If you are connected to two ISPs and looking to use NAT, you might have discovered that with the “ip nat inside source” command you can only specify one outgoing interface. Since you have two outgoing interfaces, you’ll need to use a route-map to get this working. I will show you how to do this using the following topology:
Above we have a ‘host’ router that will be our client on the internal network. NAT is of course our NAT/PAT router and on the right we have two ISPs.
Let’s configure the host first:
Host(config)#no ip routing Host(config)#ip default-gateway 192.168.12.2
First I will disable ip routing so it becomes an ordinary host device. We’ll configure the NAT router as the default gateway. Now we can configure the NAT router:
NAT(config)#ip route 0.0.0.0 0.0.0.0 192.168.23.3 NAT(config)#ip route 0.0.0.0 0.0.0.0 192.168.24.4
I will create two equal static routes, one for ISP1 and another one for ISP2. This allows us to do load balancing.
These two static routes will allow us to perform load-balancing:
NAT#show ip route static S* 0.0.0.0/0 [1/0] via 192.168.24.4 [1/0] via 192.168.23.3
With our routing operational, we can continue to configure NAT. First I’ll configure the correct inside and outside interfaces:
NAT(config)#interface fastEthernet 0/0 NAT(config-if)#ip nat inside NAT(config)#interface fastEthernet 0/1 NAT(config-if)#ip nat outside NAT(config)#interface fastEthernet 1/0 NAT(config-if)#ip nat outside
Next step is to configure an access-list to determine what hosts should be NATed. I’ll make sure that the entire 192.168.12.0/24 will be translated: