您的位置:首页 > 其它

配置多区域OSPF和P2MP、P2P帧中继

2009-07-04 09:30 429 查看
[align=left]实验4-3:配置多区域OSPF和P2MP、P2P帧中继

【实验目的】:
在本次实验中,你将在复杂的帧中继网络中配置OSPF。
在完成本次实验之后,你需要完成下列任务: [/align]

使用点对多点网络类型配置OSPF

使用点对点网络类型配置OSPF

连接核心中的其他设备

[align=left]【实验拓扑】:[/align]
[align=left][/align]
[align=left]注意:图中x为所在机架编号,y为路由器编号。[/align]
[align=left]【实验帮助】:
如果出现任何问题,可以向在值的辅导老师提出并请求提供帮助。[/align]
[align=left]【命令列表】: [/align]

[align=left]命令[/align][align=left]描述[/align]
[align=left](config)#default interface s0[/align][align=left]恢复S0接口到默认配置[/align]
[align=left](config-subif)#frame-relay interface-dlci 122[/align][align=left]给点对点连接指定DLCI[/align]
[align=left](config)#internface s0/0.1 multipoint | point-to-point[/align][align=left]创建一个点对点(点对多点)子接口[/align]
[align=left](config-subif)#ip ospf network Point-to-multipoint[/align][align=left]强制指定OSPF接口类型为点对多点。缺省是NBMA。[/align]
[align=left](config-router)#network 172.31.0.0 0.0.255.255 area 0[/align][align=left]指定符合这个网络范围的接口运行在这个指定的OSPF区域[/align]
[align=left](config-if)#no frame-relay inverse-arp[/align][align=left]关闭此接口的帧中继反向ARP解析[/align]
[align=left]
【任务一】:配置OSPF多区域和帧中继网络点对多点、点对点
实验过程:[/align]
[align=left]第一步:在边界路由器,创建一个多点子接口s0.1。你将使用这个为OSPF点对多点网络类型去连接帧中继网络。[/align]
[align=left]第二步:更改子接口s0.1的OSPF网络类型为点对多点(缺省的帧中继多点子接口网络类型是非广播(NBMA)[/align]
[align=left]第三步:分配IP地址172.31.xx.y/24到s0.1接口,x是你的机架号,y是你的路由器编号。例如:P3R2,这个IP地址是172.31.33.2/24。[/align]
[align=left]第四步:因为我们的帧中继没有使用帧中继反向ARP,我们需要手动的映着这个远程地址到本地DLCI号。在边界路由器创建一个新的帧中继映射语句到路由器BBR2的IP地址172.31.xx.4使用DLCI号2xy,这儿x是机架号,y是你的路由器编号。不要放记添加broadcast参数。
例如:P3R2,这个帧中继映射语句应该是:
frame-relay map ip 172.31.33.4 232 broadcast
P3R1,这个帧中继映射语句应该是:
frame-relay map ip 172.31.33.4 231 broadcast[/align]
[align=left]第五步:在边界路由器上接活S0接口。[/align]
[align=left]第六步:在边界路由器上,在OSPF进程下添加新的network语句声明172.31.xx.0这个网段运行在Area 0,同时使用ip ospf network point-to-multipoint命令修改S0.1接口的网络类型。[/align]
[align=left]第七步:在边界路由器,使用适当的show命令检查OSPF邻居状态。在点对多点网络类型下这里是否有DR/BDR?
你的路由器输出应该与下列类似:
P1R1#sh ip os nei[/align]
[align=left]Neighbor ID Pri State Dead Time Address Interface
172.31.11.4 1 FULL/BDR 00:01:55 172.31.11.4 Serial0.1
172.31.1.3 100 FULL/DR 00:01:54 172.31.1.3 Serial0
10.1.0.2 0 FULL/ - 00:00:35 10.1.0.2 Serial1
10.200.200.13 1 FULL/DR 00:00:37 10.1.1.3 Ethernet0
P1R1#[/align]
[align=left]第八步:显示边界路由器PxR1和PxR2的路由表,验证他们是正确的学习了核心的OSPF路由。
从边界路由器PING BBR2路由器的以太网接口10.254.0.2,以验证与核心建立了正确的连接。你的输出应该与下列类似:
router#ping 10.254.0.2[/align]
[align=left]Type Escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.254.0.2, timeout is 2 seconds:
!!!!!
Success rate is 80 Percent(4/5), round-trip min/avg/max = 1/1/4 ms[/align]
[align=left]第九步:创建一个新的点对点子接口s0.2连接两个边界路由器。配置IP地址10.xx.0.y/24给这个子接口,x是你的机架编号,y是你的路由器编号。这个从路由器PxR1到PxR2的DLCI是122,路由器从PxR2到PxR1的DLCI是221。
例如, P3R1和P3R2路由器的连接,配置如下所示:
P3R1(config)#interface Serial0.2 point-to-point
P3R1(config-subif)#ip address 10.33.0.1 255.255.255.0
P3R1(config-subif)#frame-relay interface-dlci 122
P3R2(config)#interface Serial0.2 point-to-point
P3R2(config-subif)#ip address 10.33.0.2 255.255.255.0
P3R2(config-subif)#frame-relay interface-dlci 221[/align]
[align=left]第十步:在每一个边界路由器上,PING对方边界路由器的S0.2子接口,验证连接的正确性。你的输出应该与下列类似:
router#ping 10.55.0.2[/align]
[align=left]Type Escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.55.0.2, timeout is 2 seconds:
!!!!!
Success rate is 80 Percent(4/5), round-trip min/avg/max = 1/1/4 ms[/align]
[align=left]第十一步:在边界路由器上,加入10.xx.0.0网络到OSPF区域x。[/align]
[align=left]第十二步:在边界路由器上,验着两个子接口的网络类型。哪一个OSPF的网络类型是点对点子接口的缺省网络类型?你的显示应该与下列类似:
P1R1#sh ip os int
Serial0.1 is up, line protocol is up
Internet Address 172.31.11.1/24, Area 0
Process ID 1, Router ID 10.1.0.1, 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:11
Index 2/4, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 3
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.11.4
Suppress hello for 0 neighbor(s)
(Output Omitted)
Serial0.2 is up, line protocol is up
Internet Address 10.11.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:06
Index 3/5, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 2, maximum is 3
Last flood scan time is 4 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)
(Output Omitted)[/align]
[align=left]第十三步:在边界路由器上,使用适当的show命令验证OSPF邻居状态。在点对点网中这里是否有DR/BDR存在?你的输出应该与下列类似:
P1R1#sh ip os nei[/align]
[align=left]Neighbor ID Pri State Dead Time Address Interface
172.31.11.4 0 FULL/ - 00:01:31 172.31.11.4 Serial0.1
10.1.0.2 0 FULL/ - 00:00:33 10.11.0.2 Serial0.2
10.1.0.2 0 FULL/ - 00:00:33 10.1.0.2 Serial1
10.200.200.13 1 FULL/DR 00:00:34 10.1.1.3 Ethernet0
P1R1#[/align]
[align=left]第十四步:在边界路由器上,验着IP路由表中的OSPF路由,依靠你使用的机架,你可能会看到其它机架的路由。你的输出与下列类似:
P1R1#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[/align]
[align=left]Gateway of last resort is not set[/align]
[align=left]172.31.0.0/16 is variably subnetted, 4 subnets, 2 masks
C 172.31.1.0/24 is directly connected, Serial0
C 172.31.11.0/24 is directly connected, Serial0.1
O 172.31.11.2/32 [110/128] via 172.31.11.4, 00:03:47, Serial0.1
O 172.31.11.4/32 [110/64] via 172.31.11.4, 00:03:47, Serial0.1
10.0.0.0/24 is subnetted, 6 subnets
C 10.11.0.0 is directly connected, Serial0.2
O 10.1.3.0 [110/74] via 10.1.1.3, 00:07:54, Ethernet0
O 10.1.2.0 [110/74] via 10.1.0.2, 00:07:55, Serial1
[110/74] via 10.11.0.2, 00:07:55, Serial0.2
C 10.1.1.0 is directly connected, Ethernet0
C 10.1.0.0 is directly connected, Serial1
O E2 10.254.0.0 [110/20] via 172.31.11.4, 00:03:38, Serial0.1
P1R1#[/align]
[align=left]第十五步:在内部路由器上,验证IP路由表中的OSPF路由。
P1R3#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[/align]
[align=left]Gateway of last resort is not set[/align]
[align=left]172.31.0.0/16 is variably subnetted, 4 subnets, 2 masks
O IA 172.31.1.0/24 [110/74] via 10.1.1.1, 00:05:11, Ethernet0
O IA 172.31.11.1/32 [110/10] via 10.1.1.1, 00:04:20, Ethernet0
O IA 172.31.11.2/32 [110/74] via 10.1.1.1, 00:04:20, Ethernet0
[110/74] via 10.1.3.4, 00:04:20, Serial0
O IA 172.31.11.4/32 [110/74] via 10.1.1.1, 00:04:20, Ethernet0
10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
O 10.11.0.0/24 [110/74] via 10.1.1.1, 00:08:27, Ethernet0
C 10.200.200.13/32 is directly connected, Loopback0
C 10.1.3.0/24 is directly connected, Serial0
O 10.1.2.0/24 [110/74] via 10.1.3.4, 00:08:28, Serial0
C 10.1.1.0/24 is directly connected, Ethernet0
O 10.1.0.0/24 [110/74] via 10.1.1.1, 00:08:28, Ethernet0
O E2 10.254.0.0/24 [110/20] via 10.1.1.1, 00:04:16, Ethernet0
P1R3#[/align]
[align=left]第十六步:为什么有一些路由在内部路由器标记为“O IA”,但在是边界路由器没有呢?[/align]
[align=left]第十七步:在边界路由器和内部路由器上使用show ip protocols命令验证OSPF路由进程。边界路由器属于多个少区域?内部路由器属于多少区域?
P1R3#sh ip pro
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.200.200.13
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.1.0.0 0.0.255.255 area 1
Routing Information Sources:
Gateway Distance Last Update
10.200.200.14 110 01:45:09
10.200.200.13 110 00:10:37
10.1.0.2 110 00:06:30
10.1.0.1 110 00:06:29
10.1.1.1 110 02:32:18
172.31.1.3 110 00:10:37
172.31.11.4 110 00:06:24
Distance: (default is 110)[/align]
[align=left]P1R1#sh ip pro
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.1.0.1
It is an area border router
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.1.0.0 0.0.255.255 area 1
10.11.0.0 0.0.0.255 area 1
172.31.1.0 0.0.0.255 area 0
172.31.11.0 0.0.0.255 area 0
Routing Information Sources:
Gateway Distance Last Update
10.200.200.14 110 01:46:31
10.200.200.13 110 00:11:59
10.1.0.2 110 00:07:51
10.1.0.1 110 00:07:51
10.1.1.1 110 02:33:39
172.31.1.3 110 00:11:59
172.31.11.4 110 00:07:41
Distance: (default is 110)[/align]
[align=left]【实验验证】:
成功完成整个实验,你需要完成下列任务: [/align]

你有在点对多点和点对点网络配置OSPF。

你能够PING通BBR2路由器。

[align=left]【路由器配置】:[/align]
[align=left]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
frame-relay map ip 172.31.1.3 111 broadcast
no frame-relay inverse-arp
!
interface Serial0.1 multipoint
ip address 172.31.11.1 255.255.255.0
ip ospf network point-to-multipoint
frame-relay map ip 172.31.11.4 211 broadcast
no frame-relay inverse-arp
!
interface Serial0.2 point-to-point
ip address 10.11.0.1 255.255.255.0
frame-relay interface-dlci 122
!
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 10.11.0.0 0.0.0.255 area 1
network 172.31.1.0 0.0.0.255 area 0
network 172.31.11.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[/align]
[align=left]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 Serial0.1 multipoint
ip address 172.31.11.2 255.255.255.0
ip ospf network point-to-multipoint
frame-relay map ip 172.31.11.4 212 broadcast
no frame-relay inverse-arp
!
interface Serial0.2 point-to-point
ip address 10.11.0.2 255.255.255.0
frame-relay interface-dlci 221
!
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 10.11.0.0 0.0.0.255 area 1
network 172.31.1.0 0.0.0.255 area 0
network 172.31.11.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[/align]
[align=left]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[/align]
[align=left]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[/align]本文出自 “butter520” 博客,转载请与作者联系!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: