思科ASA/PIX的双出口问题解决方案
07-04
0
    Asa/PIX的Static Route Tracking命令可以有效解决双ISP出口的问题
    存在问题:
    静态路由没有固定的机制来决定是否可用,即使下一跳不可达,静态路由还是会存在路由表里,是有当ASA自己的和这条路由相关接口down了,才会从路由表里删除
    解决办法:
    Static Route Tracking这个feature提供一种方法来追踪静态路由,当主路由失效时可以安装备份路由进路由表,例如:2条缺省指向不同ISP,当主的ISP 断了,可以立即启用备用ISP链路,它是使用ICMP来进行追踪的,如果在一定holdtime没有收到reply的话就认为这条链路down了,就会立即删除该静态路由,预先设置的备份路由就会进入路由表。
    注意:配置时要在outside口上放开icmp reply(如果打开了icmp限制)
    pixFirewall(config)#sla monitor sla_id     #指定检测的slaID
    Pixfirewall(config-sla-monitor)# type echo protocol ipIcmpEcho target_ip interface
    if_name    #指定检测的协议类型为ICMP协议,并指定检测目的地址和接口
    这个必须是个可以ping通的地址,当这个地址不可用时,track跟踪的路由就会被删除,备份路由进路由表
    pixFirewall(config)#sla monitor schedule sla_id [life {forever | seconds}] [start-time {hh:mm[:ss] [month day | day month] | pending | now | after hh:mm:ss}] [ageout seconds] [recurring]   #指定一个Schedule,一般会是start now
    必须要写时间表,不然track的路由进不了路由表
    pixFirewall(config)# track track_id  rtr sla_id  reachability  #指定一个TrackID,并要求追踪SlaID的可达性
    pixFirewall(config)# route if_name dest_ip mask gateway_ip [admin_distance] track track_i     #设定默认路由,并绑定一个TrackID
    配置实例:
    sla monitor 1
    type echo protocol ipIcmpEcho 202.1.1.2 interface dx
    sla monitor schedule 1 start-time now(必须配置,不然track的路由进不了路由表)
    track 2 rtr 1 reachability
    route dx 0.0.0.0 0.0.0.0 202.1.1.2 1 track 2 (电信默认网关,会追踪地址的可达性)
    route wt 0.0.0.0 0.0.0.0 101.1.1.2 2 (网通默认网关)
    当配置的202.1.1.2 ping不通(ICMP协议不能Reachability)的时候,route dx 0.0.0.0 0.0.0.0 202.1.1.2 1就会在路由表里删除,并由第二条默认路由即route wt 0.0.0.0 0.0.0.0 101.1.1.2 2取代,当202.1.1.2恢复后,又会重新变为dx 0.0.0.0 0.0.0.0 202.1.1.2 1
    这个feature我想大家在很多项目里都会遇到,ASA可以有效解决!
    这与我们用路由器实现双出口备份是一样的,通过配置SAA,检查其连通性。并跟踪这结果。来对路由进行选择,实现思路非常精巧!
    附:PIX双出口ISP配置实例
    网络拓扑图:
    配置文件:
    Pixfirewall# show running-config
    : Saved
    :
    PIX Version 7.2(1)
    !
    hostname pix
    domain-name default.domain.invalid
    enable password 9jNfZuG3TC5tCVH0 encrypted
    names
    !
    interface Ethernet0
    nameif outside
    security-level 0
    ip address 10.200.159.2 255.255.255.248
    !
    interface Ethernet1
    nameif backup!--- 命名链接备份ISP接口的接口名字,随便起名字的security-level 0
    ip address 10.250.250.2 255.255.255.248
    !
    interface Ethernet2
    nameif inside
    security-level 100
    ip address 172.22.1.163 255.255.255.0
    !
    interface Ethernet3
    shutdown
    no nameif
    no security-level
    no ip address
    !
    interface Ethernet4
    shutdown
    no nameif
    no security-level
    no ip address
    !
    interface Ethernet5
    shutdown
    no nameif
    no security-level
    no ip address
    !
    passwd 2KFQnbNIdI.2KYOU encrypted
    ftp mode passive
    dns server-group DefaultDNS
    domain-name default.domain.invalid
    pager lines 24
    logging enable
    logging buffered debugging
    mtu outside 1500
    mtu backup 1500
    mtu inside 1500
    no failover
    asdm image flash:/asdm521.bin
    no asdm history enable
    arp timeout 14400
    global (outside) 1 interface
    global (backup) 1 interface
    nat (inside) 1 172.16.1.0 255.255.255.0 [page]
    !--- 配置双ISP接口的NAT,都直接指定接口而不是IP地址
    route outside 0.0.0.0 0.0.0.0 10.200.159.1 1 track 1
    !--- 配置被追踪的默认静态路由,并指定管理距离为1.
    !--- 被追踪的静态路由如果追踪成功则在路由表中,否则从路由表中清除
    route backup 0.0.0.0 0.0.0.0 10.250.250.1 254
    !--- 配置备份的默认静态路由,一定要指定的管理距离大于被追踪的静态默认路由
    !--- 当被追踪默认静态路由追踪成功时,则选用被追踪路由,因为其管理距离小
    !--- 当被追踪的默认静态路由追踪不成功时,则选用本条路由,因为被追踪的默认路由已从路由表中清除。
    timeout xlate 3:00:00
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout uauth 0:05:00 absolute
    username cisco password ffIRPGpDSOJh9YLq encrypted
    http server enable
    http 172.22.1.0 255.255.255.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart
    sla monitor 123
    type echo protocol ipIcmpEcho 10.0.0.1 interface outside
    num-packets 3
    frequency 10
    sla monitor schedule 123 life forever start-time now
    !--- 配置SLA Monitor,设定ID为123;指定协议和监测目的IP地址及接口
    !--- 并且设置了包的个数和频率为10秒
    !--- 配置了SLA Monitor ID为123的生命期和开始的时间
    !
    track 1 rtr 123 reachability
    !--- 配置Track ID为1的RTR,要求判断标准为可达性。
    !--- 与前面的命令route outside 0.0.0.0 0.0.0.0 10.0.0.2 1 track 1 相对应
    telnet timeout 5
    ssh timeout 5
    console timeout 0
    !
    class-map inspection_default
    match default-inspection-traffic
    !
    !
    policy-map type inspect dns preset_dns_map
    parameters
    message-length maximum 512
    policy-map global_policy
    class inspection_default
    inspect dns preset_dns_map
    inspect ftp
    inspect h323 h225
    inspect h323 ras
    inspect netbios
    inspect rsh
    inspect rtsp
    inspect skinny
    inspect esmtp
    inspect sqlnet
    inspect sunrpc
    inspect tftp
    inspect sip
    inspect xdmcp
    !
    service-policy global_policy global
    prompt hostname context
    Cryptochecksum:a4a0e9be4593ad43bc17a1cc25e32dc2: end

上一篇:没有了

下一篇:MPLS VPN技术原理和配置解析

相关内容

热门资讯

2012年思科认证(CCNP)... 2012年思科认证(CCNP)考试复习指导6
2012年思科认证(CCNP)... 2012年思科认证(CCNP)考试复习指导3
Cisco考试再认证常见问题4 Cisco考试再认证常见问题4
思科推进中国泛海网络建设 思科推进中国泛海网络建设
Cisco认证问答:我能在考试... Cisco认证问答:我能在考试的时候带计算器吗?
2012年思科认证(CCNP)... 2012年思科认证(CCNP)考试复习指导8