CSCE 515: Computer Network Programming - PowerPoint PPT Presentation

About This Presentation
Title:

CSCE 515: Computer Network Programming

Description:

Need to map from an IP address to a hardware address ... Mapping between IP address and hardware address may change ... get hardware address of computer j, i ... – PowerPoint PPT presentation

Number of Views:49
Avg rating:3.0/5.0
Slides: 13
Provided by: huan75
Learn more at: https://www.cse.sc.edu
Category:

less

Transcript and Presenter's Notes

Title: CSCE 515: Computer Network Programming


1
CSCE 515Computer Network Programming
  • Chin-Tser Huang
  • huangct_at_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
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

10
arp Command
  • -a option to display all entries in ARP cache
  • -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

11
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

12
Next Class
  • IP
  • Read TI Ch. 3
  • Homework 1 will be passed out
Write a Comment
User Comments (0)
About PowerShow.com