ARP vs layer2 switch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2019 09:00 AM
As per my understanding ARP works on Layer3 and switch only check layer2 header to process packets.
I am wondering if there is case in which there is only pure L2 environment, how communication will happen between two PC without ARP.
PC1 10.10.10.10/24 mac 11---------Pure L2 switch------------- mac 22 ----PC2 10.10.10.11/24
How switch will build mac table
- Labels:
-
LAN Switching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2019 09:23 AM
Assuming no previous communication, PC1 sends arp for PC2 and switch sees mac address of PC1 on that port.
Then switch floods packet out of all other ports and PC2 receives it, responds at which point switch now learns the mac address and port of PC2.
Both PCs needs to map the other's IP address to a mac address but a L2 switch has no need to use the IPs.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2019 09:27 AM
If both PC are in different subnet then how switch will learn each other mac address?
Does PC1 cannot communicate to PC2 without router?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2019 09:30 AM
If the PCs are in different subnets then you need a L3 device to route between them.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2019 10:07 AM
The router will then know where to send the packet for PC2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2019 10:11 AM
To your later question, if the hosts are on different subnetworks, what do you mean, as networks imply L3. If those networks are on the same "wire", the above still would work. If they were separated by a router, by default, a router will not forward L2. However, if they were on different "wires", but connected via a L2 bridge, the bridge would forward any broadcast or unknown unicast MAC. (BTW, a "L2 switch" is a multi-port bridge.)
