The OSI model layer 3, network layer handles the routing of data packets by using IP addresses to identify each device on the network. Each device connected to a computer network has an unique IP address so that data can be sent correctly to it. In the following sections, we will study how to construct an IP address, the classes of IP addresses designated for specific routing purposes and public versus private IP addresses. There are two types of IP addresses: IP version 4 (IPv4) and IP version 6 (IPv6). The 32-bit IPv4 is currently the most common address type, but 128-bit IPv6 address is created to replace the IPv4 in the near future. IPv6 will be studied in detail in icnd2.
IP is the primary protocol in the Network Layer (Layer 3) of the OSI Model and has the task of delivering packets from the source host to the destination host solely based on their addresses. Lets take a close look at the IP packet:
|0||Version||Header length||Differentiated Services||Total Length|
|64||Time to Live||Protocol||Header Checksum|
The header consists of 13 fields, of which 12 are required. The 13th field is optional (red background in table). Note that each IP datagram carries this header, which includes a source IP address and destination IP address that identify the source and destination network and host.
An IP address is a 32 bit binary number, looks like the following:
00000100 10000000 00000011 00000001
We generally divide them into four 8-bit chunks, called octet, and then represent each 8-bit chunk into decimal number so that human can understand.
For example, the IP address showing above can be represented in decimal number format as
An IP address consists of two parts:
- The leftmost bits specify the network address component, called network ID.
- The rightmost bits specify the host address components, called host ID.
Every physical or virtual LAN on a corporate internetwork is seen as a single network. Each LAN has a unique network ID. The hosts that populate that network share those same network ID. For example, both hosts 192.168.1.100 and 192.168.1.101 resides in the same LAN with network address 192.168.0.0, and share the same network ID 192.168. The host ID of 192.168.1.100 is 1.100. The host ID of 192.168.1.101 is 1.101. We will talk about how to to find out the network portion and host portion of the IP address later.
ICND1 and ICND2 break down