Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking to set multiple DHCP pools on sub-ints

Status
Not open for further replies.

pctechnician

Technical User
Feb 10, 2003
134
US
I want to set up two dhcp pools on FA 0/0 on the 2620 routers. I understand that you have to set them up on sub interfaces , but im not familiar with the concep of the ip dhcp relay.

I cant type: router(config-subif)# ip dhcp pool
on the sub-int, all i can do is:

(config-subif)# ip dhcp relay

could anyone help?



A+,Network+,MCP
 
I reckon that for making dhcp relay work, a DHCP server is needed.

Anyways, if making the router the dhcp server is your objective and seems like the IOS doesn't allow you to make it, please could you post your IOS version?

#show version

best regards,
 
See this how to from CCO on how to setup DHCP.



Concerning the subinterface setup....

With ethernet subinterfaces you have to specify a vlan encapsulation type(ISL or 802.1q). this would require that the hosts for the seperate subnets be on different vlans which may complicate your solution here since it would require intervlan routing and trunking to be setup between the switches and the routers in your network.

I would setup my dhcp services on either seperate boxes or seperate interfaces on the same box not on the router. Then you can avoid the dhcp relay situation altogether and just create and secondary ip address on your routers ethernet interface for gateway purposes ie


router(config-if)#ip address 192.168.x.x 255.255.255.0
router(config-if)#ip address 192.168.x.x 255.255.255.0 secondary
 
in order to do this just do the following

create the dhcp pools from global configuration mode using

ip dhcp pool xxxx

then go and create your corresponding subinterfaces that contain the ip address located within each dhcp pool that will be the gateway...ie ip dhcp pool 192.168.1.0

subinterface ip address will be 192.168.1.1




the router will know which pool belongs to which subinterface

 
My question is do you want the router to be the DHCP server or do you have a DHCP server? If you have a stand alone DHCP server then all you need to do is add ip helper-address <IP ADDRESS> on each sub-interface.
 
I have been playing around with what I think you are wanting to do. In short, there isn't really a way to have multiple dhcps running on one interface, subinterfaces or not. This is because your router won't know what ip to give to what machine. It will disperse one set of IPs in one pool then when it runs out it will hand out the ones from the other.

You can however have as many dhcp pools running as you have actual interfaces to point it to, and whatever machine you don't want to receive an ip request set that machine with a static IP, in regards to a subinterface.

Hopefully this will answer your question, but really the best way to do it is to have a seperate box handle the dhcp, even if you do manage to get it to work on your router, any network with more then about 10 machines that request an IP will really bog down your router.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top