实验十七、OSPF 在NBMA 网络的配置

一、 实验目的

1. 掌握OSPF 协议在NBMA (非广播多点可达)环境下的配置

2. 理解NBMA 环境的特殊性

二、 应用环境

在帧中继的网络中,通常一个物理接口对应多条PVC,DR 的选择非常重要,如在下图中,

要保证ROUTER-A 成为DR,才能保证OSPF 路由更新的正确

三、 实验设备

1. DCR-1751 三台

2. DCR-2630 (安装相应模块满足三个serial 接口) 一台

3. CR-V35FC 三条

4. CR-V35MT 三条

四、 实验拓扑

实验十七、OSPF 在NBMA 网络的配置_实验

五、 实验要求

ROUTER-A ROUTER-B ROUTER-C

S1/1 192.168.1.1/24 S1/0 192.168.1.2/24 S03 192.168.1.3/24

F0/0 192.168.2.1/24 F0/0 192.168.3.1/24 F0/0 192.168.4.1/24六、 实验步骤

第一步:参照实验 15,将帧中继网络配置好,并测试连通性

第二步:配置路由器A、B、C 的OSPF 协议

Router-A#conf

Router-A_config#int f0/0

Router-A_config_f0/0#ip address 192.168.2.1 255.255.255.0

Router-A_config_f0/0#exit

Router-A_config#router ospf 1

Router-A_config_ospf_1#network 192.169.1.0 255.255.255.0 area 0

Router-A_config_ospf_1#network 192.169.2.0 255.255.255.0 area 0

Router-B#conf

Router-B_config#int f0/0

Router-B_config_f0/0#ip address 192.168.3.1 255.255.255.0

Router-B_config_f0/0#exit

Router-B_config#router ospf 1

Router-B_config_ospf_1#net 192.168.1.0 255.255.255.0 area 0

Router-B_config_ospf_1#net 192.168.3.0 255.255.255.0 area 0

Router-C#conf

Router-C_config#int f0/0

Router-C_config_f0/0#ip address 192.168.4.1 255.255.255.0

Router-C_config_rip#exit

Router-C_config#router ospf 1

Router-C_config_ospf_1#network 192.168.1.0 255.255.255.0 area 0

Router-C_config_ospf_1#network 192.168.4.0 255.255.255.0 area 0

第三步:查看各路由器的路由表

Router-A#sh ip route

Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected

D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area

ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2

OE1 - OSPF external type 1, OE2 - OSPF external type 2

DHCP - DHCP type

VRF ID: 0

C 192.168.2.0/24 is directly connected, FastEthernet0/0

C 192.168.1.0/24 is directly connected, Serial1/1

Router-B# sh ip route

Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area

ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2

OE1 - OSPF external type 1, OE2 - OSPF external type 2

DHCP - DHCP type

VRF ID: 0

C 192.168.1.0/24 is directly connected, Serial1/0

C 192.168.3.0/24 is directly connected, FastEthernet0/0

Router-C#sh ip route

Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected

D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area

ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2

OE1 - OSPF external type 1, OE2 - OSPF external type 2

DHCP - DHCP type

VRF ID: 0

C 192.168.1.0/24 is directly connected, Serial0/3

C 192.168.4.0/24 is directly connected, FastEthernet0/0

!都没有得到OSPF 路由,说明在NBMA 环境下的需要做特定的配置

第四步:查看OSPF 状态

Router-A#sh ip ospf interface

Serial1/1 is up, line protocol is up

Internet Address: 192.168.1.1/24

Nettype: Non-Broadcast !网络类型为非广播

OSPF process is 1, AREA: 0, Router ID: 192.168.1.1

Cost: 1600, Transmit Delay is 1 sec, Priority 1

Hello interval is 30, Dead timer is 120, Retransmit is 5

OSPF INTF State is IWAITING

Neighbor Count is 0, Adjacent neighbor count is 0

Router-B#sh ip ospf interface

Serial1/0 is up, line protocol is up

Internet Address: 192.168.1.2/24

Nettype: Non-Broadcast !网络类型为非广播

OSPF process is 1, AREA: 0, Router ID: 192.168.2.1

Cost: 1600, Transmit Delay is 1 sec, Priority 1

Hello interval is 30, Dead timer is 120, Retransmit is 5

OSPF INTF State is IWAITING

Neighbor Count is 0, Adjacent neighbor count is 0 Router-C#sh ip ospf interface

Serial0/3 is up, line protocol is up

Internet Address: 192.168.1.3/24

Nettype: Non-Broadcast !网络类型为非广播

OSPF process is 1, AREA: 0, Router ID: 192.168.4.1

Cost: 1600, Transmit Delay is 1 sec, Priority 1

Hello interval is 30, Dead timer is 120, Retransmit is 5

OSPF INTF State is IDrOTHER

Neighbor Count is 0, Adjacent neighbor count is 0

第五步:NBMA 环境下的配置

Router-A#conf

Router-A_config#router ospf 1

Router-A_config_ospf_1#neighbor 192.168.1.2 !手工指定邻居

Router-A_config_ospf_1#neighbor 192.168.1.3

Router-B#conf

Router-B_config#int s1/0

Router-B_config_s1/0#ip ospf priority 0 !使B 不参加DR 选举

Router-B_config_s1/0#exit

Router-B_config#router ospf 1

Router-B_config_ospf_1#neighbor 192.168.1.1 !手工指定邻居

Router-C#conf

Router-C_config#int s0/3

Router-C_config_s0/3#ip ospf priority 0 !使C 不参加DR 选举

Router-C_config_s0/3#exit

Router-C_config#router ospf 1

Router-C_config_ospf_1#neighbor 192.168.1.1 !手工指定邻居

第六步:再次查看各路由表

Router-A#sh ip route

Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected

D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area

ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2

OE1 - OSPF external type 1, OE2 - OSPF external type 2

DHCP - DHCP type

VRF ID: 0

C 192.168.1.0/24 is directly connected, Serial1/1

C 192.168.2.0/24 is directly connected, FastEthernet0/0

O 192.168.3.0/24 [110,1601] via 192.168.1.2(on Serial1/1) O 192.168.4.0/24 [110,1601] via 192.168.1.3(on Serial1/1)

Router-B#sh ip route

Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected

D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area

ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2

OE1 - OSPF external type 1, OE2 - OSPF external type 2

DHCP - DHCP type

VRF ID: 0

C 192.168.1.0/24 is directly connected, Serial1/0

O 192.168.2.0/24 [110,1601] via 192.168.1.1(on Serial1/0)

C 192.168.3.0/24 is directly connected, FastEthernet0/0

O 192.168.4.0/24 [110,1601] via 192.168.1.3(on Serial1/0)

Router-C#sh ip route

Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected

D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area

ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2

OE1 - OSPF external type 1, OE2 - OSPF external type 2

DHCP - DHCP type

VRF ID: 0

C 192.168.1.0/24 is directly connected, Serial0/3

O 192.168.2.0/24 [110,1601] via 192.168.1.1(on Serial0/3)

O 192.168.3.0/24 [110,1601] via 192.168.1.2(on Serial0/3)

C 192.168.4.0/24 is directly connected, FastEthernet0/0

第七步:查看OSPF 状态

Router-A#sh ip ospf interface !查看OSPF 接口状态

Serial1/1 is up, line protocol is up

Internet Address: 192.168.1.1/24

Nettype: Non-Broadcast

OSPF process is 1, AREA: 0, Router ID: 192.168.1.1

Cost: 1600, Transmit Delay is 1 sec, Priority 1

Hello interval is 30, Dead timer is 120, Retransmit is 5

OSPF INTF State is IDr

Designated Router ID: 192.168.1.1, Interface address 192.168.1.1 !A 成为DR

Neighbor Count is 2, Adjacent neighbor count is 2

Adjacent with neighbor 192.168.2.1 !OSPF 邻居

Adjacent with neighbor 192.168.4.1 FastEthernet0/0 is up, line protocol is up

Internet Address: 192.168.2.1/24

Nettype: Broadcast

OSPF process is 1, AREA: 0, Router ID: 192.168.1.1

Cost: 1, Transmit Delay is 1 sec, Priority 1

Hello interval is 10, Dead timer is 40, Retransmit is 5

OSPF INTF State is IDr

Designated Router ID: 192.168.1.1, Interface address 192.168.2.1

Neighbor Count is 0, Adjacent neighbor count is 0

Router-A#sh ip ospf neighbor !查看邻居状态

----------------------------------------------------------------------------

OSPF process: 1

AREA: 0

Neighbor ID Pri State DeadTime Neighbor Addr Interface

192.168.2.1 0 FULL/DROTHER 109 192.168.1.2 Serial1/1

192.168.4.1 0 FULL/DROTHER 96 192.168.1.3 Serial1/1

----------------------------------------------------------------------------