Rewriting the Network Prefix
Problem
You want to rewrite all of the addresses in a particular range by simply replacing the prefix with one of equal length.
Solution
Sometimes you need to connect your network to another network
that uses an unregistered range, such as 172.16.0.0/16. However, if you already use
this range in your network, the easiest thing to do is to simply
replace this prefix with another one that doesn’t have a conflict,
such as 172.17.0.0/16:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#ip nat outside source static network172.16.0.0 172.17.0.0 /16no-aliasRouter(config)#ip route172.16.0.0 255.255.0.0EthernetRouter(config)#1/0ip route172.17.0.0 255.255.0.0EthernetRouter(config)#1/0interfaceRouter(config-if)#FastEthernet 0/0ip addressRouter(config-if)#10.1.1.1 255.255.255.0ip nat insideRouter(config-if)#exitRouter(config)#interfaceRouter(config-if)#Ethernet1/0ip addressRouter(config-if)#172.16.1.6 255.255.255.252ip nat outsideRouter(config-if)#exitRouter(config)#endRouter#
Discussion
Unlike the previous examples, this recipe shows a very simple
static form of NAT that translates addresses by simply replacing one
prefix with another. So, for example, the remote host, 172.16.55.19, gets its address rewritten
simply as 172.17.55.19.
The router can accomplish this with the following command:
Router(config)#ip nat outside source static network172.16.0.0 172.17.0.0 /16no-alias
This defines a static ...