某家庭宽带用户同时从ISP1和ISP2购买了宽带接入服务,ISP1通过DHCP方式向用户分配IP地址,网关地址是114.243.224.1,ISP2通过静态方式向用户分配地址,网关地址是123.122.96.1,CPE与BRAS之间经过的都是二层接入交换机,网关都在BRAS上面。ISP1和ISP2都是按流量计费的,但是ISP1的流量价格低于ISP2,用户希望在ISP1没有故障时流量全部通过ISP1转发,ISP1发生故障时自动切换到ISP2转发,既能实现高可靠性,又能降低宽带接入服务价格。
CPE设备的配置如下:
#
sysname CPE
#
nqa entry admin test
type icmp-echo
destination ip 114.243.224.1
frequency 100
reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only
ttl 1
#
nqa schedule admin test start-time now lifetime forever
#
interface GigabitEthernet0/0
ip address dhcp-alloc
#
interface GigabitEthernet0/1
ip address 123.122.96.2 255.255.255.0
#
ip route-static 0.0.0.0 0 114.243.224.1 track 1
ip route-static 0.0.0.0 0 123.122.96.1 preference 80
#
track 1 nqa entry admin test reaction 1
#
return
在某一天ISP1的BRAS到二层接入交换机之间的链路发生故障时,发现静态路由Track与NQA联动不生效,导致用户无法上网。
在CPE上display track 1,可以看到Track 1现在是Negative状态,但是display ip routing-table看到的缺省路由下一跳仍然是ISP1的网关地址。
[CPE]display track 1
Track ID: 1
State: Negative
Duration: 8 days 4 hours 20 minutes 10 seconds
Notification delay: Positive 0, Negative 0 (in seconds)
Tracked object:
NQA entry: admin test
Reaction: 1
Remote IP/URL: 114.243.224.1
Local IP: --
Interface: --
[CPE]display ip routing-table
Destinations : 17 Routes : 17
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 70 0 114.243.224.1 GE0/0
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
114.243.224.0/24 Direct 0 0 114.243.224.2 GE0/0
114.243.224.0/32 Direct 0 0 114.243.224.2 GE0/0
114.243.224.2/32 Direct 0 0 127.0.0.1 InLoop0
114.243.224.255/32 Direct 0 0 114.243.224.2 GE0/0
123.122.96.0/24 Direct 0 0 123.122.96.2 GE0/1
123.122.96.0/32 Direct 0 0 123.122.96.2 GE0/1
123.122.96.2/32 Direct 0 0 127.0.0.1 InLoop0
123.122.96.255/32 Direct 0 0 123.122.96.2 GE0/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
注意到此处缺省路由的Preference是70,但是ip route-static 0.0.0.0 0 114.243.224.1 track 1没有配置Preference,正常情况下Preference应该是60。
[CPE]display ip routing-table 0.0.0.0 0 verbose
Summary count : 1
Destination: 0.0.0.0/0
Protocol: Static
Process ID: 0
SubProtID: 0x2 Age: 196h20m10s
Cost: 0 Preference: 70
IpPre: N/A QosLocalID: N/A
Tag: 0 State: Active Adv
OrigTblID: 0x0 OrigVrf: default-vrf
TableID: 0x2 OrigAs: 0
NibID: 0x11000000 LastAs: 0
AttrID: 0xffffffff Neighbor: 0.0.0.0
Flags: 0x10060 OrigNextHop: 114.243.224.1
Label: NULL RealNextHop: 114.243.224.1
BkLabel: NULL BkNextHop: N/A
Tunnel ID: Invalid Interface: GigabitEthernet0/0
BkTunnel ID: Invalid BkInterface: N/A
FtnIndex: 0x0 TrafficIndex: N/A
Connector: N/A PathID: 0x0
在CPE上display ip routing-table 0.0.0.0 0 verbose,可以看到SubProtID是0x2,查资料可知这条缺省路由是通过DHCP协议学到的,通过DHCP学到的路由Preference是70,小于下一跳是ISP2的网关地址的缺省路由的Preference是80,所以这条缺省路由被添加到了路由表。
在CPE上将下一跳是ISP2网关地址的缺省路由的Preference修改为65。
[CPE]ip route-static 0.0.0.0 0 123.122.96.1 preference 65
Route has been modified.
[CPE]display ip routing-table
Destinations : 17 Routes : 17
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 60 0 114.243.224.1 GE0/0
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
114.243.224.0/24 Direct 0 0 114.243.224.2 GE0/0
114.243.224.0/32 Direct 0 0 114.243.224.2 GE0/0
114.243.224.2/32 Direct 0 0 127.0.0.1 InLoop0
114.243.224.255/32 Direct 0 0 114.243.224.2 GE0/0
123.122.96.0/24 Direct 0 0 123.122.96.2 GE0/1
123.122.96.0/32 Direct 0 0 123.122.96.2 GE0/1
123.122.96.2/32 Direct 0 0 127.0.0.1 InLoop0
123.122.96.255/32 Direct 0 0 123.122.96.2 GE0/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
%Jan 01 00:00:00:000 2011 CPE NQA/6/NQA_ENTRY_PROBE_RESULT: Reaction entry 1 of NQA entry admin-name admin operation-tag test: probe-fail.
[CPE]display ip routing-table
Destinations : 17 Routes : 17
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 65 0 123.122.96.1 GE0/1
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
114.243.224.0/24 Direct 0 0 114.243.224.2 GE0/0
114.243.224.0/32 Direct 0 0 114.243.224.2 GE0/0
114.243.224.2/32 Direct 0 0 127.0.0.1 InLoop0
114.243.224.255/32 Direct 0 0 114.243.224.2 GE0/0
123.122.96.0/24 Direct 0 0 123.122.96.2 GE0/1
123.122.96.0/32 Direct 0 0 123.122.96.2 GE0/1
123.122.96.2/32 Direct 0 0 127.0.0.1 InLoop0
123.122.96.255/32 Direct 0 0 123.122.96.2 GE0/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
经过测试,可以解决问题。
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作