Topology we will be using.
1) Objective is to get R5 (192.168.1.5) to be NAT'd with R2 fast2/0 IP address (188.8.131.52).
2) Objective is to get R4 (192.168.1.4) to be NAT'd with R2 fast1/1 IP address (184.108.40.206).
Let's get started by configuring the interfaces.
|R4 and R5 interface configurations.|
|R3 and R6 interface configuration and route back to the 220.127.116.11/30 and 18.104.22.168/30 networks.|
|R2 fast1/0 and fast1/1 interface configurations.|
|R2 fast2/0 interface configurations.|
- Configure R2 fast1/0 and make sure to have 'ip nat inside' as this is the interface facing the inside hosts.
- Configure R2 fast1/1 and fast2/0 and make sure to have 'ip nat outside' as this is the interface facing the outside hosts (usually the internet).
- Create 2 access lists to match R4 and R5 IP address.
- Create a route-map to match R4 IP address.
- Create a route-map to match R5 IP address.
- Create the NAT statements with route-maps and assign the appropriate outside NAT interfaces.
Let's do a ping from R4 and R5 and verify that our NAT is working as it should.
From R4 we are pinging R3 and R6. Notice that no matter what the inside global is 22.214.171.124 (R2 fast1/1). Reason being in our NAT statement we specified that anything sourcing from R4 (192.168.1.4) should be NAT'd to 126.96.36.199.
Now from R5.
From R5 we are pinging R3 and R6. Notice that no matter what the inside global is always 188.8.131.52 (R2 fast2/0). Reason being in our NAT statement we specified that anything sourcing from R5 (192.168.1.5) should be NAT'd to 184.108.40.206.
All is working as it should. NAT with route-maps can be used in numerous instances such as manipulating NAT's only for certain destinations, VPN setups and many more.
Many more articles to come so stay tuned. If you like what you read please comment/like/+1/join this site --->