![图片[1]-4.6 配置多区域OSPF-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/03/图片7-20-1024x236.png)
1.R1配置
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]network 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.1]network 12.1.1.0 0.255.255.255
2.R2配置
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 23.1.1.0 0.255.255.255
[R2-ospf-1-area-0.0.0.0]quit
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.1]network 12.1.1.0 0.255.255.255
3.R3配置
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 23.1.1.0 0.255.255.255
[R3-ospf-1-area-0.0.0.0]quit
[R3-ospf-1]area 2
[R3-ospf-1-area-0.0.0.1]network 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.1]network 34.1.1.0 0.255.255.255
4.R4配置
[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]ar
[R4-ospf-1]area 2
[R4-ospf-1-area-0.0.0.2]network 4.4.4.4 0.0.0.0
[R4-ospf-1-area-0.0.0.2]network 34.1.1.0 0.255.255.255
5.查看OSPF路由表
<R1>display ip routing-table protocol ospf
Destination/Mask Proto Pre Cost Flags NextHop Interface
2.2.2.2/32 OSPF 10 1 D 12.1.1.2 GigabitEthernet0/0/0
3.3.3.3/32 OSPF 10 2 D 12.1.1.2 GigabitEthernet0/0/0
4.4.4.4/32 OSPF 10 3 D 12.1.1.2 GigabitEthernet0/0/0
23.0.0.0/8 OSPF 10 2 D 12.1.1.2 GigabitEthernet0/0/0
34.0.0.0/8 OSPF 10 3 D 12.1.1.2 GigabitEthernet0/0/0
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容