IP Addressing and Subnetting
Internet Layer The purpose of the Internet layer is to send packets from a network node and have them arrive at the destination node independent of the path taken.
Internet Architecture Two computers, anywhere in the world, following certain hardware, software, protocol specifications, can communicate, reliably even when not directly connected. LANs are no longer scalable beyond a certain number of stations or geographic separation.
IP Addressing An IP address is a 32-bit sequence of 1s and 0s. To make the IP address easier to use, the address is usually written as four decimal numbers separated by periods. This way of writing the address is called the dotted decimal format.
IPv4 Addressing
Class A, B, C, D, and E IP Addresses
Reserved IP Addresses Certain host addresses are reserved and cannot be assigned to devices on a network. An IP address that has binary 0s in all host bit positions is reserved for the network address. An IP address that has binary 1s in all host bit positions is reserved for the broadcast address.
Public and Private IP Addresses No two machines that connect to a public network can have the same IP address because public IP addresses are global and standardized. However, private networks that are not connected to the Internet may use any host addresses, as long as each host within the private network is unique. RFC 1918 sets aside three blocks of IP addresses for private, internal use. Connecting a network using private addresses to the Internet requires translation of the private addresses to public addresses using Network Address Translation (NAT).
Subnetting Split host address range into 2 or more distinct subnets Provides addressing flexibility for the network administrator. Each LAN has its own network or subnetwork address. Provides broadcast containment and low-level security on the LAN. Provides some security since access to other subnets is only available through the services of a router.
Introduction to Subnetting Host bits must be reassigned (or borrowed ) as network bits. The starting point is always the leftmost host bit. 3 bits borrowed allows 2 3-2 or 6 subnets 5 bits borrowed allows 2 5-2 or 30 subnets 12 bits borrowed allows 2 12-2 or 4094 subnets
Establishing the Subnet Mask Address Determines which part of an IP address is the network field and which part is the host field. Follow these steps to determine the subnet mask: 1. Express the subnetwork IP address in binary form. 2. Replace the network and subnet portion of the address with all 1s. 3. Replace the host portion of the address with all 0s. 4. Convert the binary expression back to dotted-decimal notation.
Establishing the Subnet Mask Address To determine the number of bits to be used, the network designer needs to calculate how many hosts the largest subnetwork requires and the number of subnetworks needed. The slash format is a shorter way of representing the subnet mask: /25 represents the 25 one bits in the subnet mask 255.255.255.128
Establishing the Subnet Mask Address This example subnets a class C address using 3 bits for the subnet and 5 bits for the host address. What is the correct subnet mask?
Subnetting Class A and B Networks The available bits for assignment to the subnet field in a Class A address is 22 bits while a Class B address has 14 bits. Why?
Calculating the Subnetwork With ANDing ANDing is a binary process by which the router calculates the subnetwork ID for an incoming packet. 1 AND 1 = 1; 1 AND 0 = 0; 0 AND 0 = 0 The router then uses that information to forward the packet across the correct interface. Packet Address 192.168.10.65 11000000.10101000.00001010.010 00001 Subnet Mask 255.255.255.224 11111111.11111111.11111111.111 00000 Subnetwork Address 192.168.10.64 11000000.10101000.00001010.010 00000
Problems in Address Resolution In TCP/IP communications, a datagram on a local-area network must contain both a destination MAC address and a destination IP address. There needs to be a way to automatically map IP to MAC addresses. The TCP/IP suite has a protocol, called Address Resolution Protocol (ARP), which can automatically obtain MAC addresses for local transmission. TCP/IP has a variation on ARP called Proxy ARP that will provide the MAC address of an intermediate device for transmission outside the LAN to another network segment.
Address Resolution Protocol (ARP) Each device on a network maintains its own ARP table. A device that requires an IP and MAC address pair broadcasts an ARP request. If one of the local devices matches the IP address of the request, it sends back an ARP reply that contains its IP-MAC pair. If the request is for a different IP network, a router performs a proxy ARP. The router sends an ARP response with the MAC address of the interface on which the request was received, to the requesting host.