此示例配置显示如何使用浮动静态路由和按需拨号(DDR)路由来备份使用集成多业务数字网络(ISDN)的帧中继链路。
本文档没有任何特定的要求。
此配置使用下面软件和硬件版本开发并且被测试。
Cisco 2503 路由器
思科IOS®软件版本12.2(7b)在两台路由器上运行
本文档中的信息都是基于特定实验室环境中的设备创建的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您是在真实网络上操作,请确保您在使用任何命令前已经了解其潜在影响。
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
WAN链路的一个实施目标是提供一种方法,在链路发生故障时对其进行备份。ISDN经常提供此备份。思科提供的备份策略可以以不同方式实现相同的功能。如果路由信息通过帧中继链路传输,则如果帧中继链路停止传输信息,浮动静态路由可以启动备用链路。
注意:本示例显示使用浮动静态路由的帧中继备份。但是,您也可以使用此方法备份任何WAN链路。
其他解决方案可以使用备份接口(请参阅为子接口配置备份接口)或拨号器监视。如果使用backup interface命令方法,则点对点子接口是有优势的,因为即使永久虚拟连接(PVC)在帧中继下行时,主接口或多点接口仍可保持打开/打开状态。
有关配置DDR备份的详细信息,请参阅文档配置DDR备份并排除故障。有关各种DDR备份方法的详细信息,您还可以参阅“评估备份接口、浮动静态路由和拨号器监视”文档。
本部分提供有关如何配置本文档所述功能的信息。
注意:要查找有关本文档中使用的命令的其他信息,请使用IOS的命令查找工具。
本文档使用下图所示的网络设置。
本文档使用如下所示的配置。
此配置已在2500系列路由器上使用Cisco IOS软件版本12.2(7b)进行测试。相同的配置概念也适用于类似的路由器拓扑或其他Cisco IOS版本。
Router1(Cisco 2503路由器) |
---|
Current configuration: version 12.2 ! hostname Router1 ! !--- This username password pair is used for !--- PPP CHAP authentication username Router2 password 0 letmein ip subnet-zero no ip domain-lookup ! isdn switch-type basic-5ess ! interface Ethernet0 ip address 172.16.1.1 255.255.255.0 no ip route-cache no ip mroute-cache ! interface Serial0 !--- Primary Link. !--- The bandwidth is adjusted to allow for rapid backup of the link. !--- This adjusts the EIGRP Hello interval and !--- Hold time for rapid convergence. !--- The bandwidth command does not actually change the bandwidth of the link, !--- it only adjusts the routing protocol bandwidth parameter. bandwidth 2048 ip address 172.16.2.1 255.255.255.128 encapsulation frame-relay no ip route-cache no ip mroute-cache clockrate 64000 ! interface Serial1 no ip address no ip route-cache no ip mroute-cache shutdown ! interface BRI0 ! -- Backup link. ip address 172.16.3.1 255.255.255.0 ! -- The backup link is in a different subnet. ! -- The BRI interface on the peer should also be in this subnet. encapsulation ppp no ip route-cache no ip mroute-cache dialer map ip 172.16.3.2 name Router2 broadcast 5552000 ! -- Dialer map for the peer. Note the IP address and name. ! -- The name must match the authenticated username of the peer. dialer load-threshold 5 either dialer-group 1 ! -- Apply interesting traffic definition. ! -- Interesting traffic definition is defined in dialer-list 1. isdn switch-type basic-5ess ppp authentication chap ppp multilink ! router eigrp 100 !--- This example uses eigrp. !--- You can use any routing protocol instead. network 172.16.0.0 auto-summary no eigrp log-neighbor-changes ! ip classless ip route 172.16.4.0 255.255.255.0 172.16.3.2 200 !--- The floating static route is defined. !--- Note the administrative distance of the route is 200. !--- Hence it is only used when all other routes for 172.16.4.0/24 !--- are lost. Note that the next hop for the floating static route !--- matches the dialer map ip. If the nexthop is not the same as !--- in the dialer map then the router will no dial. ! access-list 100 deny eigrp any any access-list 100 permit ip any any !--- EIGRP routing packets are denied in the dialer-list. !--- This prevents eigrp packets from keeping the link up. !--- Adjust the interesting traffic depending on your traffic definitions. ! dialer-list 1 protocol ip list 100 !--- Interesting traffic defintion. Use access-list 100. !--- The interesting traffic is applied to BRI interface !--- using dialer-group 1. ! line con 0 line aux 0 transport input all line vty 0 4 login ! end |
已为Router1配置了浮动静态路由。浮动静态路由的分配管理距离为200。同一子网的路由也将通过增强型内部网关路由协议(EIGRP)通过帧中继链路获知,该协议强调浮动路由的附加或冗余性质。EIGRP学习的路由将安装在路由表中,因为其管理距离比静态路由的200低90。如果帧中继链路发生故障,EIGRP路由将从路由表中消失,浮动静态路由将安装。要通过ISDN连接发送的任何相关流量都会打开线路。当通过帧中继恢复连接时,通过EIGRP再次获知路由。此路由将取代静态路由,并再次通过帧中继电路转发流量。
路由协议流量在拨号器列表中标记为不相关,这样不会导致ISDN线路连接或保持连接。但是,一旦链路接通,EIGRP数据包就可以通过链路,两台路由器可以交换路由信息。broadcast关键字已包含在拨号器映射语句中,以允许路由协议流量通过ISDN链路。如果即使ISDN链路已打开,您也不希望EIGRP交换路由信息,请勿在dialer map语句中包含broadcast关键字。
dialer load-threshold命令设置将触发要在第二B信道上发出的并发呼叫的负载。已配置多链路点对点协议(PPP)(ppp multilink),以便两个ISDN B信道可以捆绑在一起,作为一个虚拟接入接口,用于聚合带宽。
在当前配置中,仅将Router1配置为发出呼叫。Router2从Router1接收呼叫。如果希望两端都启动链路,请向Router2的配置中添加dialer map和dialer load-threshold命令。
Router2(Cisco 2503路由器) |
---|
Current configuration: version 12.2 ! ! hostname Router2 ! username Router1 password 0 letmein ip subnet-zero no ip domain-lookup ! isdn switch-type basic-5ess ! ! interface Ethernet0 ip address 172.16.4.1 255.255.255.0 ! interface Serial0 bandwidth 2048 ip address 172.16.2.2 255.255.255.128 encapsulation frame-relay clockrate 64000 ! interface Serial1 no ip address shutdown clockrate 64000 ! interface BRI0 ip address 172.16.3.2 255.255.255.0 ! -- IP address of backup interface. ! -- This router accepts the call. Note the IP address matches both the ! -- dialer map floating static router nexthop on the peer. encapsulation ppp dialer-group 1 isdn switch-type basic-5ess ppp authentication chap ppp multilink !--- The missing dialer map command disables !--- this router from making the call. ! router eigrp 100 network 172.16.0.0 auto-summary no eigrp log-neighbor-changes ! ip classless ip route 172.16.1.0 255.255.255.0 172.16.3.1 200 ! access-list 100 deny eigrp any any access-list 100 permit ip any any dialer-list 1 protocol ip list 100 ! ! line con 0 line aux 0 line vty 0 4 ! end |
本部分所提供的信息可用于确认您的配置是否正常工作。
注意:某些show命令受Output Interpreter工具支持,该工具允许您查看对show命令输出的分析;
观察Router1的下面路由表。注意,在Router2通过帧中继链路无法到达后,浮动静态路由取代了EIGRP获知的路由。
下面显示的是帧中继链路打开时Router1的路由表。
Router1#show ip route Codes: C - connected, S - static, I - IGRP, 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, E - EGP i - IS-IS, 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.16.0.0/16 is variably subnetted, 4 subnets, 2 masks [D 172.16.4.0/2490/1787392] via 172.16.2.2, 00:06:56, Serial0 !--- EIGRP learned route over Frame Relay link C 172.16.1.0/24 is directly connected, Ethernet0 C 172.16.2.0/25 is directly connected, Serial0 C 172.16.3.0/24 is directly connected, BRI0 Router1#
当帧中继链路上的连接丢失时,Router1会将浮动静态路由安装到其路由表中,如下所示。
Router1#show ip route Codes: C - connected, S - static, I - IGRP, 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, E - EGP i - IS-IS, 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.16.0.0/16 is variably subnetted, 4 subnets, 2 masks S 172.16.4.0/24 [200/0] via 172.16.3.2 !--- Floating static route. Administrative distance is 200 C 172.16.1.0/24 is directly connected, Ethernet0 C 172.16.2.0/25 is directly connected, Serial0 C 172.16.3.0/24 is directly connected, BRI0 Router1#
到网络172.16.4.0/24的任何相关流量现在都会建立ISDN连接。例如,从Router1,对172.16.4.1执行ping操作会启动ISDN链路,如下所示。
注意:如果您使路由协议感兴趣,则定期流量会自动启动链路。这种情况的缺点是,该链路将无限期地保持运行,可能导致高额的收费。
Router1#ping 172.16.4.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.4.1, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 36/36/36 ms Router1# 3d22h: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up 3d22h: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to up 3d22h: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1, changed state to up 3d22h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access1, changed state to up 3d22h: %ISDN-6-CONNECT: Interface BRI0:1 is now connected to 5552000 Router2 Router1#
由于ISDN线路已启用,EIGRP现在开始通过ISDN连接交换路由信息。这会导致Router1将EIGRP路由安装到其路由表中,该路由指向下一跳172.16.3.2。
Router1#show ip route Codes: C - connected, S - static, I - IGRP, 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, E - EGP i - IS-IS, 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.16.0.0/16 is variably subnetted, 5 subnets, 3 masks D 172.16.4.0/24 [90/40537600] via 172.16.3.2, 00:00:17, BRI0 !--- EIGRP route learnt over the ISDN link C 172.16.3.2/32 is directly connected, BRI0 C 172.16.1.0/24 is directly connected, Ethernet0 C 172.16.2.0/25 is directly connected, Serial0 C 172.16.3.0/24 is directly connected, BRI0 Router1#
相关流量是发起ISDN呼叫的流量,由dialer-list命令定义。在上述配置中,拨号器列表指向访问列表编号100,该编号允许除EIGRP数据包外的所有IP数据包。这意味着,除EIGRP数据包外,所有IP数据包都可以建立ISDN连接。建立连接后,允许任何流量(包括EIGRP流量)通过链路。但是,如果在拨号器空闲计时器期间没有相关流量通过ISDN链路,则链路将关闭,并且不会交换EIGRP路由。此时,浮动静态路由将再次安装在Router1的路由表中。
有关浮动静态路由故障排除的信息,请参阅文档配置和DDR备份故障排除。本文档解决常见症状,例如:
当主链路断开时,不会拨打备份链路。
备份链路拨号,但未连接到另一端。
当主链路恢复时,备份链路不会停用。
当主接口关闭时,备份链路不稳定(例如,它抖动)。
有关帧中继特定故障排除,请参阅配置帧中继备份
以下命令有助于排除备份链路故障:
debug dialer events — 查看按需拨号路由活动。
debug dialer packets — 查看拨号程序相关流量信息。
show ppp multilink — 在备份启动后检查多链路状态。
在尝试以上任何debug命令之前,请参阅有关Debug命令的重要信息。
路由协议流量(EIGRP)被dialer list命令标记为不相关,因此它不会启动链路或保持链路正常运行。但是,当链路处于活动状态时,将交换路由更新。debug dialer packet命令可以验证正确的流量是否可以启动链路。输出如下所示。
Router1#debug dialer packets Dial on demand packets debugging is on Router1# 3d22h: BR0 DDR: ip (s=172.16.3.1, d=224.0.0.10), 60 bytes, outgoing uninteresting (list 100) !--- EIGRP packet 3d22h: BR0 DDR: sending broadcast to ip 172.16.3.2 -- failed, not connected !--- EIGRP packet does not bring up the link 3d22h: BR0 DDR: ip (s=172.16.3.1, d=224.0.0.10), 60 bytes, outgoing uninteresting (list 100) !--- EIGRP packet 3d22h: BR0 DDR: sending broadcast to ip 172.16.3.2 -- failed, not connected !--- EIGRP packet does not bring up the link 3d22h: BR0 DDR: cdp, 273 bytes, outgoing uninteresting (no list matched)
相关流量(本例中为Internet控制消息协议(ICMP)回显)将重置空闲计时器并保持链路正常运行,如下所示。非关注流量会通过,但如果空闲计时器过期,链路将不会保持运行。
Router1#ping 172.16.4.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.4.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 40/51/80 ms Router1# 3d22h: BR0 DDR: ip (s=172.16.3.1, d=172.16.4.1), 100 bytes, outgoing interesting (list 100) !--- ICMP packet (ping) 3d22h: BR0 DDR: ip (s=172.16.3.1, d=172.16.4.1), 100 bytes, outgoing interesting (list 100) !--- ICMP packet (ping) 3d22h: BR0 DDR: ip (s=172.16.3.1, d=172.16.4.1), 100 bytes, outgoing interesting (list 100) !--- ICMP packet (ping) 3d22h: BR0 DDR: ip (s=172.16.3.1, d=172.16.4.1), 100 bytes, outgoing interesting (list 100) !--- ICMP packet (ping) 3d22h: BR0 DDR: ip (s=172.16.3.1, d=172.16.4.1), 100 bytes, outgoing interesting (list 100) !--- ICMP packet (ping) 3d22h: BR0 DDR: ip (s=172.16.3.1, d=224.0.0.10), 60 bytes, outgoing uninteresting (list 100) !--- EIGRP packet 3d22h: BR0 DDR: sending broadcast to ip 172.16.3.2 3d22h: BR0 DDR: ip (s=172.16.3.1, d=224.0.0.10), 60 bytes, outgoing uninteresting (list 100) !--- EIGRP packet 3d22h: BR0 DDR: sending broadcast to ip 172.16.3.2
EIGRP数据包虽然标记为无关,但会通过ISDN链路,因为连接已由相关ICMP流量建立。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
17-Aug-2004 |
初始版本 |