690 likes | 697 Views
Network Layer. Computer Networks John Ourada. Where are we?. Will Layer 2 Networking Suffice?. Motivation. Connect various link technologies to form a larger internetwork Universal addressing scheme required General purpose use Hides underlying technologies from end user
E N D
Network Layer Computer Networks John Ourada John Kristoff
Where are we? John Kristoff
Will Layer 2 Networking Suffice? John Kristoff
Motivation • Connect various link technologies to form a larger internetwork • Universal addressing scheme required • General purpose use • Hides underlying technologies from end user • Facilitate communicate between autonomous domains • Able to move packets between any host on the internetwork John Kristoff
Connecting Heterogeneous Networks • Computer System used • Special purpose • Dedicated • Works with LAN or WAN technologies • Known as • router • gateway John Kristoff
Illustration of a Router • Cloud denotes an arbitrary network • One interface per network John Kristoff
Important Idea A router can interconnect networks that use different technologies, including different media and media access techniques, physical addressing schemes or frame formats. John Kristoff
The Internet Concept John Kristoff
Key Functions of the Network Layer • Global Addressing • Fragmentation • Routing We’ll be primarily concerned with addressing and routing John Kristoff
Example Network Layer: Internet Protocol (IP) • Standardized by IETF as RFC 791 • Most popular Layer 3 protocol • Core protocol used on the public Internet • Connectionless protocol • datagrams contain identity of the destination • each datagram sent/handled independently • Of utmost importance for this class! John Kristoff
IP Addressing • Provides an abstraction • Independent of hardware (MAC) addressing • Used by • higher layer protocols • applications John Kristoff
IP Address • Virtual • only understood by software • Used for all communication across an internetwork • 32-bit integer • Unique value for each host/interface John Kristoff
IP Address Assignment An IP address does not identify a specific computer. Instead, each IP address identifies a connection between a computer and a network. A computer with multiple network connections (e.g., a router) must be assigned one IP address for each connection. John Kristoff
IP Address Details • Divided into two parts • prefix identifies the network • suffix identifies the host/interface • Global authority assigns unique prefix for the network • Local administrator assigns unique suffix for the host/interface John Kristoff
Class of IP Addresses (Historical) • Initial bits determined the class • The class determines the boundary between prefix and suffix John Kristoff
Dotted Decimal Notation • Shorthand for IP addresses • Allows humans to avoid binary • Represents each octet in decimal separated by dots • NOT the same as names like www.depaul.edu John Kristoff
Examples of Dotted Decimal Notation • Four decimal values per 32-bit address • Each decimal number • represents eight bits • is between 0 and 255 inclusive John Kristoff
Classes and Network Size (Historical) • Maximum size determined by class of address • Class A large • Class B medium • Class C small John Kristoff
Addressing Example John Kristoff
Illustration of Router Addresses • Address prefix identifies the network • Need one address per router connection John Kristoff
Special Addresses • Network Address not used in packets • Loopback addresses never leave the local computer John Kristoff
IP Addressing: Problems with Classes • Internet growth • Routing table size • Exhaustion of addresses • Administration overhead • Misappropriation of addresses John Kristoff
IP Addressing: Solutions • Subnetting • Variable Length Subnet Mask (VLSM) • Supernetting • Classless InterDomain Routing (CIDR) John Kristoff
Subnetting • Split the suffix into a local network portion and a smaller host id portion • Subnet mask becomes 255.255.255.0 for an 8-bit subnet mask John Kristoff
Subnetting • Subnet boundaries fall between any of the 32 bits in an IP address • Can be complex and confusing, know binary if not not on 8-bit boundaries John Kristoff
VLSM • Variable Length Subnet Mask • Can be complex and confusing, know binary! • Use addresses more efficiently. John Kristoff
Supernetting • Combine multiple smaller address classes into a larger block John Kristoff
CIDR • Classless Inter-domain Routing • Employ supernetting information in IP routers • Advertise smaller CIDR blocks • Decreases the routing table size John Kristoff
IP Packet (datagram) Format John Kristoff
IP Datagrams • Can be delayed • Duplicated • Delivered out of order • Lost • Can change routes from packet to packet • Are connectionless John Kristoff
IP Routing • Performed by routers • Table-driven • Forwarding on a hop-by-hop basis • Destination address used for route determination John Kristoff
Routing/Forwarding Overview • Strip off layer 2 headers/trailers • Extract destination address field, D • Look up D in the routing table • Find next hop address, N • Send datagram to N • Add on layer 2 headers/trailers John Kristoff
Routing Basic Operation John Kristoff
Routing Basic Operation John Kristoff
Basic Routing Operations John Kristoff
Basic Routing Operations John Kristoff
TCP/IP Routing John Kristoff
TCP/IP Routing John Kristoff
TCP/IP Routing John Kristoff
TCP/IP Routing John Kristoff
ARP Protocol • ARP: Address Resolution Protocol • Resolves IP address to MAC address • Node sends broadcast looking for another node • 140.192.23.1 broadcasts looking for 140.192.23.23 • Node replies with MAC address • 140.192.23.23 replies with 00600A34AA3C • ARP Table: contains records of learned relationships. John Kristoff
Example IP Routing Table • Table (b) is for center router in (a) John Kristoff
Routing Table Size Since each destination in a routing table corresponds to a network, the number of entries in a routing table is proportional to the number of networks in the internetwork. John Kristoff
Key Concept The destination address in a datagram header always refers to the ultimate destination. When a router forwards the datagram to another router, the address of the next hop does not appear in the datagram header. John Kristoff