DHCP and Secondary Addresses

Answered Question
Nov 10th, 2008

All,

I have a router that has a primary address and a couple of secondaries on the ethernet interface. This is a simple question I know it but I am having trouble solving this issue. When a host looks for a DHCP address it uses the address that is on the ethernet interface which is the PC's gateway. If there are secondary addresses on an ethernet interface does the PC request a DHCP address using all of the addresses on the ethernet interface?

Correct Answer by Jon Marshall about 8 years 3 months ago

Mario


Assuming you are using an "ip helper-address .." this will only work for the primary interface. It will not work for secondary interfaces so any clients on the secondary networks will not be able to get IP addresses.


If your addressing was contiguous you could just enlarge the DHCP scope on your DHCP server.


What you really need to do is to create subinterfaces on your router interface for each subnet ie. 802.1q routing on a stick. With subinterfaces each one can use their own ip helper-address.


Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Jon Marshall Mon, 11/10/2008 - 09:16

Mario


Assuming you are using an "ip helper-address .." this will only work for the primary interface. It will not work for secondary interfaces so any clients on the secondary networks will not be able to get IP addresses.


If your addressing was contiguous you could just enlarge the DHCP scope on your DHCP server.


What you really need to do is to create subinterfaces on your router interface for each subnet ie. 802.1q routing on a stick. With subinterfaces each one can use their own ip helper-address.


Jon

mrashby Wed, 11/12/2008 - 05:33

I think for what I am trying to do enlarging the scope will work best. Thanks.

andrew.butterworth Wed, 11/12/2008 - 09:49

DHCP SuperScopes.....


Not that I would advise anyone to use secondary addressing and superscopes as it is a 'bodge' to be used during migrations and should never be put forward as a final design. However DHCP SuperScopes are exactly what secondary addresses are used for. When you group DHCP Scopes into SuperScopes the DHCP server can assign addresses from any of the scopes within the superscope as long as the DHCP forwarder is within the range.

For example a router with the following config:


interface FastEthernet0/1

ip address 10.1.1.254 255.255.255.0

ip address 10.1.50.254 255.255.255.0 secondary

ip address 172.16.10.254 255.255.255.0 secondary

ip helper-address 192.168.10.10 secondary

!


The DHCP Server at address 192.168.10.10 can be configured with three DHCP scopes covering each of the four subnets (10.1.1.0/24, 10.1.50.0/24 & 172.16.10.0/24). These can then be grouped into a single superscope so it can offer IP addresses from any of the scopes when it receives a forwared DHCP discover/request from the router 10.1.1.254.


Obviously your DHCP server needs to support SuperScopes (Windows DHCP Server does).


Again though, I must stress I wouldn't advise this unless you need to continue a service during a migration.


HTH


Andy

Actions

This Discussion