在framerelay网络中的路由协议.docx
《在framerelay网络中的路由协议.docx》由会员分享,可在线阅读,更多相关《在framerelay网络中的路由协议.docx(18页珍藏版)》请在冰豆网上搜索。
在framerelay网络中的路由协议
在frame-relay上的路由协议-----ospf
wangyang发表于2006-10-1910:
04:
05
试验说明:
本试验还是沿用rip试验中的图,只是将协议改为ospf。
本试验的目的是验证ospf的几种网络类型(非广播;广播;点对点;点对多点;点对多点非广播)在frame-relay网络上的运行。
试验配置:
1:
ospf在frame-relay上的默认网络类型为非广播,先来配置这个类型。
r1(config)#routerospf1
r1(config-router)#network10.1.1.00.0.0.255area0
r3(config)#routerospf1
r3(config-router)#network10.1.1.00.0.0.255area0
r3(config-router)#network3.3.3.30.0.0.0area0
r5(config)#routerospf1
r5(config-router)#network10.1.1.00.0.0.255area0
r5(config-router)#network5.5.5.50.0.0.0area0
**********************************
r1#shipospfneighbor
r3#shipospfneighbor
r5#shipospfneighbor
r1#shiproute
Gatewayoflastresortisnotset
10.0.0.0/24issubnetted,1subnets
C 10.1.1.0isdirectlyconnected,Serial0
可以看到3者之间邻居关系都没有建立,R1的路由表当然也就学不到邻居的路由了。
*********************************************
这时需要手动建立邻居关系
r1(config)#routerospf1
r1(config-router)#neighbor10.1.1.3
r1(config-router)#neighbor10.1.1.5
**********************************************
r1#shipospfneighbor
NeighborID Pri State DeadTime Address Interface
5.5.5.5 1 FULL/BDR 00:
01:
31 10.1.1.5 Serial0
3.3.3.3 1 FULL/DROTHER 00:
01:
52 10.1.1.3 Serial0
r1#shiproute
Gatewayoflastresortisnotset
3.0.0.0/32issubnetted,1subnets
O 3.3.3.3[110/65]via10.1.1.3,00:
01:
06,Serial0
5.0.0.0/32issubnetted,1subnets
O 5.5.5.5[110/65]via10.1.1.5,00:
01:
06,Serial0
10.0.0.0/24issubnetted,1subnets
C 10.1.1.0isdirectlyconnected,Serial0
这时我们看到路由器之间的邻居关系已经建立,R1也学习到了R3和R5的路由。
因此网络类型为非广播的路由器之间不会自动建立邻居关系。
需要手动配置(只需要在hub端配置就行了,而不用象eigrp那样两端都要配置)
***************************************************************************************************
***************************************************************************************************
2配置网络类型为广播
r1(config-router)#ints0
r1(config-if)#ipospfnetworkbroadcast
r3(config)#ints1
r3(config-if)#ipospfnetworkbroadcast
r5(config)#ints1
r5(config-if)#ipospfnetworkbroadcast
r1#shipospfneighbor
NeighborID Pri State DeadTime Address Interface
5.5.5.5 1 FULL/BDR 00:
00:
39 10.1.1.5 Serial0
3.3.3.3 1 FULL/DROTHER 00:
00:
36 10.1.1.3 Serial0
r3#shipospfneighbor
NeighborID Pri State DeadTime Address Interface
10.1.1.1 1 FULL/DR 00:
00:
33 10.1.1.1 Serial1
r1#shiproute
Gatewayoflastresortisnotset
3.0.0.0/32issubnetted,1subnets
O 3.3.3.3[110/65]via10.1.1.3,00:
00:
42,Serial0
5.0.0.0/32issubnetted,1subnets
O 5.5.5.5[110/65]via10.1.1.5,00:
00:
42,Serial0
10.0.0.0/24issubnetted,1subnets
C 10.1.1.0isdirectlyconnected,Serial0
可以看到邻居关系可以建立,路由表也可以学到。
r3#shiprou
Gatewayoflastresortisnotset
3.0.0.0/32issubnetted,1subnets
C 3.3.3.3isdirectlyconnected,Loopback0
5.0.0.0/32issubnetted,1subnets
O 5.5.5.5[110/65]via10.1.1.5,00:
01:
45,Serial1
10.0.0.0/24issubnetted,1subnets
C 10.1.1.0isdirectlyconnected,Serial1
我们注意到R3在学习5.5.5.5这条路由的下一跳为10.1.1.5。
(但事实上R3与R5之间并没有建立邻居关系,也没有2层映射。
)ping应该不通。
r3#ping5.5.5.5
Typeescapesequencetoabort.
Sending5,100-byteICMPEchosto5.5.5.5,timeoutis2seconds:
.....
Successrateis0percent(0/5)
结果就是不通。
******************************************************************
3配置网络类型为点到多点
r1(config)#ints0
r1(config-if)#ipospfnetworkpoint-to-multipoint
r3(config)#ints1
r3(config-if)#ipospfnetworkpoint-to-multipoint
r5(config)#ints1
r5(config-if)#ipospfnetworkpoint-to-multipoint
r1#shipospfneighbor
NeighborID Pri State DeadTime Address Interface
5.5.5.5 1 FULL/ - 00:
01:
40 10.1.1.5 Serial0
3.3.3.3 1 FULL/ - 00:
01:
57 10.1.1.3 Serial0
我们看到邻居关系已经建立,而且我们注意到在点到多点网络中没有DR,BDR.
r1#shiproute
Gatewayoflastresortisnotset
3.0.0.0/32issubnetted,1subnets
O 3.3.3.3[110/65]via10.1.1.3,00:
09:
13,Serial0
5.0.0.0/32issubnetted,1subnets
O 5.5.5.5[110/65]via10.1.1.5,00:
09:
13,Serial0
10.0.0.0/8isvariablysubnetted,3subnets,2masks
O 10.1.1.3/32[110/64]via10.1.1.3,00:
09:
13,Serial0
C 10.1.1.0/24isdirectlyconnected,Serial0
O 10.1.1.5/32[110/64]via10.1.1.5,00:
09:
13,Serial0
我们看到路由表中已经学习到了路由,而且又多了两条主机路由。
r3#shiproute
Gatewayoflastresortisnotset
3.0.0.0/32issubnetted,1subnets
C 3.3.3.3isdirectlyconnected,Loopback0
5.0.0.0/32issubnetted,1subnets
O 5.5.5.5[110/129]via10.1.1.1,00:
10:
36,Serial1
10.0.0.0/8isvariablysubnetted,3subnets,2masks
C 10.1.1.0/24isdirectlyconnected,Serial1
O 10.1.1.1/32[110/64]via10.1.1.1,00:
10:
37,Serial1
O 10.1.1.5/32[110/128]via10.1.1.1,00:
10:
37,Serial1
注意到此时路由表中5.5.5.5这条路由的下一跳为10.1.1.1(回忆一下在非广播网络中下一跳为10.1.1.5)。
这时再ping一下。
r3#ping5.5.5.5
Typeescapesequencetoabort.
Sending5,100-byteICMPEchosto5.5.5.5,timeoutis2seconds:
!
!
!
!
!
Successrateis100percent(5/5),round-tripmin/avg/max=120/124/136ms
r3#ping10.1.1.5
Typeescapesequencetoabort.
Sending5,100-byteICMPEchosto10.1.1.5,timeoutis2seconds:
!
!
!
!
!
Successrateis100percent(5/5),round-tripmin/avg/max=120/124/132ms
ping是成功的。
为什么呢?
在刚才的几种网络类型中直接ping都是不通的。
让我们再来检查一下R5的路由表。
r5#shiproute
Gatewayoflastresortisnotset
3.0.0.0/32issubnetted,1subnets
O 3.3.3.3[110/129]via10.1.1.1,00:
14:
41,Serial1
5.0.0.0/32issubnetted,1subnets
C 5.5.5.5isdirectlyconnected,Loopback0
10.0.0.0/8isvariablysubnetted,3subnets,2masks
O 10.1.1.3/32[110/128]via10.1.1.1,00:
14:
42,Serial1
C 10.1.1.0/24isdirectlyconnected,Serial1
O 10.1.1.1/32[110/64]via10.1.1.1,00:
14:
42,Serial1
我们看到10.1.1.3这条路由的下一跳为10.1.1.1因此不需要查找2层映射关系。
直接通过路由发送出去。
因此ping是成功的。
因此点对多点这种网络类型具有这种优势。
那就是在hub-spoke拓扑结构中,只需要建立hub与spoke之间的映射。
而不需要建立spoke之间的映射。
就可以实现全网通信。
这大大减低了工作量。
并使网络更加稳定。
在frame-relay中的路由协议----EIGRP
wangyang发表于2006-10-1814:
09:
53
试验说明:
本试验还是沿用上一个试验的用图,frame-relay部分的配置也相同。
只是改变路由部分。
本试验中先删除rip,然后再启动eigrp。
试验配置:
r1(config)#routereigrp1
r1(config-router)#network10.1.1.00.0.0.255
r3(config)#routereigrp1
r3(config-router)#network10.1.1.00.0.0.255
r3(config-router)#network3.3.3.30.0.0.0
r5(config)#routereigrp1
r5(config-router)#network10.1.1.00.0.0.255
r5(config-router)#network5.5.5.50.0.0.0
***************************************************************
***************************************************************
试验检验:
r1#shiproute
Gatewayoflastresortisnotset
3.0.0.0/32issubnetted,1subnets
D 3.3.3.3[90/2297856]via10.1.1.3,00:
03:
33,Serial0
5.0.0.0/32issubnetted,1subnets
D 5.5.5.5[90/2297856]via10.1.1.5,00:
03:
24,Serial0
10.0.0.0/24issubnetted,1subnets
C 10.1.1.0isdirectlyconnected,Serial0
r3#shiproute
Gatewayoflastresortisnotset
3.0.0.0/32issubnetted,1subnets
C 3.3.3.3isdirectlyconnected,Loopback0
10.0.0.0/24issubnetted,1subnets
C 10.1.1.0isdirectlyconnected,Serial1
r5#shiproute
Gatewayoflastresortisnotset
5.0.0.0/32issubnetted,1subnets
C 5.5.5.5isdirectlyconnected,Loopback0
10.0.0.0/24issubnetted,1subnets
C 10.1.1.0isdirectlyconnected,Serial1
我们看到R1虽然都收到了来自R3和R5的路由,但它并没有转发。
这是因为水平分割在R1上起了作用。
所以需要关闭水平分割。
r1(config)#ints0
r1(config-if)#noipsplit-horizoneigrp1
然后R1还要和R3和R5建立邻居关系
r1(config)#routereigrp1
r1(config-router)#neighbor10.1.1.3s0
r1(config-router)#neighbor10.1.1.5s0
r3(config)#routereigrp1
r3(config-router)#neighbor10.1.1.1s1
r5(config)#routereigrp1
r5(config-router)#neighbor10.1.1.1s1
*********************************************************************
然后再进行查看
r3#shiproute
Gatewayoflastresortisnotset
3.0.0.0/32issubnetted,1subnets
C 3.3.3.3isdirectlyconnected,Loopback0
5.0.0.0/32issubnetted,1subnets
D 5.5.5.5[90/2809856]via10.1.1.1,00:
18:
22,Serial1
10.0.0.0/24issubnetted,1subnets
C 10.1.1.0isdirectlyconnected,Serial1
r5#shiproute
Gatewayoflastresortisnotset
3.0.0.0/32issubnetted,1subnets
D 3.3.3.3[90/2809856]via10.1.1.1,00:
18:
47,Serial1
5.0.0.0/32issubnetted,1subnets
C 5.5.5.5isdirectlyconnected,Loopback0
10.0.0.0/24issubnetted,1subnets
C 10.1.1.0isdirectlyconnected,Serial1
这时我们看到r3和r5都相互学习到了路由。
在frame-relay网络中的路由协议----rip
wangyang发表于2006-10-1810:
41:
55
试验说明:
1在本试验中首先要搭建一个frame-relay网络,由于没有frame-relay交换机。
所以要用两台2500来模拟。
2在网络完成后跑rip协议,查看结果。
********************************************************************************************
试验配置:
首先进行frame-relay网络的配置。
r1#shrun
interfaceSerial0
ipaddress10.1.1.1255.255.255.0
encapsulationframe-relay /将接口封装为frame-relay
frame-relaymapip10.1.1.3103broadcast /建立到远端的frame-relay映射,远端IP为10.1.1.3,本地DLCI为103
frame-relaymapip10.1.1.5105broadcast
noframe-relayinverse-arp /关闭反向arp解析
!
end
*******************************************************
r2#shrun
!
frame-relayswitching /启动frame-relay交换模式
interfaceTunnel0 /封装一个隧道接口隧道号为0
noipaddress
noipdirected-broadcast
tunnelsourceEthernet0 /指定该隧道的源
tunneldestination1.1.24.4 /指定该隧道的目的,即隧道的对端
!
interfaceEthernet0
ipaddress1.1.24.2255.255.255.0
noipdirected-broadcast
!
int