In this video, I'm going to show you how to set up a net overloading or port address translation or
pat these two internal devices, router one and router four are going to be netted to the IP address
of router two.
So rather two is configured on the first Ethernet zero one interface with this IP address, 8.1 and
1.1.
But rather than allocating additional addresses for Nat, I'm going to net both these devices to that
single IP address by using port address translation or Pat Rafter.
Three in this example is acting as our Internet server on the outside at the moment, router one is
not able to ping router three root of four on the inside.
Over here is also not able to ping router three.
The pings are failing.
And that's because there is no routing enabled on router three.
It only has a directly connected network.
It doesn't know how to send traffic back to those devices.
We can see that by running debug debug IP ICMP debug IP packet.
I'll do a ping from router one to write a three again.
We can see messages here unreadable.
Unreadable.
So the traffic is getting from the internal hosts to the outside device, rather three, but rather
three doesn't know how to route it back again because the ping is being received from ten 111.
So the local route is trying to send an echo reply back to that address but doesn't know how to get
to that address because there is no route in the routing table.
To get router 3 to 10 111.
So neither rated one out of four are able to ping rather three.
So let's enable nat on router two.
So interface f0/1 ip nat outside.
Now in this example, we need to make an important distinction to the previous NAT examples.
In this example, I am netting multiple devices to the same IP address on router two and that IP address
is configured on Fost Ethernet zero one.
So we are not allocating additional IP addresses to Nat.
This is probably the most common way of doing that in the real world.
So notice I'm using the term Nat and that's what most engineers will call it.
But in actual fact, it's Pat or port address translation or Nat overloading because we're taking multiple
devices and overloading a single IP address to allow those devices to use that single IP address for
access to the Internet.
So what I've done thus far is enable Nat on the outside here and enable Nat on the inside over here.
That's all I've done.
And I'm going to top IP net.
And I'm netting the inside devices and in this case, their source addresses based on an access list,
which I'll create in a moment, access list one, and I'm going to enact them to a physical interface,
fast Ethernet zero one rather than allocating a separate IP address.
And this is the important piece I'm going to overload this net entry to allow multiple devices to access
the Internet using that single address.
Now I have to create the access list, one as referenced in my command.
So access list one permit.
And who's going to be allowed to be netted.
I made a mistake there.
In this case, it should be anyone in the ten 110 network.
So anyone in this network will be netted.
So show IP net translation.
No net translations at the moment.
I'm going to enable telnet on router three.
And I'd rather one I'll do a telnet to router three.
But before I do that, let's enable net debugging on router two so we can see the net debugging in real
time.
Telnet 8.1.12.
Hit Enter.
Notice we can see the net translations taking place.
The source IP address ten 111 is being matted to 8111.
This IP address for traffic sent to 811 to the reply comes back.
So source 8112 sending traffic to 8111 that is netted to ten 111.
So it put my password in of Cisco.
We can see the net translations taking place.
Type A single character.
There's the net translations.
Show IP net translations.
There's the dynamic net translation.
Notice the inside local address ten 111.
Using this ephemeral or random port number is being translated to 8111.
Using the same port number going to 8112 on port 23.
So notice router three is not being translated, but the entries for that address are shown in the table.
Let's do another telnet.
So telnet from router 4 to 8 112.
And log in.
We can see.
Ten 114.
This is part of Ford's IP address is translated to 8111.
Right.
A two IP address for traffic going to 811 to router three.
IP address show IP net translations.
We can see two dynamic net translations one 410 114 and one 410 111.
And this is how router two knows who the traffic is destined to when both router one and router four
telnet into router three, router three sends traffic back to router two, but based on different port
numbers and on router three, I'll just type one character in.
Notice we can see sequence numbers here.
I'll try type another character.
Notice
28832288333435.
And then for the return traffic, we can see the sequence numbers as well.
Show IP net translations.
There are translations once again.
What's important to remember is that when traffic is returned from router three to router two, it's
coming from this address 8112 port 23 going to this address 8111 but using a port number.
So rather two is able to differentiate between the two sessions based on the port number, hence the
term port address.
Translation When traffic arrives from router three at router two with a destination port, number of
this going to 8111, the traffic is going to be forwarded to router one, but when it arrives going
to the same IP address.
But this port number, the traffic is forwarded to router for router two ensures that these port numbers
are unique in the net table.