02-21-2009 02:59 PM - edited 03-06-2019 04:09 AM
Hi every body!
I was practicing dynamic nat on my 2500 routers when i encountered something strange.
The topology is:
h1----sw(L2)----e0RA s0----------s0 RB
Ip address:
h1: 199.199.199.10/24
default gateway: 199.199.199.1/24
rAe0 199.199.199.1/24
rA s0 200.200.200.1/24
rB s0 200.200.200.2/24
rA config:
int eo
ip nat inside
ip addres 199.199.199.1/24
int s0
ip address 200.200.200.1/24
ip nat outside
ip nat source list 1 pool zee
acess-list 1 permit 199.199.199.0 0.0.0.255
ip nat pool zee 200.200.200.2 200.200.200.3 netmask 255.255.255.0
------------------------------------------
rb config;
int s0
ip address 200.200.200.2/24
clockrate 56000
-------------------------------------------
i found:
h1 can ping 200.200.200.2
but rA can not ping 200.200.200.2
Rb can ping 200.200.200.1
Why can ra not ping 200.200.200.2?
Any input will be appreciated
thanks a lot!
Solved! Go to Solution.
02-22-2009 01:41 PM
If you guys don't mind, i have one more questions.
I was reading about NAT(using pat) in my ccna book, i find that nat router does not change the src port, it retains the src port number in the packet received from host. for example:
My book shows the following output;
show ip nat translation
( i omitted the output for brevity )
inside global inside local
200.200.1.1 3213 10.10.10.10 3213
It is obvious that nat router is using the same port number it receives in the packet.
My questions are:
1) Does nat router change the port number if it receives two ip packets from different hosts with same src port say 200?
2) Does nat router usually use the same port number , it receives in the ip packet ,for multiplexing?
Thanks a lot!
02-22-2009 02:36 PM
Hi Sarah,
PAT (overloading) divides the available ports per global IP address into three ranges: 0-511, 512-1023, and 1024-65535. PAT assigns a unique source port for each UDP or TCP session. It will attempt to assign THE SAME port value of the original request, but if the original source port has already been used, it will start scanning from the beginning of the particular port range to find the first available port and will assign it to the conversation.
So in your example the first translation should keep the same port (200) whereas for the second one the router should chose the first available port from the 0-511 range (of course different from 200).
Hope it helps,
Petru
02-22-2009 02:51 PM
Thanks a lot Petru for the awesome reply !
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide