Skip to main content

DHCP & VLANS on cisco routers

More
18 years 7 months ago #16292 by Ranger24
Hi Guys,

I have a cisco 1841 router (12.3T security IOS i think) configured with 5 DHCP pool and 5 VLANs.

The router works fine with 1 pool per VLAN and address allocation working fine.

However this was configure before my time and I have not been able to understand how the VLANs & DHCP pools relate.

How does the router know which DHCP pool relates to which vlan. I cannot find an obvious link up between them?

Thanks for any help

R


Patience - the last reserve of the any engineer
More
18 years 7 months ago #16293 by d_jabsd
In a nutshell, the DHCP pool is chosen based on the Vlan that the request was received on.

The DHCP pool network statement defines the network that it belongs to. The vlan interfaces also belong to those networks, so the correct address is always given out, with gateway set to the vlan interface that received the request.

If this makes things more confusing, let me know and I'll try to clarify it.
More
18 years 7 months ago #16318 by Smurf
This is also true for a Multi-Homed server running DHCP Server with multiple scopes. If it receives a DHCP request on an interface in a 10.10.10.0/24 subnet, it will dish out a 10.10.10.x ip address. If on the other hand it received a DHCP request on an interface in a 192.168.0.0/24 subnet, it will dish out a 192.168.0.x ip address.

Hope it helps to clarify

Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
More
18 years 7 months ago #16321 by Ranger24
Hi,

So obvious it hurts! Thanks!

Now I understand that the next step to configure these dhcp pools to work with option82.

Option 82 is added to DHCP messages and identifies subscriber information (port, switch for example) i.e. who sent the DHCP message. I need my cisco box to assign address based on this, not the interface the message arrives at.

I'll investigate myself, but if anyone has done this anc can help....

Cheers

R


Patience - the last reserve of the any engineer
More
18 years 7 months ago #16322 by Dove
For this need to configure DHCP Server and DHCP Relay Agent. The Relay Agent passes the DHCP request to the respective DHCP pool.


As per your network, the router is acting as a DHCP server and leas the 5 Different netwrok address right.

your doubt is

How does the router know which DHCP pool relates to which vlan. I cannot find an obvious link up between them?


for this you need to configure this command in each VLAN
ip helper-address address
its nothing but configuring the Relay Agent in Switch. Based on this IP helper-address the corresponding IP address will be leased to the client.


Hope I had answer to your question.

Rgds,
Dove


Dove
Time to create page: 0.198 seconds