Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mapping IP Addresses to Hardware Addresses Chapter 5.

Similar presentations


Presentation on theme: "Mapping IP Addresses to Hardware Addresses Chapter 5."— Presentation transcript:

1 Mapping IP Addresses to Hardware Addresses Chapter 5

2 Introduction Two machines on a physical network can communicate only if they know each other’s hardware address Network connections are given IP addresses How does a host or a router map an IP address to a hardware address so that a packet can be sent across a network?

3 Address Resolution Generally, machine A (or a user on machine A) knows the IP address of machine, but not the hardware address The hardware addresses must be found for: –the destination machine –any intermediate routers along the path Mapping high-level (IP) addresses to hardware addresses is called address resolution

4 Address Resolution How can address resolution be done? –keep lookup tables in each machine –encode hardware addresses in high-level addresses –direct mapping –dynamic binding

5 Direct Mapping Recall proNet which had an interface board with 8 switches that could be set to values (addresses) from 0 to 255 –0 was not used –255 was for broadcasting Network administrators could assign their own hardware addresses and have them correspond to the last decimal digit in the IP address –129.7.61.15 corresponds to the machine with hardware address of 15

6 Direct Mapping Choosing a numbering scheme means selecting a function f that maps IP addresses to hardware addresses On connection-oriented networks such as ATM, one or more computers (servers) store pairs of addresses as a table in memory for quick searching Software can use a hashing function to search the table

7 Dynamic Binding TCP/IP’s approach is to use the Address Resolution Protocol (ARP) –When A wants to communicate with B in the same network, A broadcasts a packet that asks the host with IP address I B to respond with its hardware address P B –All hosts, including B hear the request, but only B replies with its hardware address –When A receives the reply, it plugs the hardware address in and sends the packet to B Why not just broadcast the message?

8 ARP Cache Recently acquired IP to hardware address bindings are stored in a cache on each computer. Why? Thus, when two computers on a network communicate: –ARP request –ARP reply –repeated transfer of packets The term soft state describes the situation in which information becomes incorrect, or not helpful –information is deleted after a time

9 ARP Cache Advantages –? Disadvantages –Delay of knowing that a machine is not responding

10 ARP Refinements If A requests a hardware address for B, B will likely need a hardware address for A –Have A send its hardware address to B –Put A’s information in the cache as well All computers on the network can update their caches when they see the mappings on the line A newly added computer can do an ARP broadcast when it boots, to notify others

11 ARP Implementation Two functions –Mapping an IP @ to a hardware @ –Answering requests from other machines Steps: –Upon reception of request, check cache –If in cache, place data in a frame and send the frame –If not in cache, broadcast ARP request, wait for reply

12 ARP Implementation Problems The target machine could be down, or too busy to respond. What happens? A binding has been made for a machine, but then it goes down. This is why cache is short-lived. Delays See bottom of p. 83: “the ARP software removes packets from the queue, places each packet in a frame, and …”

13 ARP Encapsulation When ARP messages are sent from one machine to another, they are sent in frames What are frames? See Figure 2.7-Frame type 0806 ARP message frame header frame data area

14 ARP Protocol Format See ARP message format in Figure 5.3 This shows the 28-octet format used on Ethernet hardware (48 bits) when resolving IP addresses (32 bits) –Hardware type: 1 for Ethernet –Protocol type: 0800 16 for IP addresses... –Sender Hardware Address (6 octets), IP (4 octets) –Target Hardware Address (6 octets), IP (4 octets) The length of fields depends on the hardware and protocol address lengths

15 Summary IP addresses are assigned independent of hardware addresses To send a packet, a computer must know the other’s hardware address ARP broadcasts a message asking for the computer with a given IP address to respond with its hardware address

16 For Next Time Read Chapter 6


Download ppt "Mapping IP Addresses to Hardware Addresses Chapter 5."

Similar presentations


Ads by Google