It is my understanding that Vlans separate broadcast domains, but I often see people say, "subnets define a broadcast domain" as well.
Is it correct to say, "Vlans define a L2 broadcast domain, and subnets define a L3 broadcast domain"?
Host A: 10.0.1.1/24, Vlan 10
Host B: 10.0.2.1/24, Vlan 10
These two hosts are on the same vlan, therefore they should be able to communicate at L2 via their MAC addresses without routing. (Please correct me if I'm wrong)
However, the hosts are on different subnets. So that means packets must be sent to the default gateway and routed.
I'm having trouble understanding how these can both be true, as well as how communication between the hosts would differ if they were on the same subnet instead. Any clarification would be greatly appreciated, thanks.