Overview of the Address Resolution Protocol

Overview of the Address Resolution Protocol

Network layer uses the services of the DLL. The network layer in turn provide its services to the transport layer.

For communication to destination host we need to provide the IP address and the physical address of the source and destination. If any one of them is not available with the source host, then it is to be discovered. The following paragraph explains the procedure and use of following additional protocols at the network layer.

  1. ARP
  2. RARP
  3. Proxy ARP
  4. ICMP
  5. IGMP

ARP

Overview of the Address Resolution Protocol

The Address Resolution Protocol (ARP) was developed to enable communications on an internetwork. Layer 3 devices need ARP to map IP network addresses to MAC hardware addresses so that IP packets can be sent across networks.

Before a device sends a datagram to another device, it looks in its ARP cache to see if there is a MAC address and corresponding IP address for the destination device. If there is no entry, the source device sends a broadcast message to every device on the network. Each device compares the IP address to its own.

Only the device with the matching IP address replies to the sending device with a packet containing the MAC address for the device (except in the case of “proxy ARP”). The source device adds the destination device MAC address to its ARP table for future reference, creates a data-link header and trailer that encapsulates the packet, and proceeds to transfer the data. The figure below illustrates the ARP broadcast and response process

When the destination device lies on a remote network, one beyond another Layer 3 device, the process is the same except that the sending device sends an ARP request for the MAC address of the default gateway. After the address is resolved and the default gateway receives the packet, the default gateway broadcasts the destination IP address over the networks connected to it. The Layer 3 device on the destination device network uses ARP to obtain the MAC address of the destination device and delivers the packet. Encapsulation of IP datagrams and ARP requests and replies on IEEE 802 networks other than Ethernet use Subnetwork Access Protocol (SNAP).

The ARP request message has the following fields:

Field Name / Size (bytes) / Description
HRD / 2 / style
PRO / 2 / Protocol Type: This field is the complement of the Hardware Type field, specifying the type of layer three addresses used in the message. For IPv4 addresses, this value is 2048 (0800 hex), which corresponds to the EtherType code for the Internet Protocol.
HLN / 1 / Hardware Address Length: Specifies how long hardware addresses are in this message. For Ethernet or other networks using IEEE 802 MAC addresses, the value is 6.
PLN / 1 / Protocol Address Length: Again, the complement of the preceding field; specifies how long protocol (layer three) addresses are in this message. For IP(v4) addresses this value is of course 4.
OP / 2 / style
SHA / (Variable, equals value in HLN field) / Sender Hardware Address: The hardware (layer two) address of the device sending this message (which is the IP datagram source device on a request, and the IP datagram destination on a reply, as discussed in the topic on ARP operation).
SPA / (Variable, equals value in PLN field) / Sender Protocol Address: The IP address of the device sending this message.
THA / (Variable, equals value in HLN field) / Target Hardware Address: The hardware (layer two) address of the device this message is being sent to. This is the IP datagram destination device on a request, and the IP datagram source on a reply)
TPA / (Variable, equals value in PLN field) / Target Protocol Address: The IP address of the device this message is being sent to.

Vulnerabilities of ARP

  1. Since ARP does not authenticate requests or replies, ARP Requests and Replies can be forged
  2. ARP is stateless: ARP Replies can be sent without a corresponding ARP Request
  3. According to the ARP protocol specification, a node receiving an ARP packet (Request or Reply) must update its local ARP cache with the information in the source fields, if the receiving node already has an entry for the IP address of the source in its ARP cache. (This applies for ARP Request packets and for ARP Reply packets)

Typical exploitation of these vulnerabilities:

• A forged ARP Request or Reply can be used to update the ARP cache of a remote system with a forged entry (ARP Poisoning)

• This can be used to redirect IP traffic to other hosts

RARP

Reverse ARP Reverse ARP (RARP) as defined by RFC 903 works the same way as the Address Resolution Protocol (ARP), except that the RARP request packet requests an IP address instead of a media access control (MAC) address. RARP often is used by diskless workstations because this type of device has no way to store IP addresses to use when they boot. The only address that is known is the MAC address because it is burned in to the hardware. RARP requires a RARP server on the same network segment as the device interface. The figure below illustrates how RARP works.

Because of the limitations with RARP, most businesses use Dynamic Host Configuration Protocol (DHCP) to assign IP addresses dynamically. DHCP is cost-effective and requires less maintenance than RARP. The most important limitations with RARP are as follows:

• Because RARP uses hardware addresses, if the internetwork is large with many physical networks, a RARP server must be on every segment with an additional server for redundancy. Maintaining two servers for every segment is costly.

• Each server must be configured with a table of static mappings between the hardware addresses and the IP addresses. Maintenance of the IP addresses is difficult.

• RARP only provides IP addresses of the hosts but not subnet masks or default gateways.

Cisco software attempts to use RARP if it does not know the IP address of an interface at startup to respond to RARP requests that it is able to answer. The AutoInstall feature of the software automates the configuration of Cisco devices. AutoInstall supports RARP and enables a network manager to connect a new device to a network, turn it on, and automatically load a pre-existing configuration file. The process begins when no valid configuration file is found in NVRAM. For more information about AutoInstall, see the Configuration Fundamentals Configuration Guide.

Proxy ARP

Proxy Address Resolution Protocol, as defined in RFC 1027, was implemented to enable devices that are separated into physical network segments connected by a router in the same IP network or subnetwork to resolve IP-to-MAC addresses. When devices are not in the same data link layer network but are in the same IP network, they try to transmit data to each other as if they were on the local network. However, the router that separates the devices will not send a broadcast message because routers do not pass hardware-layer broadcasts. Therefore, the addresses cannot be resolved.

Proxy ARP is enabled by default so the “proxy router” that resides between the local networks responds with its MAC address as if it were the router to which the broadcast is addressed. When the sending device receives the MAC address of the proxy router, it sends the datagram to the proxy router, which in turns sends the datagram to the designated device.

Proxy ARP is invoked by the following conditions:

• The target IP address is not on the same physical network (LAN) on which the request is received.

• The networking device has one or more routes to the target IP address.

• All of the routes to the target IP address go through interfaces other than the one on which the request is received.

When proxy ARP is disabled, a device responds to ARP requests received on its interface only if the target IP address is the same as its IP address or if the target IP address in the ARP request has a statically configured ARP alias.

Ref:

http://www.cs.virginia.edu/~cs458/slides/module06-arpV2.pdf

ICMP

ICMP uses IP as if ICMP were a higher level protocol (that is, ICMP messages are encapsulated in IP datagrams). However, ICMP is an integral part of IP and must be implemented by every IP module. Even though ICMP is used to report errors, this does not make IP reliable: datagrams may still be undelivered without any report on their loss.

• Internet Control Message Protocol (ICMP) The Internet Control Message Protocol (ICMP) is used by routers and hosts to send network control information to each other

• From a layering point of view, ICMP is a separate protocol that sits above IP and uses IP to transport messages

• In practice, ICMP is an integral part of IP and all IP modules must support the ICMP protocol

Types of ICMP Messages

• Information messages

—Sender sends a query to another machine (either host or router) and expects an answer. For example, a host might want to know if a router is alive

• Error indication messages

—The IP software on a host or router has encountered a problem processing an IP datagram. For example, it may be unable to route the datagram to its destination.

ICMP Types of Messages

Ref: http://www.csc.villanova.edu/~mdamian/Past/networksfa12/Notes/ICMP.pdf

http://web.cs.unlv.edu/jh/CSC465/Resources/ch09.pdf

Internet Group Management Protocol (IGMP)

Internet Group Management Protocol (IGMP) is a protocol used by IPv4 systems to report IP multicast memberships to neighboring multicast routers.

IGMP Messages:

  1. Querry Type:
  2. General
  3. Special
  4. Membership report
  5. Leave report

IGMP Version 3 (IGMPv3) adds support for “source filtering,” which enables a multicast receiver host to signal to a router which groups it wants to receive multicast traffic from, and from which source(s) this traffic is expected. This membership information enables Cisco IOS software to forward traffic only from those sources from which receivers requested the traffic. IGMPv3 supports applications that explicitly signal sources from which they want to receive traffic. With IGMPv3, receivers signal membership to a multicast host group in the following two modes:

• INCLUDE mode—In this mode, the receiver announces membership to a host group and provides a list of IP addresses (the INCLUDE list) from which it wants to receive traffic.

• EXCLUDE mode—In this mode, the receiver announces membership to a host group and provides a list of IP addresses (the EXCLUDE list) from which it does not want to receive traffic. This indicates that the host wants to receive traffic only from other sources whose IP addresses are not listed in the EXCLUDE list. To receive traffic from all sources, like in the case of the Internet Standard Multicast (ISM) service model, a host expresses EXCLUDE mode membership with an empty EXCLUDE list.

IGMPv3 is the industry-designated standard protocol for hosts to signal channel subscriptions in Source Specific Multicast (SSM). SSM was introduced in Cisco IOS Release 12.1(3)T, however SSM support for IGMPv3 was introduced in 12.1(5)T. For SSM to rely on IGMPv3, IGMPv3 must be available in last hop routers and host operating system network stacks, and be used by the applications running on those hosts

Where does IGMP reside

Benefits

• Enables new multicast services—SSM.

• Optimized bandwidth utilization—Receiver may request to receive traffic only from explicitly

known sources.

• Improved security—No denial of service attacks from unknown sources.