Now if they were multiple hosts on Insight Network let's say we've got PC one and PC to PC one has an
IP address of 10 to 1 to 1 and 1 PC to has an IP address of 10 that one would wonder.
In this example if we were using 1 to 1 Nat rather than port address translation Pat we would need to
create a net entry for each host.
So Host 1 as an example would be enacted to one that one would want a to and host to a PC ti would be
netted to one but one would 1.3 the net increase would look as follows 10 1 1 1 2 1 1 1 2 10 1 1 2 2
2 2 1 2 1 2 1 2 3 as the inside global address outside local outside global in this example would be
the same.
So the inside local address would be the actual IP address of the host the inside global address would
be the nattered global address as seen on the Internet.
The outside local and outside global addresses in this example would remain the same because we are
not enacting the destination IP address only the source IP address will be netted in this example.
The problem with Pier network address translation as shown in this example is that you would need a
public IP address for every internal host that uses a private RAFC 19:18 address that kind of defeats
the whole purpose of network address translation where we want to conserve IP addresses in the real
world.
We tend to use Pat or port address translation which so Scott also call not overloading Pat allows multiple
inside host addresses such as 10 1 on 1 and 10 1 20 to be netted to the same public IP address.
So in this example both PCs are indebted to the same inside global address.
Its not a one to one mapping.
In this example two private IP addresses on Nottage to a single public IP address.
In addition in this example one dog wandered wandered.
One is the router is configured IP address.
That raises another issue.
How does the router to free initiate traffic that's destined to itself versus traffic destined to PC
one versus traffic destined to PC.
So when PC one since traffic onto the Internet to the server and the traffic is returned How does the
router know that that traffic belongs to PC one rather than PC.
Two if the traffic is going to the same IP address.
So in other words how does the router differentiate between different sessions or different flows if
multiple hosts on the inside are talking to the same server on the internet while that's where port
address translation comes in.
In this example multiple hosts are sharing the same IP address.
So the way to make the entries unique is to combine an IP address with a port number to differentiate
between the different sessions or different host devices.
And that's where the port address translation term comes in because multiple hosts are sharing the same
IP address.
The way to get a unique entry in the inside global table is to combine a port and an IP address.
So the combination of port and IP address provides a unique value which allows the router to differentiate
between entries.
So in this example both PC 1 and pc 2 are sharing $1.1 1.1 as they inside global address.
However when host 1 initiate the session to the server it's going to choose a random way femoral port
number to uniquely identify the session on the local PC when the traffic hits the router.
The router will use that chosen source port number to represent the next entry in the table.
So the PC chose 1024 and that's the entry used in the inside global net table entry if PC to initiate
a session to the server.
And let's say for argument's sake it chose ten twenty five as the source port number that's the entry
used on the router to uniquely identify the session.
So when traffic is sent from these PCs to the server and it's returned back to the router from the server
the server is able to differentiate between traffic that's destined to tend not one but one to one.
There's this traffic that's destined to tend at one did wondered too because of the unique IP address
and port number combination.
So what happens if both PCs for whatever reason randomly choose the same source port number.
So let's assume both PC one and PC to chose 10:24 while all the router does is it just changes the entry
in the inside global table to keep the entry unique.
So take one one to chose 10:24 is the port number and the router simply changes that to another port
number to keep the valley's unique in the table.
So in the service sense traffic to the Rodda destined to wondered wondered wondered.
One port number ten twenty five.
The router simply changes the address to 10 that wanted one to two port number 10:24.
So if you are sniffing the traffic on this local area network connection you would see traffic with
the address of 10.
Doug wondered wondered.
One port 10:24 going to the servo with address 1:58 to port 80.
You would also see traffic from PC with IP address change but one would want to port number 10:24 going
to the same server.
To to to to to to to port 80.
However when the traffic hits the router the route is going to change those valleys when the traffic
is noted by the Rodda before sending the traffic onto the Internet.
The radical change to the source addresses.
So if you are sniffing the traffic on the Internet interface you would see traffic from PC one now having
a source IP address of one but wondered one that one port 10:24 destination address remains the same.
We are not changing the outside global and outside local addresses.
You would also see traffic from PC to the source address would now be wondered wondered what one port
10:25 on this interface with the destination set to the server.
So the router has netted both the IP address and in this case it's also changed the port number to keep
the values unique.
The server in this example believes that it's got two sessions from the same host.
One does wonder wonder.
One way is in actual fact they are two separate PCs but the server is unaware of that as it only sees
the nattered IP address when the server returns traffic to the Rodda it's going to return traffic to
wondered wondered what at one port 10:24 source address would now be two door to door to door to port
80 as well as destination address and wondered.
Wondered.
One port.
Ten twenty five.
Source address of two toe to toe to toe to port 80.
The server once again believes that it's talking to the same host but different sessions so same IP
address but different port numbers.
The Radan gnats that increase traffic based on the inside global table so traffic destined to one dog
wanted 1.1 port 10:24 is changed to standard one that one but one port 10:24 and forwarded on to the
local segment traffic destined to wondered wondered why at one port 10:25 these translated to 10 dead
wonder wonder to port 10:24 and forwarded on to the local segment.
The PCs as well as the server are unaware that their traffic has been Nottage.
They are essentially oblivious to the changes that have been made on the router to the IP addresses
and port numbers.
Traffic is rodded correctly PCs are unaware of what's going on and that's essentially how much overloading
or port address translation or Pat works.