How do I dynamically obtain IP addresses for VLAN interfaces?
I am setting up a dhcp server to supply ip address for different VLANs of different subnet.(192.168.1.x for VLAN100, 192.168.2.x for VLAN200 and likewise for VLAN300)I have created VLANs 100,200,300 on eth0 on the ubuntu machine on which the dhcp server runs.I have configured the dhcp server to listen on all the virtual interfaces eth0.100 eth0.200 eth0.200. But when I run the dhclient for the interface eth0.100, how the server will recognize that this packet is from that particular interface? Will the dhcp request packet will contain the VLAN id? If so how the dhcp server will assign the address from that particular subnet. I think so in the configuration file we should specify that if the packet is on this particular interface say eth0.100 you should give IP from the subnet of 192.168.1.x.
I referred to DHCP server for multilple VLANs and the there is no such information in the dhcpd.config file saying the above information.I did not understand this. How the dhcp server assigns IP address from that particular range, as i think so only the VLAN id of the dhcp request packet is available to dhcp server. Can anyone please explain this? Forgive me for my ignorance as i am new to networks as well as Linux.
thanks and regards