OSPF路由协议——OSPF多区域原理和配置

时间:2025-03-08 14:40:23
配置命令
R2
en
conf t
int f0/0 
ip add 10.0.0.1 255.255.255.252
no sh
int f0/1
ip add 172.16.0.1 255.255.255.0
no sh
exit
router ospf 1
router-id 1.1.1.1
network 10.0.0.0 0.0.0.3 area 2
network 172.16.0.0 0.0.0.255 area 2
R4
en
conf t
int f0/0
ip add 10.0.0.2 255.255.255.252
no sh
int f0/1
ip add 10.0.0.5 255.255.255.0
no sh
 int f1/0
ip add 10.0.0.9 255.255.255.252
no sh
exit
router ospf 1
router-id 2.2.2.2
network 10.0.0.4 0.0.0.3 area 0
network 10.0.0.8 0.0.0.3 area 0
network 10.0.0.0 0.0.0.3 area 2
R9
en
conf t
int f0/0
ip add 10.0.0.6 255.255.255.252
no sh
int f1/0
ip add 10.0.0.17 255.255.255.252
no sh
int f0/1
ip add 10.0.0.13 255.255.255.252
no sh
exit
router ospf 1
router-id 3.3.3.3
network 10.0.0.16 0.0.0.3 area 10
network 10.0.0.12 0.0.0.3 area 0
network 10.0.0.4 0.0.0.3 area 0
 R11
en
conf t
int f0/0
ip add 10.0.0.10 255.255.255.252
no sh
int f0/1
ip add 10.0.0.14 255.255.255.252
no ah
int f1/0
ip add 192.168.100.1 255.255.255.0
no sh
exit
router ospf 1
router-id 4.4.4.4
network 192.168.100.0 0.0.0.255 area 0
network 10.0.0.12 0.0.0.3 area 0
nerwork 10.0.0.8 0.0.0.3 area 0
R10
en
conf t
int f0/0
ip add 10.0.0.18 255.255.255.252
no sh
int f0/1
ip add 172.16.1.1 255.255.255.0
no sh
exit
router ospf 1
router-id 5.5.5.5
network 172.16.1.0 0.0.0.255 area 10
network 10.0.0.16 0.0.0.3 area 10
查看路由表命令
show ip router
末梢配置
R9
conf t
router ospf 1
area 10 stub
R10
conf t
router ospf 1
area 10 stub