Computer Network Architecture Lecture 9: IP Addressing 13/1/2013 1 IP Address • An IP address is a 32-bit, two-level hierarchical number.it is uniquely defined by a network layer address. • It is hierarchical because the first portion of the address represents the network, and the second portion of the address represents the node (or host). • The 32 bits are grouped into four octets, with 8 bits per octet. The value of each octet ranges from 0 to 255 decimal, or 00000000 to 11111111 binary. IP addresses are usually written in dotted decimal notation, which means that each octet is written in decimal notation and dots are placed between the octets. 2 IP Address (Con.) • The hosts of an network have identical bit patterns in the network address portion of their IP addresses. • In the following example, the two addresses have identical network portions. Therefore, hosts assigned these two addresses would be on the same logical network: 172.16.4.20 172.16.4.32 network host network host portion portion portion portion 3 IP Address(Con.) • Although, IP addresses are divided into two parts (network, host) portion, the number of bytes for each of them are different. • The decision of how many bits are required for the host portion are depend on the number of hosts that a network requires. • For example, If a particular network requires at least 200 hosts, you would need to use enough bits in the host portion to be able to represent at least 200 different bit patterns. • To assign a unique address to 200 hosts, you would use the entire last octet. With 8 bits, a total of 256 different bit patterns can be achieved. As with the previous example, this means that the bits for the upper three octets represent the network portion. 4 Converting IP Addresses Between Decimal and Binary • The IP address can be decimal or binary. we can convert between of them. • Value for each bit. 1+ 2+ 4+ 8+ 16+ 32+ 64+ 128= 255 5 Converting IP Addresses Between Decimal and Binary • Converting From Binary to Decimal 0 1 0 0 0 0 0 1 128 64 32 16 8 4 2 1 0 + 64+ 0 + 0+ 0 + 0 + 0 + 1= 65 6 Converting IP Addresses Between Decimal and Binary • Examples: find the decimal addresses for the following binary addresses: • 00001010 00000001 00010111 00010011 • 10101010 01000001 00010010 10101100 • 11000000 10101000 00001110 11111111 7 Converting IP Addresses Between Decimal and Binary • Examples: find the binary addresses for the following decimal addresses: • 10.1.23.19 • 192.168.14.6 • 172.18.65.170 8 Thank You 9