Vlan Configuration question

DANMOH009DANMOH009 Member Posts: 241
I have been working with the CCNA exploration practice labs and i have came across an issue that i just need a bit of help with.

Basically i have 3 vlans

vlan 20, vlan 30 and vlan 40.

At first i configured each host in each vlan on a separate subnet with default gateway etc... I then changed one of the port assignments on one of the host so that host a (that was orginally in vlan 20) was now in vlan 30.

I kept the same deafult gateway on host a (so it still had the default gateway 192.168.10.1, but changed the ip address to 192.168.20.20) however even though the Default gateway was different i was still able to ping other hosts in vlan 30.

Is it because all the connectivity is layer 2 connectivity and there is no need for the devices to even look at the default gateway????

if so then why would i have to change any ip addresses at all coz they are all layer 3?

i hope ive made this clear starting to confuse myself a bit.

Thanks

Comments

  • DarthVaderDarthVader Member Posts: 71 ■■□□□□□□□□
    Are you using SVIs for you vlan gateways?(ie. "interface vlan 20") if so, are they all on the same switch?

    If so, a multilayer switch will route between these vlans.
  • ZartanasaurusZartanasaurus Member Posts: 2,008 ■■■■■■■■■□
    DANMOH009 wrote: »
    Is it because all the connectivity is layer 2 connectivity and there is no need for the devices to even look at the default gateway????
    No. When hosts are deciding whether or not they need to send traffic to their default gateway, they go through the bitwise AND process. They take their configured subnet mask and do an AND with their IP and another AND with the target IP. If the answer is the same, they are on the same network and don't need to send to a default gateway. In more layman's terms, the host is checking the target IP to see if it falls in the host's subnet.

    Since they're on the same network, they send out an ARP request for the target IPs L2 address. And since both hosts are in the same VLAN, the ARP request can be heard and replied to.

    If the AND process came up with a different result, the host would do an ARP for their default gateway and send traffic to it. Of course, in your scenario, the host wouldn't be able to reach its default gateway.
    Currently reading:
    IPSec VPN Design 44%
    Mastering VMWare vSphere 5​ 42.8%
  • DANMOH009DANMOH009 Member Posts: 241
    Thanks Zartanasaurus

    That makes perfect sense.

    Cheers
Sign In or Register to comment.