Understand DHCP's "Shared Network" Option

  • 7004091
  • 04-Aug-2009
  • 26-Apr-2012

Environment

Novell DHCP
Novell Open Enterprise Server 2 Support Pack 1 (OES 2 SP 1) Linux

Situation

The OES documentation, under section 1.4.2, states the following about the "Shared Network" option under DHCP:

"All subnets that share the same physical network can be grouped under a Shared Network object.

Some installations have physical networks on which more than one IP subnet operates. For example, if there is a site-wide requirement that 8-bit subnet masks be used, but a department with a single physical Ethernet network expands to the point where it has more than 254 nodes, it might be necessary to run two 8-bit subnets on the same Ethernet until a new physical network can be added. In this case, the subnet declarations for these two networks must be enclosed in a shared-network declaration.

A shared network object must be created under a service object."

This TID is to clarify the above statement, and to state what the shared network option does and does not do.

Resolution

Assume the following network setup:

VLAN 1: 10.0.1.0 Mask 255.255.255.0
VLAN 2: 10.0.2.0 Mask 255.255.255.0
VLAN 3: 10.0.3.0 Mask 255.255.255.0
VLAN 4: 10.0.4.0 Mask 255.255.255.0

Assume the following DHCP setup on the OES server (for reference, this information is from the /var/log/dhcp-ldap-startup.log):

shared-network "MySharedNetwork" {
subnet 10.0.3.0 netmask 255.255.255.0 {
default-lease-time 259200;
max-lease-time 259200;
pool {
range 10.0.3.1 10.0.3.251;
}
}
subnet 10.0.4.0 netmask 255.255.255.0 {
default-lease-time 259200;
max-lease-time 259200;
pool {
range 10.0.4.1 10.0.4.251;
}
}
}
Note that both subnet declarations for both VLAN 3 and 4 are located within the shared-network configuration (called "MySharedNetwork")
subnet 10.0.1.0 netmask 255.255.255.0 {
default-lease-time 259200;
max-lease-time 259200;
pool {
range 10.0.1.1 10.0.1.251;
}
}
Note the subnet configurations for both VLAN 1 and 2 look the same as the subnet configurations for VLAN 3 and 4; however, they DO NOT fall under the shared network configuration. When creating a subnet, the administrator can choose to create the subnet within a shared network or not. It is only an option, and not a requirement (as a shared network was designed for a specific purpose)
subnet 10.0.2.0 netmask 255.255.255.0 {
default-lease-time 259200;
max-lease-time 259200;
pool {
range 10.0.2.1 10.0.2.251;
}
}
 Assume the following network layout:
 
 
In the above scenario, when clients on VLAN 1 request a DHCP address from the OES server, the client will receive a 10.1.0.x address.  Similarly, clients on  VLAN 2 will receieve a 10.2.0.x address when a request is sent to the OES DHCP server.  However, DHCP Shared Networks act differently.
 
Refer to the snipit from the documentation above.  Assume DEPT B has 350 employees.  VLAN 3 or 4, in and of themselves, will not have a sufficient number of available DHCP addresses should all employees be in the office and logged in.  DEPT B, being short on cash, cannot setup a physical network to address their expansion concerns; however, new hardware isn't needed in order to assign more DHCP addresses to DEPT B.  If the system administrator setups a new subnet inside of DHCP, and assigns it to a shared network, and then does the same for another subnet (NOTE: All subnets must share the same physical network). 
 
In the above example, VLANs 3 and 4, representing the 10.0.{3,4}.0/25 subnets, have been grouped together under a DHCP shared network.  Assume that a pool has been created for each subnet in which 250 addresses are share out.  When a client from DEPT B requests a DHCP address, they may receive either a 10.0.4.x address or a 10.0.3.x address.  Likely, the DHCP server will start with the highest address possible, and hand out addresses from there--meaning the server will likely hand out 10.0.4.251, then 250, then 249, and so on until the 10.0.4 x addresses are depleted.  The server will then hand out the 10.0.3.251 address, and so on and so forth.
 
In the case of VLAN 1 and 2, where the subnets were created OUTSIDE of a shared network, the administrator has control over which VLAN recieves which addresses (at least as far as the subnet is defined).  In the case of VLAN 3 and 4, from a DHCP perspective, the clients are on the same network and the administrator does not control which clients will receive addresses from a specific VLAN (other than the subnets created under the shared network).