Lecture 2: Internet Protocol Literature: Forouzan: ch (4-6), 7-9 and ch 31 2004 Image Coding Group, Linköpings Universitet
Lecture 2: IP Goals: Understand the benefits Understand the architecture IPv4 and IPv6, (IP addressing and basic routing) Support protocols: ARP RARP ICMP 2
Outline Tasks of the network layer Logical vs physical addresses Adressing Basic Routing ARP RARP IPv4 ICMP IPv6 3
Tasks of the network layer Source to destination delivery of packets (across multiple networks) Logical addressing - addresses valid over network borders Routing 4
Logical vs Physical Addresses Each network interface card (NIC) has a physical address, eg MAC addresses. They are enough within a LAN, but give no routing help outside the local area. Logical addresses created to help with communication between networks. Nodes within a LAN have neighbouring IP addresses. All traffic to the network can be routed using the common part of the addresses in the LAN, the network address. 5
Addressing 32 bit addresses in IPv4 - - >approx 4300 million addresses available. Dotted decimal notation, eg. 198.36.42.18 Sometimes hexadecimal notation is used, eg 0xC6242A12 6
Classful Addressing One reason that we are running out of available addresses! Addresses are assigned in blocks where the block size is defined by the chosen class. Classes A- E OBS! This is an obsolete addressing scheme! (They are still in use though...) Many organisations have been assigned more addresses than they need! 7
Classless Addressing Addresses are assigned in blocks of variable size. Only restriction is that the size of the block should be a power of 2. Network address - the first address in the block Broadcast address - the last address in the block Network mask - used for extracting the network address, Slash notation - short form of network mask Subnetting - divide a block into subnets Supernetting - not needed if classless addressing is used 8
Delivery and Routing Connection- oriented or connectionless service? Direct or indirect delivery? Routing tables - gets huge next- hop network specific static or dynamic? search algorithm? 9
ARP Maps logical addresses to physical addresses. ARP requests are broadcasts on the LAN. An ARP packet is encapsulated directly into a data link frame. 10
RARP Maps physical addresses to logical addresses. RARP requests are broadcast on the LAN A RARP packet is encapsulated directly into a data link frame. 11
The Internet Protocol (IP) Unreliable Connectionless A best effort delivery service 12
Datagrams Header (20-60 bytes): Version (VER) - 4 bits Header length (HLEN) - 4 bits Differentiated Services (DS) - 8 bits Total length - 16 bits Identification - 16 bits Flags - 3 bits Fragmentation offset - 13 bits Time to live (TTL) - 8 bits Protocol - 8 bits Checksum - 16 bits Source address - 32 bits Destination address - 32 bits 13
Fragmentation Maximum transfer unit (MTU) Each data link layer protocol use its own frame format. Fragmentation needed when passing to a network with a smaller MTU. 14
Options Used for network testing and debugging,eg record route strict source route timestamp 15
Checksum Redundant information added that is used for error detection The checksum is constructed as follows: 1. Divide the packet into k section, each of n bits 2. All sections are added together using one's complement arithmetic. (We will look at this during lesson 1) 3. The result is complemented to make the checksum 16
ICMP Messages are encapsulated in IP datagrams. Two types of messages: Error reporting Dest. unreachable Source quench Time exceeded Parameter problems Redirection Query Echo request and reply Timestamp request and reply Address- mask request and reply Router solicitation and advertisement 17
IPv6 Solves addressing problems Accomodates real- time traffic Accomodates encryption and authentication Better header format New options Extension possible Resource allocation supported 18