dhcp service on server

I have 3 scopes of IP addresses, each assign to a specific vlan. Currently my router is running my dhcp service. I'd like to move it to a server. Will it be possible? One of the consultant I talked to said that I cannot because the server would not know which vlan to assign the scope to. Not sure I agree with that but I am new to the dhcp server, so may be you can provide me some guidance.

Thanks
biggynetAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

andrew1812Commented:
Sure you can

You can setup DHCP server on Windows 2003/2008 with multiple scopes each for different network addresses belonging to the VLAN's. You should also configure IP helper address feature on the router which would enable your clients to receive DHCP addresses from the respective scopes configured on the DHCP server.
biggynetAuthor Commented:
So if I have DHCP scope1 10.10.10.0/24 and DHCP scope 2 10.20.20.0/24. Then, the config for IP Helper address on ALL the routers on the network would be:

ip helper-address 10.10.10.1
ip helper-address 10.20.20.1

Is that correct?

Thx
andrew1812Commented:
Let's take your Scenario with an example. You have 3 VLANs.

192.168.1.0 ( VLAN 2), 192.168.2.0 (VLAN 3), 192.168.3.0 (VLAN 4).

The DHCP server would be configured for all the scopes above.

Assume that the DHCP server is on VLAN 4 and has an IP address 192.168.3.1

For the other subinterfaces on the router on which the VLAN 2 and VLAN 3 terminates, the IP helper address would be

VLAN 2 sub interface -  IP Helper address - 192.168.3.1
VLAN 3 subinterface - IP Helper address - 192.168.3.1
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Khandakar Ashfaqur RahmanExpert/ConsultantCommented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
biggynetAuthor Commented:
andrew1812,

So the NIC card of the dhcp server will be a static IP address 192.168.3.2 from vlan 4. Correct?
If it is connected to fa0/1 of the switch, then the switch port will be configured for vlan4. The traffic for vlan4 will be sent through that fa0/1 because it is an access port. But how does it know to forward DHCP broascasts to vlan 2 & 3 because fa0/1 is not a trunk port.

Thanks
andrew1812Commented:
It works this way

fa0/1 is an access port and you have a static IP for the DHCP server - you are correct.

Now you connect your router to a port on the switch which would be configured as a trunk.

The encapsulation used on that port would be 802.1q used for trunking. On the corresponding interface on the router, you configure the IP addresses for respective vlans 2,3 and 4. Assume that the IP addresses ( you go the sub interface and configure vlan ip address- router on a stick config) are 192.168.1.1, 192.168.2.1 and 192.168.3.1.

Now you go to each of these interface IP addresses ( Apart from 192.168.3.1) and configure the IP helper address.

So lets say a client on VLAN 2 requests an IP address from the server  - The following would happen

1. DHCP Discover (broadcast)  packets would be sent on the VLAN 2 network by the client.
2. The DHCP server does not receive the packet as broadcast since it is on a different VLAN.
3. The DHCP Discover is recieved by the routers subinterface for vlan 2 , which is 192.168.1.1
4. Since the IP Helper address is configured for the interface, the DHCP Discover packet would be converted from Broadcast to unicast.
5. When the DHCP server receives the packet, the vlan ip ( 192.168.1.1) is also included in the packet from which the dhcp server know from which scope the ip has to be provided.

6. The DHCP server would prepare the DHCP offer packet and send it to it's gateway ( Configure 192.168.3.1 as the gateway) with the IP address from where it would be sent to the client.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DHCP

From novice to tech pro — start learning today.