沈阳电脑维修上门服务13889116605: Track与nqa联动VS静态路由优先级相同有蛮长一段时间没有写博客了,下面就来说一下Track与nqa联动VS静态路由优先级相同的情况,也不知道对不对,请指正!请看下图:说明:SWA是机房1...
Track与nqa联动VS静态路由优先级相同
有蛮长一段时间没有写博客了,下面就来说一下Track与nqa联动VS静态路由优先级相同的情况,也不知道对不对,请指正!请看下图:
说明:SWA是机房1的,SWB是机房2的,SWC是某银行的,A到B是truck直连,其他是access,C到A时电信专线,C到B是联通专线;A-B-C-PC2和A-C-PC2是互为备份线路。另:图示是GigabitEthernet口,实际配置用Ethernet
SWA配置:
[SWA]interfaceEthernet0/4/0
[SWA-Ethernet0/4/0]portlink-typetrunk
[SWA-Ethernet0/4/0]porttrunkpermitvlanall
[SWA]vlan2
[SWA]interfaceVlan-interface2
[SWA-Vlan-interface2]ipaddress10.1.1.124
[SWA-Ethernet0/4/1]portlink-typeaccess
[SWA-vlan4]porte0/4/1
[SWA-Vlan-interface4]ipaddress30.1.1.124
[SWA-Ethernet0/4/2]portlink-typeaccess
[SWA-vlan5]porte0/4/2
[SWA-Vlan-interface5]ipaddress50.1.1.124
SWB与SWC同上相似的配置。
PC1:50.1.1.2255.255.255.050.1.1.1
PC2:60.1.1.2255.255.255.060.1.1.1
首先,我们来看静态路由优先级相同的情况
PC1-SWA-SWC-PC2线路
SWA上配置,目的地址:60.1.1.2/24,下一跳:30.1.1.2/24,优先级preference默认60
[SWA]iproute-static60.1.1.22430.1.1.2
SWC上配置,目的地址:50.1.1.2/24,下一跳:30.1.1.1/24,优先级preference默认60
[SWC]iproute-static50.1.1.22430.1.1.1
[SWC]ping50.1.1.2PING50.1.1.2:56databytes,pressCTRL_CtobreakReplyfrom50.1.1.2:bytes=56Sequence=1ttl=63time=44msReplyfrom50.1.1.2:bytes=56Sequence=2ttl=63time=24msReplyfrom50.1.1.2:bytes=56Sequence=3ttl=63time=25ms
[SWA]displayiprouting-tableRoutingTables:PublicDestinations:9Routes:9
Destination/MaskProtoPreCostNextHopInterface
10.1.1.0/24Direct0010.1.1.1Vlan210.1.1.1/32Direct00127.0.0.1InLoop030.1.1.0/24Direct0030.1.1.1Vlan430.1.1.1/32Direct00127.0.0.1InLoop050.1.1.0/24Direct0050.1.1.1Vlan550.1.1.1/32Direct00127.0.0.1InLoop060.1.1.0/24Static60030.1.1.2Vlan4127.0.0.0/8Direct00127.0.0.1InLoop0127.0.0.1/32Direct00127.0.0.1InLoop0
[SWC]displayiprouting-tableRoutingTables:PublicDestinations:9Routes:9
Destination/MaskProtoPreCostNextHopInterface
20.1.1.0/24Direct0020.1.1.2Vlan320.1.1.2/32Direct00127.0.0.1InLoop030.1.1.0/24Direct0030.1.1.2Vlan430.1.1.2/32Direct00127.0.0.1InLoop050.1.1.0/24Static60030.1.1.1Vlan460.1.1.0/24Direct0060.1.1.1Vlan660.1.1.1/32Direct00127.0.0.1InLoop0127.0.0.0/8Direct00127.0.0.1InLoop0127.0.0.1/32Direct00127.0.0.1InLoop0
PC1-SWA-SWB-SWC-PC2线路
SWA上配置,目的地址:60.1.1.2/24,下一跳:10.1.1.2/24,优先级preference还是默认60
[SWA]iproute-static60.1.1.22410.1.1.2
[SWA]disiprouting-tableRoutingTables:PublicDestinations:9Routes:10
Destination/MaskProtoPreCostNextHopInterface
10.1.1.0/24Direct0010.1.1.1Vlan210.1.1.1/32Direct00127.0.0.1InLoop030.1.1.0/24Direct0030.1.1.1Vlan430.1.1.1/32Direct00127.0.0.1InLoop050.1.1.0/24Direct0050.1.1.1Vlan550.1.1.1/32Direct00127.0.0.1InLoop060.1.1.0/24Static60030.1.1.2Vlan4Static60010.1.1.2Vlan2127.0.0.0/8Direct00127.0.0.1InLoop0127.0.0.1/32Direct00127.0.0.1InLoop0
SWC上配置,目的地址:50.1.1.2/24,下一跳:20.1.1.1/24,优先级preference也还是默认60
[SWC]iproute-static50.1.1.22420.1.1.1
[SWC]disiprouting-tableRoutingTables:PublicDestinations:9Routes:10
Destination/MaskProtoPreCostNextHopInterface
20.1.1.0/24Direct0020.1.1.2Vlan320.1.1.2/32Direct00127.0.0.1InLoop030.1.1.0/24Direct0030.1.1.2Vlan430.1.1.2/32Direct00127.0.0.1InLoop050.1.1.0/24Static60030.1.1.1Vlan4Static60020.1.1.1Vlan360.1.1.0/24Direct0060.1.1.1Vlan660.1.1.1/32Direct00127.0.0.1InLoop0127.0.0.0/8Direct00127.0.0.1InLoop0127.0.0.1/32Direct00127.0.0.1InLoop0
在两条线路都有静态路由的情况下,由于SWB还没有静态路由,所以会出现丢包
SWB上配置静态路由:
SWB-PC1线路
[SWB]iproute-static50.1.1.22410.1.1.1
SWB-PC2线路
[SWB]iproute-static60.1.1.22420.1.1.2
[SWB]disiprouting-tableRoutingTables:PublicDestinations:8Routes:8
Destination/MaskProtoPreCostNextHopInterface
10.1.1.0/24Direct0010.1.1.2Vlan210.1.1.2/32Direct00127.0.0.1InLoop020.1.1.0/24Direct0020.1.1.1Vlan320.1.1.1/32Direct00127.0.0.1InLoop050.1.1.0/24Static60010.1.1.1Vlan260.1.1.0/24Static60020.1.1.2Vlan3127.0.0.0/8Direct00127.0.0.1InLoop0127.0.0.1/32Direct00127.0.0.1InLoop0
当两条线路优先级都是一样的时候,关闭SWA或者SWC其中的一个接口,另一条线路是通的,因为是交互的
[SWA-Vlan-interface4]shutdown
50.1.1.2icmp_seq=497ttl=61time=40.000ms50.1.1.2icmp_seq=498ttl=61time=30.000ms50.1.1.2icmp_seq=499ttl=61time=50.000ms50.1.1.2icmp_seq=500ttl=61time=30.000ms50.1.1.2icmp_seq=501ttl=61time=40.000ms
Track与nqa联动的情况,必须两边都配置联动,如果只有一边,那么只能探测到对端的线路是否联通。
PC1-SWA-SWC-PC2线路
SWA上配置,目的地址:60.1.1.2/24,下一跳:30.1.1.2/24,优先级默认60,该路由与Track项1关联。
[SWA]iproute-static60.1.1.22430.1.1.2track1
PC1-SWA-SWB-SWC-PC2线路
SWA上配置,目的地址:60.1.1.2/24,下一跳:10.1.1.2/24,优先级preference是70
[SWA]iproute-static60.1.1.22410.1.1.2preference70
[SWA]nqaentryadmindianxin
[SWA-nqa-admin-dianxin]typeicmp-echo
[SWA-nqa-admin-dianxin-icmp-echo]destinationip30.1.1.2
[SWA-nqa-admin-dianxin-icmp-echo]frequency100
[SWA-nqa-admin-dianxin-icmp-echo]reaction1checked-elementprobe-failthreshold-typeconsecutive5action-typetrigger-only
[SWA-nqa-admin-dianxin-icmp-echo]quit
[SWA]nqascheduleadmindianxinstart-timenowlifetimeforever
[SWA]track1nqaentryadmindianxinreaction1
[SWA]distrackallTrackID:1Status:PositiveDuration:0days0hours0minutes15secondsNotificationdelay:Positive0,Negative0(inseconds)Referenceobject:NQAentry:admindianxinReaction:1
同上,SWC上配置类似SWA,这样可以互相探测对方的线路的联通性。
例如:关闭SWC其中的一个端口,track就可以启动另一条备份线路了
[SWC-Vlan-interface4]shutdown[SWC-Vlan-interface4]%Apr2722:30:49:2202014SWCIFNET/3/LINK_UPDOWN:Vlan-interface4linkstatusisDOWN.%Apr2722:30:49:2202014SWCIFNET/5/LINEPROTO_UPDOWN:LineprotocolontheinterfaceVlan-interface4isDOWN.[SWC-Vlan-interface4][SWC-Vlan-interface4]displayiprouting-tableRoutingTables:PublicDestinations:7Routes:7
Destination/MaskProtoPreCostNextHopInterface
20.1.1.0/24Direct0020.1.1.2Vlan320.1.1.2/32Direct00127.0.0.1InLoop050.1.1.0/24Static70020.1.1.1Vlan360.1.1.0/24Direct0060.1.1.1Vlan660.1.1.1/32Direct00127.0.0.1InLoop0127.0.0.0/8Direct00127.0.0.1InLoop0127.0.0.1/32Direct00127.0.0.1InLoop0
上一篇:CCNP学习笔记之静态路由