# OSPF的网络5种接口类型,适应不同拓扑结构 IOU4(config-if)#ip ospf network ? broadcast Specify OSPF broadcast multi-access network non-broadcast Specify OSPF NBMA network point-to-multipoint Specify OSPF point-to-multipoint network point-to-point Specify OSPF point-to-point network IOU4(config-if)#ip ospf network point-to-multipoint ? non-broadcast Specify non-broadcast point-to-mpoint network 网络接口类型 二层封装 Hello/Dead DR/BDR 主动Hello /32主机路由 P2P PPP/HDLC/FR-P2Psub 10/40 N Y N Broadcast ETH/FDDI 10/40 Y N N NBMA FR/ATM/X.25 30/120 Y N N P2mp hub/spoke 30/120 N Y Y P2mp nb(思科)hub/spoke 30/120 N N Y # 帧中继配置需要配置frame-relay map ip broadcast,可以选择是否接收broadcast; # 所以NBMA网络中ospf为单播报文,配置neighbor命令,邻居状态为ATTEMPT # DR只能配置在hub,spoke配置priority为0; IOU4#sh run | b r o router ospf 1 router-id 4.4.4.4 network 10.1.4.4 0.0.0.0 area 0 network 10.1.45.0 0.0.0.255 area 1 network 10.1.234.0 0.0.0.255 area 0 neighbor 10.1.234.3 neighbor 10.1.234.2 IOU4#sh ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface N/A 0 ATTEMPT/DROTHER 00:01:37 10.1.234.2 Serial2/0 N/A 0 ATTEMPT/DROTHER 00:01:43 10.1.234.3 Serial2/0 5.5.5.5 0 FULL/ - 00:00:36 10.1.45.5 Serial2/1 IOU4#sh ip ospf int s2/0 Serial2/0 is up, line protocol is up Internet Address 10.1.234.4/24, Area 0, Attached via Network Statement Process ID 1, Router ID 4.4.4.4, Network Type NON_BROADCAST, Cost: 64 Topology-MTID Cost Disabled Shutdown Topology Name 0 64 no no Base Transmit Delay is 1 sec, State DR, Priority 1 Designated Router (ID) 4.4.4.4, Interface address 10.1.234.4 Backup Designated router (ID) 3.3.3.3, Interface address 10.1.234.3 Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 120 Hello due in 00:00:10 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 1/2, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 0, maximum is 5 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 2, Adjacent neighbor count is 2 Adjacent with neighbor 2.2.2.2 Adjacent with neighbor 3.3.3.3 (Backup Designated Router) Suppress hello for 0 neighbor(s) # 帧中继Hub-spoke网络中 配置frame-relay map ip和OSPF协议配置量为n*n; # 配置ospf协议,POINT_TO_MULTIPOINT 类型配置量为3n,不用配置其他spoke的frame-relay,大大降低配置量; # POINT_TO_MULTIPOINT ,不需要配置neighbor,spoke的frame-relay, IOU2#sh ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 4.4.4.4 1 FULL/DR 00:01:44 10.1.234.4 Serial2/0 1.1.1.1 0 2WAY/DROTHER 00:00:33 10.1.123.1 Ethernet0/0 3.3.3.3 255 FULL/DR 00:00:32 10.1.123.3 Ethernet0/0 IOU2#sh run int s2/0 interface Serial2/0 ip address 10.1.234.2 255.255.255.0 encapsulation frame-relay ip ospf priority 0 serial restart-delay 0 frame-relay map ip 10.1.234.3 204 broadcast frame-relay map ip 10.1.234.4 204 broadcast no frame-relay inverse-arp IOU4#sh run int s2/0 interface Serial2/0 ip address 10.1.234.4 255.255.255.0 encapsulation frame-relay ip ospf network point-to-multipoint serial restart-delay 0 frame-relay map ip 10.1.234.2 402 broadcast frame-relay map ip 10.1.234.3 403 broadcast no frame-relay inverse-arp IOU3#sh run int s2/0 interface Serial2/0 ip address 10.1.234.3 255.255.255.0 encapsulation frame-relay ip ospf network point-to-multipoint serial restart-delay 0 frame-relay map ip 10.1.234.4 304 broadcast no frame-relay inverse-arp IOU2#sh ip ospf int s2/0 Serial2/0 is up, line protocol is up Internet Address 10.1.234.2/24, Area 0, Attached via Network Statement Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_MULTIPOINT, Cost: 64 Topology-MTID Cost Disabled Shutdown Topology Name 0 64 no no Base Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT #网络类型 Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 120 Hello due in 00:00:05 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 1/2, 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 4.4.4.4 Suppress hello for 0 neighbor(s) # POINT_TO_MULTIPOINT原理:改变路由下一跳地址,通过递归计算到目的地址; IOU2#sh ip ro 10.0.0.0/8 is variably subnetted, 11 subnets, 2 masks O 10.1.1.1/32 [110/11] via 10.1.123.1, 01:25:55, Ethernet0/0 C 10.1.2.0/24 is directly connected, Loopback0 L 10.1.2.2/32 is directly connected, Loopback0 O 10.1.3.3/32 [110/65] via 10.1.234.3, 00:15:56, Serial2/0 # 下一跳地址为目的spoke地址:10.1.234.3 O 10.1.4.4/32 [110/65] via 10.1.234.4, 00:16:01, Serial2/0 O IA 10.1.5.5/32 [110/129] via 10.1.234.4, 00:16:01, Serial2/0 O IA 10.1.45.0/24 [110/128] via 10.1.234.4, 00:16:01, Serial2/0 C 10.1.123.0/24 is directly connected, Ethernet0/0 L 10.1.123.2/32 is directly connected, Ethernet0/0 C 10.1.234.0/24 is directly connected, Serial2/0 L 10.1.234.2/32 is directly connected, Serial2/0 IOU2#sh ip route 10.0.0.0/8 is variably subnetted, 13 subnets, 2 masks O 10.1.1.1/32 [110/11] via 10.1.123.1, 01:46:14, Ethernet0/0 C 10.1.2.0/24 is directly connected, Loopback0 L 10.1.2.2/32 is directly connected, Loopback0 O 10.1.3.3/32 [110/129] via 10.1.234.4, 00:07:36, Serial2/0 # 下一跳地址为hub地址:10.1.234.4 O 10.1.4.4/32 [110/65] via 10.1.234.4, 00:07:36, Serial2/0 O IA 10.1.5.5/32 [110/129] via 10.1.234.4, 00:07:36, Serial2/0 O IA 10.1.45.0/24 [110/128] via 10.1.234.4, 00:07:36, Serial2/0 C 10.1.123.0/24 is directly connected, Ethernet0/0 L 10.1.123.2/32 is directly connected, Ethernet0/0 C 10.1.234.0/24 is directly connected, Serial2/0 L 10.1.234.2/32 is directly connected, Serial2/0 O 10.1.234.3/32 [110/128] via 10.1.234.4, 00:07:36, Serial2/0 O 10.1.234.4/32 [110/64] via 10.1.234.4, 00:07:36, Serial2/0
原文地址:http://f1yinsky.blog.51cto.com/12568071/1982150