Download presentation
Presentation is loading. Please wait.
1
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas E. Comer Lecture PowerPoints By Lami Kaya, LKaya@ieee.org
2
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.2 Chapter 19 Binding Protocol Addresses ARP
3
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.3 Topics Covered 19.1 Introduction 19.2 Protocol Addresses And Packet Delivery 19.3 Address Resolution 19.4 Address Resolution Techniques 19.5 Address Resolution With Table Lookup 19.6 Address Resolution With Closed-Form Computation 19.7 Address Resolution With Message Exchange 19.8 Address Resolution Protocol 19.9 ARP Message Delivery 19.10 ARP Message Format 19.11 Sending An ARP Message 19.12 Identifying ARP Frames 19.13 Caching ARP Responses 19.14 Processing An Incoming ARP Message 19.15 Layering, Address Resolution, Protocol Addresses
4
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.4 19.1 Introduction IP addresses are “virtual”, maintained by SW A frame transmitted across a physical NW –must have the HW address (HWA) of the destination SW must translate the protocol address (PRA) of the destination into an equivalent HWA This chapter describes three general mechanisms that are used to perform address mapping: –1 st relies on a table that contains address translation information –2 nd uses a mathematical function to perform the translation. –3 rd makes two computers exchange messages across a NW
5
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.5 19.2 Protocol Addresses And Packet Delivery SW in each host or router uses the destination PRA to select a next hop for the packet PRA cannot be used when transmitting frames across physical NW –the HW does not understand PRA A frame must use the HW's frame format –and all addresses in the frame must be a HWA PRA of a next hop must be translated to an equivalent HWA before a frame can be sent
6
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.6 19.3 Address Resolution (AR) Mapping between a PRA and a HWA –called “address resolution” (AR) A host/router uses AR when it needs to send a packet to another computer on the same physical NW –AR is local to a NW A computer never resolves the address of a computer that attaches to a remote NW. Each computer that handles a packet resolves a next- hop address before sending
7
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.7
8
8 19.4 Address Resolution Techniques Different methods needed –To resolve a PRA to an Ethernet address differs from the method used to resolve a PRA to an ATM address AR algorithms can be grouped into three categories: Table lookup –Bindings or mappings are stored in a table in memory Closed-form computation –HWA can be computed from the protocol address using basic Boolean and arithmetic operations Message exchange –Computers exchange messages across a NW for AR; “request” and “reply” messages
9
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.9 19.5 AR With Table Lookup Table is an array with a pair of ( P, H ) entries –P PRA –H equivalent HWA A separate binding table is used for each NW Table in Figure 19.2 corresponds to a NW with prefix 197.15.3.0 / 24. Each IP address has 197.15.3 prefix –We can save space by omitting the prefix from table entries Chief advantage of the table lookup is generality –a table can store the address bindings for an arbitrary set –arbitrary # of PRAs can map to an arbitrary # of HWA
10
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.10
11
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.11 19.5 AR With Table Lookup (cont) Sequential search for a match for a given PRA For large NWs a sequential search requires excessive CPU time –For computational efficiency –We can use “hashing” or “direct indexing” Administrators may choose non-sequential numbers for PRA to help identify the purpose of a computer, e.g. –hosts with suffixes 200 –host suffix from an IP address as an index into the array To prevent an illegal PRA from causing a subscript error –must check to ensure the suffix is in range
12
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.12
13
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.13 19.6 AR With Closed-Form Computation Some technologies use configurable addressing –A NW interface can be assigned a specific HWA –values can be chosen to optimize the translation –especially, the host portion of PRA can be chosen to be identical to the computer's HWA HWA can be computed by a Boolean and (&) operation: HWA = PRA & 0xFF
14
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.14 19.7 AR With Message Exchange A request HWA corresponding to a PRA Reply carries the corresponding HWA Where should an AR request be sent? Most protocols choose one of two possible designs –A NW may include one or more servers contact servers in turns broadcasts its request to all servers –Each computer on the NW participates by agreeing to answer resolution requests for its address: broadcasts a request on the NW, all machines examine If request matches a computer's address, then responds Centralization versus distributed mechanism ?
15
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.15
16
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.16 19.8 Address Resolution Protocol TCP/IP can use any of the three methods depending on the addressing scheme used by HW –Table lookup to resolve PRA across a WAN –Closed-form computation for configurable NWs –Message exchange on LAN with static/dynamic addressing TCP/IP has an Address Resolution Protocol (ARP), which defines two message types: –A request for a HWA correspond to an PRA (namely IP address) –A reply returning the HWA
17
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.17 19.9 ARP Message Delivery An ARP request message should –Be placed in a HW frame and broadcast to all computers All receive the request and examines the IP address –The computer mentioned in the request sends a response; –All others discard the request The ARP response is not broadcast –Response is sent directly back to the computer that issued the request
18
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.18
19
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.19 19.10 ARP Message Format ARP describes the general form for messages, –and specifies how to determine the details for each type of HW To increase the generality of ARP –the designers included an address length field for PRA and HWA ARP is not restricted to IP addresses or specific HWA –In practice, these generality of ARP is seldom used: –ARP is almost always used to bind a 32-bit IP address (a PRA) to a 48-bit Ethernet address (a HWA)
20
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.20
21
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.21 19.11 Sending An ARP Message When sending an ARP, the message travels inside a HW frame The ARP message is treated as data being transported –the NW HW does not know about the ARP message format and does not examine the contents of individual fields Placing a message inside a frame for transport is called encapsulation –an ARP message is encapsulated directly in a HW frame Figure 19.7 illustrates the concept
22
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.22
23
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.23 19.12 Identifying ARP Frames How does a host know whether an incoming frame contains an ARP message? –The type field specifies that the frame contains an ARP msg Sender must assign the appropriate value to the type field before transmitting the frame Receiver examine the type field in each incoming frame Figure 19.8 illustrates the concept
24
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.24
25
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.25 19.13 Caching ARP Responses To reduce NW traffic –ARP extracts and saves the information from a response so it can be used later ARP maintains a small table in memory (cache) –An entry is replaced whenever a response arrives –Oldest entry is removed whenever the table runs out of space –An entry is removed if it has not been updated for a long time Whenever ARP performs address binding, it searches the cache before using the NW –If present, ARP uses the binding without transmitting a request –If not present, ARP broadcasts a request, waits for a response, updates the cache, and then proceeds to use the binding
26
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.26 19.14 Processing An Incoming ARP Message Receiver perform two steps when a message arrives –extracts the sender's address binding –checks to see if the sender's address is present in the cache ARP contains a further optimization: –after a reply to an ARP request, adds to its cache for later use Most computer communication involves two-way traffic –if a message travels from one computer to another, probability is high that a reply will travel back Because memory constraints –only the target of an ARP request perform caching
27
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.27 19.15 Layering, Address Resolution, Protocol Addresses AR is an example of a function associated with the NW interface layer AR SW hides the details of HWA, allowing SW (applications) in higher layers to use PRA There is an important conceptual boundary –imposed between the NW interface layer and all higher layers Figure 19.9 illustrates the addressing boundary
28
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.28
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.