CSCI 5273 Computer Networks Stevens, Chapter 4 - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

CSCI 5273 Computer Networks Stevens, Chapter 4

Description:

RARP is a protocol for 'managing' a machine -- telling a machine what it's IP ... At boot-up, many systems issue an ARP request for their own IP address. ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 22
Provided by: DirkGr8
Category:

less

Transcript and Presenter's Notes

Title: CSCI 5273 Computer Networks Stevens, Chapter 4


1
CSCI 5273Computer NetworksStevens, Chapter 4
5ARP, RARP ICMP
  • Dirk GrunwaldAssoc. ProfessorDept. of Computer
    ScienceUniversity of Colorado, Boulder

2
Outline
  • ARP is a protocol for mapping and IP address to a
    MAC address
  • RARP is a protocol for managing a machine --
    telling a machine what its IP address should be,
    based on the MAC address
  • ICMP is the internet control message protocol and
    is used to manage ( measure) many aspects of IP

3
ARP - The Problem
  • Once a packet has been routed to a specific
    network, we need to deliver it to the appropriate
    host
  • The host Ethernet only listens to an ethernet MAC
    address
  • We only have an IP address
  • Thus, we need to know how to map the IP address
    to a MAC address

4
ARP - Example
  • FTP uses gethostbyname to determine the IP
    address of an FTP server
  • FTP asks TCP to establish a connection
  • TCP send a connection request to that IP address,
    which is on the local network
  • The O/S uses ARP to determine the Ethernet MAC
    address
  • The destination O/S replies the reply is
    received
  • The IP layer can now send the packet

5
The sequence
6
Format of an ARP request
HardwareSize
ProtocolType
SizeType
HardwareType
EthenetDest. Address
EthernetSrc Address
SenderEnet Addr
SenderIP Addr
TargetEnet Addr
TargetIP Addr
Notice this!Used by Proxy ARP
7
Notes
  • ARP uses a physical (Ethernet) broadcast to the
    network
  • A unicast response is used to inform the sender
    of the appropriate MAC address
  • ARP responses are cache by the kernel
  • Everyone listens to the Sender message and caches
    that response

8
You can use arp to see the ARP table
  • foobar-22 arp -a
  • mx6-0.cs.colorado.edu (128.138.241.90) at
    00-00-f8-75-4b-38
  • cs-gw3-esl.cs.colorado.edu (128.138.241.65) at
    00-e0-f7-94-05-80
  • ragtop.cs.colorado.edu (128.138.241.81) at
    00-00-f8-75-5b-8c
  • foobar-23

9
Example ARP exchange
Destination MAC
Sender MAC
  • 110754.537688 00f80a3f2 ffffffffffff
    arp 42 arp who-has ragtop.cs.colorado.edu tell
    foobar.cs.colorado.edu
  • 110754.538665 00f8755b8c 00f80a3f2
    arp 60 arp reply ragtop.cs.colorado.edu is-at
    00f8755b8c

10
Proxy ARP
  • ARP Packets reply to the Sender Hardware
    Address and cache the Target Hardware Address
  • This can be different than the Ethernet Source
    Address of the reply!
  • Thus, host A can reply for host B, and all IP
    packets destined for B will be sent to A
  • Host A can then insure they get to host B

11
Using Proxy ARP
gateway
.1.4
Enet, 140.252.1
.1.183
netb
.1.29
bsdi
sun
192.252.1.183
.13.35
.13.33
Enet, 140.252.13
12
Using ARP to spot configuration problems
  • At boot-up, many systems issue an ARP request for
    their own IP address.
  • If anyone responds, something is mis-configured
  • You can also use gratituous ARP for rapid
    fail-over.
  • Everyone (usually) snoops the sending hardware
    address
  • Server A B have same internal IP address, but A
    is dormant
  • Server A listens for a death song from Server B
  • Server A immediately send an ARP request
  • Everyone now thinks that A is the specified IP
    address

13
RARP
  • RARP is a reverse ARP request
  • A host knows its MAC address, but not the
    specified IP address
  • Broadcasts an RARP who-is request
  • An RARP server looks up the MAC address in a
    table (/etc/ethers) and replys with the IP address

14
Sample /etc/ethers table
  • Anchor and clients
  • 080020085866 anchor
  • 0800200632a0 littletime
  • 08002007a5ce chimay
  • 08002002b274 duvel
  • 08002000e68b alltime
  • 080020000c7a pilsner
  • 08002002a4c1 white
  • 08002001d5a4 twig

15
Implementation of RARP servers
  • RARP entries are typically stored in a file
  • Rather than implement this as a kernel
    process/module, most systems use a (privileged)
    daemon
  • That daemon listens on the interface for all
    WHO-IS packets

16
ICMP - Internet Control Message Protocol
  • Communicates error and exceptional conditions
  • Some ICMP messages cause errors to be returned to
    the use process

IPHeader
(contents depend on type code)
8-bit type
Checksum of ICMP
8-bitcode
17
ICMP Types
18
Error Reporting
  • ICMP never returns errors (e.g. destination
    unreachable) for
  • ICMP error messages
  • A datagram destined for an IP broadcast address
  • A datagram sent as a link-layer broadcast
  • A fragment other than the first
  • A datagram whose source address does not define a
    single host (zero, loopback, broadcast or
    multicast)
  • Avoids broadcast storm
  • Implies that protocols must be able to deal with
    dropped ICMP packets

19
ICMP Destination Unreachable Codes
20
Sample ICMP Types
  • ICMP address mask reply informs a host about
    the subnet mask that should be used
  • As stevens points out
  • Not reliable (e.g., Unix SVR4 reply was
    incorrect)
  • Alternate protocols exist (e.g. BOOTP DHCP)

21
Sample ICMP Types
  • ICMP Timestamp Request Reply
  • Used to return the current time from another host
  • Could be used for (primitive) time
    synchronization protocol, but NTP and XNTP do a
    much better job
Write a Comment
User Comments (0)
About PowerShow.com