OSPF上的帧中继framerelay.docx
《OSPF上的帧中继framerelay.docx》由会员分享,可在线阅读,更多相关《OSPF上的帧中继framerelay.docx(13页珍藏版)》请在冰点文库上搜索。
OSPF上的帧中继framerelay
在帧中继上运行OSPF
---------------------------------------------------------------
OSPF在NBMA网络中的解决方案
---------------------------------------------------------------
一、OSPF在NBMA网络中产生的通信问题
配置基本的帧中继网络
帧中继配置
R1:
interfaces1/0
ipaddress192.168.1.1255.255.255.0
noshutdown
encapsulationframe-relay
noframe-relayinverse-arp
frame-relaymapip192.168.1.2102broadcast
frame-relaymapip192.168.1.3103broadcast
exit
routerospf1
network192.168.1.00.0.0.255area0
R2:
interfaces1/0
ipaddress192.168.1.2255.255.255.0
noshutdown
encapsulationframe-relay
noframe-relayinverse-arp
frame-relaymapip192.168.1.1201broadcast
frame-relaymapip192.168.1.3201broadcast
exit
routerospf1
network192.168.1.00.0.0.255area0
R3:
interfaces1/0
ipaddress192.168.1.3255.255.255.0
noshutdown
encapsulationframe-relay
noframe-relayinverse-arp
frame-relaymapip192.168.1.1301broadcast
frame-relaymapip192.168.1.2301broadcast
exit
routerospf1
network192.168.1.00.0.0.255area0
路由配置
R1:
routerospf1
network192.168.1.00.0.0.255area0
R2:
routerospf1
network192.168.1.00.0.0.255area0
R3:
routerospf1
network192.168.1.00.0.0.255area0
debugipospfadj
clearipospfprocess刷新ospf进程,重新计算
showipospfneighbor查看ospf邻居
问题:
只看到了downstate,以后的邻居关系就建立不了
原因:
不支持广播和组播,ospf路由器在建立邻居关系的时候,第一个hello包使用的是组播,第二个才是单播包,又因为NBMA网络不支持组播,所以才导致邻居关系无法建立起来
默认情况下,参与到NBMA网路中的ospf接口模式为non-broacast,都不支持广播
showipospfinterfaces1/0
二、在NBMA网络上运行OSPF解决方案
---------------------------------------------------------------------------
五种解决方法:
在NBMA网络上运行OSPF解决方案
工业标准
non-broadcast:
保持默认的NBMA状态
point-to-multipoint:
点到多点
cisco标准
broadcast:
模拟成广播网络
point-tomultipointnon-broadcast:
点到多点非广播
point-to-point:
点到点网络
showipospfinters0/0查看当前模式,默认是non-broadcast模式
----------------------------------------------------------------------------
--------------------------------------------------------------------------
方法一:
NBMA模式:
保持NBMA的接口模式去运行ospf,手动指定邻居
-------------------------------------------------------------------------
要点:
默认就是non-broadcast模式,所以不需要去修改接口模式了
邻居不能自动发现,必须通过neighbor命令手动指定邻居,指定的是邻居的RouterID
在NBMA网络中,需要选举DR和BDR的,如果拓扑是星型网络,就要让中心路由器成为DR;如果是全互连的就无所谓了
通过修改接口优先级,优先级0代表该路由器永远无法成为DR或者BDR,1是路由器默认的接口优先级
时间计时器:
deadtime---120秒hello间隔----30秒
1、帧中继配置还是和上面一样(DLCI复用)
2、修改接口模式:
所有路由器在帧中继的接口都要配置
ipospfnetworknon-broadcast
3、手动指定邻居
R1:
(中心路由器),我们只需要在这一台路由器上指定邻居就可以了,那是因为在ospf建立邻居关系的时候,第一个发送hello包使用的是组播地址,其他路由器再发送的时候使用的就是单播地址了,就不再需要组播,所以我们在中心路由器上指定邻居完成第一个hello包的传输就可以了
手动指定路由器的两个邻居
routerospf1
neighbor192.168.1.2必须使用邻居路由器的router-id
neighbor192.168.1.3
exit
4、手动调整优先级,使中心路由器成为DR
R1
interfaces0/0
ipospfpriority25
或者
在指定邻居的时候,将邻居的优先级设置为0
routerospf1
neighbor192.168.1.2priority0
neighbor192.168.1.3priority0
5、在每台路由器上刷新ospf进程重新计算DR
clearipospfprocess
查看邻居关系
showipospfneighbor
-----实验:
证明在手动指定邻居的时候我们使用的是邻居物理接口地址还是邻居的RouterID
创建两个回环接口
R2:
interfacelo0
ipaddress2.2.2.2255.255.255.255
noshutdown
ipospf1area0在接口上通过ospf路由
R3:
interfacelo0
ipaddress3.3.3.3255.255.255.255
noshutdown
ipospf1area0
clearipospfp刷新ospf进程,重新计算RID
或者
手动指定RID
R2:
routerospf1
router-id2.2.2.2
R3:
routerospf1
router-id3.3.3.3
clearipospfprocess刷新进程,让RID生效
更改邻居
routerospf1
neighbor192.168.1.2邻居路由器的RouterID
neighbor192.168.1.3
exit
showipospfneighbor
deadtime:
120秒
hello间隔:
30秒
--------------------------------------------------------------------------
方法二:
广播模式--broadcast
-------------------------------------------------------------------------
要点:
邻居是自动发现的
在星型拓扑中,中心路由器还是DR,配置和上述一样
hello时间间隔是10秒;deadtime是40秒
在这种网络中需要选举DR/BDR
删掉之前的OSPF路由
norouterospf1
1、帧中继配置和上面是一样的(DLCI复用)
2、手动调整优先级,使中心路由器成为DR
R1
interfaces0/0
ipospfpriority25
3、配置OSPF路由
routerospf1
networkarea0
4、将路由器所有在NBMA网络中的接口类型修改为broadcast
interfaces1/0
ipospfnetworkbroadcast
showipospfinters1/0查看接口的网络类型
-------------------------------------------------------------------------
方法三:
点到点模式
中心路由器必须划分成点到点子接口
-------------------------------------------------------------------------
hellotime是30秒,deadtime是120秒
不需要选举DR和BDR
中心路由器必须划分子接口,边缘路由器可以使用物理接口,或者划分子接口
划分点到点子接口的路由器,不需要使用ipospfnetworkpoint-to-point这条命令
IP编制需要重新规划,使用两个不同的子网
1、帧中继配置(不用DLCI复用)
R1:
interfaces1/0
enfr
noframeinver
noshutdown
interfaces1/0.1point-to-point
ipaddress192.168.1.1255.255.255.252
noshutdown
frame-relayinterface-dlci102
interfaces1/0.2point-to-point
ipaddress192.168.1.5255.255.255.252
noshutdown
frame-relayinterface-dlci103
routerospf1
network192.168.1.10.0.0.0area0
network192.168.1.50.0.0.0area0
R2:
interfaces0/0
enfr
noframeinver
ipaddress192.168.1.2255.255.255.252
noshut
frame-relaymapip192.168.1.1201broadcast
ipospfnetworkpoint-to-point
routerospf1
network192.168.1.2255.255.255.252area0正常通告
R3:
interfaces0/0
enfr
noframeinver
ipaddress192.168.1.6255.255.255.252
noshut
ipospfnetworkpoint-to-point
frame-relaymapip192.168.1.1301broadcast
ipospf1area0OSPF的另外一种路由通告方式
-------------------------------------------------------------------------
方法四:
点到多点模式
可以直接使用物理接口,也可以使用多点子接口
-------------------------------------------------------------------------
hellotime是30秒,deadtime是120秒
不需要选举DR和BDR
不需要DLCI复用,但是运行了ospf之后,两个spoke之间任意可以通信
自动产生一条多点帧中继接口的主机路由,用于解决不使用DICI复用产生的端到端连通性问题
如果使用多点子接口代替物理接口,那么多点子接口不需要使用ipospfnetworkpoint-to-multipoint
清空所有路由器的配置
defaults1/0
norouterospf1
1、配置帧中继,不使用DLCI的复用,运行ospf
R1:
interfaces1/0
ipaddress192.168.1.1255.255.255.0
noshutdown
encapsulationframe-relay
noframe-relayinverse-arp
frame-relaymapip192.168.1.2102broadcast
frame-relaymapip192.168.1.3103broadcast
exit
routerospf1
network192.168.1.00.0.0.255area0
R2:
interfaces1/0
ipaddress192.168.1.2255.255.255.0
noshutdown
encapsulationframe-relay
noframe-relayinverse-arp
frame-relaymapip192.168.1.1201broadcast
exit
routerospf1
network192.168.1.00.0.0.255area0
R3:
interfaces1/0
ipaddress192.168.1.3255.255.255.0
noshutdown
encapsulationframe-relay
noframe-relayinverse-arp
frame-relaymapip192.168.1.1301broadcast
exit
routerospf1
network192.168.1.00.0.0.255area0
2、更改接口模式,如果使用子接口就不需要
R1:
interfaces1/0
ipospfnetworkpoint-to-multipoint
R2:
interfaces1/0
ipospfnetworkpoint-to-multipoint
R3:
interfaces1/0
ipospfnetworkpoint-to-multipoint
-------------------------------------------------------------------------
方法五:
点到多点非广播模式
跟点到多点模式相比,邻居必须要手动指定,其他特点和点到多点一样
-------------------------------------------------------------------------
要点:
hellotime是30秒,deadtime是120秒
不需要选举DR和BDR
不需要DLCI复用,但是运行了ospf之后,两个spoke之间任意可以通信
自动产生一条多点帧中继接口的主机路由,用于解决不使用DICI复用产生的端到端连通性问题
如果使用多点子接口代替物理接口,那么多点子接口不需要使用ipospfnetworkpoint-to-multipoint
跟点到多点模式相比,必须要手动指定邻居
1、帧中继配置(无DLCI复用)
2、OSPF路由(和上面一样)
3、手动指定路由器的两个邻居
routerospf1
neighbor192.168.1.2邻居接口的IP地址
neighbor192.168.1.3
exit
4、更改接口模式,如果使用子接口就不需要
R1:
interfaces1/0
ipospfnetworkpoint-to-multipoint
R2:
interfaces1/0
ipospfnetworkpoint-to-multipoint
R3:
interfaces1/0
ipospfnetworkpoint-to-multipoint