- Posts: 7
- Thank you received: 0
DHCP & VLAN's (How do they work together?)
- future2000
- Topic Author
- Offline
- New Member
Less
More
18 years 8 months ago #13393
by future2000
DHCP & VLAN's (How do they work together?) was created by future2000
Hi to all,
I have a conceptual issue in my head which I need to share. I'm currently studying for my CCNA and I administer a network where we use DHCP. I was thinking of splitting our network up a bit as the number of broadcasts and the negative effect they are having isn't good for our network. Anyway can anyone explain to me how I use dhcp when I've split the network up into seperate VLAN's?.
I'm not sure if I have any idea how DHCP and VLAN's work together, is it just c case of having the dhcp server on both subnets and having two scopes setup, if so, how do I determine which clients get which addresses?
Thanks
future2000
I have a conceptual issue in my head which I need to share. I'm currently studying for my CCNA and I administer a network where we use DHCP. I was thinking of splitting our network up a bit as the number of broadcasts and the negative effect they are having isn't good for our network. Anyway can anyone explain to me how I use dhcp when I've split the network up into seperate VLAN's?.
I'm not sure if I have any idea how DHCP and VLAN's work together, is it just c case of having the dhcp server on both subnets and having two scopes setup, if so, how do I determine which clients get which addresses?
Thanks
future2000
18 years 8 months ago #13400
by jhun
Replied by jhun on topic Re: DHCP & VLAN's (How do they work together?)
hi future2000
well the way that i understand it (and please do correct me if i'm worng) that when you create vlans you create different networks altogether. logically they are in different networks with different parameters and can be "linked" togethter using intervlan routing.
actually if you have configured a dhcp server with multiple scopes, and knowing that dhcp request are broadcast to which they do not cross routing boundaries, and have enabled intervlan routing, you need to put an 'ip helper-address' in your router/L3 switch so that it will forward the request to the proper dhcp pool/scope.
When the L3 switch receives the dhcp request on a vlan interface it will forward that request to the dhcp server as a unicast. It will also put the ip address of the VLAN interface it received the request on, into the GIADDR field, which is set to the IP address of the dhcp client. This is how the dhcp server knows which scope to choose from and to which client to hand it off. So if vlan1 interface (with an IP address of 192.168.1.1) receives a dhcp request, the DHCP server will hand out from the 192.168.1.x scope because it sees the 192.168.1.1 in the GIADDR field. If the vlan2 interface (192.168.2.1) receives the request, then the dhcp server will hand out from the 192.168.2.x scope.
well the way that i understand it (and please do correct me if i'm worng) that when you create vlans you create different networks altogether. logically they are in different networks with different parameters and can be "linked" togethter using intervlan routing.
actually if you have configured a dhcp server with multiple scopes, and knowing that dhcp request are broadcast to which they do not cross routing boundaries, and have enabled intervlan routing, you need to put an 'ip helper-address' in your router/L3 switch so that it will forward the request to the proper dhcp pool/scope.
When the L3 switch receives the dhcp request on a vlan interface it will forward that request to the dhcp server as a unicast. It will also put the ip address of the VLAN interface it received the request on, into the GIADDR field, which is set to the IP address of the dhcp client. This is how the dhcp server knows which scope to choose from and to which client to hand it off. So if vlan1 interface (with an IP address of 192.168.1.1) receives a dhcp request, the DHCP server will hand out from the 192.168.1.x scope because it sees the 192.168.1.1 in the GIADDR field. If the vlan2 interface (192.168.2.1) receives the request, then the dhcp server will hand out from the 192.168.2.x scope.
18 years 8 months ago #13477
by Tarun
Next would be SP (Service Provider)
CCNA, CCNP (Switching), CCIE#20640
Replied by Tarun on topic Re: DHCP & VLAN's (How do they work together?)
Can you tell us a little more about your setup...as to how the computers connect to each other & then to the DHCP server. What forms the DHCP server of your network (Server or a Router).
DHCP would always work as it should even if you have multiple VLANs setup on your Layer2 network.
Please tell us a little more about your network...
DHCP would always work as it should even if you have multiple VLANs setup on your Layer2 network.
Please tell us a little more about your network...
Next would be SP (Service Provider)
CCNA, CCNP (Switching), CCIE#20640
18 years 8 months ago #13492
by VINODM
Cheers,
VINOD M
CCNA
~If You Cant Beat Him Join Him~
Replied by VINODM on topic Re: DHCP & VLAN's (How do they work together?)
I agree with jhun.
Since we are assigning IP Address for diffrent networks seperated by VLAN.
Hear is what you need to Implement, First assign all the IP address ranges in Individual scope in the DHCP server, since DHCP Requests are brodcast and will be terminated by the router as said by jhun. What you would need is a "DHCP Relay Agent" which can help you assign IP address on diffrent subnet.
And the way DHCP Relay agent works is it sits inside a subnet and whenever any host in the same subnet requires a IP address it sends a unicast message directly to the DHCP server since the Relay Agent is already assigned with an IP and it knows the IP address of DHCP as well. The DHCP then replies the unicast form Relay Agent with an IP and assignes the new IP to the requested host.
The DHCP Discover Brodcast messages are eliminated with the Help of DHCP relay agent. All you need is one DHCP Relay Agent per network. and thats it.
Cheers,
-VINOD M
Since we are assigning IP Address for diffrent networks seperated by VLAN.
Hear is what you need to Implement, First assign all the IP address ranges in Individual scope in the DHCP server, since DHCP Requests are brodcast and will be terminated by the router as said by jhun. What you would need is a "DHCP Relay Agent" which can help you assign IP address on diffrent subnet.
And the way DHCP Relay agent works is it sits inside a subnet and whenever any host in the same subnet requires a IP address it sends a unicast message directly to the DHCP server since the Relay Agent is already assigned with an IP and it knows the IP address of DHCP as well. The DHCP then replies the unicast form Relay Agent with an IP and assignes the new IP to the requested host.
The DHCP Discover Brodcast messages are eliminated with the Help of DHCP relay agent. All you need is one DHCP Relay Agent per network. and thats it.
Cheers,
-VINOD M
Cheers,
VINOD M
CCNA
~If You Cant Beat Him Join Him~
18 years 8 months ago #13495
by Tarun
Sorry, but i am a little confused here...
"It will also put the IP Address of the VLAN interface it received the request on"?
If the requesting interface had an IP Address already, what is it requesting for ?
How come interface vlan1 already has an IP Address although we haven't used DHCP yet ?
I am sorry but i could not understand this, i am sorry if i am understanding it wrong...
Next would be SP (Service Provider)
CCNA, CCNP (Switching), CCIE#20640
Replied by Tarun on topic Re: DHCP & VLAN's (How do they work together?)
It will also put the ip address of the VLAN interface it received the request on, into the GIADDR field, which is set to the IP address of the dhcp client.
Sorry, but i am a little confused here...
"It will also put the IP Address of the VLAN interface it received the request on"?
If the requesting interface had an IP Address already, what is it requesting for ?
This is how the dhcp server knows which scope to choose from and to which client to hand it off. So if vlan1 interface (with an IP address of 192.168.1.1)
How come interface vlan1 already has an IP Address although we haven't used DHCP yet ?
receives a dhcp request, the DHCP server will hand out from the 192.168.1.x scope because it sees the 192.168.1.1 in the GIADDR field. If the vlan2 interface (192.168.2.1) receives the request, then the dhcp server will hand out from the 192.168.2.x scope.
I am sorry but i could not understand this, i am sorry if i am understanding it wrong...
Next would be SP (Service Provider)
CCNA, CCNP (Switching), CCIE#20640
18 years 8 months ago #13504
by reaper
Replied by reaper on topic Re: DHCP & VLAN's (How do they work together?)
The switch/router that does the routing has to be in all the subnets to be able to route between them. So it has a lot of vlan interfaces with different ipnets, VLAN 1 might be 192.168.0.1, VLAN 2 192.168.1.1 and so on. A client sends a DHCP broadcast to it's local switch, the switch forwards the packet to the switch/router that is doing the routing, it then sends the packet to the DHCP server with an IP according to which VLAN it received the packet. The interfaces that jhun is talking about are on the unit doing the routing which has to have interfaces with IP's on them. The DHCP-server will hand out an IP according to what IP is in the GIADDR-field. That's why the IP's will be handed out correctly because the switch/router doing the routing will put the correct adress in this field and the client will get an IP depending on which VLAN it came from.
Hope this made it a little more clear Tarun.
Hope this made it a little more clear Tarun.
Time to create page: 0.132 seconds