Docsity

Internet Control Protocols: ICMP, ARP, RARP, DHCP, and BOOTP - Prof. Errin Fulp, Study notes of Computer Science

Toggle sidebar
bg1
Internet Control Protocols
CSC 343·643
WA K E FO R E S T
UNIVERSITY
Department of Computer Science
Fall 2008
Internet Protocols CSC 343·643 Internet Control Protocols 1
Internet Control Message Protocols
•In addition to IP, which is used for data transmission, there are
several control protocols used in the network layer
–Internet Control Message Protocol (ICMP)
–Address Resolution Protocol (ARP)
–Reverse Address Resolution Protocol (RARP)
–Bootstrap Protocol (BOOTP)
–Dynamic Host Configuration Protocol (DHCP)
E. W. Fulp Fall 2008
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Internet Control Protocols: ICMP, ARP, RARP, DHCP, and BOOTP - Prof. Errin Fulp and more Study notes Computer Science in PDF only on Docsity!

Internet Control Protocols

CSC 343· 643 WAKE FORESTU N I V E R S I T Y Department of Computer Science Fall 2008

Internet Protocols CSC 343· 643 Internet Control Protocols 1

Internet Control Message Protocols

  • In addition to IP, which is used for data transmission, there are several control protocols used in the network layer - Internet Control Message Protocol (ICMP) - Address Resolution Protocol (ARP) - Reverse Address Resolution Protocol (RARP) - Bootstrap Protocol (BOOTP) - Dynamic Host Configuration Protocol (DHCP)

Internet Control Message Protocol

  • Operation of the Internet is monitored by routers
  • If something unexpected occurs, event is reported to ICMP (Internet Control Message Protocol) RFC[792]
  • ICMP messages are acted on by the IP layer or transport layer
    • Messages are either query or error oriented
  • ICMP messages are transmitted within IP datagrams

IP Header

ICMP Message

IP datagram

E. W. Fulp Fall 2008

Internet Protocols CSC 343· 643 Internet Control Protocols 3

  • ICMP message format
    • First four bytes have the same format
    • Type field, identifies the ICMP message
    • Code field, helps specify the condition
    • Checksum, covers the ICMP message 32 Bits

contents depend on type and code

8-bit type 8-bit code 16-bit checksum

Tracing a Route

  • A helpful program that is based on ICMP is traceroute
    • traceroute traces a route from one host to another
    • Shows the intermediate routers on the route
    • Windows version is tracert
  • Determines the route by sending a series of IP packets
    • Send a packet that has a TTL of one
    • Afterwards, send a packet that has a TTL of two
    • This repeats until a packet is sent that reaches the destination So how does this actually determine the route? How is ICMP actually involved?

E. W. Fulp Fall 2008

Internet Protocols CSC 343· 643 Internet Control Protocols 7

 Terminal 

traceroute www.wfu.edu traceroute to io.wfunet.wfu.edu [10.2.1.77], 30 hops max, 40B pkt 1 10.104.8.252 2.904ms 0.994ms 1.264ms 0.839ms 2 10.0.104.1 1.027ms 1.264ms 0.851ms 3 io.wfunet.wfu.edu [10.2.1.77] 2.001ms 1.386ms 2.006 ms

  • Output is the route hop followed by the round-trip times (RTT)
    • Three packets are sent per hop, each RTT is displayed
    • If no response for a hop, then *’s are printed
  • traceroute has several command line options
    • The option -g allows loose source routing
    • The option -t allows you to alter the ToS bits

When ICMP Message is Never Generated

  • An ICMP message should never be never generated in response to
    1. An ICMP error message An ICMP message is sent in response to a query message, what is an example?
    2. A datagram destined to an IP broadcast or multicast address
    3. A datagram sent as a link-layer broadcast
    4. A fragment other than the first
    5. A datagram that does not identify a single host (includes zero address, loopback address, broadcast address, and multicast address) What problems are we trying to avoid with these rules?

E. W. Fulp Fall 2008

Internet Protocols CSC 343· 643 Internet Control Protocols 9

Layer 3 Addresses versus Layer 2 Addresses

  • Sending IP datagrams requires knowledge of the link-layer address
    • The IP datagram is placed inside a link-layer frame then sent

Link Header

IP Header Data Dest: 223.1.1. LLA of: 223.1.1.

  • Hosts are attached to the network via an interface card
    • The interface card is a layer 1 and 2 device
    • Can only understand LAN addresses (also called hardware address or MAC address)

ARP

  • Dynamic mapping of IP address → hardware address [RFC 826]
  • Assume A needs the hardware address of host B

160.1.1.

160.1.1.

160.1.1.

160.1.2.

160.1.2.

160.1.2.

160.1.1.0/24 160.1.1.7 eth1 160.1.2.7 eth2 160.1.2.0/ A

B

E

  • Host A broadcasts an ARP request
    • Ethernet address of all 1’s is the broadcast address
    • Host asks “Who owns IP address 160.1.1.2?”
  • Host B would reply with its hardware address

E. W. Fulp Fall 2008

Internet Protocols CSC 343· 643 Internet Control Protocols 13

  • ARP is intended for broadcast (shared medium) networks
    • Not needed for point-to-point links Would A ever send an ARP request for the MAC address of E?
  • Proxy ARP
    • Assume host A does send an ARP request for host E (routing table incomplete or wrong)
    • If router is set-up to respond with its hardware address to any address outside of subnet, then this is proxy ARP
  • Gratuitous ARP
    • Host sends request for own IP address
    • Lets host determine if another host using same IP address

ARP Optimization

There are various ways to improve the efficiency of ARP

  • ARP Tables
    • Keep an ARP table for most recently used IP addresses
    • Entries can time-out
  • Hey, this used to be lots of fun...
    • When your laptop is first connected to the network, enter the DOS command, arp -a
    • Ping a machine on our network, ping www.cs.wfu.edu
    • Issue the arp command again, should see hardware (physical) address for the machine This may be a proxy ARP, how can you tell?
    • Wait a few minutes and issue the arp command again

E. W. Fulp Fall 2008

Internet Protocols CSC 343· 643 Internet Control Protocols 15

  • Broadcast at boot-time
    • When a machine connects, broadcast its mapping (ARP reply)
    • All hosts on network (or subnet) will know the IP and hardware address of the new machine This is a big problem at Wake Forest, why?
    • Also called gratuitous ARP, a great way to spread ARP poison...

Dynamic Host Configuration Protocol

Provides configuration parameters to Internet hosts [RFC 2131]

  • DHCP consists of two components
    1. Mechanism for allocation of network addresses to hosts
    2. Delivering host-specific configuration parameters to hosts
  • If a host does not have an IP address, sends DHCP request
    • Broadcast message “Can I have an IP address?”
    • DHCP server responds with the appropriate IP address This smells like RARP? What is the difference?
  • DHCP goes beyond RARP by providing
    • IP address leases
    • Additional network configuration information

E. W. Fulp Fall 2008

Internet Protocols CSC 343· 643 Internet Control Protocols 19

DHCP Operation

  1. Host connects to the network as sends DHCPDISCOVER
    • Request for IP address from DHCP server(s) How does the host know the address of the DHCP server?
  2. Server responds with DHCPOFFER
    • Contains IP address and configuration parameters
    • Contains the IP address lease time What is the IP address of the host?
  3. Host responds with DHCPREQUEST (may receive multiple offers)
    • Confirms the offer from the server
  1. Server responds with DHCPACK
    • Configuration parameters (committed network address)
  2. Once the host is done sends DHCPRELEASE to server
    • Relinquishing network address and cancelling remaining lease DHCP is used for laptops on campus. As a result, is it possible to run a web-server (or any other type of server) as a host on these networks?

E. W. Fulp Fall 2008

Internet Protocols CSC 343· 643 Internet Control Protocols 21

DHCP, BOOTP, and RARP FAQ

  • DHCP is based on BOOTP (backwards compatible)
    • BOOTP was designed for manual pre-configuration of the host information in a server database
    • DHCP allows for dynamic allocation (leasing) of network addresses and configurations to newly attached hosts
  • RARP is a protocol used by Sun that allows a computer to find out its IP number (done by DHCP or BOOTP) - RARP doesn’t support other parameters and using it, a server can only serve a single LAN. DHCP and BOOTP are designed so they can be routed; thus serve multiple LANs
  • Can multiple DHCP servers exist on the same network?
    • Yes, if each has a dynamic pool accessible to the same clients, then even if one server is down, one of those clients can lease an address from the other server.