Time
31 hours 29 minutes
Difficulty
Beginner
CEU/CPE
30

Video Description

NAT and PAT (part 2) - IP Address Types This lesson continues to discuss Network Address Translation and Port Address Translation (PAT). Within NAT there are four IP address types:

  • Inside local
  • Inside global
  • Outside local
  • Outside global

This lesson also discusses PAT; which gives us the ability to map multiple IP addresses to a single public IP address. Translation is done in the basis of IP address and port.

Video Transcription

00:04
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.
00:21
So when we're talking about a different I p address types, we really have to pick a
00:25
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.
00:35
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.
00:50
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
01:07
ah and devices on those networks
01:11
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.
01:30
And inside Global is inside our network with the public. I p address
01:34
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.
01:42
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.
01:55
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
02:08
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.
02:15
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,
02:36
but it's still inside. Our network is still managed by us,
02:38
So these will be our inside global addresses. They're inside our network, but they have addresses that are globally row doble.
02:46
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
03:05
number one. Because that private I p addresses not row double,
03:07
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
03:28
toe hot toe, other computers, other private network computers that are connected to it
03:31
that may not necessarily be public facing,
03:34
so that outside local is a private I p address referencing the remote device that we typically will not see.
03:40
So it's the outside network here.
03:46
So inside, local
03:49
inside global
03:51
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
04:11
is what we used to reference this device. It's the address that we're connecting to
04:15
as we're connecting to the Web server. That's the address of our router is connecting to over the Web server.
04:20
So while this address is what is assigned to this device, this address is actually
04:27
on the serve on the
04:30
other ends router.
04:31
So
04:32
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
04:46
prevent some confusion.
04:48
Um,
04:49
this public address
04:50
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.
05:05
So we have our outside global.
05:10
So just as a quick
05:11
walkthrough of how our connection goes, we have our inside local I p address, which is going to send a packet
05:18
to our inside global device are inside. Global Device is going to send using that inside global address
05:27
over the Internet to a device with an outside global address
05:31
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,
05:46
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.
05:56
Next we have
05:59
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.
06:17
Now, this is especially useful
06:18
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
06:38
to map to a private our public i p address so we can send information over the Internet.
06:43
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
07:00
that we can't really just say Oh, you have 50 devices in your network. Here you go. Here's 50 I p addresses.
07:06
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.
07:16
So these this port address translation,
07:19
also known as overloading, that allows us to translate based on i p address and port.
07:27
So rather than just simply stating Okay, 1 92.1 68.1 dot 17 equals 12 are 17 20.53 dot 200.
07:40
We now say
07:44
that 1 92.1 68.1 dot 17
07:51
equals
07:53
$17.20.53
07:57
0.200
07:59
port
08:01
2050.
08:05
So what do we mean by that?
08:07
Well, as we've talked about in some of our other modules,
08:13
we have
08:15
thousands and thousands of
08:18
port numbers,
08:18
and these port numbers
08:22
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
08:39
I p address, but also a destination port that we're sending those packets too.
08:43
So
08:46
what does this mean?
08:46
Well, let's say we're trying to connect to a Web server.
08:52
Now this Web server over here, we're going to send a request to its public I P address over Port 80.
09:03
So we'll send a We'll send a request to 1 74.16 dot 100.12. Port 80
09:13
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,
09:33
and I only have one public address. So in order to share the Connect connect ability around, I'm going to say that
09:39
this device 1 92.1 68 not 1.17
09:43
is assigned the port number of 2050
09:48
for this for this particular connection that I'm trying to make.
09:52
So what is going to send a packet over the Internet
09:56
to 1 92.1 74? That 16 dot
10:01
1 74 that? 16.112 Port 80. And effectively tell the server that the source port for this packet
10:11
is 17. 22 53.200.
10:15
Port 2050.
10:16
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.
10:31
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.
10:50
So it's going to send it back to our router to port 2050.
10:54
Then our writers gonna look in its tables and it's going to say OK, now
11:00
I gave out this port. I assigned the the private I P address for this port
11:07
for this particular connection to 1 92.1 68.1 by 17.
11:11
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.
11:22
Subtle Senate support. 80.
11:24
So, just one more time. So we so we know we completely understand this.
11:30
Our routers,
11:31
our local router has one public I p address that it can send information over the Internet from
11:37
so because we have multiple devices.
11:39
Well, add another device onto our outer
11:43
because we have multiple devices with multiple private I P addresses. This device is gonna be 1 92.1 68 not 1.16.
11:54
These multiple devices send information at the same time
11:58
are they request information at the same time they may be made? These may even be talking to the same location.
12:05
So both of these devices may be trying to talk to the same Web server.
12:09
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,
12:20
especially if they're going to the same i p address.
12:22
So both of these devices send out packets to the same maybe they're both going to Facebook.
12:28
They're both sending packets to the same i p address. They're both sending packets to the same web server
12:35
over their port 80
12:37
indicating that there http packets
12:41
all rounder gets them
12:43
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
12:54
and then for our second computer is going to assign the port of 2051 for the sore sport of this packet.
13:03
That packet is still on. Http. Packet, regardless of what port it's on. Still, http packet
13:07
sends it over the internet to the destination port of public are the destination public I p. Address support 80.
13:15
The Web server receives both the packets and then sends them back to their originating source port.
13:20
So the originating port 2050 and port 2051.
13:26
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.
13:37
So that's the purpose of our port address. translation.
13:41
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?
13:52
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.
14:07
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.
14:26
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
14:46
that we tack on to the end of every I p address packet
14:48
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.

Up Next

CompTIA Network+

This CompTIA Network+ certification training provides you with the knowledge to begin a career in network administration. This online course teaches the skills needed to create, configure, manage, and troubleshoot wireless and wired networks.

Instructed By

Instructor Profile Image
Anthony Harris
Systems Analyst and Administrator at SAIC
Instructor