470 likes | 536 Views
IP Address Format IP Address Class IP Subnet Addressing Special Addresses. Lecture 2 IP V.4 Addressing. IP Address Format. 32 bits. Network ID. Host ID. 8 bits. 8 bits. 8 bits. 8 bits. Dotted Decimal notation. Example. 172. 16. 122. 204.
E N D
IP Address Format • IP Address Class • IP Subnet Addressing • Special Addresses Lecture 2 IP V.4 Addressing
IP Address Format 32 bits Network ID Host ID 8 bits 8 bits 8 bits 8 bits Dotted Decimal notation Example 172 16 122 204 An IP Address Consists of 32 Bits, Grouped into 4 Octets
IP Address Class • IP addressing supports five different address classed: A, B, C, D and E. • Only classes A, B and C are available for commercial use. • The left-most (high-order) bits indicate the network class.
IP Address Class 8 21 14 16 24 Bits 7 Class A 0 Network Host Host Host Class B 1 0 Network Network Host Host Class C 1 1 0 Network Network Network Host A Range of Possible Values Exists for the First Octet of Each Address Class
IP Address Class Number of Bits Network/ Host 7/24 14/16 21/8 Not for commercial use - Address Range 1.0.0.0 to 126.0.0.0 128.1.0.0 to 191.254.0.0 192.0.1.0 to 223.255.254.0 224.0.0.0 to 239.255.255.255 240.0.0 to 254.255.255.255 High – Order Bit (s) 0 1,0 1,1,0 1,1,1,0 1,1,1,1 Max. Hosts 16,777,214 (224-2) 65,534 (216-2) 254 (28-2) - - IP Address Class A B C D E Format N.H.H.H N.N.H.H N.N.N.H - - Purpose Few large Organizations Medium - size Organizations Relatively Small Organizations Multicast Groups (RFC 1112) Experimental
IP Address Class • The class of address can be determined easily by examining the first octet of the address and mapping that value to a class range in the following table.
IP Address Class Address class First octet In decimal High – order bits Class A Class B Class C Class D Class E 1 – 126 128 – 191 192 – 223 224 – 239 240 - 254 0 10 110 1110 1111 A Range of Possible Values Exists for the First Octet of Each Address Class
Note: Millions of class A addresses are wasted.
Note: Many class B addresses are wasted.
Note: The number of addresses in class C is smaller than the needs of most organizations.
IP Subnet Addressing • IP networks can be divided into smaller called “subnetworks or subnets ” • Subnetting provides the network administrator with several benefits, including extra flexibility, more efficient use of network addressed, and the capability to contain broadcast traffic (a broadcast will not cross a router).
broadcast traffic • Broadcast traffic is traffic that is simultaneously addressed to all computers connected to the network • For example in the network 192.168.0.0/24 (192.168.0.xxx with subnet mask 255.255.255.0) the broadcast address is 192.168.0.255 • In MAC addressing (layer 2 on the OSI model), the broadcast address is the MAC address FF:FF:FF:FF:FF:FF
IP Subnet Mask • A subnet address is created by borrowing bits from the host field and designing them as the Subnet field. • The number of borrowed bits varies and is specified by the subnet mask. • Subnet masks use the same format and representation technique as IP addresses. • The subnet mask, however, has binary 0s in all bits specifying the Host field.
How to IP Subnet Mask Step 1 Step 2
How to IP Subnet Mask Step 3
How to IP Subnet Mask 8 4 2 1 32 128 16 64 0 0 0 0 128 0 1 = 0 0 0 0 0 0 192 0 1 = 0 1 224 0 0 0 0 1 1 = 0 1 0 0 0 0 240 1 1 = 1 1 1 0 0 0 1 1 = 1 1 248 1 1 0 0 1 1 = 252 1 1 1 1 1 0 254 1 1 = 1 1 1 1 1 1 255 1 1 = 1 1 Subnet Mask Bits Come From the High-Order Bits of the Host Field
How to IP Subnet Mask Step 4
IP Subnet Mask Number of Bits 2 3 4 5 6 Number of Subnets 2 6 14 30 62 Number of Hosts 62 30 14 6 2 Subnet Mask 255.255.255.192 255.255.255.224 255.255.255.240 255.255.255.248 255.255.255.252 Class C Subnetting Reference Chart
IP Subnet Mask Class C Subnetting Reference Chart
How Subnet Masks Are Used to Determine the Network Number • The router performs a set process to determine the network address. (or the subnetwork address) • First, the router extracts the IP destination address from the incoming packet and retrieves the internal subnet mask. • It then performs a logical AND operation to obtain the network number. (or the subnetwork number)
How Subnet Masks Are Used to Determine the Network Number • This causes the host portion of the IP destination address to be removed, while the destination network number remains. • The router then looks up the destination network number and matches it with an outgoing interface. • It forwards the frame to the destination IP address.
Logical AND Operation Output Input Output 1 0 0 0 Input 1 0 1 0 Input 1 1 0 0
Private Addresses A number of blocks in each class are assigned for private use. They are not recognized globally. These blocks are depicted in Table 4.4
Unicast, Multicast, and Broadcast Addresses Unicast communication is one-to-one. Multicast communication is one-to-many. Broadcast communication is one-to-all.
Credits • All figures obtained from publisher-provided instructor downloads TCP/IP Protocol Suite, 2nd edition by Behrouz A. Forouzan. McGraw Hill Publishing, 2003