Originally Posted by alix123
So DHCP should offer the ip address depending upon the port/vlan/subnet the request came in??
Not exactly. When a client connects to a network there's four DHCP packets that get sent:
Syn (hello & request)
Syn/Ack (reply and 'what do you need?')
Syn/Ack (need IP address, here's my mac)
Ack (got your mac, here's your IP)
Problem is that the DHCP server has to be on the same subnet as the requesting client. I see three possible solutions:
1. Add a NIC to your DHCP server, making it multi-honed, and tie the second NIC to 22.
2. Set up relay agent. A relay agent is on the same subnet and will forward the request to a specific destination IP, then return the Ack to the requesting client. But I'm not sure how to accomplish this outside of the Win realm so I couldn't help with that.
3. Make your router the relay agents. The primary problems with this is a) your router wants to be the DHCP server anyways; b) the routers that can do this are fairly expensive; and c) it would defeat the purpose of having a dedicated Linux DHCP server.
My personal advice is to go with the relay agent. You can then specify through the server options to have all requests coming in eth0 to get assigned an IP from the 20 vlan/200 net (like it's already set up now) and inbound to eth1 would be assigned an address from vlan22/sub 202.
Hope all of this makes sense for you. It's pretty much the limit of my knowledge now.
If anyone else can lend some assistance I'm sure it would be appreciated. Hope everything goes well for you!