I thought of this blog following up a very popular blog of mine on Recursive Lookups. End-to-end communication between two Layer3/Layer2 hops is yet another networking fundamental concept which ought to be understood.

Here is the topology I’ll be using:

l2-l3-comm-01

Notice the following:

  • all mac-addresses have been changed on all Layer3 interfaces
  • there are two networks – 192.168.1.0 /24 & 192.168.2.0 /24
  • each switch is servicing its own VLAN-1 – i.e. there is no trunking between the two switches
  • arp & mac address learning debuging has been enabled

Before each of the following tests, I will be clearing the mac-address tables on all Layer2 devices (switches) as well as the arp-cache on all Layer3 devices (routers).

TEST 1: Connectivity on the same LAN, between HOST-02-01 and HOST-02-02
TEST 2: Connectivity between two different LANs - HOST-02-01 to HOST-01-01

Conclusions ...
  1. Before any communication happens, we need to have Layer2 information – on an Ethernet network this is found in the MAC-ADDRESS table
  2. Same applies in regards to Layer3 information – this is found in the ARP table
  3. If the destination IP address is on the same LAN, an ARP request is sent out to find out the MAC address of the actual destination IP
  4. When the destination IP is *not* on the same LAN, an ARP request is sent out to find out the MAC address of the configured default gateway
  5. An ARP request is received by all host on the same broadcast domain – ideally though, only one host should reply – the one with the IP address which matches the destination IP
  6. As the packet travels from hop-to-hop (L2 and L3) the source and destination MAC addresses will change; this is not true for the source and destination IP addresses which will always stay the same
  7. You should also know that the host will use the network mask to find out whether or not the destination IP is on the same LAN


Thank you,
Signature
View Rafael A Couto Cabral's profile on LinkedIn



Comments are closed.