Ios Nat LB
Ios Nat LB
Introduction
Prerequisites
Requirements
Components Used
Conventions
Configure
Network Diagram
Firewall Policy Discussion
Verify
Troubleshoot
NetPro Discussion Forums − Featured Conversations
Related Information
Introduction
This document describes a configuration for a Cisco IOS® router to connect a network to the Internet with
Network Address Translation (NAT) via two ISP connections. Cisco IOS NAT can distribute subsequent TCP
connections and UDP sessions over multiple network connections if equal−cost routes to a given destination
are available. In the event that one of the connections becomes unusable, object−tracking, a component of
Optimized Edge Routing (OER), can be used to deactivate the route until the connection becomes available
again, which ensures network availability inspite of instability or unreliability of an Internet connection.
This document describes additional configurations to apply Cisco IOS Zone−Based Policy Firewall to add
stateful inspection capability to augment the basic network protection provided by NAT.
Prerequisites
Requirements
This document assumes you already have LAN and WAN connections that work and does not provide
configuration or troubleshooting background to establish initial connectivity.
This document does not describe a way to differentiate between the routes. Therefore, there is no way to
prefer a more desirable connection over a less−desirable connection.
This document describes how to configure OER in order to enable or disable either Internet route−based on
reachability of the ISP's DNS servers. You need to identify specific hosts that are reachable via only one of
the ISP connections and might not be available if that ISP connection is not available.
Components Used
This configuration was developed with a Cisco 1811 router that runs 12.4(15)T2 Advanced IP Services
software. If a different software version is used, some features may not be available, or the configuration
commands might differ from those shown in this document. Similar configurations should be available on all
Cisco IOS router platforms, although the interface configuration will likely vary between different platforms.
The information in this document was created from the devices in a specific lab environment. All of the
devices used in this document started with a cleared (default) configuration. If your network is live, make sure
that you understand the potential impact of any command.
Conventions
Refer to the Cisco Technical Tips Conventions for more information on document conventions.
Configure
You might need to add policy−based routing for specific traffic to be sure that it always uses one ISP
connection. Examples of traffic that might require this behavior include IPsec VPN clients, VoIP handsets,
and any other traffic that should always use only one of the ISP connection options to prefer the same IP
address, higher speed, or lower latency on the connection.
In this section, you are presented with the information to configure the features described in this document.
Note: Use the Command Lookup Tool ( registered customers only) to obtain more information on the commands
used in this section.
Network Diagram
This document uses this network setup:
This configuration example, as illustrated in the network diagram, describes an access router that uses a
DHCP−configured IP connection to one ISP (as shown by FastEthernet 0) and a PPPoE connection over the
other ISP connection. The connection types have no particular impact on the configuration, unless
object−tracking and Optimized Edge Routing (OER) and/or policy−based routing is to be used with a
DHCP−assigned Internet connection. In these cases, it may be very difficult to define a next−hop router for
policy routing or OER.
If you have questions on Zone−Based Policy Firewall policy design and configuration, refer to Zone−Based
Policy Firewall Design and Application Guide.
CLI Configuration
!
interface FastEthernet0
ip address dhcp
ip dhcp client route track 345
ip nat outside
ip virtual−reassembly
zone security public
!
!−−−Use ip dhcp client route track [number] to monitor route on DHCP interfaces
!−−− Define ISP−facing interfaces with ip nat outside
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
!
!
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
zone security private
!
!
Interface Dialer 0
description PPPoX dialer
ip address negotiated
ip nat outside
ip virtual−reassembly
ip tcp adjust−mss
zone security public
!
ip route 0.0.0.0 0.0.0.0 dialer 0 track 123
!
!
ip nat inside source route−map fixed−nat interface Dialer0 overload
ip nat inside source route−map dhcp−nat interface FastEthernet0 overload
!
!
ip sla 1
icmp−echo 172.16.108.1 source−interface Dialer0
timeout 1000
threshold 40
frequency 3
!
!
!
ip sla 2
icmp−echo 172.16.106.1 source−interface FastEthernet0
timeout 1000
threshold 40
frequency 3
!
!
!
ip sla schedule 1 life forever start−time now
ip sla schedule 2 life forever start−time now
!
!
!
access−list 110 permit ip 192.168.108.0 0.0.0.255 any
!−−− Define ACLs for traffic that will be NATed to the ISP connections
!
!
!
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
!−−− Route−maps associate NAT ACLs with NAT outside on the ISP−facing interfaces
Verify
Use this section to confirm that your configuration works properly.
The Output Interpreter Tool ( registered customers only) (OIT) supports certain show commands. Use the OIT to
view an analysis of show command output.
• show ip nat translationDisplays NAT activity between NAT inside hosts and NAT outside hosts.
This command provides verification that inside hosts are being translated to both NAT outside
addresses.
Router#show 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
Troubleshoot
Verify these items if the connections do not work after you configure the Cisco IOS router with NAT:
Related Information
• Cisco IOS Firewall
• Cisco IOS 12.4 NAT configuration Reference
• Zone−Based Policy Firewall Design and Application Guide
• Cisco IOS Optimized Edge Routing Configuration Guide, Release 12.4T
• Technical Support & Documentation − Cisco Systems
All contents are Copyright © 2006−2007 Cisco Systems, Inc. All rights reserved. Important Notices and Privacy Statement.