1、OSPF网络类型及NBMA五种类型配置配置一个基本的帧中继环境:中间的帧中继已经配置好了R1(config)#interface s0/0R1(config-if)#no shutdown R1(config-if)#encapsulation frame-relay R1(config-if)#ip address 10.0.0.1 255.255.255.0R1(config-if)#no frame-relay inverse-arp R1(config-if)#no arp frame-relay R1(config-if)#frame-relay map ip 10.0.0.2 10
2、2 broadcast R1(config-if)#frame-relay map ip 10.0.0.3 103 broadcastR1(config-if)#exitR2#sh run int s0/0Building configuration.Current configuration : 223 bytes!interface Serial0/0 ip address 10.0.0.2 255.255.255.0 encapsulation frame-relay no arp frame-relay frame-relay map ip 10.0.0.3 203 broadcast
3、 frame-relay map ip 10.0.0.1 201 broadcast no frame-relay inverse-arpendR3#sh run int s0/0Building configuration.Current configuration : 223 bytes!interface Serial0/0 ip address 10.0.0.3 255.255.255.0 encapsulation frame-relay no arp frame-relay frame-relay map ip 10.0.0.2 302 broadcast frame-relay
4、map ip 10.0.0.1 301 broadcast no frame-relay inverse-arpen帧中继子接口:R1(config)#interface s0/0R1(config-if)#no shutdown R1(config-if)#encapsulation frame-relay R1(config-if)#exitR1(config)#interface s0/0.1 point-to-point R1(config-subif)#R1(config-subif)#ip address 10.0.0.1 255.255.255.0R1(config-subif)
5、#frame-relay interface-dlci 102R1(config-fr-dlci)#exitR1(config)#interface s0/0.2 point-to-point R1(config-subif)#ip add 20.0.0.1 255.255.255.0R1(config-subif)#frame-relay interface-dlci 103R1(config-fr-dlci)#exitR1#sh ip int brief Interface IP-Address OK? Method Status ProtocolFastEthernet0/0 unass
6、igned YES unset administratively down down Serial0/0 unassigned YES TFTP up up Serial0/0.1 10.0.0.1 YES manual up up Serial0/0.2 20.0.0.1 YES manual up up FastEthernet0/1 unassigned YES unset administratively down down Serial0/1 unassigned YES unset administratively down down R3#sh run int s0/0Build
7、ing configuration.Current configuration : 180 bytes!interface Serial0/0 ip address 20.0.0.3 255.255.255.0 encapsulation frame-relay no arp frame-relay frame-relay map ip 20.0.0.1 301 broadcast no frame-relay inverse-arpend帧中继的多点子接口:R1(config)#interface s0/0R1(config-if)#encapsulation frame-relay R1(
8、config-if)#no shutdown R1(config-if)#exitR1(config)#interface s0/0.1 multipoint R1(config-subif)#R1(config-subif)#ip address 10.0.0.1 255.255.255.0R1(config-subif)#frame-relay map ip 10.0.0.2 102 broadcast R1(config-subif)#frame-relay map ip 10.0.0.3 103 broadcast R1(config-subif)#R1(config-subif)#e
9、xitR3#sh run int Building configuration.Current configuration : 223 bytes!interface Serial0/0 ip address 10.0.0.3 255.255.255.0 encapsulation frame-relay no arp frame-relay frame-relay map ip 10.0.0.2 302 broadcast frame-relay map ip 10.0.0.1 301 broadcast noOSPF的NBMA:非广播网络方式可以当成一个广播网来看,不具备自动发现邻居的能力
10、,需要手动指定邻居该类网络需要DR。可以手动指定DR,修改其他设备接口的优先级为0适用于全互联网络R1:interface Loopback0 ip address 1.1.1.1 255.255.255.0!interface Serial0/0 ip address 10.0.0.1 255.255.255.0 encapsulation frame-relay no arp frame-relay frame-relay map ip 10.0.0.3 103 broadcast frame-relay map ip 10.0.0.2 102 broadcast no frame-rel
11、ay inverse-arp!R1(config)#router ospf 1R1(config-router)#network 10.0.0.0 0.0.0.255 aR1(config-router)#network 10.0.0.0 0.0.0.255 area 0R1(config-router)#network 1.1.1.0 0.0.0.255 area 0 R1(config-router)#neighbor 10.0.0.2 priority 0R1(config-router)#neighbor 10.0.0.3 priority 0R1(config-router)#exi
12、tR1#show ip ospf interface s0/0Serial0/0 is up, line protocol is up Internet Address 10.0.0.1/24, Area 0 Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 64 Transmit Delay is 1 sec, State WAITING, Priority 1 No designated router on this network No backup designated router on this n
13、etwork Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 120 Hello due in 00:00:17 Wait time before Designated router selection 00:01:17 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 1/1, flood queue
14、 length 0 Next 0x0(0)/0x0(0) Last flood scan length is 0, maximum is 0 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 0, Adjacent neighbor count is 0 Suppress hello for 0 neighbor(s)R2:interface Loopback0 ip address 2.2.2.2 255.255.255.0interface Serial0/0 ip address 10.0.0.2 25
15、5.255.255.0 encapsulation frame-relay ip ospf priority 0 no arp frame-relay frame-relay map ip 10.0.0.3 203 broadcast frame-relay map ip 10.0.0.1 201 broadcast no frame-relay inverse-arprouter ospf 1 log-adjacency-changes network 2.2.2.0 0.0.0.255 area 0 network 10.0.0.0 0.0.0.255 area 0R3:interface
16、 Loopback0 ip address 3.3.3.3 255.255.255.0interface Serial0/0 ip address 10.0.0.3 255.255.255.0 encapsulation frame-relay ip ospf priority 0 no arp frame-relay frame-relay map ip 10.0.0.2 302 broadcast frame-relay map ip 10.0.0.1 301 broadcast no frame-relay inverse-arprouter ospf 1 log-adjacency-c
17、hanges network 3.3.3.0 0.0.0.255 area 0 network 10.0.0.0 0.0.0.255 area 0R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface2.2.2.2 0 FULL/DROTHER 00:01:51 10.0.0.2 Serial0/03.3.3.3 0 FULL/DROTHER 00:01:33 10.0.0.3 Serial0/0R1#sh ip route ospf 2.0.0.0/32 is subnetted, 1 subnet
18、sO 2.2.2.2 110/65 via 10.0.0.2, 00:02:15, Serial0/0 3.0.0.0/32 is subnetted, 1 subnetsO 3.3.3.3 110/65 via 10.0.0.3, 00:01:33, Serial0/0NBMA环境下点到点子接口:不需要DR的选举,可以自动发现邻居,不需要手工指定邻居。需要注意,对端设备如果使用物理接口,需要增加配置ip ospf network point-to-pointR1:interface Loopback0 ip address 1.1.1.1 255.255.255.0interface Ser
19、ial0/0 no ip address encapsulation frame-relay!interface Serial0/0.1 point-to-point ip address 10.0.0.1 255.255.255.0 frame-relay interface-dlci 102 !interface Serial0/0.2 point-to-point ip address 20.0.0.1 255.255.255.0 frame-relay interface-dlci 103 router ospf 1 log-adjacency-changes network 1.1.
20、1.0 0.0.0.255 area 0 network 10.0.0.0 0.0.0.255 area 0 network 20.0.0.0 0.0.0.255 area 0R1#show ip ospf interface s0/0.1Serial0/0.1 is up, line protocol is up Internet Address 10.0.0.1/24, Area 0 Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 64 Transmit Delay is 1 sec, State PO
21、INT_TO_POINT Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:06 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 1/1, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length
22、 is 0, maximum is 0 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 0, Adjacent neighbor count is 0 Suppress hello for 0 neighbor(s)R2:interface Loopback0 ip address 2.2.2.2 255.255.255.0interface Serial0/0 ip address 10.0.0.2 255.255.255.0 encapsulation frame-relay ip ospf prior
23、ity 0 no arp frame-relay frame-relay map ip 10.0.0.3 203 broadcast frame-relay map ip 10.0.0.1 201 broadcast no frame-relay inverse-arpip ospf network point-to-pointrouter ospf 1 log-adjacency-changes network 2.2.2.0 0.0.0.255 area 0 network 10.0.0.0 0.0.0.255 area 0R3:interface Loopback0 ip address
24、 3.3.3.3 255.255.255.0interface Serial0/0 ip address 20.0.0.3 255.255.255.0 encapsulation frame-relay ip ospf network point-to-point ip ospf priority 0 no arp frame-relay frame-relay map ip 20.0.0.1 301 broadcast no frame-relay inverse-arp!router ospf 1 log-adjacency-changes network 3.3.3.0 0.0.0.25
25、5 area 0 network 20.0.0.0 0.0.0.255 area 0R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface3.3.3.3 0 FULL/ - 00:00:36 20.0.0.3 Serial0/0.22.2.2.2 0 FULL/ - 00:00:39 10.0.0.2 Serial0/0.1R1#sh ip route ospf 2.0.0.0/32 is subnetted, 1 subnetsO 2.2.2.2 110/65 via 10.0.0.2, 00:02
26、:35, Serial0/0.1 3.0.0.0/32 is subnetted, 1 subnetsO 3.3.3.3 110/65 via 20.0.0.3, 00:01:58, Serial0/0.2NBMA环境下多点子接口:星型网络,非全互联需要DR,需要手工指定邻居。R1:interface Loopback0 ip address 1.1.1.1 255.255.255.0endinterface Serial0/0 no ip address encapsulation frame-relayinterface Serial0/0.1 multipoint ip address
27、10.0.0.1 255.255.255.0 frame-relay map ip 10.0.0.3 103 broadcast frame-relay map ip 10.0.0.2 102 broadcastrouter ospf 1 log-adjacency-changes network 1.1.1.0 0.0.0.255 area 0 network 10.0.0.0 0.0.0.255 area 0 neighbor 10.0.0.2 neighbor 10.0.0.3R1#show ip ospf interface s0/0.1Serial0/0.1 is up, line
28、protocol is up Internet Address 10.0.0.1/24, Area 0 Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 64 Transmit Delay is 1 sec, State DR, Priority 1 Designated Router (ID) 1.1.1.1, Interface address 10.0.0.1 No backup designated router on this network Timer intervals configured, H
29、ello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 120 Hello due in 00:00:21 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 1/1, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 0, maximum is 0 Last flood scan tim
30、e is 0 msec, maximum is 0 msec Neighbor Count is 0, Adjacent neighbor count is 0 Suppress hello for 0 neighbor(s)R2:interface Serial0/0 ip address 10.0.0.2 255.255.255.0 encapsulation frame-relay ip ospf network non-broadcast ip ospf priority 0 no arp frame-relay frame-relay map ip 10.0.0.3 203 broa
31、dcast frame-relay map ip 10.0.0.1 201 broadcast no frame-relay inverse-arpinterface Loopback0 ip address 2.2.2.2 255.255.255.0endrouter ospf 1 log-adjacency-changes network 2.2.2.0 0.0.0.255 area 0 network 10.0.0.0 0.0.0.255 area 0R2#R3:interface Loopback0 ip address 3.3.3.3 255.255.255.0endinterface Serial0/0 ip address 10.0.0