Are VLAN and Secondary IP address the same?
lon21
Member Posts: 201
in CCNA & CCENT
Just reading the cisco book and learnt that I can use a secondary ip address on the same internet with a different network. If this is the case then would the broadcast of one network only be reached with host which fall in that network or by both networks hosts. It makes sense that it should only hit the same network.
Also whats the need to use vlan when I can just use secondary ip address?
Thanks
Also whats the need to use vlan when I can just use secondary ip address?
Thanks
Comments
-
pham0329 Member Posts: 556Also whats the need to use vlan when I can just use secondary ip address?
They're 2 totally different things. VLAN are often used to segment the broadcast domain, and for security purposes. A secondary IP address is used to allow a device, usually a GW, to respond to requests from hosts belonging to different subnets, but on the same physical LAN.
Secondary IP address is inefficient because even though the hosts are on the same physical L2 segment, when a host A wants to communicate with another Host B, who's in a different subnet, it will ARP for the GW's MAC instead of the MAC of the host B. So in essence, it Host A goes through the GW instead of going directly to Host B.
Also, when you send a broadcast, while the L3 broadcast IP will be different depending on the subnet (last ip of the subnet), the L2 broadcast will be the same, all Fs. This means that the switch will forward this out all ports. -
lon21 Member Posts: 201They're 2 totally different things. VLAN are often used to segment the broadcast domain, and for security purposes. A secondary IP address is used to allow a device, usually a GW, to respond to requests from hosts belonging to different subnets, but on the same physical LAN.
Secondary IP address is inefficient because even though the hosts are on the same physical L2 segment, when a host A wants to communicate with another Host B, who's in a different subnet, it will ARP for the GW's MAC instead of the MAC of the host B. So in essence, it Host A goes through the GW instead of going directly to Host B.
But surely if VLAN are used to segment a broadcast domain then having the second ip does the same, as a broadcast would only hit hosts which reside on that subnet and not the other? -
pham0329 Member Posts: 556But surely if VLAN are used to segment a broadcast domain then having the second ip does the same, as a broadcast would only hit hosts which reside on that subnet and not the other?
See the Edit above.
Suppose you have a network of 500 hosts, and instead of using VLANs, you decided to use secondary ip addressing, and all 500 hosts are on VLAN 1. Every time a host sends a broadcast, that frame is sent to every other hosts in the network, whereas if you have VLANs, the frame is only sent to hosts that belongs in the same VLAN.
If you use Secondary IPs, you can't use DHCP because every host would get an IP from the same subnet. You would have to configure each host manually.