1 ethernet port, multiple virtual interfaces, multiple DHCP servers. How to set up?

I have a laptop running FreeBSD 4.10 which has one ethernet port (fxp0)

I have so far configured the ethernet port and kernel to support three vlan virtual interfaces with static IPs. (vlan0, vlan1, vlan2). So far, I have got this working.

What I want to do now is make each of my vlan interfaces connect to a DHCP server to get their own IP adresses on different networks, but here's the catch: each vlan interface needs to connect to a different DHCP server.

I figure that since there's only one default gateway on the machine, all DHCP requests are going to end up at one DHCP server, therefore making all 3 virtual vlan interfaces get an IP from the same network. I don't want this to happen.

I know that in FreeBSD, rc.conf can be edited so that an interface gets its IP from DHCP (for example, ifconfig_fxp0="DHCP"

Is there any way I can set up rc.conf to get each virtual interface to point to a different DHCP server? If not, is there some set of commands I can use to do this?

Thanks
Neo-RioAsked:
Who is Participating?
 
gheistCommented:
This is impossible.
vlan is not intended to work with DHCP
no dhcp client works with two differently configured DHCP servers
vlan is specific sub-protocol for ethernet, where frames are tagged with specific vlan-id, and then most likely, by a ethernet switch with vlan support, further mapped to distinct ethernet ports. this, for example, makes firewall in middle of corporate network wuite easily -  it is simply capable of decode data from every port on the switch etc.
i will confirm that no DHCP providers support vlan for their clients and connecting cables of two providers is basically against their AUP or so.
please buy network card, and stop dreaming about impossible things.
0
 
gheistCommented:
DHCP is for ethernet and not for vlan.
VLAN is fot those whose ethernet switches decode it.

Please describe your problem in understandable manner with commands you run and errors you get ...
0
 
Neo-RioAuthor Commented:
Ok, here's a more concise question:

Can I, or can I not, set a virtual vlan interface to receive an IP from a specified DHCP server within FreeBSD?

I can set an ethernet interface to receive DHCP with ifconfig_fxp0="DHCP".
If I do ifconfig_vlan0="DHCP", then no IP address is taken for the interface, and the vlan interface remains with no IP address.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.