Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Here's the situation:

I have a couple of clients connected to a switch and the switch is connected to a Cisco 2621.

The clients all have IP addresses in the range and the router address is

So, host A has the address and host B has the address

I would like to be able to get to each host using another address ( for for example).

So I need to be able to NAT this on the router. I have played about and used a loopback interface and assigned an address and used ip nat outside on there, though I couldn't really get it working.

Any ideas on how to do this would be great.


share|improve this question

1 Answer 1

This configuration is called 'NAT on a stick', as the router will forward to the same end of the stick.

Cisco has a good design technote here which explain how to use it with indeed a loopback, but also with route-maps. This could help you.

Here is the configuration they're using. With only a little ajustments you should be able to use it with your setup:

interface Loopback0   
 ip address
 ip nat outside

interface Ethernet0
 ip address secondary
 ip address
 ip nat inside
 ip policy route-map Nat-loop

ip nat pool external prefix-length 29
ip nat inside source list 10 pool external overload
ip nat inside source static

ip classless

ip route
ip route Ethernet0

access-list 10 permit 

access-list 102 permit ip any
access-list 102 permit ip any
access-list 177 permit icmp any any

route-map Nat-loop permit 10
 match ip address 102
 set ip next-hop
share|improve this answer
Thanks. I'd seen that before and gave it a go and couldn't get it working at all. Would it essentially let me ping say and this be translated to – fdf33 Jun 3 '11 at 15:47
well, you have to adapt it to your configuration, but yes, this would allow it. – petrus Jun 3 '11 at 16:13
Just adapted that config and tried it on my router. Basically, the pings now work, but the router shows nothing when debugging NAT and the host isn't showing that it's getting the actual pings either when using tcpdump. So it's like it's pinging just the router itself. – fdf33 Jun 3 '11 at 17:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.