Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHCP on VLAN 1

Status
Not open for further replies.

glio

Technical User
Sep 25, 2002
77
MO
4 VLANs(ID2, 3, 4 and 10), all connected to a 3Com 4924 switch. All workstations reside on VLAN 2, 3 and 4 and a DHCP server (Fedora Core 5) runs on VLAN 10. I'd like to configure the DHCP server so that it assigns IPs to all workstations on the VLANs. Can someone please post a sample config file and the required setup of the 3Com 4924 switch on the forum? ... and, if possible, explain a little bit about the mechanism of the IP assignment?

Jimmy
 
I can't give you a config file because I'm not running 3com, but the basic mechanism involves assigning an "iphelper" or "forwarding agent" per VLAN (or switch, depending. Check your 3com docs). This "helper" is usually the IP address of the DHCP server.

So, PC boots, sends out a DHCP request. Switch recognizes that this is a DHCP request, but since there is no DHCP server on that VLAN (and the switch can't cross VLANs) it gets the info from the "helper", and forwards it to the appropriate VLAN.

The switch does not blindly route the DHCP traffic, it intelligently forwards it.
 
But how does the Linux DHCP Server tell the origin of a DHCP request, given that there are 4 VLANs and the server is required to assign IP in different subnet according to the VLAN a workstation belongs to?

Thank you very much for your previous post!
 
I think you're confusing VLANs and subnets. Different VLANs can and do exist within the same IP subnet (at least with port-based VLANs). So your DHCP server doesn't care which VLAN you're on, everybody gets the same subnet.

Say we have a non-VLAN setup working with 4 PCs on a switch. All are set for DHCP from the same address block and subnet.
Client1 - port1
Client2 - port2
Client3 - port3
Client4 - port4
Now we introduce VLANs by assigning port1 and port3 to VLAN1, and port2 and port4 to VLAN2. The IP addresses and subnets are still the same, but the switch has added an extra filter, the VLAN, which prevents Client1 and Client3 (VLAN1) from seeing the traffic from Client2 and Client4 (VLAN2) and vice-versa.

Not a great explanation but hopefully it will help.
 
Oh, VLANs can also be used to bring different subnets to the same PC, but the situation gets pretty complicated, and is beyond my experience.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top