So what exactly is address translation? Well, it's all about lying pretty much
lying or changing the address
Involved in the layer 3 header of a packet and to discuss view options
regarding address translation
We're gonna use this topology right here. So I've got a client a Windows client
down here on the 1010 zero subnet
I've got a little virtual PC up here on
the 10 12 zero network
We've got PC 20 on the 10 20 zero network and I've got PC 30 down here on the
10 30 zero network and
Currently routing in place between all our four routers WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Currently routing in place between all our four routers
I also have a multiplayer switch just playing the role right here of a layer 2
transparent switch and then I hear off of our four
I've got a little simulated internet at 23.1.2
That's the address base out here and this server is at dot 100 now this server
does not have a route back to any of the private
RFC 1918 address spaces. So if we want any of these devices the PCs or the
Windows client to be able to reach the server for
DNS or web services or anything else we need to implement address translation
here at router 4 WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
here at router 4
So let's talk about a few of our options one of our options for doing address
translation is
Static and that's where we simply tell the router that's doing the address
translation that this PC let's say PC 30
Which has an inside address of 10 30 0 51 as that traffic is routed through the
router going to the outside world
That we wanted to have a specific address that's reachable on the outside for
example
Maybe 23.1.2.51 if that's the address that's been assigned to us that we can
use so that traffic is routed through our four in on WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
use so that traffic is routed through our four in on
Gig 1 0 and out on gig 2 0 router 4 is gonna swap out the source address with
source net and replace the 10 30 0 51 with
2312 51 also while we're talking about source and destination
Let's also talk about source net versus destination net. So static address
translation we're mapping one address like this right here
To another address on the outside and with that officially network address
translation that is just for that client
So it's a one-to-one mapping so if this client is going to that server or going
to other servers or other resources up on the internet WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to other servers or other resources up on the internet
That mapping is gonna stay because the static mapping between 10 30 0 51 and 23
12 51
So the packets go out we'll swap out these source address when the reply
traffic comes back
The device that the net will untranslated put the original IP address for the
destination and then continue forward it down to the client
So officially static net is a one-to-one mapping between one address on the
inside and one address on the outside
So next let's chat about source versus destination net on the initial flow of
traffic going through a net device
What are we swapping out on the initial flow? Are we swapping out the source WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
What are we swapping out on the initial flow? Are we swapping out the source
address or the destination address in this case?
PC 30 as it goes out or swapping out the source address on the initial flow
And that's why it's called source net when we're swapping out the source
address initially on the other side of that coin
We have destination net now when we have that let's imagine we have a router or
a firewall here
And out here is the internet and we have users out here on the internet that
may want to access our servers
So here let's say on the inside we have a server and maybe it's a web server WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So here let's say on the inside we have a server and maybe it's a web server
unless it's at 10.1.1.10
That's its IP address
So if we want users to be able to access this server obviously users on the
internet without a VPN or something else
Cannot access a private RSC 1918 address space. So what we do is we can map
that for example at 23.1.2.10
Assuming that IP address is assigned to us and we can use it and we can map
that address to the servers address and then furthermore
We very likely have that in DNS as well
So when users resolve the name of our server to 23.1.2.10 that traffic is WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So when users resolve the name of our server to 23.1.2.10 that traffic is
received here at the router and with destination net
It's going to swap out the destination address on that first flow of traffic
with the new destination address of the web server 10.1.1.10
Again, it's on the initial flow of traffic. What are we swapping out the source
or the destination address?
And that's what determines if we're using source net or destination net again
is on that initial flow of traffic
Because on the reply when the server responds back the device that the address
translation initially is going to untranslate that back to the address
The client things they're using to get to that server before saying that packet WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
The client things they're using to get to that server before saying that packet
back to the user
So I clean this up a little bit and let's continue to talk about a few other
aspects regarding address translation for IPv4
Another option beside static net is dynamic net
And whenever you say officially the word net we're talking about a 1 to 1
mapping
Where one device on the inside is mapped to one IP address on the outside that
it gets to use exclusively
And the difference between static net and dynamic net is that with static net
where we're mapping for example this IP address to the outside address of 23.1.
2.51 WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
2.51
If that's static, we configured whether or not this device is sending traffic
out to the internet
That mapping, that static mapping between those two addresses exists in the
configuration on this router
And here's how that compares in contrast to dynamic net
With dynamic net we could have a rule in place that says okay for clients who
are coming in to the net device
And they're coming in from the 1010-0 subnet when they go out to the internet
Go ahead and give them a 1 to 1 mapping
So maybe we have a pull out here like 23.1.2.65 through 126 WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So maybe we have a pull out here like 23.1.2.65 through 126
And let's imagine we have rules in place that says of a client from the subnet
is going out to the internet
For example traffic is coming in on gig 10 or FA4-1 and being routed out to the
internet through the gig 20 interface
To go ahead and simply pull an available IP address from this pool of addresses
And use that for the 1 to 1 mapping between this client machine here
And it's traffic as it goes out to the internet
So once that mapping is in place, if this client then goes to other websites or
other locations on the internet
The net device will continue to use that 1 to 1 mapping
But the key is between static and dynamic is that it doesn't actually create WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
But the key is between static and dynamic is that it doesn't actually create
that translation with dynamic net
Until it sees some traffic that matches the rule that would cause it to make
that translation
So think of it like static is always there
And dynamic is when it's needed
Meaning when a client for example is going out to the internet at that moment
It creates the net 1 to 1 mapping
And this example from this IP address of the PC at 1010-050 to some IP address
that's available in the pool
And then we have the idea regarding that which is a 1 to 1 mapping and pat
which is a mini to 1 mapping WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
which is a mini to 1 mapping
So let's talk about how pat works
We could set up a rule that says you know what?
Dear Mr. Router, if you see traffic that's coming in from let's say this subnet
1020-0
And if he's that traffic and it's being routed into your receive it on either
Fast-eat-of-fourth-lush-1 or gig-a-bet-eat-net-once-lush-0
And you're routing it out here go ahead and do source net and swap out that
source address whatever it is
But instead of giving this device its own 1 to 1 mapping on the outside
Let's use one IP address and make people share it WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Let's use one IP address and make people share it
So for the mapped address we use 23.1.2.
Let's say 99 if that's not already used since inside to us
Then this PC and actually thousands of other PCs as they're going out to the
internet
Can be swapped out to this single IP address with source net
And then when their responses come back from the servers
The device that did the original translation will swap that back to the
original source address
And the way it can do that is by tracking details including ports that are
being used
For example this client is going out to the internet and using a source port
for TCP of like 673
The router is going to leverage that port information and oftentimes to the WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
The router is going to leverage that port information and oftentimes to the
path device
It'll even swap out not just the source address with source net with path
But also it'll swap out the source port with some other port that it wants to
use as it tracks that session
And then when the response comes back based on that port and that IP address
the path device will swap that out back to what it was
So if originally the source port was 673 that would be the new destination port
coming back
If the original IP address was 1020.051 it'll swap that as well from the 23.1.2
.99 before forwarding it through the network WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
.99 before forwarding it through the network
And have it go back to the client
And that's why Pat is actually called Pat is actually port address translation
And theoretically we can have thousands and thousands of internal IP addresses
being mapped to a single IP address on the outside with port address
translation
And in a Cisco environment the keyword that influence or references doing that
is the keyword of overload
So it helped bring forth not only the concepts of the different types of NAT
for IPv4 but also the implementation and verification of them
In the next video let's put a game plan together regarding what we want to WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
In the next video let's put a game plan together regarding what we want to
accomplish
And then with that game plan in place we'll go through step by step of the
implementation for static NAT dynamic NAT
And as I mentioned at the tail end of the set of videos I'll give you hands on
labs you can practice it as well
So when you're ready I'll see you in the next video for the game plan