【实验目的】:
在本次实验中,你将在单个帧中继网络中配置OSPF。在完成本次实验之后,你需要完成下列任务:
- 在NAMB网络中配置OSPF
- 配置多区域OSPF环境
【实验拓扑】:
注意:图中x为所在机架编号,y为路由器编号。
【实验帮助】:
如果出现任何问题,可以向在值的辅导老师提出并请求提供帮助。
如果出现任何问题,可以向在值的辅导老师提出并请求提供帮助。
【命令列表】:
命令
|
描述
|
(config-if)#ip ospf priority 0
|
设置OSPF优先级为0,防止它参与DR/BDR选择
|
(config-router)network 172.31.x.0
|
指定一个(组)接口运行在一个OSPF在区域
|
【任务一】:在帧中继网络上使用NBMA网络类型。
在这个任务中,你将配置ABR允许在路由跨过区域。
实验过程:
第一步:配置边界路由器(PxR1和PxR2)为区域边界路由器(ABR)。配置这个帧中继连接172.31.1.0/24(边界路由器的S0接口)到OSPF的区域0。记住帧中继网络上缺省的OSPF网络类型是NBMA。
第二步:记住这里非常重要的一点是将核心(BBR1)作为DR。因为在这里是一个星型(Hub-and-Spoke)网络类型,仅仅BBR1有完整的连接到其他的路由器。在边界中币器上设置串行接口S0 的OSPF的优先级为0确保BBR1被选为DR。
- 注意:在NBMA网络,邻居语句仅仅需要在DR和BDR是声明。在我们的星型拓扑,邻居声明必须是配置在HUB路由器上。但是,在一个全互连(FULL-MESH)拓扑中如果没有使用优先级命令指定DR和BDR邻居声明是需要在所有的路由器上声明的
第三步:使用no shut命令激活边界路由器的S0接口(在先前的实验中,我们关闭了这个接口)。
第四步:检查内部路由器的路由表,确认所有的OSPF路由都已经学习到,并检查与TFTP服务器的连通性。在OSPF路由中的O,O IA和O E2之间有什么区别?
你的show ip route 输出应该与下列类似:
P1R4#sh 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
你的show ip route 输出应该与下列类似:
P1R4#sh 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
172.31.0.0/24 is subnetted, 1 subnets
O IA 172.31.1.0 [110/74] vi
a 10.1.2
.2, 00:02:28, Ethernet0
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C 10.200.200.14/32 is directly connected, Loopback
0
C 10.1.3.0/24 is directly connected, Serial
0
C 10.1.2.0/24 is directly connected, Ethernet0
O 10.1.1.0/24 [110/74] vi
a 10.1.3
.3, 00:02:53, Serial0
O 10.1.0.0/24 [110/74] vi
a 10.1.2
.2, 00:02:53, Ethernet0
O E2 10.254.0.0/24 [110/20] vi
a 10.1.2
.2, 00:00:00, Ethernet0
P1R4#
O IA 172.31.1.0 [110/74] vi
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C 10.200.200.14/32 is directly connected, Loopback
O 10.1.1.0/24 [110/74] vi
O 10.1.0.0/24 [110/74] vi
O E2 10.254.0.0/24 [110/20] vi
P1R4#
第五步:在边界路由器上,使用show ip ospf neighbor命令验证OSPF的邻居。路由器BBR1是否是区域中的DR。
第六步:确认BBR1配置了边界路上器的邻居语句。
第七步:在边界路由器,PxR1和PxR2,验证帧中继网络接口的网络类型。哪一个网络类型是帧中继接口使用的。在路由器PxR1和PxR2之间的HDLC串口上哪一种网络类型是使用的?在以太网接口呢?记住这些OSPF NBMA网络类型之间的关键的不同。
网络类型 指定邻居 DR 拓扑需求 Hello间隔备注
NBMA YES YES Full mesh 30 如果没有全互联,至少DR和BDR应该与所有的路由器有物理连接。
P2MP NO NO Arbitrary 30
Broadcast No Yes Full mesh 10 如果没有全互联,至少DR和BDR应该与所有的路由器有物理连接。
P2P No No P2P 10
你的路由器输出应该与下列类似:
P1R1#sh ip os int
Serial0 is up, line protocol is up
Internet Address 172.31.1.1/24, Area 0
Process ID 1, Router ID
10.1.0
.1, Network Type NON_BROADCAST, Cost: 64
Transmit Delay is 1 sec, State DROTHER, Priority 0
Designated Router (ID) 172.31.1.3, Interface address 172.31.1.3
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:25
Index 1/3, 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 172.31.1.3 (Designated Router)
Suppress hello for 0 neighbor(s)
Serial1 is up, line protocol is up
Internet Address 10.1.0.1/24, Area 1
Process ID 1, Router ID 10.1.0.1, 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:08
Index 2/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 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.1.0.2
Suppress hello for 0 neighbor(s)
Ethernet0 is up, line protocol is up
Internet Address 10.1.1.1/24, Area 1
Process ID 1, Router ID 10.1.0.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 10.200.200.13, Interface address 10.1.1.3
Backup Designated router (ID) 10.1.0.1, Interface address 10.1.1.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:07
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 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.200.200.13 (Designated Router)
Suppress hello for 0 neighbor(s)
P1R1#
网络类型 指定邻居 DR 拓扑需求 Hello间隔备注
NBMA YES YES Full mesh 30 如果没有全互联,至少DR和BDR应该与所有的路由器有物理连接。
P2MP NO NO Arbitrary 30
Broadcast No Yes Full mesh 10 如果没有全互联,至少DR和BDR应该与所有的路由器有物理连接。
P2P No No P2P 10
你的路由器输出应该与下列类似:
P1R1#sh ip os int
Serial0 is up, line protocol is up
Internet Address 172.31.1.1/24, Area 0
Process ID 1, Router ID
Transmit Delay is 1 sec, State DROTHER, Priority 0
Designated Router (ID) 172.31.1.3, Interface address 172.31.1.3
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:25
Index 1/3, 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 172.31.1.3 (Designated Router)
Suppress hello for 0 neighbor(s)
Serial1 is up, line protocol is up
Internet Address 10.1.0.1/24, Area 1
Process ID 1, Router ID 10.1.0.1, 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:08
Index 2/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 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.1.0.2
Suppress hello for 0 neighbor(s)
Ethernet0 is up, line protocol is up
Internet Address 10.1.1.1/24, Area 1
Process ID 1, Router ID 10.1.0.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 10.200.200.13, Interface address 10.1.1.3
Backup Designated router (ID) 10.1.0.1, Interface address 10.1.1.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:07
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 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.200.200.13 (Designated Router)
Suppress hello for 0 neighbor(s)
P1R1#
【实验验证】:
成功完成整个实验,你需要完成下列任务:
成功完成整个实验,你需要完成下列任务:
- 你有成功的在网络核心配置OSPF。
- 你的路由表有完成的OSPF路由。
- 你能够PING通核心TFTP服务器。
【路由器配置】:
P1R1:
hostname P1R1
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
no ip domain lookup
!
interface Ethernet0
ip address
10.1.1
.1 255.255.255.0
!
interface Serial0
ip address 172.31.1.1 255.255.255.0
encapsulation frame-relay
ip ospf priority 0
frame-relay map ip 172.31.1.3 111 broadcast
no frame-relay inverse-arp
!
interface Serial1
ip address 10.1.0.1 255.255.255.0
clockrate 64000
!
router ospf 1
router-id 10.1.0.1
log-adjacency-changes
network 10.1.0.0 0.0.255.255 area 1
network 172.31.1.0 0.0.0.255 area 0
!
no ip http server
ip classless
!
line con 0
exec-timeout 30 0
logging synchronous
line aux 0
line vty 0 4
login
End
P1R2:
hostname P1R2
!
boot-start-marker
boot-end-marker
no aaa new-model
ip subnet-zero
no ip domain lookup
!
interface Ethernet0
ip address 10.1.2.2 255.255.255.0
!
interface Serial0
ip address 172.31.1.2 255.255.255.0
encapsulation frame-relay
ip ospf priority 0
frame-relay map ip 172.31.1.3 112 broadcast
no frame-relay inverse-arp
!
interface Serial1
ip address 10.1.0.2 255.255.255.0
!
router ospf 1
router-id 10.1.0.2
log-adjacency-changes
network 10.1.0.0 0.0.255.255 area 1
network 172.31.1.0 0.0.0.255 area 0
!
no ip http server
ip classless
!
line con 0
exec-timeout 30 0
logging synchronous
line aux 0
line vty 0 4
login
!
End
P1R1:
hostname P1R1
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
no ip domain lookup
!
interface Ethernet0
ip address
!
interface Serial0
ip address 172.31.1.1 255.255.255.0
encapsulation frame-relay
ip ospf priority 0
frame-relay map ip 172.31.1.3 111 broadcast
no frame-relay inverse-arp
!
interface Serial1
ip address 10.1.0.1 255.255.255.0
clockrate 64000
!
router ospf 1
router-id 10.1.0.1
log-adjacency-changes
network 10.1.0.0 0.0.255.255 area 1
network 172.31.1.0 0.0.0.255 area 0
!
no ip http server
ip classless
!
line con 0
exec-timeout 30 0
logging synchronous
line aux 0
line vty 0 4
login
End
P1R2:
hostname P1R2
!
boot-start-marker
boot-end-marker
no aaa new-model
ip subnet-zero
no ip domain lookup
!
interface Ethernet0
ip address 10.1.2.2 255.255.255.0
!
interface Serial0
ip address 172.31.1.2 255.255.255.0
encapsulation frame-relay
ip ospf priority 0
frame-relay map ip 172.31.1.3 112 broadcast
no frame-relay inverse-arp
!
interface Serial1
ip address 10.1.0.2 255.255.255.0
!
router ospf 1
router-id 10.1.0.2
log-adjacency-changes
network 10.1.0.0 0.0.255.255 area 1
network 172.31.1.0 0.0.0.255 area 0
!
no ip http server
ip classless
!
line con 0
exec-timeout 30 0
logging synchronous
line aux 0
line vty 0 4
login
!
End
P1R3
:
hostname P1R3
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
!
interface Loopback0
ip address 10.200.200.13 255.255.255.255
!
interface Ethernet0
ip address
10.1.1
.3 255.255.255.0
!
interface Serial0
ip address 10.1.3.3 255.255.255.0
clockrate 64000
!
interface Serial1
no ip address
shutdown
!
router ospf 1
log-adjacency-changes
network 10.1.0.0 0.0.255.255 area 1
!
no ip http server
ip classless
!
line con 0
line aux 0
line vty 0 4
login
!
End
hostname P1R3
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
!
interface Loopback0
ip address 10.200.200.13 255.255.255.255
!
interface Ethernet0
ip address
!
interface Serial0
ip address 10.1.3.3 255.255.255.0
clockrate 64000
!
interface Serial1
no ip address
shutdown
!
router ospf 1
log-adjacency-changes
network 10.1.0.0 0.0.255.255 area 1
!
no ip http server
ip classless
!
line con 0
line aux 0
line vty 0 4
login
!
End
P1R4
:
hostname P1R4
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
!
interface Loopback0
ip address 10.200.200.14 255.255.255.255
!
interface Ethernet0
ip address
10.1.2
.4 255.255.255.0
ip ospf priority 0
!
interface Serial0
ip address 10.1.3.4 255.255.255.0
!
interface Serial1
no ip address
shutdown
!
router ospf 1
log-adjacency-changes
network 10.1.0.0 0.0.255.255 area 1
!
no ip http server
ip classless
!
line con 0
line aux 0
line vty 0 4
login
!
end
hostname P1R4
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
!
interface Loopback0
ip address 10.200.200.14 255.255.255.255
!
interface Ethernet0
ip address
ip ospf priority 0
!
interface Serial0
ip address 10.1.3.4 255.255.255.0
!
interface Serial1
no ip address
shutdown
!
router ospf 1
log-adjacency-changes
network 10.1.0.0 0.0.255.255 area 1
!
no ip http server
ip classless
!
line con 0
line aux 0
line vty 0 4
login
!
end
本文转自hexianguo 51CTO博客,原文链接:
http://blog.51cto.com/xghe110/69413
,如需转载请自行联系原作者