Test the LAN connection with ping, and test the Internet connections by using a web
78 |
Lesson 4
CERTIFICATION READY How can you define NAT
and subnetting? 3.2
Defining Advanced IPv4 Concepts
Methods such as network address translation, subnetting, and classless inter-domain routing CIDR can make networks faster, more efficient, and more secure. These
advanced IP configurations are found in most networks today. Therefore, to be a profi- cient network engineer, you must master these concepts.
NETWORK ADDRESS TRANSLATION
Network address translation NAT is the process of modifying an IP address while it is in transit across a router, computer, or similar device. This is usually so one larger address space
private can be re-mapped to another address space, or perhaps re-mapped to a single public IP address. This process is also known as IP masquerading, and it was originally implemented
due to the problem of IPv4 address exhaustion. Today, NAT hides a person’s private internal IP address, making it more secure. Some routers only allow for basic NAT, which carries
out IP address translation only. However, more advanced routers allow for port address translation PAT, a subset of NAT, which translates both IP addresses and port numbers.
A NAT implementation on a firewall hides an entire private network of IP addresses e.g., the 192.168.50.0 network behind a single publicly displayed IP address. Many SOHO routers,
servers, and similar devices offer this technology to protect a company’s computers on a LAN from outside intrusion.
Figure 4-6 illustrates how NAT might be implemented with some fictitious IP addresses. Here, the router has two network connections. One goes to the LAN—192.168.50.254—and
is a private IP address. This is also known as an Ethernet address and is sometimes referred to as E
or the first Ethernet address. The other connection goes to the Internet or WAN— 64.51.216.27—and is a public IP address. Sometimes, this will be referred to as S
, which denotes a serial address common to vendors such as Cisco. So, the router is employing NAT
to protect all of the organization’s computers and switches on the LAN from possible attacks initiated by mischievous persons on the Internet or in other locations outside the LAN.
Figure 4-6 NAT implementation
Switch 192.168.50.251
Router Internet
192.168.50.254 64.51.216.27
An example of a D-Link DIR-655 multifunction network device that implements NAT is shown in Figure 4-7. This screen capture displays the main Device Information page.
Notice in the WAN section that there is a public IP address of 216.164.145.27. This is the WAN address, and this particular testing device obtains that address and the subsequent
WAN information from an ISP’s DHCP server. You will also note the LAN IP address of 10.254.254.1. That is the private IP address on the local side of the router. Accordingly,
this device is translating for all computers on the 10.254.254.0 network and allowing them to communicate with the Internet, but it is only displaying one IP address to the Internet:
216.164.145.27.
Understanding Internet Protocol |
79
SUBNETTING
Subnetting could be considered one of the most difficult concepts in networking—but it can be simplified with some easy equations and a well-planned implementation process. Until
now, we have used default subnet masks. However, one reason for having a subnet mask is to gain the ability to create subnetworks logically by IP. We must ask, what is a subnet? It is
a subdivision of your logical IP network; by default, all computers are on one subnet or net- work with no divisions involved. And . . . what is a mask? It is any binary number that is a
1. If the binary digit is a 1, then it is masked. If the binary digit is a 0, then it is unmasked. Let’s review the standard default subnet masks, as shown in Table 4-4.
Note the binary numbers that are 1s and the binary numbers that are 0s in the table. Subnetting is the act of dividing a network into smaller logical subnetworks. It is accom-
plished by transforming the default subnet mask into something else by borrowing bits. One or more of the 0s in the subnet masks in Table 4-4 will become masked, thus changing the
amount of subnets and hosts per subnet. Network administrators implement subnetting in an effort to organize and compartmentalize networks, reduce broadcast traffic, and increase net-
work security. By default, computers in one subnet cannot communicate with computers on another subnet, even if they are part of the same total IP network.
For the upcoming exercise, we will use a Class C network and show how we can subdivide it into smaller subnetworks. We will use 192.168.50.0 for our network number. By default, the
subnet mask would be 255.255.255.0. But what if we wanted to divide the network into four distinct IP subnetworks?
There are a lot of different subnetting options, but as one example, we could use 255.255.255.240. This would also be known as 192.168.1.0 28 because the binary equiva-
lent of the subnet mask has 28 masked bits and 4 unmasked bits.
Figure 4-7 NAT on a DIR-655 router
Table 4-4 Standard subnet mask review
T
YPE
D
ECIMAL
B
INARY
Class A 255.0.0.0
11111111.00000000.00000000.00000000 Class B
255.255.0.0 11111111.11111111.00000000.00000000
Class C 255.255.255.0
11111111.11111111.11111111.00000000
80 |
Lesson 4
The first three 255s are the same, and we can pretty much ignore them, but the fourth octet 240 tells us how many subnetworks subnet IDs and hosts we can have per subnetwork. All
you need is the ability to convert to binary and to use two equations:
• Equation 1: 2
n
= x • Equation 2: 2
n
– 2 = x
Here’s how you do it:
1. Convert 240 to binary. It equals 11110000. 2. Break the octet up like this: 1111 and 0000. Use the part made up of 1s for the subnet
IDs and the part made up of 0s for the host IDs.