Pages

Sunday, May 20, 2012

ARP Interview questions

What is the destination mac-address of an ARP request frame
Broadcast

Is ARP used on a PPP link
No

Does ARP contain an IP header
ARP is a layer 2 protocol. It does not use IP header.

What does a switch do when it receives an ARP request frame on one of its ports
It adds the source port to its mac-address-table and broadcasts the frame out to all ports.

Would an ARP request frame generated on a port which is member of VLAN 2, be received on a port which is a member of VLAN 3
ARP is a layer 2 broadcast. VLAN’s are used for segregating broadcast domains. So it would not be received.

Can an ARP packet cross IP networks
ARP is a layer 2 broadcast. It cannot traverse across networks.

If an ARP entry is available on the local cache of a computer, would an ARP request be triggerred
No. The computer would first check it’s ARP entry before sending out an ARP request frame.

Explain how an ARP packet is triggered on a computer
Assume that a user on a computer pings another computer on the same network. For the ping packet to be sent to the other computer, it has to be encapsulated on an Ethernet frame. For constructing the frame, the mac-address of the destination is needed. The computer checks its ARP cache if the corresponding ARP entry for the destination computer is available. If not an ARP request is sent out.

Does a hub support ARP
If the hub works on mediums like Token Ring, Ethernet etc, then ARP would be supported.

ARP usecases
The Address Resolution Protocol (ARP) is a critical protocol in computer networking primarily used for mapping an IP address to a physical MAC address. Here are some key use cases of ARP:

1. **Address Resolution**: ARP resolves the layer 3 (IP) address of a device to its corresponding layer 2 (MAC) address. When a device wants to communicate with another device on the same local network, it uses ARP to find out the MAC address associated with the IP address it wants to communicate with.

2. **Local Network Communication**: In Ethernet networks, devices use ARP to discover the MAC addresses of other devices on the same local network. For example, when a computer wants to communicate with another computer on the same LAN, it sends an ARP request to obtain the MAC address of the destination IP.

3. **Ethernet Switch Forwarding**: ARP helps Ethernet switches build and maintain their MAC address tables (also known as MAC address forwarding tables or CAM tables). When an ARP request is received by a switch, it records the MAC address and the port where the request originated. This information is then used to forward frames more efficiently within the network.

4. **IP Address Conflict Detection**: ARP can be used to detect IP address conflicts within a network. If two devices have been assigned the same IP address, they may respond to ARP requests for that IP address, leading to ARP resolution issues and communication problems.

5. **Gratuitous ARP**: Devices can use Gratuitous ARP to announce their presence or to update the ARP caches of other devices in the network. This is commonly used during device initialization or when a device changes its IP or MAC address.

6. **ARP Spoofing Detection**: ARP is also used in detecting and mitigating ARP spoofing attacks. Network monitoring tools can analyze ARP traffic patterns to detect abnormal behavior, such as multiple devices responding to ARP requests for the same IP address.

Overall, ARP is essential for enabling communication within local networks and plays a crucial role in the functioning and management of Ethernet-based networks.

No comments:

Post a Comment