1 / 14

CSCE 515 : Computer Network Programming

CSCE 515 : Computer Network Programming. Chin-Tser Huang huangct@cse.sc.edu University of South Carolina. Need for Address Resolution. Need to map from an IP address to a hardware address Frames exchanged at hardware level must be addressed to correct interface

dalia
Télécharger la présentation

CSCE 515 : Computer Network Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSCE 515:Computer Network Programming Chin-Tser Huang huangct@cse.sc.edu University of South Carolina

  2. Need for Address Resolution • Need to map from an IP address to a hardware address • Frames exchanged at hardware level must be addressed to correct interface • Mapping between IP address and hardware address may change • Need to map from a hardware address to an IP address • For systems without a disk (diskless workstations or X terminals)

  3. ARP and RARP • Provide dynamic mapping between IP address and hardware address 32-bit Internet address ARP RARP 48-bit Ethernet address

  4. ARP Request • For computer i to get hardware address of computer j, i broadcasts a rqst message with IP address of j to the subnetwork rqst(ipa.j) i default router Internet switch r j

  5. ARP Reply • If j sees a rqst message from i with its IP address, j sends a rply message with its IP address and hardware address to i rply(ipa.j,hda.j) i default router Internet switch r j

  6. ARP and RARP Packet Format hard size prot size Ethernet destination addr Ethernet source addr frame type hard type prot type op sender Ethernet addr sender IP addr target Ethernet addr target IP addr 6 6 2 2 2 1 1 2 6 4 6 4 Ethernet header 28-byte ARP request/reply

  7. ARP Cache • Maintain recent mappings from Internet addresses to hardware addresses • Make ARP operations efficient • Timeout is 20 minutes for completed entry and 3 minutes for incomplete entry • Timeout for an entry restarted every time it is referenced

  8. Proxy ARP • A router answers ARP request on one of its networks for a host on another of its networks • Sender of ARP request will regard the router as destination host and send IP datagram to the router • Router acting as proxy agent will forward IP datagram to destination

  9. Proxy ARP Example gemini ARP request for 140.252.1.29 Ethernet subnet 140.252.1 140.252.1.183 ARP reply netb Router configured to act as proxy ARP agent for sun modem SLIP modem 140.252.1.29 slip bsdi sun svr4 SLIP .65 .66 .35 .33 .34 Ethernet subnet 140.252.13

  10. Gratuitous ARP • A host sends an ARP request looking for its own IP address • Usually done at bootstrap time • Two features provided by gratuitous ARP • Let a host determine if another host is already configured with same IP address • Let other hosts update their cache entries

  11. arp Command • Available at /usr/sbin • -a option to display all entries in ARP cache • -n option to print IP addresses instead of host names • -d option to delete an entry from ARP cache (superuser only) • -s option to add a permanent entry to ARP cache (superuser only) • Keyword temp • Keyword pub

  12. Ethereal • A free network protocol analyzer for Unix and Windows • Examine data from a live network or from a capture file on disk • Provide a rich display filter language and the ability to view the reconstructed stream of a TCP session • http://www.ethereal.com

  13. Ethereal at Unix Lab • To sniff packets at Unix lab with Ethereal, use the following four machines at SWGN 1D39 • regulus.cse.sc.edu • pollux.cse.sc.edu • nunki.cse.sc.edu • menkar.cse.sc.edu

  14. Next Class • IP • Read TI Ch. 3 • Homework 1 will be passed out

More Related