[c-nsp] how NAt works from outside to inside

s m sam.gh1986 at gmail.com
Sat Mar 30 04:47:00 EDT 2013


hello all

i am newbie in NAT and i have some problem. i want to have a dynamic
nat and this is my topology:

192.168.1.1-----> cisco 2800 ------> 192.168.2.1

and this is my configuration in cisco 2800:

interface GigabitEthernet 0/0
ip address 192.168.2.2 255.255.255.0
ip nat outside
ip virtual-reassebly in
duplex auto
speed auto

interface GigabitEthernet 0/1
ip address 192.168.1.2 255.255.255.0
ip nat inside
ip virtual-reassebly in
duplex auto
speed auto

ip nat pool t 192.168.2.50 192.168.2.60 netmask 255.255.255.0
ip nat inside source list 1 pool t
access-list 1 permit any

when i ping 192.168.2.1 from 192.168.1.1 (from inside to outside),
every thing is ok and nat is done correctly but when i ping
192.168.1.1 from 192.168.2.1 (from outside to inside),  packets that
received in 192.168.2.1 are as below:

request packets:   src:192.168.2.1----> dst: 192.168.1.1
reply packets:       src: 192.168.2.50----> dst:192.168.2.1

and 192.168.2.1 system accept these packets as its reply!!! i think
this behavior is wrong, isn't it? how it is happen? moreover, if i put
a freebsd system instead of cisco, everything is the same except that
192.168.2.1 does not accept the reply packets as its reply (as i
expected!!). please let me know if the cisco behavior is correct or
not and  if it is correct, how cisco router do that?

please help me if i am misunderstanding.
thanks in advance


More information about the cisco-nsp mailing list