1、新建一个拓扑
2、给路由器配置地址及其环回
AR1中
[r1-LoopBack0]ip address 192.168.1.33 27
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
开启OSPF
[r1]ospf 1 router-id 192.168.1.33
[r1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0
AR2中
[r2-LoopBack0]ip address 192.168.1.65 27
[r2-GigabitEthernet0/0/0]ip address 192.168.1.6 30
开启OSPF
[r2]ospf 1 router-id 192.168.1.65
[r2-ospf-1-area-0.0.0.0]network 192.168.1.6 0.0.0.0
AR3中
[r3-LoopBack0]ip address 192.168.1.97 27
[r3-GigabitEthernet0/0/0]ip ad 192.168.1.10 30
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
开启OSPF
[r3]ospf 1 router-id 192.168.1.97
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 192.168.1.10 0.0.0.0
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]network 192.168.1.13 0.0.0.0
AR3中只有dr没有bdr
[r3-GigabitEthernet0/0/1]ospf dr-priority 0
AR4中
[r4-LoopBack0]ip address 4.4.4.4 24
[r4-GigabitEthernet0/0/0]ip address 192.168.1.14 30
开启OSPF
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 1
[r4-ospf-1-area-0.0.0.1]network 192.168.1.14 0.0.0.0