So when we're talking about network address translation, we have four different I p address types that we use now. These different I p address types are actually different labels that we apply toe I p addresses that were seeing when we're making in connection that allow us to know what those I P addresses are referring to.
So when we're talking about a different I p address types, we really have to pick a
reference point. And our reference point will be the device that we're currently on and that we're connected and that we are using to connect to other devices over the Internet.
So our I p address types have inside local inside, global, outside, local and outside global. And each of these refer to different different types of devices and different I p address, whether they're public or private.
Now the inside or the outside refers to where, in reference to our network, these devices are so inside refers to devices that are inside our local network. Better devices, you could say, managed by us and outside devices are going to be the remote global devices that were connecting to
ah and devices on those networks
when we say local versus global local refers to a private I P address, which is non girl out row double. So it's a local I P address, and Global refers to a public I p address that is row double. So if we have an inside local device, it's a device that is inside our network with a private i. P address.
And inside Global is inside our network with the public. I p address
outside local is outside our network with a private I. P address. An outside global is outside our network with a public i p address.
So let's take a look at those these different types of devices. So are inside local is going to be our private i p address referencing the local device. So this would be a device such as our this would be an I P address, such as our workstation.
1 92.1 68.1 dot 17 is our inn is one of our inside local addresses. So I l addresses because it's inside our network
and it's a local device. It's inside our network. It's managed by us. Um, and it's also a private I p address.
Next we have inside global addresses. Now, these are gonna be addresses that are inside our network here, but are going to have public I p addresses. And this will typically be addresses such as our Internet Facing router. These have a public I P address are 17.20 dot 53.200. It's a public i p address,
but it's still inside. Our network is still managed by us,
So these will be our inside global addresses. They're inside our network, but they have addresses that are globally row doble.
Next we have outside local now outside local is going to be referring to our device that we are trying to connect to remotely, but it's still a private i p address. So this is the address that we typically will not see if we're connecting to a Web server. Were typically not going to see that Web servers internal private I p. Address
number one. Because that private I p addresses not row double,
but number two also for security reasons, if we knew what a Web servers private I p address was, we would have a better idea of what they're addressing scheme was in their network, and we could use that information to If we exploited a particular Web server, then we could use the knowledge of its internal private I p
toe hot toe, other computers, other private network computers that are connected to it
that may not necessarily be public facing,
so that outside local is a private I p address referencing the remote device that we typically will not see.
So it's the outside network here.
then we have outside local and then lastly, have outside global outside global is going to be our public i p address referencing a remote device. Now we have our public I p address, which we referenced this Web server as 1 74.16 dot 100.11. And this public address here
is what we used to reference this device. It's the address that we're connecting to
as we're connecting to the Web server. That's the address of our router is connecting to over the Web server.
So while this address is what is assigned to this device, this address is actually
as we're going through the Internet, and we hit the public address on this network's router. This public address on this network's router we're gonna race this just for a little bit of
prevent some confusion.
of 174 16 100.11 or 174 16.112 are going to be our outside global addresses because there are public addresses which are translated to a device that we're trying to connect to.
So we have our outside global.
walkthrough of how our connection goes, we have our inside local I p address, which is going to send a packet
to our inside global device are inside. Global Device is going to send using that inside global address
over the Internet to a device with an outside global address
that outside global address and the device is this been going to perform network address translation to translate that outside global address to a outside local address,
and then it just happens in the reverse as we're receiving information back from the Web server. So that's our four different types of I P address types for a network address. Translation.
Next up, we have our port address. Translation Now we mentioned are poured a drink dress translation when we were talking about overloading network address translation, overloading that now port address translation gives us the ability to map multiple private I P addresses to a single public I p address.
Now, this is especially useful
today in today's age because we've effectively run out of the ability to give a public I p address a public I pee before address to every single device that connects to the internet. So we have to set up these private I p addresses thes private networks that use this port address translation
to map to a private our public i p address so we can send information over the Internet.
Typically, if you request a public I p address or public I p addresses from an internet service provider, then they may only give you one for your network or only. Ah, handful. There are very There are so few public addresses left
that we can't really just say Oh, you have 50 devices in your network. Here you go. Here's 50 I p addresses.
There are 50 public I p addresses those public I p addresses. Costs a lot of money to get a hold of because we're running out so quickly and we've run out effectively so quickly.
So these this port address translation,
also known as overloading, that allows us to translate based on i p address and port.
So rather than just simply stating Okay, 1 92.1 68.1 dot 17 equals 12 are 17 20.53 dot 200.
that 1 92.1 68.1 dot 17
So what do we mean by that?
Well, as we've talked about in some of our other modules,
thousands and thousands of
and these port numbers
allow us to having these different port numbers allow us to have a data in 0.4 packets. So when we're routing packets over the network, we need tohave or when we're routing packets to a public I P address, we need to have a destination
I p address, but also a destination port that we're sending those packets too.
what does this mean?
Well, let's say we're trying to connect to a Web server.
Now this Web server over here, we're going to send a request to its public I P address over Port 80.
So we'll send a We'll send a request to 1 74.16 dot 100.12. Port 80
Now when we send that packet when we send that request to our router are router is going to note in its in its tables is going to say OK, I need to send this packet over a public I p address. I need to translate this private address into a public address, but I have multiple devices that connect to me,
and I only have one public address. So in order to share the Connect connect ability around, I'm going to say that
this device 1 92.1 68 not 1.17
is assigned the port number of 2050
for this for this particular connection that I'm trying to make.
So what is going to send a packet over the Internet
to 1 92.1 74? That 16 dot
1 74 that? 16.112 Port 80. And effectively tell the server that the source port for this packet
So the Web server receives the quest request and it sends back the information and it sends back a packet to 17.20 dot 53.200 port to 2050.
So our router receives the packet. Now, remember, you can send just because this is an http package. Just because this is a Web ah, Web addressed pack, it doesn't mean that it has to go to our public. I p addresses port 80. It can go. We can assign it to go to any port, and that's what we did. We change the way, change the sore sport for that.
So it's going to send it back to our router to port 2050.
Then our writers gonna look in its tables and it's going to say OK, now
I gave out this port. I assigned the the private I P address for this port
for this particular connection to 1 92.1 68.1 by 17.
So then it will translate that packet back to go to that private address, and it's gonna send it to our private I P addresses. Port 80.
Subtle Senate support. 80.
So, just one more time. So we so we know we completely understand this.
our local router has one public I p address that it can send information over the Internet from
so because we have multiple devices.
Well, add another device onto our outer
because we have multiple devices with multiple private I P addresses. This device is gonna be 1 92.1 68 not 1.16.
These multiple devices send information at the same time
are they request information at the same time they may be made? These may even be talking to the same location.
So both of these devices may be trying to talk to the same Web server.
So because our router only has one public I p address, it needs to have some sort of way to keep track of what packets are meant for what devices,
especially if they're going to the same i p address.
So both of these devices send out packets to the same maybe they're both going to Facebook.
They're both sending packets to the same i p address. They're both sending packets to the same web server
indicating that there http packets
all rounder gets them
and it translate those translates these packets to a public address. But for this computer, it says, Okay, I'm going to translate the source port for this packet to port 2050
and then for our second computer is going to assign the port of 2051 for the sore sport of this packet.
That packet is still on. Http. Packet, regardless of what port it's on. Still, http packet
sends it over the internet to the destination port of public are the destination public I p. Address support 80.
The Web server receives both the packets and then sends them back to their originating source port.
So the originating port 2050 and port 2051.
And then our router says, Oh, Pat, the packet sent to my port 2050 goes to this I p address and the packets into my port 2051 goes to this I p address.
So that's the purpose of our port address. translation.
Now you say, Well, what if I have a Web server inside my network? What if I have a Web server? That service is clients and they're reaching me by default over Port 80?
Well, we can go in our router and weaken sets. We can set up manual configurations so that if our router receives a packet directed edit towards Port 80 it's going to direct that packet toward our Web server.
So that's still port address translation that still are that still are router saying, OK, this packet is directed toward Port 80. This Web server is where I'm going to send this port 80 packet, too, and then any of the other requests that makes for other devices. It'll just send out over a different port.
So it's important to understand Port address translation as well as network address translation and how it allows our router to take packets and a sign I p addresses are private I p addresses to public I P addresses. And it's especially important to understand how port address translation works, and it uses those port numbers
that we tack on to the end of every I p address packet
in our router keeping track of where our patent requests air coming from inside our network and then sending them out over the Internet and then when we received the request back, assigning them to the correct computers.