Skip to main content

Local Area Network

This page provides introduction to Local Area Network.

Overview

It is a network contained with relatively small area. For example office network. Routers are used to connect LANs.

Media Access Control (MAC) Address

  • Mac address is 66-byte (4848-bit) physical address assigned to device when it is made.
  • It is also know as Burned-In-Address.
  • It is globally unique.
  • The first 33 bytes are the OUI(organizationally unique identifier), which is assigned to the company making the device.
  • The last 33 bytes are unique to the device itself.

Ethernet LAN Switching

Let's say we have ethernet setup as shown in below diagram:


computer-network-3.svg

Now, suppose PC11 wants to send data to PC33. The Ethernet frame will include the following MAC and IP addresses:

Source IP: 192.168.1.01
Destination IP: 192.168.1.03
Source MAC: 002F.B012.1001
Destination MAC: FFFF.FFFF.FFFF # This is broadcast MAC address

The destination MAC address is initially unknown because PC11 does not know PC33's MAC address. However, since switches are layer 22 devices that operate using MAC addresses, PC11 must first learn PC33's MAC address.

ARP Process

To learn the MAC address, PC11 uses the Address Resolution Protocol (ARP). It sends an ARP request, and PC33 responds with an ARP reply. The ARP request is a broadcast message sent to all hosts on the network, while the ARP reply is a unicast message sent only to PC11.

Below are the steps involved in ARP process:

  • PC11 sends an ARP request on its interface (G0/1), which is received by Switch 11.

  • Upon receiving the ARP request, Switch 11 adds PC11's MAC address to its MAC address table. This entry is called a dynamic MAC address because it is learned automatically.

  • Since the destination MAC address is a broadcast address (FFFF.FFFF.FFFF), Switch 11 forwards the ARP request to all its network interfaces except the one on which it was received.

  • PC22 receives the ARP request but discards it since the destination IP does not match its own.

  • Switch 22 receives the ARP request and adds PC11's MAC address to its MAC address table.

  • Since the destination MAC address is a broadcast, Switch 22 also forwards the ARP request to all its network interfaces except the one it came from.

  • PC44 discards the frame for the same reason as PC22.

  • PC33 recognizes that the destination IP matches its own. It processes the ARP request and sends an ARP reply frame with the following details:

Source IP: 192.168.1.03
Destination IP: 192.168.1.01
Source MAC: 002F.B012.2001
Destination MAC: 002F.B012.1001
  • Switch 22 receives the ARP reply, updates its MAC address table with PC33's MAC address, and forwards the reply to Switch 11.

  • Switch 11 forwards the ARP reply to PC11 since it knows that PC11's MAC address is associated with the G0/1 interface.

  • PC11 receives the ARP reply and stores an entry for PC33 in its ARP table, associating PC33's IP address with its MAC address.

  • PC11 can now use this information to send data directly to PC33.