02-15-2024 01:22 PM
HI All,
we are configuring the IP SLA on Cisco Router,
we have two Internet links and one router.
I am able to reachable the internet from my PC via 2nd ISP, when I unplug the 2nd ISP cables, now the Primary static route is not showing, and the primary ISP internet from PC is not working..
!
track 1 ip sla 1 reachability
!
track 2 ip sla 2 reachability
!
interface FastEthernet0/0
description Inside Interface - LAN
ip address 10.213.57.20 255.255.255.0
ip nat inside
duplex full
!
interface FastEthernet1/0
no ip address
shutdown
duplex full
!
interface FastEthernet2/0
no ip address
shutdown
duplex full
!
interface FastEthernet3/0
no ip address
shutdown
duplex full
!
interface FastEthernet4/0
description PTCL
ip address 117.20.18.82 255.255.255.248
ip nat outside
shutdown
duplex full
!
interface FastEthernet5/0
no ip address
duplex full
!
interface FastEthernet6/0
description MPLS
ip address 182.176.4.92 255.255.255.248
ip nat outside
duplex full
!
ip nat pool BACKUP 182.176.4.89 182.176.4.94 netmask 255.255.255.248
ip nat pool PRIMARY 117.20.18.81 117.20.18.86 netmask 255.255.255.248
ip nat inside source route-map BACKUP interface FastEthernet6/0 overload
ip nat inside source route-map PRIMARY interface FastEthernet4/0 overload
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 117.20.18.81 track 1
ip route 0.0.0.0 0.0.0.0 182.176.4.89 track 2
!
ip access-list extended NAT_BACKUP
permit ip 10.213.57.0 0.0.0.255 any
ip access-list extended NAT_PRIMARY
permit ip 10.213.57.0 0.0.0.255 any
!
ip sla 1
icmp-echo 117.20.18.81 source-interface FastEthernet4/0
threshold 2
timeout 1000
frequency 3
ip sla schedule 1 life forever start-time now
ip sla 2
icmp-echo 182.176.4.89 source-interface FastEthernet6/0
threshold 1000
timeout 1000
frequency 5
ip sla schedule 2 life forever start-time now
!
route-map BACKUP permit 20
match ip address NAT_BACKUP
!
route-map PRIMARY permit 10
match ip address NAT_PRIMARY
!
!
!
control-plane
!
!
line con 0
stopbits 1
line aux 0
stopbits 1
line vty 0 4
login
!
!
end
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#end
Router#
Router#
Router#sh ip nat
*Feb 15 20:29:03.763: %SYS-5-CONFIG_I: Configured from console by console tr
Router#sh ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 182.176.4.92:1024 10.213.57.21:6004 8.8.8.8:6004 8.8.8.8:1024
icmp 182.176.4.92:1025 10.213.57.21:6260 8.8.8.8:6260 8.8.8.8:1025
Router#sh ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 182.176.4.92:1024 10.213.57.21:6004 8.8.8.8:6004 8.8.8.8:1024
icmp 182.176.4.92:1025 10.213.57.21:6260 8.8.8.8:6260 8.8.8.8:1025
icmp 182.176.4.92:1026 10.213.57.21:6516 8.8.8.8:6516 8.8.8.8:1026
icmp 182.176.4.92:1027 10.213.57.21:6772 8.8.8.8:6772 8.8.8.8:1027
Router#sh ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 182.176.4.92:1024 10.213.57.21:6004 8.8.8.8:6004 8.8.8.8:1024
icmp 182.176.4.92:1025 10.213.57.21:6260 8.8.8.8:6260 8.8.8.8:1025
icmp 182.176.4.92:1026 10.213.57.21:6516 8.8.8.8:6516 8.8.8.8:1026
icmp 182.176.4.92:1027 10.213.57.21:6772 8.8.8.8:6772 8.8.8.8:1027
02-16-2024 01:37 AM - edited 02-16-2024 01:40 AM
There are different ways to achive this to failover since you have only 1 Subnet in the Lan, (personally Route-map not much effective)
Route-map we use only when you like to Traffic steering one over other to utlilise both the links based on source or based on destination.
you still like to use Route-map
you need add below interface command to the config :
route-map BACKUP permit 20
match ip address NAT_BACKUP
set interface FastEthernet6/0
!
route-map PRIMARY permit 10
match ip address NAT_PRIMARY
set interface FastEthernet4/0
what is the reason you added below : (you would like to use this Pool for NAtting ?)
ip nat pool BACKUP 182.176.4.89 182.176.4.94 netmask 255.255.255.248
ip nat pool PRIMARY 117.20.18.81 117.20.18.86 netmask 255.255.255.248
other methods check below example : (bottom you see example for single subnet)
https://www.balajibandi.com/?p=1643
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide