View
290
Download
5
Tags:
Embed Size (px)
Citation preview
ChapterChapter 1919Binding Protocol Addresses (ARP)Binding Protocol Addresses (ARP)
Chapter 20Chapter 20IP Datagrams and Datagram IP Datagrams and Datagram
ForwardingForwarding
Chapter 19Chapter 19TopicsTopics
• Protocol Addresses and Packet Delivery• Address Resolution Techniques
– Table Lookup– Closed-Form Computation– Message Exchange
• ARP Message Delivery and Format• Sending ARP Messages• Caching ARP Responses• Incoming ARP Messages• Layering: The Protocol Address Boundary
The ProblemThe Problem
• IP provides the illusion of a single, large network.• However, an internet really consists of many networks
possibly using incompatible hardware.• IP addresses are virtual- They are maintained by
software and hardware doesn’t understand them.• Before protocol software can send a packet across a
physical network, the software must translate the IP address of the destination computer to the equivalent hardware address.
• Three Address Resolution Techniques– Table Lookup– Mathematical Function– Distributed Computation
Address Resolution TechniquesAddress Resolution Techniques
• Table Lookup
• Closed-Form Computation
• Message Exchange Address Resolution
Table LookupTable Lookup
• Used most often in WANs• Data structure contains
address bindings.• One address binding
table per physical network.
• direct indexing improves efficiency in large networks.– The suffix is used as an
index into an array.
Closed –Form ComputationClosed –Form Computation
• Used with network technologies that use static physical addresses.
• Uses a mathematical function to map an IP address to a hardware address.
• In networks with configurable addresses the addresses may be chosen to optimize the translation. – Ex: make the IP suffix equal to the computers
hardware address.• Hardware_address = ip_address & 0xff
Message Exchange Address Message Exchange Address ResolutionResolution
• Most often use in LANs with static addressing• The computer that needs to resolve an address sends a message
across a network and receives a reply. – Request carries an IP address – Reply carries the corresponding hardware address.
• Two possible designs depend on where the request is sent.– One or more servers
• A message is sent to one of the servers which send a reply.
– Each computer participates by answering the resolution requests for its address.
• Computer broadcasts a request on the network. Every machine receives the request and examines the IP address, but only the computer with that address responds.
Address Resolution Protocol (ARP)Address Resolution Protocol (ARP)
• The standard used by TCP/IP to resolve addresses.
• Defines two message types: a request and a response.
• Specifies exactly how ARP messages should be sent – In a hardware frame
– Requests are broadcast to all computers
– Responses are sent directly back to the requesting computer.
ARP Message FormatARP Message Format
• Describes the general form for ARP messages and how to determine the details for each network hardware.
• Variable protocol and hardware address length add generallity– Adaptable to future address lengths
– Most often used to bind IP addresses to Ethernet addresses • HADDR LEN = 6 (octets) PADDR LEN = 4 (octets)
Sending ARP MessagesSending ARP Messages
• When sent, an ARP message is encapsulated in a hardware frame.– Treated as data– The network does not
examine the contents
• The ARP message is identified in the type field of the frame header– Ex: Ethernet specifies type
hex 0x806– Request or Response?
Caching ARP ResponsesCaching ARP Responses
• Message exchange is inefficient– Three packets are sent for each ARP message.– Computer communication is usually repeated many
times.
• To reduce network traffic ARP maintains a small table of bindings as a cache.– The cache is searched while performing a binding– If the binding is found no request is transmitted.
Incoming ARP MessagesIncoming ARP Messages
• When a message arrives protocol specifies two steps.
– Extract the sender’s address binding and check cache.– Examine the message’s OPERATION field.
• Request or Response?• If response, the receiver must have sent a request• If request, compare the TARGET PADDR to the local protocol address and
send a response.
• To optimize the process the computer replies and adds the binding to its cache for later use.– Computer communication is bidirectional
• There is a high probability that this response will be followed by another reply.
• This eliminates the need for the responding computer to issue an ARP request.
Layering: The Protocol Address Layering: The Protocol Address BoundaryBoundary
• Recall the TCP/IP layering model.
• A conceptual boundary between the network interface layer and higher layers hides physical addressing.– Protocol Address Boundary– Above this boundary
applications and protocol software use protocol addresses exclusively.
Chapter 19: SummaryChapter 19: Summary
• Hardware does not recognize IP addresses so hardware addresses must be resolved.
• There are three methods of resolving addresses which depend on hardware.– Table Lookup, Computation, Message Request
• TCP/IP suite uses Address Resolution Protocol (ARP)– ARP defines message formats, rules of exchange, and how
these messages should be processed.
• Questions?
Chapter 20:Chapter 20:TopicsTopics
• Virtual Packets
• IP Datagram
• Datagram Forwarding
• Routing Tables
• Next Hop Addresses
• The IP Datagram Header
• Best-Effort Delivery
Virtual PacketsVirtual Packets
• Goal: Universal packet communication system
• Problem: an internet consists of heterogeneous networks.– Hardware frames may be incompatible
between networks.– Routers can not route them from one network
to the next because frame formats differ.
Virtual PacketsVirtual Packets
• Solution: IP defines an internet packet format (Universal, Virtual Packet)– Independent of underlying hardware.– Can be transferred intact
• Virtual-created and handled entirely by software.
• Universal-Every host or router in an internet contains this protocol software.
The IP DatagramThe IP Datagram
• TCP/IP protocol packet• Same general format as hardware frame• Flexible
– Size determined by the sending application (1-64K octets)• More throughput, less overhead
• Similar to a frame header, the datagram header also contains Sending and Destination IP address for routing across an internet.
Datagram ForwardingDatagram Forwarding
• Datagrams traverse a path from source to destination through routers.– Routers extract the destination address and determine the next
hop.– Each IP router maintains a routing table.– ex: Net 2 to Net 4– Each entry is a network, not a host (reduces table size)
Routing TablesRouting Tables
• An actual table contains– IP address network prefix– Mask– Next Hop
• Routing-The process of selecting a next hop
• Routers compute the Boolean “and” of the mask and destination address.– Efficient extraction
• Compares to the tables destination field.
• Routers are assigned one IP address per network.
Next Hop AddressesNext Hop Addresses
• After the router determines the next hop the datagram is sent directly to the next router. – The destination address remains unchanged.– Address binding is used to resolve the next
routers hardware address.
The IP Datagram HeaderThe IP Datagram Header
• Specifies characteristics of the datagram.• VERS-protocol version number (currently 4)• SERVICE TYPE-specifies either a minimal delay or maximal
throughput route• TOTAL LENGTH-the total number of octets including data and
header• TIME TO LIVE-prevents a datagram from traveling forever in a loop• IP OPTIONS may be present therefore header length is variable
Best-Effort DeliveryBest-Effort Delivery
• Best effort describes the service IP offers.– It does not guarantee that
• Datagram duplication• Delayed or out-of-order delivery• Corruption of data• Datagram loss
– Will not occur
• IP is not responsible for these problems– Physical networks may cause the problems– Software using IP must solve them
Chapter 20 SummaryChapter 20 Summary
• Virtual Packets are used by IP software to send messages.– Datagrams in TCP/IP
• Routers use routing tables to forward datagrams through an internet.
• When sending to the next hop, next hop addresses do not replace the destination address in the datagram header.
• IP datagram headers specify characteristics of the datagram for routing.
• Because an internet consists of many types of hardware IP can not guarantee certain problems will not occur. – These problems must be resolved by other layers.
• Questions?