CCNP-9 OSPF试验5(BSCI)

本文介绍了在NBMA网络环境中,使用点对多点子接口配置OSPF的过程及注意事项。重点在于不同接口类型间的邻居关系建立,以及如何通过调整网络类型实现自动邻居建立。
试验拓扑:

试验要求:R1 R2 R3通过FR相连,形成hub and spoke网络拓扑,R1hub路由器,R2 R3spoke路由器,R1采用点对多点子接口,R2 用物理接口,R3用点对点子接口,全部起OSPF
试验目的:一是掌握NBMA部分网格环境下,采用点对点子接口时,OSPF的配置方法,二是掌握不同接口类型是否可以成功建立邻居关系。

实验配置:
R1
R1(config)#int s1/0
R1(config-if)#enca frame-relay
R1(config-if)#no shu
R1(config-if)#exit
R1(config)#int s1/0.1 multipoint
R1(config-subif)#ip add 199.99.1.1 255.255.255.0
R1(config-subif)#frame-relay map ip 199.99.1.2 301 broadcast
R1(config-subif)#frame-relay map ip 199.99.1.3 302 broadcast
 
R2
R2(config)#int s1/0
R2(config-if)#enca frame-relay
R2(config-if)#ip add 199.99.1.2 255.255.255.0
R2(config-if)#no frame-relay inverse-arp
R2(config-if)#frame-relay map ip 199.99.1.1 103 broadcast
R2(config-if)#frame-relay map ip 199.99.1.2 103 broadcast
R2(config-if)#frame-relay map ip 199.99.1.3 103 broadcast
 
R3
R3(config)#int s1/0
R3(config-if)#enca frame-relay
R3(config-if)#no shu
R3(config-if)#exit
R3(config)#int s1/0.1 point-to-point
R3(config-subif)#ip add 199.99.1.3 255.255.255.0
R3(config-subif)#frame-relay interface-dlci 203
 
基本的链路层配置完成,先验证连通性:
R1#ping 199.99.1.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 199.99.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/204/356 ms
 
R1#ping 199.99.1.3
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 199.99.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/191/216 ms
 
好了,连路都是通的,下面开始OSPF的配置:
R1(config)#int loop0
R1(config-if)#ip add 100.100.100.100 255.255.255.0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#exit
R1(config)#router ospf 100
R1(config-router)#router-id 100.100.100.100
R1(config-router)#network 0.0.0.0 255.255.255.255 area 0
 
R2(config)#int loop0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#ip ospf network point-to-point
R2(config-if)#exit
R2(config)#router ospf 100                      
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 0.0.0.0 255.255.255.255 area 0
 
R3(config)#int loop0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#ip ospf network point-to-point
R3(config-if)#exit
R3(config)#router ospf 100
R3(config-router)#router-id 3.3.3.3 
R3(config-router)#network 0.0.0.0 255.255.255.255 area 0
 
配置完成后,用show ip ospf interface查看接口OSPF配置:
R1#show ip ospf interface
Loopback0 is up, line protocol is up
  Internet Address 100.100.100.100/24, Area 0
  Process ID 100, Router ID 100.100.100.100, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue 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)
Serial1/0.1 is up, line protocol is up
  Internet Address 199.99.1.1/24, Area 0
  Process ID 100, Router ID 100.100.100.100, 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 network
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:02
    Wait time before Designated router selection 00:01:02
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue 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#show ip ospf interface
Loopback0 is up, line protocol is up
  Internet Address 2.2.2.2/24, Area 0
  Process ID 100, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue 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)
Serial1/0 is up, line protocol is up
  Internet Address 199.99.1.2/24, Area 0
  Process ID 100, Router ID 2.2.2.2, 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 network
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:11
    Wait time before Designated router selection 00:01:11
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue 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)
 
R3#show ip ospf interface
Loopback0 is up, line protocol is up
  Internet Address 3.3.3.3/24, Area 0
  Process ID 100, Router ID 3.3.3.3, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue 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)
Serial1/0.1 is up, line protocol is up
  Internet Address 199.99.1.3/24, Area 0
  Process ID 100, Router ID 3.3.3.3, 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
    oob-resync timeout 40
    Hello due in 00:00:02
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue 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)
 
注意用红色标记的部分:R1接口的网络类型为NON_BROADCASTR2NON_BROADCASTR3POINT_TO_POINT。然后查看邻居表会发现无法建立邻居关系。Debug信息会显示接口类型不匹配,所以无法建立邻居关系,下面手动修改接口网络类型为POINT_TO_MULTIPOINT
R1(config)#int s1/0.1 multipoint
R1(config-subif)#ip ospf network point-to-multipoint
 
R2(config)#int s1/0
R2(config-if)#ip ospf network point-to-multipoint
 
R3(config)#int s1/0.1 point-to-point
R3(config-subif)#ip ospf network point-to-multipoint
 
这样修改完成后,再用show ip ospf interface命令查看接口网络类型:
R1#show ip ospf interface
Serial1/0.1 is up, line protocol is up
  Internet Address 199.99.1.1/24, Area 0
  Process ID 100, Router ID 100.100.100.100, 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
    oob-resync timeout 120
    Hello due in 00:00:10
  Supports Link-local Signaling (LLS)
  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 2, 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 100.100.100.100/24, Area 0
  Process ID 100, Router ID 100.100.100.100, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue 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#show ip ospf interface
Serial1/0 is up, line protocol is up
  Internet Address 199.99.1.2/24, Area 0
  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
    oob-resync timeout 120
    Hello due in 00:00:12
  Supports Link-local Signaling (LLS)
  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 100.100.100.100
  Suppress hello for 0 neighbor(s)
Loopback0 is up, line protocol is up
  Internet Address 2.2.2.2/24, Area 0
  Process ID 100, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue 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)
 
R3#show ip ospf interface
Serial1/0.1 is up, line protocol is up
  Internet Address 199.99.1.3/24, Area 0
  Process ID 100, Router ID 3.3.3.3, 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
    oob-resync timeout 120
    Hello due in 00:00:15
  Supports Link-local Signaling (LLS)
  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 4 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 100.100.100.100
  Suppress hello for 0 neighbor(s)
Loopback0 is up, line protocol is up
  Internet Address 3.3.3.3/24, Area 0
  Process ID 100, Router ID 3.3.3.3, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue 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)
 
上面用红颜色标记的部分不仅显示了接口的网络类型为POINT_TO_MULTIPOINT,还显示了默认的HELLO时间间隔为30秒,等待时间和死亡时间为HELLO时间间隔的4120,然后在用show ip ospf neighbor查看邻居关系:
R1#show ip ospf neighbor
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           0   FULL/  -        00:01:59    199.99.1.3      Serial1/0.1
2.2.2.2           0   FULL/  -        00:01:57    199.99.1.2      Serial1/0.1
 
R2#show ip ospf neighbor
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
100.100.100.100   0   FULL/  -        00:01:58    199.99.1.1      Serial1/0
 
R3#show ip ospf neighbor
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
100.100.100.100   0   FULL/  -        00:01:50    199.99.1.1      Serial1/0.1
 
邻居关系自动建立,并且不需要选举DR/BDRsopke路由器只和hub路由器建立邻居关系,最后查看一下每台路由器的路由表:
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
     100.0.0.0/24 is subnetted, 1 subnets
C       100.100.100.0 is directly connected, Loopback0
     3.0.0.0/24 is subnetted, 1 subnets
O       3.3.3.0 [110/65] via 199.99.1.3, 00:00:10, Serial1/0.1
     199.99.1.0/24 is variably subnetted, 2 subnets, 2 masks
C       199.99.1.0/24 is directly connected, Serial1/0.1
O       199.99.1.3/32 [110/64] via 199.99.1.3, 00:00:10, Serial1/0.1
 
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     100.0.0.0/24 is subnetted, 1 subnets
O       100.100.100.0 [110/65] via 199.99.1.1, 00:00:05, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
O       3.3.3.0 [110/129] via 199.99.1.1, 00:00:05, Serial1/0
     199.99.1.0/24 is variably subnetted, 3 subnets, 2 masks
O       199.99.1.1/32 [110/64] via 199.99.1.1, 00:00:05, Serial1/0
C       199.99.1.0/24 is directly connected, Serial1/0
O       199.99.1.3/32 [110/128] via 199.99.1.1, 00:00:05, Serial1/0
 
R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
     2.0.0.0/24 is subnetted, 1 subnets
O       2.2.2.0 [110/129] via 199.99.1.1, 00:00:10, Serial1/0.1
     100.0.0.0/24 is subnetted, 1 subnets
O       100.100.100.0 [110/65] via 199.99.1.1, 00:00:10, Serial1/0.1
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     199.99.1.0/24 is variably subnetted, 3 subnets, 2 masks
O       199.99.1.1/32 [110/64] via 199.99.1.1, 00:00:11, Serial1/0.1
C       199.99.1.0/24 is directly connected, Serial1/0.1
O       199.99.1.2/32 [110/128] via 199.99.1.1, 00:00:11, Serial1/0.1
 
OK,发现每台路由器里都学到了“O”路由。并且通过OSPF学到的接口地址是32位的主机路由。

实验总结:掌握在NBMA模式下,采用点对多点子接口的时候OSPF路由协议的配置,并且邻居关系是自动建立,无需手动指定邻居,无DR/BDR选举,默认的HELLO时间间隔为30秒,等待时间和死亡时间为HELLO时间间隔的4倍,120秒。还有就是接口地址是以32位主机路由的方式泛洪出去的。






















本文转自loveme2351CTO博客,原文链接:http://blog.51cto.com/loveme23/46307 ,如需转载请自行联系原作者


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值