Scaling the Network Chapters 3-4 Part 2 Networking CS 3470, Section 1 Network Layer Functions Addressing Globally unique address for each routable device Assigned by network operator Need to map to MAC address Forwarding Logical address, unlike MAC address From input port to appropriate output port in a router Routing Which path to use to forward packets from src to dest 2 Today Subnetting Forwarding with CIDR ARP and DHCP Protocols 3 Subnetting Add another level to address/routing hierarchy: subnet Subnet masks define variable partition of host part of class A and B addresses Subnets visible only within site Subnetting R1 Routing Table Subnetting Forwarding Algorithm D = destination IP address for each entry < SubnetNum, SubnetMask, NextHop> D1 = SubnetMask & D if D1 = SubnetNum if NextHop is an interface deliver datagram directly to destination else deliver datagram to NextHop (a router) Longest-Prefix Match Suppose two network IDs exist: 1) 128.186.0.0/16 2) 128.186.134.0/24 Suppose you have destination IP of 128.186.134.100 Both subnet mask & IP of 1 and 2 will yield match – what to do? Longest-prefix match – route to network with the most matching host bits. 7 Subnetting Notes Would use a default router if nothing matches Not necessary for all ones in subnet mask to be contiguous Can put multiple subnets on one physical network Subnets not visible from the rest of the Internet Routing with CIDR Choices: A, B, C, D, E, F 9 Address Resolution IP address is virtual Not understood by underlying physical networks IP packets need to be transmitted by the underlying physical network Address resolution Translating IP address to physical address Address Resolution Protocol (ARP) 10 ARP A router has to know where to deliver packets on the local network ARP is used to discover MAC addresses based on IP addresses arp who-has 192.168.10.1 tell node31.ceee.lab arp reply 192.168.10.1 is-at 00:60:08:ce:9d:3b arp who-has node31.ceee.lab tell 192.168.10.254 arp reply node31.ceee.lab is-at 00:02:3f:b4:cd:87 ARP Cache Each computer maintains a cache table IP address hardware address mapping Only about computers on the same network Try out “/usr/sbin/arp –a” command Exchanges ARP messages To resolve IP addresses with unknown hardware addresses Encapsulated in DLL frame (e.g., Ethernet data frame) 12 ARP Protocol When a node sends an IP packet Look up destination address in the ARP table If not found To another node on the same physical network Broadcast a request to the local network Whose IP address is this? What info should the request message contain? 13 ARP Response The target node responds to sender (unicast?) On receiving the response Requester updates its table Other nodes upon receiving the request With its physical address Adds the requester into its ARP table (why?) Refresh the requester entry if already there No action otherwise (why?) Table entries deleted if not refreshed for a while 14 ARP Example ARP broadcast by W requesting hardware address of Y 15 Dynamic Host Configuration Protocol (DHCP) DHCP server is responsible for providing configuration information to hosts There is at least one DHCP server for an administrative domain DHCP server maintains a pool of available addresses DHCP State Protocol DHCPDISCOVER (client) DHCPOFFER (server) DHCPREQUEST (client) DHCPACK (server) DHCPNAK (server) DHCPINFORM (client) DHCP Newly booted or attached host sends DHCPDISCOVER message to a special IP address (255.255.255.255) DHCP relay agent unicasts the message to DHCP server and waits for the response DHCP IP leases are valid for a predefined period of time (T1) Leases are renewed at T1/2 Leases are released if they have not been renewed at the expiration of the lease time Internet Control Message Protocol (ICMP) Defines a collection of error messages that are sent back to the source host whenever a router or host is unable to process an IP datagram successfully ICMP-Redirect Destination host unreachable due to link /node failure Reassembly process failed TTL had reached 0 (so datagrams don't cycle forever) IP header checksum failed From router to a source host With a better route information The ping application is a very common ICMP-messagegenerator
© Copyright 2025 Paperzz