Cisco – IOS NAT Load-Balancing with Optimized Edge Routing for Two Internet Connections

IOS NAT Load-Balancing with Optimized Edge Routing for Two Internet Connections – Cisco Systems.

track timer interface 5
!
! Configure timers on route tracking
!
track 123 rtr 1 reachability
 delay down 15 up 10
!
track 345 rtr 2 reachability
 delay down 15 up 10
!
! Use “ip dhcp client route track [number]” 
   ! to monitor route on DHCP interfaces
! Define ISP-facing interfaces with “ip nat outside”
!
interface FastEthernet0
 ip address dhcp
 ip dhcp client route track 345
 ip nat outside
 ip virtual-reassembly
!
interface FastEthernet1
 no ip address
 pppoe enable
 no cdp enable
!
interface FastEthernet2
 no cdp enable
!
interface FastEthernet3
 no cdp enable
!
interface FastEthernet4
 no cdp enable
!
interface FastEthernet5
 no cdp enable
!
interface FastEthernet6
 no cdp enable
!
interface FastEthernet7
 no cdp enable
!
interface FastEthernet8
 no cdp enable
!
interface FastEthernet9
 no cdp enable
!
! Define LAN-facing interfaces with “ip nat inside”
!
interface Vlan1
 description LAN Interface
 ip address 192.168.108.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 ip tcp adjust-mss 1452
!
! Define ISP-facing interfaces with “ip nat outside”
!
Interface Dialer 0
 description PPPoX dialer
 ip address negotiated
 ip nat outside
 ip virtual-reassembly
 ip tcp adjust-mss
!
ip route 0.0.0.0 0.0.0.0 dialer 0 track 123
!
! Configure NAT overload (PAT) to use route-maps
!
ip nat inside source route-map fixed-nat
   interface Dialer0 overload
ip nat inside source route-map dhcp-nat 
   interface FastEthernet0 overload
!
! Configure an OER tracking entry 
   ! to monitor the first ISP connection
!
ip sla 1
 icmp-echo 172.16.108.1 source-interface Dialer0
 timeout 1000
 threshold 40
 frequency 3
!
! Configure a second OER tracking entry 
   ! to monitor the second ISP connection
!
ip sla 2
 icmp-echo 172.16.106.1 source-interface FastEthernet0
 timeout 1000
 threshold 40
 frequency 3
!
! Set the SLA schedule and duration
!
ip sla schedule 1 life forever start-time now
ip sla schedule 2 life forever start-time now
!
! Define ACLs for traffic that 
   ! will be NATed to the ISP connections
!
access-list 110 permit ip 192.168.108.0 0.0.0.255 any
!
! Route-maps associate NAT ACLs with NAT 
   ! outside on the ISP-facing interfaces
!
route-map fixed-nat permit 10
 match ip address 110
 match interface Dialer0
!
route-map dhcp-nat permit 10
 match ip address 110
 match interface FastEthernet0
This entry was posted in Cisco. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s