cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
33215
Views
15
Helpful
5
Replies

Destination NAT

Krista Bowman
Level 1
Level 1

I am trying to nat the destination address with an ASR router.

Source --- Source IP: 96.97.98.99 Destination IP: 12.34.56.78

Router ----NAT the destination to 10.0.0.4

After NAT Source IP is 96.97.98.99  Destination IP is: 10.0.0.4

I don't seem to be able to find the correct commands.

Any assistance would be appreciated.

K

 

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

What you are looking for is in reality a static source NAT. I know that you intend to rewrite the destination of the packets coming from internet to your router so that they can reach your internal server at 10.0.0.4. However, the names "source NAT" and "destination NAT" apply to the traffic that flows from the inside to the outside interface, i.e. from your internal LAN going off to the internet. It is only natural that in the return traffic, the opposite addresses are rewritten, i.e. if the source NAT rewrites the source IP in the traffic going from inside to outside, it will also rewrite the destination IP in the traffic going from outside to inside.

So simply look for a typical static source NAT configuration. While I do not know what ASR you are running (if it is IOS-XE or IOS-XR), on plain IOS, this would be very simple:

ip nat inside source static 10.0.0.4 12.34.56.78

or, with port forwarding:

ip nat inside source static tcp 10.0.0.4 80 12.34.56.78 80

Please give it a try.

Best regards,
Peter

View solution in original post

5 Replies 5

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

What you are looking for is in reality a static source NAT. I know that you intend to rewrite the destination of the packets coming from internet to your router so that they can reach your internal server at 10.0.0.4. However, the names "source NAT" and "destination NAT" apply to the traffic that flows from the inside to the outside interface, i.e. from your internal LAN going off to the internet. It is only natural that in the return traffic, the opposite addresses are rewritten, i.e. if the source NAT rewrites the source IP in the traffic going from inside to outside, it will also rewrite the destination IP in the traffic going from outside to inside.

So simply look for a typical static source NAT configuration. While I do not know what ASR you are running (if it is IOS-XE or IOS-XR), on plain IOS, this would be very simple:

ip nat inside source static 10.0.0.4 12.34.56.78

or, with port forwarding:

ip nat inside source static tcp 10.0.0.4 80 12.34.56.78 80

Please give it a try.

Best regards,
Peter

Hi peter,

can you please let me know in which interface we need to give

 ip nat inside and ip nat outside 

command?

Krista Bowman
Level 1
Level 1

Thanks very much for the clarification Peter!

That worked great.

Krista

This looks like an old thread but a i have a similar situation which i couldnt resolve with the Peter's suggestions.
We have a layer3 between Corp and Customer 1.1.1.0/30 with .1 being our end and .2 being customer end. customer wants our source x.x.x.x to destination y.y.y.y to be translated to .1 of the layer3 link (x.x.x.x <=>1.1.1.1) so they see our source as coming from layer3 intreface(1.1.1.1). this works fine when we initiate the traffic. However when the customer initiate traffic towards us they want to use source y.y.y.y destination 1.1.1.1 and when the packet gets to interface 1.1.1.1 they want that translated to x.x.x.x ( 1.1.1.1<=>x.x.x.x) reverse NAT if you may.
This does not seem to be happning. I have advise custoemer that the only this can be done would be to remove NAT and just do simple routing between us or they have to NAT for the reverse traffic at their end. Im not sure if i have got all wrong. any pointers would be much appreciated.
Thanks

gaypalan
Cisco Employee
Cisco Employee

Is there any way/configurations available to NAT one directed broadcast address to other directed broadcast address(say 10.139.240.255 -> 10.133.233.255) ?

Review Cisco Networking products for a $25 gift card