170 likes | 178 Views
Explore the basics of IP addresses, subnetting, classes, and allocation. Learn about addressing examples, subnet masks, CIDR notation, and special addresses in the Internet Protocol.
E N D
Ch 18 IP Addresses Spring 2003
Internet Protocol • Only protocol at Layer 3 • Defines • Internet addressing • Internet packet format • Internet routing
IP Addressing • Independent of hardware addressing • Used by • Higher-layer protocols • Applications • IP address • 32-bit integer • Dotted decimal notation (e.g., 140.128.11.20) • Each connection must be assigned one unique IP address
IP Address Details • Divided into two parts • Prefix identifies network (net ID) • Suffix identifies host (host ID) • max. number of host • Global authority assigns unique prefix to network • Local administrator assigns unique suffix to host
IP Address Details • Default gateway 140.128.1.1 163.23.1.8 140.128 163.23 .5.2 DNS .1.2 .5.8 .12.24 .12.23
Dotted Decimal Notation • Four decimal values per 32-bit address • Each decimal number • Represents eight bits • Is between 0 and 255
Dotted Decimal Notation • Range for different classes of addresses • Class A: 0.0.0.0 - 127.255.255.255 • Class B: 128.0.0.0 - 191.255.255.255 • Class C: 192.0.0.0 - 223.255.255.255 • Class D: 224.0.0.0 - 239.255.255.255 • Class E: 240.0.0.0 - 247.255.255.255
Division of the Address Space 10. x. y. z 7-bit 24-bit
172.21.0.0 172.25.0.0 172.22.0.0 172.24.0.0 172.23.0.0 Subnet and Classless Addressing • Exhaust five class-B addresses
Subnet and Classless Addressing • Subnetting 16 bits 8 bits 8 bits Class B 172.21 X 0 Net Id Subnet Id Host Id 172.21.1.0 172.21.2.0 172.21.5.0 172.21.3.0 172.21.4.0
Address Mask • Accompanies IP address • 32 bit binary value 16 bits 8 bits 8 bits Class B Net ID = 172.21 Subnet ID Host ID Subnet mask = 255.255.255.0 or 172.21.0.0 / 24 111…………….1 11……1 00…..0 16 bits 10 bits 6 bits Class B Net ID = 172.21 Subnet ID Host ID Subnet mask = 255.255.255.192 or 172.21.0.0 / 26 111…………….1 11……1 11 000000
CIDR Notation • Uses slash notation • Example 128.211.0.0/17 Means that the boundary between prefix and suffix occurs after the first 17 bits
IP Address Allocation • Static • public IP address (by hand) • private IP address (via NAT, IP sharing) • Dynamic • public IP address (via DHCP or relay agent)
Special Addresses • 0.0.0.0 • 140.128.0.0 • 140.128.255.255 • 255.255.255.255 • 127.0.0.1
Special Addresses • Loopback never leaves local computer • Multi-homed hosts • A host that connects to multiple networks