注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

欢迎光临shaying110的博客

RSed-ISPing

 
 
 

日志

 
 

双ISP出口热备方案  

2011-04-07 12:19:22|  分类: CISCO网络 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
双ISP出口热备方案 - shaying110 - 欢迎光临shaying110的博客

 如上图所示,现在一般办公室都有2条通过不同运营商到达互联网的线路,一条主一条备,当主线DOWN是自动起动备份线路,当主线路恢复时,起用主线路,备份线路再回归到静默状态。现在通过两种方法实现这个目标。
1、Track+静态浮动路由
2、Track+EEM
具体做法如下:
1、Track+静态浮动路
 office router 配置
interface Serial1/0
 ip address 10.10.12.1 255.255.255.0
 serial restart-delay 0
!
interface Serial1/1
 ip address 10.10.112.1 255.255.255.0
 serial restart-delay 0
 
 ip route 0.0.0.0 0.0.0.0 10.10.12.2 track 1
ip route 0.0.0.0 0.0.0.0 10.10.112.2 10

ip sla 1
 icmp-echo 10.10.12.2 source-ip 10.10.12.1
 frequency 5
ip sla schedule 1 start-time now recurring
!
track 1 rtr 1 reachability


验证:
r1#sh ip sla stat

Round Trip Time (RTT) for       Index 1
        Latest RTT: 44 milliseconds
Latest operation start time: *00:08:16.827 UTC Fri Mar 1 2002
Latest operation return code: OK
Number of successes: 55
Number of failures: 10
Operation time to live: 3225 sec

r1#sh track 1
Track 1
  Response Time Reporter 1 reachability
  Reachability is Up
    2 changes, last change 00:05:04
  Latest operation return code: OK
  Latest RTT (millisecs) 28
  Tracked by:
    STATIC-IP-ROUTING 0
r1#sh ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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 10.10.12.2 to network 0.0.0.0

     10.0.0.0/24 is subnetted, 2 subnets
C       10.10.12.0 is directly connected, Serial1/0
C       10.10.112.0 is directly connected, Serial1/1
S*   0.0.0.0/0 [1/0] via 10.10.12.2

 

r1#
*Mar  1 00:09:32.631: %TRACKING-5-STATE: 1 rtr 1 reachability Up->Down
r1#
r1#
r1#sh ip sla stat

Round Trip Time (RTT) for       Index 1
        Latest RTT: NoConnection/Busy/Timeout
Latest operation start time: *00:09:36.827 UTC Fri Mar 1 2002
Latest operation return code: Timeout
Number of successes: 68
Number of failures: 12
Operation time to live: 3141 sec


r1#sh track 1
Track 1
  Response Time Reporter 1 reachability
  Reachability is Down
    3 changes, last change 00:00:16
  Latest operation return code: Timeout
  Tracked by:
    STATIC-IP-ROUTING 0
r1#sh ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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 10.10.112.2 to network 0.0.0.0

     10.0.0.0/24 is subnetted, 2 subnets
C       10.10.12.0 is directly connected, Serial1/0
C       10.10.112.0 is directly connected, Serial1/1
S*   0.0.0.0/0 [10/0] via 10.10.112.2
r1#


r1#
*Mar  1 00:10:17.647: %TRACKING-5-STATE: 1 rtr 1 reachability Down->Up
r1#
r1#
r1#sh ip sla stat

Round Trip Time (RTT) for       Index 1
        Latest RTT: 44 milliseconds
Latest operation start time: *00:10:26.827 UTC Fri Mar 1 2002
Latest operation return code: OK
Number of successes: 71
Number of failures: 15
Operation time to live: 3099 sec


r1#sh track 1                                         
Track 1
  Response Time Reporter 1 reachability
  Reachability is Up
    4 changes, last change 00:00:17
  Latest operation return code: OK
  Latest RTT (millisecs) 28
  Tracked by:
    STATIC-IP-ROUTING 0
r1#sh ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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 10.10.12.2 to network 0.0.0.0

     10.0.0.0/24 is subnetted, 2 subnets
C       10.10.12.0 is directly connected, Serial1/0
C       10.10.112.0 is directly connected, Serial1/1
S*   0.0.0.0/0 [1/0] via 10.10.12.2
******************************************

2、Track+EEM
具体做法如下:
 office router 配置
 
 ip route 0.0.0.0 0.0.0.0 10.10.12.2
 ip sla 1
 icmp-echo 10.10.12.2 source-ip 10.10.12.1
 frequency 5
ip sla schedule 1 start-time now recurring
!
track 1 rtr 1 reachability
 
 event manager applet track1up
 event track 1 state up
 action 1.1 cli command "en"
 action 1.2 cli command "conf t"
 action 1.3 cli command "no ip route 0.0.0.0 0.0.0.0 10.10.112.2"
 action 1.4 cli command "ip route 0.0.0.0 0.0.0.0 10.10.12.2"
event manager applet track1down
 event track 1 state down
 action 1.1 cli command "en"
 action 1.2 cli command "conf t"
 action 1.3 cli command "no ip route 0.0.0.0 0.0.0.0 10.10.12.2"
 action 1.4 cli command "ip route 0.0.0.0 0.0.0.0 10.10.112.2"
!
 验证:
 r1#sh ip sla stat

Round Trip Time (RTT) for       Index 1
        Latest RTT: 60 milliseconds
Latest operation start time: *00:54:46.827 UTC Fri Mar 1 2002
Latest operation return code: OK
Number of successes: 597
Number of failures: 18
Operation time to live: 437 sec


r1#sh track 1
Track 1
  Response Time Reporter 1 reachability
  Reachability is Up
    6 changes, last change 00:00:34
  Latest operation return code: OK
  Latest RTT (millisecs) 60
  Tracked by:
    EEM applet track1up
    EEM applet track1down
r1#sh ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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 10.10.12.2 to network 0.0.0.0

     10.0.0.0/24 is subnetted, 2 subnets
C       10.10.12.0 is directly connected, Serial1/0
C       10.10.112.0 is directly connected, Serial1/1
S*   0.0.0.0/0 [1/0] via 10.10.12.2


r1#
*Mar  1 00:55:23.783: %TRACKING-5-STATE: 1 rtr 1 reachability Up->Down
*Mar  1 00:55:24.071: %SYS-5-CONFIG_I: Configured from console by vty0
r1#sh ip sla stat

Round Trip Time (RTT) for       Index 1
        Latest RTT: NoConnection/Busy/Timeout
Latest operation start time: *00:55:26.827 UTC Fri Mar 1 2002
Latest operation return code: Timeout
Number of successes: 602
Number of failures: 20
Operation time to live: 393 sec


r1#sh track 1
Track 1
  Response Time Reporter 1 reachability
  Reachability is Down
    7 changes, last change 00:00:16
  Latest operation return code: Timeout
  Tracked by:
    EEM applet track1up
    EEM applet track1down
r1#sh ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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 10.10.112.2 to network 0.0.0.0

     10.0.0.0/24 is subnetted, 2 subnets
C       10.10.12.0 is directly connected, Serial1/0
C       10.10.112.0 is directly connected, Serial1/1
S*   0.0.0.0/0 [1/0] via 10.10.112.2
r1#


*Mar  1 00:55:58.787: %TRACKING-5-STATE: 1 rtr 1 reachability Down->Up
*Mar  1 00:55:59.071: %SYS-5-CONFIG_I: Configured from console by vty0
r1#sh ip sla
% Incomplete command.

r1#sh ip sla stat

Round Trip Time (RTT) for       Index 1
        Latest RTT: 44 milliseconds
Latest operation start time: *00:56:11.827 UTC Fri Mar 1 2002
Latest operation return code: OK
Number of successes: 606
Number of failures: 22
Operation time to live: 352 sec


r1#sh track 1
Track 1
  Response Time Reporter 1 reachability
  Reachability is Up
    8 changes, last change 00:00:18
  Latest operation return code: OK
  Latest RTT (millisecs) 44
  Tracked by:
    EEM applet track1up
    EEM applet track1down
r1#sh ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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 10.10.12.2 to network 0.0.0.0

     10.0.0.0/24 is subnetted, 2 subnets
C       10.10.12.0 is directly connected, Serial1/0
C       10.10.112.0 is directly connected, Serial1/1
S*   0.0.0.0/0 [1/0] via 10.10.12.2
r1#

  评论这张
 
阅读(398)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017