cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1463
Views
0
Helpful
6
Replies

Having a PAT problem

omal
Level 1
Level 1

Hi

In my lab I tested PAT like this:

pc connects to R1's ethernet0 interface and R1's serial 0 connects to R2's serial 2 interface.

The IPs are as follows:

pc -> 10.10.10.2

R1 e0 --> 10.10.10.1

R1 s0 --> 20.20.20.1

R2 s2 --> 20.20.20.1

R2 e0 --> 30.30.30.1

When I ping from the PC to 30.30.30.1 and give the nat translation command I get the following output:

inside local 10.10.10.2:6853

10.10.10.2:6854

10.10.10.2:6855

10.10.10.2:6856

inside global 20.20.20.1:6853

20.20.20.1:6854

20.20.20.1:6855

20.20.20.1:6856

outside global 30.30.30.1:6853

30.30.30.1:6854

30.30.30.1:6855

30.30.30.1:6856

The following is a show run of R1:

R1#show run

hostname R1

interface ethernet0

ip address 10.10.10.1 255.255.255.0

ip nat inside

interface serial 0

ip address 20.20.20.1 255.255.255.0

ip nat outside

access-list 25 permit 10.10.10.0 0.0.0.255

ip nat inside source list 25 interface serial 0 overload

end

R1#

But I don't see the port address getting translated. What is the reason?

Thanks in advance!

1 Accepted Solution

Accepted Solutions
6 Replies 6

lamav
Level 8
Level 8

What are you expecting to see?

There is one host on the network. The router's NAT process receives the packet and NATs it according to the rules you've set.

No ports are going to be translated as such because there's only one host on the network. There's no port contention.

Omal,

That worked as expected. (grin)

You're doing PAT. It means that the router will translate the source port before sending the packet out of the outside interface.

Because the source uses the random port. that's 6584. When the router received that packet. It will look at the table. Did I already use this port? Well, No! So I can use this port for PAT. That's why you saw the same port when using a "sh ip nat trans" command.

HTH,

Toshi

Hi Thoshi

You mean to say that if the router has already used that port only it will translate the source port (the port number that comes from the PC) in to a different port number, is it?

Thanks in advance!

Omal,

You got it.

Toshi

Thanks a lot Thoshi!

Take care.

"You mean to say that if the router has already used that port only it will translate the source port (the port number that comes from the PC) in to a different port number, is it?"

Yes, thats what I was talking about when I mentioned port contention between two flows.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card