Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Having a PAT problem

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

Re: Having a PAT problem

Omal,

You got it.

Toshi

6 REPLIES
Blue

Re: Having a PAT problem

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.

Re: Having a PAT problem

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

New Member

Re: Having a PAT problem

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!

Re: Having a PAT problem

Omal,

You got it.

Toshi

New Member

Re: Having a PAT problem

Thanks a lot Thoshi!

Take care.

Blue

Re: Having a PAT problem

"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.

122
Views
0
Helpful
6
Replies
CreatePlease to create content