320 likes | 453 Views
CS335 Networking & Network Administration. Tuesday, May 11, 2010. ARP – Address resolution protocol. Translates IP address into a hardware address Physical network hardware does not know how to locate a computer from its protocol address Known as address resolution. ARP.
E N D
CS335 Networking &Network Administration Tuesday, May 11, 2010
ARP – Address resolution protocol • Translates IP address into a hardware address • Physical network hardware does not know how to locate a computer from its protocol address • Known as address resolution
ARP • Can only resolve hardware addresses for machines on the local physical network
Address Resolution • Three techniques of address resolution • Table lookup – stored in a table in memory
Table lookup • For less than a dozen hosts sequential search suffices • In larger networks this requires excessive CPU cycles • Hashing – general purpose data structure • Direct indexing
Table lookup • Direct indexing – uses the host address as an index into the array
Address resolution • Closed-form computation • Used when the network interface can be assigned specific hardware addresses • Computed by a single Boolean and operation • Hardware_address = ip_address & 0xff • When a computer connects to a network that uses this, resolution is trivial
Address resolution • Message exchange • Computers exchange messages across network to resolve an address • 3 types of address resolution • Table lookup • Closed form computation • Dynamic message exchange
ARP • ARP standard defines 2 basic message types • Request – contains an IP address and requests the hardware address • Response – has both the IP address and the hardware address
ARP message format • Although the ARP message format is sufficiently general to allow arbitrary protocol and hardware addresses, ARP is always used to bind a 32 bit IP address to a 48 bit Ethernet address • ARP is encapsulated directly in a hardware frame
Identifying ARP frames • The type field in the frame header specifies that the frame contains an ARP message
ARP caching • ARP software extracts and saves the information • Uses small table of bindings in memory • Checks cache first before broadcasting an ARP request • Improves the efficiency of network traffic
IP • TCP/IP includes both connectionless and connection-oriented services • Routers can connect heterogeneous networks so they cannot transmit a copy of a frame that arrives on one network across another • IP is a hardware independent packet format
IP datagram • Size of a datagram is determined by the application that sends the data • Similar to format of a frame • Uses IP addresses in header • Can contain as little as a single octet of data or at most 64K octets
Forwarding IP datagrams • Next hop – either the destination or the next router
IP addresses and routing tables • Routing
Destination and Next-Hop addresses • 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.
Best effort delivery • IP uses best-effort to describe the service • Doesn’t guarantee that it will handle: • Datagram duplication • Delayed or out-of-order delivery • Corruption of data • Datagram loss • Additional layers of protocol software handle these errors
IP Datagram Header • Each field has a fixed size
Encapsulation • Network hardware doesn’t understand datagram format or IP addressing • Network understands its own frame format and heterogeneous networks may have different formats • IP datagram is encapsulated in a frame
Encapsulation • Frame type field uses the value reserved for IP • Receiver knows the data area contains IP datagram • Uses a frame address for next hop obtained by ARP
Transmission across an internet When a datagram arrives in a network frame the receiver extracts the datagram from the frame data and discards the frame header. Frame headers don’t accumulate on the trip.
MTU – Maximum transmission unit • Each hardware technology has a limit to the amount of data in a frame • Datagram must be smaller than the MTU or it can’t be encapsulated for transmission
Fragmentation • In a internet with heterogeneous networks, MTU restrictions can be a problem • Routers fragment or divide a datagram into smaller pieces to meet the MTU
Fragmentation • Each fragment uses the IP datagram format but carries only part of the data • Flags field of the header indicates whether it is fragment or a complete datagram
Reassembly • Process of creating a copy of the original datagram from fragments • Fragment with the final data has an additional bit set in header so receiver knows all fragments have arrived • Ultimate destination host reassembles fragments so the routers
Identifying a datagram • IP doesn’t guarantee delivery • Fragments can be lost or arrive out of order • Sender places a unique identification number in the identification field of outgoing datagram • When a router fragments, the identification number and source IP address determines to which datagram a fragment belongs • Fragment offset field tells a receiver how to order fragments
Fragment loss • Fragments can be delayed or lost • IP specifies a maximum time to hold fragments if they are delayed • When a fragment arrives receiver starts a timer, if all arrive before timer runs out, datagram is reassembled, otherwise they are discarded • No way for receiver to tell sender what fragments didn’t arrive • Sender doesn’t know about fragmentation • Resent packets may take a different path with different fragmentation • Fragments can be fragmented in case of an even smaller MTU
Future IP • Let’s go to the lab and research IP v6!