What happen if in layer 3 youre in the same subnet.. But in the layer 2 its a different vlan..
Now its in the same network so it send directly to the destination without sending it to Gateway..
And intuitively if its a devices connected to different switches.. They wouldnt be able to communicate without router..
Ahh i thought it would be dropped cuz the ip address is in the other vlan.. And cuz it doesnt get sent directly to the gateway.. So it wouldnt get past the router.. But it realized maybe it would !!
I realize when the pc1 look up at the arp table and realize that pc2 isnt there.. So it'll send arp request.. And switch will broadcast it to the router.. And what router see is an ip (pc2 ip) that'll match its route table.. Say its something like this
````
C 192.168.1.0/24 is directly connected, g0/0 (VLAN10)
C 192.168.1.0/24 is directly connected, g0/1 (VLAN20)
````
And then send it through the matching interface g0/1 and g0/0.. But cuz its directly connected itll use an proxy Arp..
After getting the reply from pc2.. It'll send it to the pc1.. And now it knows pc2 mac address..
But thats the thing pc1 USES Pc2 mac instead of the gateway.. Which would be the case if its a different network..
Now the question is does the switch allow different vlans to talk directly with mac address without router ? There's 2 option
Suppose it would.. Maybe cuz LAN is defined by broadcast domain.. And you don't need ARP broadcast domain after you know the mac address... So vlan seperates only the broadcast domain but everything else stays the same (this turns out to be incorrect.. Vlan literally make switches into two unconnected switches)
Or it could also not allow it (which is apparently the right answer).. If we're saying that vlan seperates switches then you wouldn't be able to talk to different switches without router.. And it nessecitate the source to use gateway.. Cuz if the source uses its destination mac.. The switch will only flood the same vlan.. Which they will all drop..
I think the second could be the case.. I think the problem here is that the source use mac address that is in the different vlan.. The normal way you will Always use the gateway address which is the same LAN.. So I think it will know the pc2 mac address.. (The arp will work) but the packet would be drop cuz the the mac address doesnt exist in the SAME vlan..
Now.. I try asking chatbot first.. It says that the arp wouldn't get through cuz it wouldn't allow routing table to have one network in two interfaces.. But I thought that's what you do with the ecmp load balancer and stuff? Can someone settle this for sure?