TCP IP Illustrated

Its value is 0x0800 for ip addresses this is

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: two 1-byte fields, hard size and prot size, specify the sizes in bytes of the hardware addresses and the protocol addresses. For an ARP request or reply for an IP address on an Ethernet they are 6 and 4, respectively. The op field specifies whether the operation is an ARP request (a value of 1), ARP reply (2), RARP request (3), or RARP reply (4). (We talk about RARP in Chapter 5.) This field is required since the frame type field is the same for an ARP request and an ARP reply The next four fields that follow are the sender's hardware address (an Ethernet address in this example), the sender's protocol address (an IP address), the target hardware address, and the target protocol address. Notice there is some duplication of information: the sender's hardware address is available both in the Ethernet header and in the ARP request. For an ARP request all the fields are filled in except the target hardware address. When a system receives an ARP request directed to it, it fills in its hardware address, swaps the two sender addresses with the two target addresses, sets the op field to 2, and sends the reply. 4.5 ARP Examples In this section we'll use the tcpdump command to see what really happens with ARP when we execute normal TCP utilities such as Telnet. Appendix A contains additional details on the tcpdump program. Normal Example To see the operation of ARP we'll execute the telnet command, connecting to the discard server. bsdi % arp -a bsdi % telnet svr4 discard Trying 140.252.13.34... Connected to svr4. Escape character is '^]'. ^] telnet> quit Connection closed. verify ARP cache is empty connect to the discard server type Control, right bracket to get Telnet client prompt and terminate While this is happening we run the tcpdump command on another system (sun) with the -e option. This displays the hardware addresses (which in our examples are 48-bit Ethernet addresses). file:///D|/Documents%20and%20Settings/bigini/Docu...homenet2run/tcpip/tcp-ip-illustrated/arp_addr.htm (5 of 12) [12/09/2001 14.46.39] Chapter 4. ARP: Address Resolut...
View Full Document

Ask a homework question - tutors are online