0

Is this possible, I cannot seem to find a solution for it..

enter image description here

Using NAT,I have this config (this is on packet tracer)

interface GigabitEthernet0/0/0
 ip address 10.1.1.1 255.255.255.0
 ip nat inside


interface GigabitEthernet0/0/1
 ip address 20.1.1.1 255.255.255.0
 ip nat outside

ip nat inside source static 10.1.1.2 20.1.1.1
ip nat outside source static 20.1.1.2 10.1.1.1

The inside rule works as expected, the outside rule, the packet dies at the 10.1.1.1 interface

6
  • 2
    Yes it’s possible, and rather simple, really. Look up Network Address Translation (NAT)
    – Ron Trunk
    Jul 19, 2019 at 12:19
  • I have tried NAT, and yes, it works as shown in the diagram, if the connection is initiated from the 10.1.1.2.. but what if a connection is initiated from 20.1.1.2? Technically, under the existing NAT rule, it should send it to 20.1.1.1, where it only goes to. Trying a similar NAT the opposite direction (using OUTSIDE static) the packet gets from 20.1.1.2 to 10.1.1.2, but dies at 10.1.1.1 so I don't get a complete connection Jul 19, 2019 at 12:24
  • 2
    Edit your question to include the configuration so we can see what’s wrong.
    – Ron Trunk
    Jul 19, 2019 at 13:00
  • Search for cisco outside source nat. You will get some documents that explain how to do that. You seem to be using inside source NAT.
    – Ron Maupin
    Jul 19, 2019 at 14:59
  • editted with commands Jul 20, 2019 at 14:30

2 Answers 2

1
  1. You should not use interface address for NAT, use some virutal address
  2. outside static NAT should be configured differently

I repeated your ip address configuration and topology, but my NAT rules are:

ip nat inside source static 10.1.1.2 20.1.1.100
ip nat outside source static 20.1.1.2 20.1.1.100

then when we ping 20.1.1.2 from 10.1.1.2 we have on the router (debug ip nat is turned on):

*Jul 21 09:46:24.251: NAT*: s=10.1.1.2->20.1.1.100, d=20.1.1.2 [32]
*Jul 21 09:46:24.271: NAT*: s=20.1.1.2, d=20.1.1.100->10.1.1.2 [32]

when we ping 10.1.1.2 from 20.1.1.2 we have

*Jul 21 09:47:12.671: NAT: s=20.1.1.2->20.1.1.100, d=10.1.1.2 [59]
*Jul 21 09:47:12.707: NAT: s=10.1.1.2, d=20.1.1.100->20.1.1.2 [59]

and all works.

0

Router(config)#ip access- list 10 permit ip 10.1.1.0 any Router(config)# ip nat inside source list 10 interface gigabit Ethernet 0/0/1 overload.

Or for static one to one natting your can use

Router (config)#ip nat inside source static 10.1.1.2 20.1.1.1

Try above two natting configuration as per your requirement

First one is nat overload many to one natting

Second is static nat one to one natting..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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