🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Networking.docx

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Transcript

Internet Layer Protocols At the Internet layer, there’s one key protocol and a few helpful support protocols. The main workhorse of TCP/IP is the Internet Protocol (IP), and it can be found at this layer. IP is responsible for managing logical network addresses and ultimately getting data from point...

Internet Layer Protocols At the Internet layer, there’s one key protocol and a few helpful support protocols. The main workhorse of TCP/IP is the Internet Protocol (IP), and it can be found at this layer. IP is responsible for managing logical network addresses and ultimately getting data from point A to point B, even if there are dozens of points in between. We cover IP addressing more in the next section. There are three support protocols you should be aware of at this layer as well. Internet Control Message Protocol (ICMP) is responsible for delivering error messages. If you’re familiar with the ping utility, you’ll know that it utilizes ICMP to send and receive packets. Address Resolution Protocol (ARP) resolves logical IP addresses to physical MAC addresses built into network cards. Reverse ARP (RARP) resolves MAC addresses to IP addresses. 376 Understanding IP Addressing To communicate on a TCP/IP network, each device needs to have a unique IP address. Any device with an IP address is referred to as a host. This can include servers, workstations, printers, routers, and other devices. If you can assign it an IP address, it’s a host. As an administrator, you can assign the host’s IP configuration information manually, or you can have it automatically assigned by a DHCP server. On the client, this is done through the network adapter’s TCP/IP properties. You’ll see in Figure 7.3 that the system is set to receive information from a DHCP server. We’ll look at how to configure this in more depth in Chapter 8, “Installing Wireless and SOHO Networks.” Figure 7.3 TCP/IP Properties  This section will cover IPv4. IPv6 will be covered in its own separate section. An IPv4 address is a 32-bit hierarchical address that identifies a host on the network. It’s typically written in dotted-decimal notation, such as 192.168.10.55. Each of the numbers in this example represents 8 bits (or 1 byte) of the address, also known as an octet. The same address written in binary (how the computer thinks about it) would be 11000000 10101000 00001010 00110111. As you can see, the dotted-decimal version is a much more convenient way to write these numbers. The addresses are said to be hierarchical, as opposed to “flat,” because the numbers at the beginning of the address identify groups of computers that belong to the same network.377Because of the hierarchical address structure, we’re able to do really cool things, such as route packets between local networks and on the Internet. A great example of hierarchical addressing is your street address. Let’s say that you live in apartment 4B at 123 Main Street, Anytown, Kansas, USA. If someone sent you a letter via snail mail, the hierarchy of your address helps the postal service and carrier deliver it to the right place. First and broadest is USA. Kansas helps narrow it down a bit, and Anytown narrows it down more. Eventually we get to your street, the right number on your street, and then the right apartment. If the address space were flat (for example, Kansas didn’t mean anything more specific than Main Street), or you could use any name you wanted for your state, it would be really hard to get the letter to the right spot. Take this analogy back to IP addresses. They’re set up to organize networks logically in order to make delivery between them possible and then to identify an individual node within a network. If this structure weren’t in place, a huge, multi-network space like the Internet probably wouldn’t be possible. It would simply be too unwieldy to manage.  Another example of a hierarchical addressing scheme is telephone numbers. The first three digits, the area code, group all telephone numbers with that area code into one logical network. The second grouping of three numbers defines a local calling area, and the last grouping of numbers is the unique identifier within that local calling area. A Quick Binary Tutorial As we mentioned earlier, each IP address is written in four octets in dotted-decimal notation, but each octet represents 8 bits. A binary bit is a value with two possible states: on equals 1 and off equals 0. If the bit is turned on, it has a decimal value based upon its position within the octet. An off bit always equals zero. Take a look at Figure 7.4, which will help illustrate what we mean. Figure 7.4 Binary values If all the bits in an octet are off, or 00000000, the corresponding decimal value is 0. If all bits in an octet are on, you would have 11111111, which is 255 in decimal.  When you’re working with IPv4 addressing, all numbers will be between 0 and 255. 378 Where it starts to get more entertaining is when you have combinations of zeroes and ones. For example, 10000001 is equal to 129 (128 + 1), and 00101010 is equal to 42 (32 + 8 + 2). As you work with IPv4 addresses, you’ll see certain patterns emerge. For example, you may be able to count quickly from left to right in an octet pattern, such as 128, 192, 224, 240, 248, 252, 254, and 255. That’s what you get if you have (starting from the left) 1, 2, 3, and so forth up to 8 bits on in sequence in the octet. It’s beyond the scope of this book to get into too much detail on binary-to-decimal conversion, but this primer should get you started.  If you want more information on binary, here are two helpful resources. A network binary math lesson can be found at https://learningnetwork .cisco.com/blogs/vip-perspectives/2014/05/15/ network-binary-math-explained, and a binary to decimal converter is at https://www.rapidtables.com/convert/number/decimal-to-binary .html. Parts of the IP Address Each IP address is made up of two components: the network ID and the host ID. The network portion of the address always comes before the host portion. Because of the way IP addresses are structured, the network portion does not have to be a specific fixed length. In other words, some computers will use 8 of the 32 bits for the network portion and the other 24 for the host portion, while other computers might use 24 bits for the network portion and the remaining 8 bits for the host portion. Here are a few rules that you should know about when working with IP addresses: All host addresses on a network must be unique. On a routed network (such as the Internet), all network addresses must be unique as well. Neither the network ID nor the host ID can be set to all 0s. A host ID portion of all 0s means “this network.” Neither the network ID nor the host ID can be set to all 1s. A host ID portion of all 1s means “all hosts on this network,” commonly known as a broadcast address. Computers are able to differentiate where the network ID ends and the host address begins through the use of a subnet mask. This is a value written just like an IP address and may look something like 255.255.255.0. Any bit that is set to a 1 in the subnet mask makes the corresponding bit in the IP address part of the network ID (regardless of whether the bit in the IP address is on or off). When setting bits to 1 in a subnet mask, you always have to turn them on sequentially from left to right, so that the bits representing the network address are always contiguous and come first. The rest of the address will be the host ID. The number 255 is the highest number you will ever see in IP addressing, and it means that all bits in the octet are set to 1. 379 Here’s an example based on two numbers that we have used in this chapter. Look at the IP address of 192.168.10.55. Let’s assume that the subnet mask in use with this address is 255.255.255.0. This indicates that the first three octets are the network portion of the address and the last octet is the host portion; therefore, the network portion of this ID is 192.168.10 and the host portion is 55. If the subnet mask were 255.255.0.0, the computer would see its network address as 192.168 and its host address as 10.55. As you can see, the subnet mask can make the exact same address appear as though it’s on a different network. If you’re ever dealing with network communication issues, the IP address and subnet mask are among the first things to check.  To communicate using IPv4, each computer is required to have an IP address and correct subnet mask. A third component, called a default gateway, identifies the IP address of the device that will allow the host to connect outside of the local network. This is typically your router, and it’s required if you want to communicate with computers outside of your local network. An example configuration is shown in Figure 7.5. Figure 7.5 Manual TCP/IP configuration with an IP address, subnet mask, and default gateway IPv4 Address Classes The designers of TCP/IP designated classes of networks based on the first three bits of the IP address. As you will see, classes differ in how many networks of each class can exist and380the number of unique hosts that each network can accommodate. Here are some characteristics of the three classes of addresses that you will commonly deal with: Class A Class A networks are defined as those with the first bit set as 0 (decimal values from 0 to 127) and are designed for very large networks. The default network portion for Class A networks is the first 8 bits, leaving 24 bits for host identification. Because the network portion is only 8 bits long (and 0 and 127 are reserved), there are only 126 Class A network addresses available. The remaining 24 bits of the address allow each Class A network to hold as many as 16,777,214 hosts. Examples of Class A networks include the networks for telecommunications giants Level 3 Communications and AT&T and organizations such as General Electric, IBM, Hewlett-Packard, Apple, Xerox, Ford, and the United States Department of Defense. All possible Class A networks are in use; no more are available.  The number of networks available is determined by the formula 2 n, where n represents the number of bits being used. In the Class A example, 7 bits are available by default (because the first one is always set as 0 by design), so there are 27 networks available, which is 128. However, the network addresses of 0 and 127 are also reserved, so it’s really 126. The number of hosts available is determined by the formula 2 n – 2, because a host address of all 0s or all 1s is not allowed. Remember, all 0s means “this network” and all 1s are broadcast addresses. So, in a default Class A network, there can be 224 – 2 hosts, or 16,777,214. Class B Class B networks always have the first two bits set at 10 (decimal values from 128 to 191) and are designed for medium-sized networks. The default network portion for Class B networks is the first 16 bits, leaving 16 bits for host identification. This allows for 16,384 (214) networks, each with as many as 65,534 (216 – 2) hosts attached. Examples of Class B networks include the networks of Microsoft, ExxonMobil, and Purdue University. Class B networks are generally regarded as unavailable, but address-conservation techniques have made some of these addresses available from time to time over the years. Class C Class C networks have the first three bits set at 110 (decimal values from 192 to 223) and are designed for smaller networks. The default network portion for Class C networks is the first 24 bits, leaving 8 bits for host identification. This allows for 2,097,152 (221) networks, but each network can have a maximum of only 254 (28 – 2) hosts. Most companies have Class C network addresses. A few class C networks are still available.  The address assignment examples in this chapter refer to addresses that are used on the Internet. For example, Apple has the network address of 17.0.0.0. No one else on the Internet can use addresses in that network’s range. But if you are using IP addresses on an internal network that never connects to the Internet, you are free to use whatever addresses you would like. 381 Table 7.2 shows the IPv4 classes, their ranges, and their default subnet masks. Table 7.2 IPv4 address classes Class First Octet Default Subnet Mask Comments A 1–127 255.0.0.0 For very large networks; 127 reserved for the loopback address B 128–191 255.255.0.0 For medium-sized networks C 192–223 255.255.255.0 For smaller networks with fewer hosts D 224–239 N/A Reserved for multicasts (sending messages to multiple systems) E 240–255 N/A Reserved for testing  The network addresses 0 and 127 are reserved and not available for use. Specifically, the address 127.0.0.1, called the loopback address, is used for troubleshooting network adapters. We’ll talk more about this in Chapter 14, “Hardware and Network Troubleshooting.” The IP address can be written in shorthand to show how many bits are being used for the network portion of the address. For example, you might see something like 10.0.0.0/8. The /8 on the end indicates that the first 8 bits are the network portion of the address, and the other 24 are the host portion. Another example is 192.168.1.0/24, which is a Class C network with a default subnet mask.

Use Quizgecko on...
Browser
Browser