Saturday, March 13, 2010

Class A, B, C, D, and E IP addresses

Class A, B, C, D, and E IP addresses
9.2.4 This page will describe the five IP address classes.


To accommodate different size networks and aid in classifying these networks, IP addresses are divided into groups called classes. This is known as classful addressing. Each complete 32-bit IP address is broken down into a network part and a host part. A bit or bit sequence at the start of each address determines the class of the address. There are five IP address classes as shown in Figure .

The Class A address was designed to support extremely large networks, with more than 16 million host addresses available. Class A IP addresses use only the first octet to indicate the network address. The remaining three octets provide for host addresses.

The first bit of a Class A address is always 0. With that first bit a 0, the lowest number that can be represented is 00000000, decimal 0. The highest number that can be represented is 01111111, decimal 127. The numbers 0 and 127 are reserved and cannot be used as network addresses. Any address that starts with a value between 1 and 126 in the first octet is a Class A address.

The 127.0.0.0 network is reserved for loopback testing. Routers or local machines can use this address to send packets back to themselves. Therefore, this number cannot be assigned to a network.

The Class B address was designed to support the needs of moderate to large-sized networks. A Class B IP address uses the first two of the four octets to indicate the network address. The other two octets specify host addresses.

The first two bits of the first octet of a Class B address are always 10. The remaining six bits may be populated with either 1s or 0s. Therefore, the lowest number that can be represented with a Class B address is 10000000, decimal 128. The highest number that can be represented is 10111111, decimal 191. Any address that starts with a value in the range of 128 to 191 in the first octet is a Class B address.

The Class C address space is the most commonly used of the original address classes. This address space was intended to support small networks with a maximum of 254 hosts.

A Class C address begins with binary 110. Therefore, the lowest number that can be represented is 11000000, decimal 192. The highest number that can be represented is 11011111, decimal 223. If an address contains a number in the range of 192 to 223 in the first octet, it is a Class C address.

The Class D address class was created to enable multicasting in an IP address. A multicast address is a unique network address that directs packets with that destination address to predefined groups of IP addresses. Therefore, a single station can simultaneously transmit a single stream of data to multiple recipients.

The Class D address space, much like the other address spaces, is mathematically constrained. The first four bits of a Class D address must be 1110. Therefore, the first octet range for Class D addresses is 11100000 to 11101111, or 224 to 239. An IP address that starts with a value in the range of 224 to 239 in the first octet is a Class D address.

A Class E address has been defined. However, the Internet Engineering Task Force (IETF) reserves these addresses for its own research. Therefore, no Class E addresses have been released for use in the Internet. The first four bits of a Class E address are always set to 1s. Therefore, the first octet range for Class E addresses is 11110000 to 11111111, or 240 to 255.

Figure shows the IP address range of the first octet both in decimal and binary for each IP address class.

The next page will discuss reserved IP addresses.

IPv4 addressing

IPv4 addressing
9.2.3 This page will discuss IPv4 addressing.


A router uses IP to forward packets from the source network to the destination network. The packets must include an identifier for both the source and destination networks. A router uses the IP address of the destination network to deliver a packet to the correct network. When the packet arrives at a router connected to the destination network, the router uses the IP address to locate the specific computer on the network. This system works in much the same way as the national postal system. When the mail is routed, the zip code is used to deliver it to the post office at the destination city. That post office must use the street address to locate the final destination in the city.

Every IP address also has two parts. The first part identifies the network where the system is connected and the second part identifies the system. As is shown Figure , each octet ranges from 0 to 255. Each one of the octets breaks down into 256 subgroups and they break down into another 256 subgroups with 256 addresses in each. By referring to the group address directly above a group in the hierarchy, all of the groups that branch from that address can be referenced as a single unit.

This kind of address is called a hierarchical address, because it contains different levels. An IP address combines these two identifiers into one number. This number must be a unique number, because duplicate addresses would make routing impossible. The first part identifies the system's network address. The second part, called the host part, identifies which particular machine it is on the network.

IP addresses are divided into classes to define the large, medium, and small networks. Class A addresses are assigned to larger networks. Class B addresses are used for medium-sized networks, and Class C for small networks. The first step in determining which part of the address identifies the network and which part identifies the host is identifying the class of an IP address.

The Interactive Media Activity will require students to identify the different classes of addresses.

The next page will provide more information about Class A, B, C, D, and E IP addresses.

Decimal and binary conversion

Decimal and binary conversion
9.2.2 There are several ways to convert decimal numbers to binary numbers. This page will describe one method.


The student may find other methods easier. It is a matter of personal preference.

When converting a decimal number to binary, the biggest power of two that will fit into the decimal number must be determined. If this process is designed to be working with computers, the most logical place to start is with the largest values that will fit into a byte or two bytes. As mentioned earlier, the most common grouping of bits is eight, which make up one byte. However, sometimes the largest value that can be held in one byte is not large enough for the values needed. To accommodate this, bytes are combined. Instead of having two eight-bit numbers, one 16-bit number is created. Instead of three eight-bit numbers, one 24-bit number is created. The same rules apply as they did for eight-bit numbers. Multiply the previous position value by two to get the present column value.

Since working with computers often is referenced by bytes it is easiest to start with byte boundaries and calculate from there. Start by calculating a couple of examples, the first being 6,783. Since this number is greater than 255, the largest value possible in a single byte, two bytes will be used. Start calculating from 215. The binary equivalent of 6,783 is 00011010 01111111.

The second example is 104. Since this number is less than 255, it can be represented by one byte. The binary equivalent of 104 is 01101000.

This method works for any decimal number. Consider the decimal number one million. Since one million is greater than the largest value that can be held in two bytes, 65535, at least three bytes will be needed. By multiplying by two until 24 bits, three bytes, is reached, the value will be 8,388,608. This means that the largest value that 24 bits can hold is 16,777,215. So starting at the 24-bit, follow the process until zero is reached. Continuing with the procedure described, it is determined that the decimal number one million is equal to the binary number 00001111 01000010 01000000.

Figure includes some decimal to binary conversion exercises.

Binary to decimal conversion is just the opposite. Simply place the binary in the table and if there is a one in a column position add that value into the total. Convert 00000100 00011101 to decimal. The answer is 1053.

Figure includes some binary to decimal conversion exercises.

The next page will discuss IPv4 addressing.

IP addressing

IP addressing
9.2.1 This page will describe IP addressing.


For any two systems to communicate, they must be able to identify and locate each other. The addresses in Figure are not actual network addresses. They represent and show the concept of address grouping.

A computer may be connected to more than one network. In this situation, the system must be given more than one address. Each address will identify the connection of the computer to a different network. Each connection point, or interface, on a device has an address to a network. This will allow other computers to locate the device on that particular network. The combination of the network address and the host address creates a unique address for each device on a network. Each computer in a TCP/IP network must be given a unique identifier, or IP address. This address, which operates at Layer 3, allows one computer to locate another computer on a network. All computers also have a unique physical address, which is known as a MAC address. These are assigned by the manufacturer of the NIC. MAC addresses operate at Layer 2 of the OSI model.

An IP address is a 32-bit sequence of ones and zeros. Figure shows a sample 32-bit number. To make the IP address easier to work with, it is usually written as four decimal numbers separated by periods. For example, an IP address of one computer is 192.168.1.2. Another computer might have the address 128.10.2.1. This is called the dotted decimal format. Each part of the address is called an octet because it is made up of eight binary digits. For example, the IP address 192.168.1.8 would be 11000000.10101000.00000001.00001000 in binary notation. The dotted decimal notation is an easier method to understand than the binary ones and zeros method. This dotted decimal notation also prevents a large number of transposition errors that would result if only the binary numbers were used.

Both the binary and decimal numbers in Figure represent the same values. However, the address is easier to understand in dotted decimal notation. This is one of the common problems associated with binary numbers. The long strings of repeated ones and zeros make errors more likely.

It is easy to see the relationship between the numbers 192.168.1.8 and 192.168.1.9. The binary values 11000000.10101000.00000001.00001000 and 11000000.10101000.00000001.00001001 are not as easy to recognize. It is more difficult to determine that the binary values are consecutive numbers.

The next page will discuss the conversion of binary and decimal numbers.

Internet architecture

Internet architecture
9.1.7 This page will examine the basic architecture of the Internet.


The Internet enables nearly instantaneous worldwide data communications between anyone, anywhere, at any time.

LANs are networks within limited geographic areas. However, LANs are limited in scale. Although there have been technological advances to improve the speed of communications, such as Metro Optical, Gigabit, and 10-Gigabit Ethernet, distance is still a problem.

Students can focus on the communications between source and destination computers or intermediate computers at the application layer to get an overview of the Internet architecture. Identical instances of an application could be placed on all the computers in a network to ease the delivery of messages. However, this does not scale well. New software would require new applications to be installed on every computer in the network. For new hardware to function properly, the software would need to be modified. Any failure of an intermediate computer or computer application would cause a break in the chain of the messages that are passed.

The Internet uses the principle of network layer interconnection. The goal is to build the functionality of the network in independent modules. This allows a diversity of LAN technologies at Layers 1 and 2 of the OSI model and a diversity of applications at Layers 5, 6, and 7. The OSI model provides a mechanism where the details of the lower and the upper layers are separated. This allows intermediate networking devices to relay traffic without details about the LAN.

This leads to the concept of internetworks, or networks that consist of many networks. A network of networks is called an internetwork, which is indicated with the lowercase i. The network on which the World Wide Web (www) runs is the Internet, which is indicated with a capital I. Internetworks must be scalable with regard to the number of networks and computers attached. They must also be able to handle the transport of data across vast distances. An internetwork must be flexible to account for constant technological innovations. It must be able to adjust to dynamic conditions on the network. And internetworks must be cost-effective. Internetworks must be designed to permit data communications to anyone, anywhere, at any time.

Figure summarizes the connection of one physical network to another through a special purpose computer called a router. These networks are described as directly connected to the router. The router is needed to handle any path decisions required for the two networks to communicate. Many routers are needed to handle large volumes of network traffic.

Figure extends the idea to three physical networks connected by two routers. Routers make complex decisions to allow users on all the networks to communicate with each other. Not all networks are directly connected to one another. The router must have some method to handle this situation.

One option is for a router to keep a list of all computers and all the paths to them. The router would then decide how to forward data packets based on this reference table. Packets would be forwarded based on the IP address of the destination computer. This option would become difficult as more users were added to the network. Scalability is introduced when the router keeps a list of all networks, but leaves the local delivery details to the local physical networks. In this situation, the routers pass messages to other routers. Each router shares information about its connected network.

Figure shows the transparency that users require. However, the physical and logical structures inside the Internet cloud can be extremely complex as shown in Figure . The Internet has grown rapidly to allow more and more users. The fact that the Internet has grown so large, with more than 90,000 core routes and 300,000,000 end users, proves the effectiveness of the Internet architecture.

Two computers located anywhere in the world that follow certain hardware, software, and protocol specifications can communicate reliably. The standardization of ways to move data across networks has made the Internet possible.

This page concludes this lesson. The next lesson will discuss Internet addressing. The first page covers IP addressing.

The OSI model and the TCP/IP model

The OSI model and the TCP/IP model
9.1.6 This page provides a comparison of the OSI model and the TCP/IP model.


The OSI and TCP/IP models have many similarities:

• Both have layers.
• Both have application layers, though they include different services.
• Both have comparable transport and network layers.
• Both use packet-switched instead of circuit-switched technology.
• Networking professionals need to know both models.

Here are some differences of the OSI and TCP/IP models:

• TCP/IP combines the OSI application, presentation, and session layers into its application layer.
• TCP/IP combines the OSI data link and physical layers into its network access layer.
• TCP/IP appears simpler because it has fewer layers.
• When the TCP/IP transport layer uses UDP it does not provide reliable delivery of packets. The transport layer in the OSI model always does.

The Internet was developed based on the standards of the TCP/IP protocols. The TCP/IP model gains credibility because of its protocols. The OSI model is not generally used to build networks. The OSI model is used as a guide to help students understand the communication process.

The Interactive Media Activity will help students understand the differences between the TCP/IP and OSI reference models.

The next page examines the basic architecture of the Internet.

Transport layer / Internet layer / Network access layer

Transport layer
9.1.3 This page will explain how the transport layer provides transport services from the source host to the destination host.


The transport layer provides a logical connection between a source host and a destination host. Transport protocols segment and reassemble data sent by upper-layer applications into the same data stream, or logical connection, between end points.

The Internet is often represented by a cloud. The transport layer sends data packets from a source to a destination through the cloud. The primary duty of the transport layer is to provide end-to-end control and reliability as data travels through this cloud. This is accomplished through the use of sliding windows, sequence numbers, and acknowledgments. The transport layer also defines end-to-end connectivity between host applications. Transport layer protocols include TCP and UDP.

The functions of TCP and UDP are as follows:

• Segment upper-layer application data
• Send segments from one end device to another

The functions of TCP are as follows:

• Establish end-to-end operations
• Provide flow control through the use of sliding windows
• Ensure reliability through the use of sequence numbers and acknowledgments

The Interactive Media Activity will help students become familiar with the transport layer protocols.

The next page will describe the Internet layer.

Internet layer
9.1.4 This page explains the functions of the TCP/IP Internet layer.


The purpose of the Internet layer is to select the best path through the network for packets to travel. The main protocol that functions at this layer is IP. Best path determination and packet switching occur at this layer.

The following protocols operate at the TCP/IP Internet layer:

• IP provides connectionless, best-effort delivery routing of packets. IP is not concerned with the content of the packets but looks for a path to the destination.
• Internet Control Message Protocol (ICMP) provides control and messaging capabilities.
• Address Resolution Protocol (ARP) determines the data link layer address, or MAC address, for known IP addresses.
• Reverse Address Resolution Protocol (RARP) determines the IP address for a known MAC address.

IP performs the following operations:

• Defines a packet and an addressing scheme
• Transfers data between the Internet layer and network access layer
• Routes packets to remote hosts

IP is sometimes referred to as an unreliable protocol. This does not mean that IP will not accurately deliver data across a network. IP is unreliable because it does not perform error checking and correction. That function is handled by upper layer protocols from the transport or application layers.

The Interactive Media Activity will help students become familiar with the protocols used in the Internet layer.

The next page will discuss the network access layer.

Network access layer
9.1.5 This page will discuss the TCP/IP network access layer, which is also called the host-to-network layer.


The network access layer allows an IP packet to make a physical link to the network media. It includes the LAN and WAN technology details and all the details contained in the OSI physical and data link layers.

Drivers for software applications, modem cards, and other devices operate at the network access layer. The network access layer defines the procedures used to interface with the network hardware and access the transmission medium. Modem protocol standards such as Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP) provide network access through a modem connection. Many protocols are required to determine the hardware, software, and transmission-medium specifications at this layer. This can lead to confusion for users. Most of the recognizable protocols operate at the transport and Internet layers of the TCP/IP model.

Network access layer protocols also map IP addresses to physical hardware addresses and encapsulate IP packets into frames. The network access layer defines the physical media connection based on the hardware type and network interface.

Here is an example of a network access layer configuration that involves a Windows system set up with a third party NIC. The NIC would automatically be detected by some versions of Windows and then the proper drivers would be installed. In an older version of Windows, the user would have to specify the network card driver. The card manufacturer supplies these drivers on disks or CD-ROMs.

The Interactive Media Activity will help students become familiar with the network access layer protocols.

The next page explains the similarities and differences between the TCP/IP model and the OSI reference model.