實驗拓撲: 實驗步驟:配置FR幀中繼:FR(config)#frame-relay switching FR(config)#inFR(config)#interface s1/2FR(config-if)#encapsulation frame-relay FR(config-if)#frame-relay intf-type dceFR(config-if)#FR(config-if)#FR(config-if)#frame-relay route 102 interface s1/3 201FR(config-if)#00:04:22: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/2, changed state to downFR(config-if)#exitFR(config)#inFR(config)#interface s1/3FR(config-if)#no shuFR(config-if)#encapsulation frame-relay FR(config-if)#frame-relay intf-type dceFR(config-if)#frame-relay route 201 interface s1/2 102FR(config-if)#exit00:05:35: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/3, changed state to downFR(config)#?R2和R3的配置:R2(config)#interface s1/2R2(config-if)#no shu00:07:02: %LINK-3-UPDOWN: Interface Serial1/2, changed state to up00:07:03: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/2, changed state to upR2(config-if)#ip add 21.1.1.1 255.255.255.0R2(config-if)#R2(config-if)#encapsulation frame-relay R2(config-if)#no frame-relay inverse-arpR2(config-if)#frame-relay map ip 21.1.1.2 102 bR2(config-if)#exitR2(config)#inR2(config)#interface lo0R2(config-if)#ip add 2.2.2.2 255.255.255.0R2(config-if)#exitR2(config)#R2(config)#router os 100R2(config-router)#router??? R2(config-router)#router-id 2.2.2.2R2(config-router)#net 21.1.1.0 0.0.0.255 a 8R2(config-router)#netR2(config-router)#network 2.2.2.0 0.0.0.255 a 8R2(config-router)#exit??R3(config)#interface s1/3R3(config-if)#no shuR3(config-if)#R3(config-if)#ip add 21.1.1.2 255.255.255.0R3(config-if)#00:08:32: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/3, changed state to downR3(config-if)#encapsulation frame-relay R3(config-if)#no frame-relay inverse-arpR3(config-if)#frame-relay map ip 21.1.1.1 201 bR3(config-if)#exitR3(config)#interface lo0R3(config-if)#ip add 3.3.3.3 255.255.255.0R3(config-if)#exitR3(config)#router os 100R3(config-router)#router R3(config-router)#router-id 3.3.3.3R3(config-router)#net 3.3.3.0 0.0.0.255 a 8R3(config-router)#net 21.1.1.0 0.0.0.255 a 8 R3(config-router)#exit?第一種默認為:Non_Broadcast 在R2上show ip ospf neighbor,發現沒有鄰居。說明在這種情況下鄰居需要手動配置!配置如下: R2(config)#router os 100R2(config-router)#ne R2(config-router)#neiR2(config-router)#neighbor 21.1.1.2R2(config-router)#exit??R3(config)#router os 100R3(config-router)#neiR3(config-router)#neighbor 21.1.1.100:18:02: %OSPF-5-ADJCHG: Process 100, Nbr 2.2.2.2 on Serial1/3 from LOADING to FULL, Loading DoneR3(config-router)#neighbor 21.1.1.1R3(config-router)#exit
發現有DR和BDR的選舉,DR為R3
R3(config)#R3(config)#exit?R2#show ip ospf nei?Neighbor ID???? Pri?? State?????????? Dead Time?? Address???????? Interface3.3.3.3?? ????????1??FULL/DR????????00:01:49??? 21.1.1.2??????? Serial1/2??R2#show ip ospf interfaceLoopback0 is up, line protocol is up ?Internet Address 2.2.2.2/24, Area 8
?
默認情況
?Process ID 100, Router ID 2.2.2.2, Network Type LOOPBACK, Cost: 1?Loopback interface is treated as a stub HostSerial1/2 is up, line protocol is up ?Internet Address 21.1.1.1/24, Area 8 ?Process ID 100, Router ID 2.2.2.2, Network Type NON_BROADCAST, Cost: 64?Transmit Delay is 1 sec, State BDR, Priority 1 ?Designated Router (ID) 3.3.3.3, Interface address 21.1.1.2?Backup Designated router (ID) 2.2.2.2, Interface address 21.1.1.1?Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5??? Hello due in 00:00:04?Index 1/1, flood queue length 0?Next 0x0(0)/0x0(0)?Last flood scan length is 1, maximum is 1?Last flood scan time is 0 msec, maximum is 0 msec?Neighbor Count is 1, Adjacent neighbor count is 1 ??? Adjacent with neighbor 3.3.3.3?(Designated Router)?Suppress hello for 0 neighbor(s)?第二種Point-to-Multipoint(Non_Broadcast) 在R2和R3上修改類型:R2(config)#interface s1/2R2(config-if)#ip ospf network point-to-multipoint non-broadcast?R3(config)#interface s1/3R3(config-if)#ip ospf network point-to-multipoint non-broadcast
?R2#show ip ospf nei
Neighbor ID???? Pri?? State?????????? Dead Time?? Address???????? Interface
3.3.3.3?????????? 1?? FULL/?-??????? 00:01:45??? 21.1.1.2??????? Serial1/2?這種類型也需手動指定鄰居,但沒有DR和BDR的選舉R2#show ip ospf interface Serial1/2 is up, line protocol is up ??Internet Address 21.1.1.1/24, Area 8 ?Process ID 100, Router ID 2.2.2.2, Network Type POINT_TO_MULTIPOINT, Cost: 64?Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,?Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5??? Hello due in 00:00:00?Index 1/1, flood queue length 0?Next 0x0(0)/0x0(0)?Last flood scan length is 1, maximum is 1?Last flood scan time is 0 msec, maximum is 0 msec?Neighbor Count is 1, Adjacent neighbor count is 1 ??? Adjacent with neighbor 3.3.3.3?Suppress hello for 0 neighbor(s)Loopback0 is up, line protocol is up ?Internet Address 2.2.2.2/24, Area 8 ?Process ID 100, Router ID 2.2.2.2, Network Type LOOPBACK, Cost: 1?Loopback interface is treated as a stub Host?第三種廣播(broadcast)?刪除R2和R3上的鄰居,并修改網絡類型為broadcast R2(config)#router ospf 100
說明廣播型不要手動指定鄰居,會自動學習。
R2(config-router)#no neighbor 21.1.1.2R2(config)#interface s1/2R2(config-if)#ip ospf network broadcast R2(config)#R2(config)#00:48:26: %OSPF-5-ADJCHG: Process 100, Nbr 3.3.3.3 on Serial1/2 from LOADING to FULL, Loading DoneR2(config)#?R3(config)#router ospf 100R3(config-router)#no neighbor 21.1.1.1R3(config-router)#exitR3(config)#interface s1/3R3(config-if)#ip ospf network broadcast R3(config-if)#00:45:56: %OSPF-5-ADJCHG: Process 100, Nbr 2.2.2.2 on Serial1/3 from LOADING to FULL, Loading Done?R2#show ip ospf nei?Neighbor ID???? Pri?? State?????????? Dead Time?? Address???????? Interface3.3.3.3 ??????????1??FULL/BDR??????? 00:00:33??? 21.1.1.2??????? Serial1/2
有DR和BDR的選舉
?R2#show ip ospf inR2#show ip ospf interface Serial1/2 is up, line protocol is up ?Internet Address 21.1.1.1/24, Area 8 ?Process ID 100, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 64??Transmit Delay is 1 sec, State DR, Priority 1 ?Designated Router (ID) 2.2.2.2, Interface address 21.1.1.1?Backup Designated router (ID) 3.3.3.3, Interface address 21.1.1.2?Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5??? Hello due in 00:00:00?Index 1/1, flood queue length 0?Next 0x0(0)/0x0(0)?Last flood scan length is 1, maximum is 1?Last flood scan time is 0 msec, maximum is 0 msec?Neighbor Count is 1, Adjacent neighbor count is 1 ??? Adjacent with neighbor 3.3.3.3?(Backup Designated Router)?Suppress hello for 0 neighbor(s)Loopback0 is up, line protocol is up ?Internet Address 2.2.2.2/24, Area 8 ?Process ID 100, Router ID 2.2.2.2, Network Type LOOPBACK, Cost: 1?Loopback interface is treated as a stub Host?第四種Point-to-Point 在R2和R3上修改網絡類型為Point-to-Point R3(config)#interface s1/3R3(config-if)#ip ospf network point-to-p?R2(config)#interface s1/2R2(config-if)#ip ospf network point-to-point?查看R2#show ip ospf nei?Neighbor ID???? Pri ??State?????????? Dead Time?? Address???????? Interface
說明這種類型不需要手動指定鄰居,但沒有DR和BDR的選舉
3.3.3.3?????????? 1?? FULL/?-??????? 00:00:38??? 21.1.1.2??????? Serial1/2R2#show ip ospf inR2#show ip ospf interface Serial1/2 is up, line protocol is up ?Internet Address 21.1.1.1/24, Area 8 ?Process ID 100, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 64?Transmit Delay is 1 sec, State POINT_TO_POINT,?Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5??? Hello due in 00:00:01?Index 1/1, flood queue length 0?Next 0x0(0)/0x0(0)?Last flood scan length is 1, maximum is 1?Last flood scan time is 0 msec, maximum is 0 msec?Neighbor Count is 1, Adjacent neighbor count is 1 ??? Adjacent with neighbor 3.3.3.3?Suppress hello for 0 neighbor(s)Loopback0 is up, line protocol is up ?Internet Address 2.2.2.2/24, Area 8 ?Process ID 100, Router ID 2.2.2.2, Network Type LOOPBACK, Cost: 1?Loopback interface is treated as a stub Host?第五種Point-to-Multipoint 在R2和R3上修改網絡類型為Point-to-Multipoint R2(config)#interface s1/2R2(config-if)#ip ospf network point-to-multipoint R2(config-if)#R2(config-if)#01:08:23: %OSPF-5-ADJCHG: Process 100, Nbr 3.3.3.3 on Serial1/2 from LOADING to FULL, Loading Done?
說明不需手動指定鄰居。
R3(config)#interface s1/3R3(config-if)#ip ospf network point-to-multipoint R3(config-if)#R3(config-if)#01:05:52: %OSPF-5-ADJCHG: Process 100, Nbr 2.2.2.2 on Serial1/3 from LOADING to FULL, Loading Done、?
沒有DR 和BDR的選舉
R2上查看R2#show ip ospf nei?Neighbor ID???? Pri?? State?????????? Dead Time?? Address???????? Interface3.3.3.3?????????? 1?? FULL/?-??????? 00:01:35??? 21.1.1.2??????? Serial1/2R2#show ip ospf inR2#show ip ospf interface Serial1/2 is up, line protocol is up ?Internet Address 21.1.1.1/24, Area 8 ?Process ID 100, Router ID 2.2.2.2, Network Type POINT_TO_MULTIPOINT, Cost: 64?Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,?Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5??? Hello due in 00:00:25?Index 1/1, flood queue length 0?Next 0x0(0)/0x0(0)?Last flood scan length is 1, maximum is 1?Last flood scan time is 0 msec, maximum is 0 msec?Neighbor Count is 1, Adjacent neighbor count is 1 ??? Adjacent with neighbor 3.3.3.3?Suppress hello for 0 neighbor(s)Loopback0 is up, line protocol is up ?Internet Address 2.2.2.2/24, Area 8 ?Process ID 100, Router ID 2.2.2.2, Network Type LOOPBACK, Cost: 1?Loopback interface is treated as a stub Host