首页 > 代码库 > 指定广播网络中的DR和BDR
指定广播网络中的DR和BDR
网络设置如下图所示:
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 0
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#no shutdown
R1(config-if)#exit
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface loopback 0
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R2(config-if)#no shutdown
R2(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 192.168.1.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface loopback 0
R3(config-if)#ip address 3.3.3.3 255.255.255.255
R3(config-if)#no shutdown
R3(config-if)#exit
R4(config)#interface fastEthernet 0/0
R4(config-if)#ip add 192.168.1.4 255.255.255.0
R4(config-if)#no shut
R4(config-if)#exit
R4(config)#interface loopback 0
R4(config-if)#ip address 4.4.4.4 255.255.255.255
R4(config-if)#no shutdown
R4(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 192.168.1.1 0.0.0.255 area 0
R1(config-router)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip ospf priority 10
R1(config-if)#no shutdown
R1(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0
R2(config-router)#network 192.168.1.2 0.0.0.255 area 0
R2(config-router)#exit
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip ospf priority 5
R2(config-if)#no shutdown
R2(config-if)#exit
R3(config)#router ospf 1
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0
R3(config-router)#network 192.168.1.3 0.0.0.255 area 0
R3(config-router)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip ospf priority 0
R3(config-if)#no shutdown
R3(config-if)#exit
R4(config)#router ospf 1
R4(config-router)#network 4.4.4.4 0.0.0.0 area 0
R4(config-router)#network 192.168.1.4 0.0.0.255 area 0
R4(config-router)#exit
R4(config)#interface fastEthernet 0/0
R4(config-if)#ip ospf priority 0
R4(config-if)#no shutdown
R4(config-if)#exit
R1(config)#do show ip route
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 192.168.1.2, 00:00:51, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/2] via 192.168.1.3, 00:00:51, FastEthernet0/0
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/2] via 192.168.1.4, 00:00:51, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R1#show ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 5 FULL/BDR 00:00:35 192.168.1.2 FastEthernet0/0
3.3.3.3 0 FULL/DROTHER 00:00:31 192.168.1.3 FastEthernet0/0
4.4.4.4 0 FULL/DROTHER 00:00:39 192.168.1.4 FastEthernet0/0
本文出自 “阿宇” 博客,请务必保留此出处http://xiaoayu.blog.51cto.com/12001978/1852948
指定广播网络中的DR和BDR