Lesson Contents
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 our NAT/PAT router, and on the right, we have two ISPs.
Configuration
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 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
The next step is configuring 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:
Thank you for this awesome post… keep it up!
Thanks Rene !!
Thank you, this site is awesome.
Rene,
Where can i find Route-Map chapter?
Hi bhargavi,
In our lessons, we used route-map with different routing protocols for routing redistribution and/or filtering. I haven’t found a specific chapter explaining specifically about route-map in our website, but you can see how Rene has used it in different routing protocols on the following 2 lessons:
EIGRP Route-map Filtering
OSPF LSA Type 5 Filtering on Cisco IOS
I can refer you also to this article from Cisco website where you can find all information needed about route-map:
Route-map explanation from cisco.com
Hope this can help.