How do you setup the DHCP server to provide DHCP services to different zones with different information?
Thanks in advance
DHCP on multiple zones
Moderator: Securepoint
You have to edit the dhcpd template and add some values to the database.
The default dhcpd.conf-template (show extc_template /etc/dhcpd.conf):
You have to add sections for the additonal subnets:
Now you must create the new variables:
To change the values use the command: change extc_value dhcp "VARIABLE" "VALUE"
e.g.
To activate the new configuration type: update applications
Note: I had no time to test this configuration, but it should work. Maybe the defaultgateway for the first subnet must be moved from global configuration to the subnet section, like we did it with the additional subnets.
edit: don't forget to make a backup before you save the new configuration
The default dhcpd.conf-template (show extc_template /etc/dhcpd.conf):
Code: Alles auswählen
#$Id: dhcpd.conf 4902 2007-09-19 11:32:23Z basti $
ddns-update-style ad-hoc;
default-lease-time ${DEFAULTLEASETIME};
max-lease-time ${MAXLEASETIME};
#IF ${DEFAULTGATEWAY}
option routers ${DEFAULTGATEWAY};
#ENDIF
#IF ${NAMESERVER1}
#IF ${NAMESERVER2}
option domain-name-servers ${NAMESERVER1}, ${NAMESERVER2};
#ELSE
option domain-name-servers ${NAMESERVER1};
#ENDIF
#ENDIF
subnet ${NETADDR} netmask ${NETMASK} {
range ${RANGE_LOW} ${RANGE_HIGH};
}
Code: Alles auswählen
change extc_template /etc/dhcpd.conf
#$Id: dhcpd.conf 4902 2007-09-19 11:32:23Z basti $
ddns-update-style ad-hoc;
default-lease-time ${DEFAULTLEASETIME};
max-lease-time ${MAXLEASETIME};
#IF ${DEFAULTGATEWAY}
option routers ${DEFAULTGATEWAY};
#ENDIF
#IF ${NAMESERVER1}
#IF ${NAMESERVER2}
option domain-name-servers ${NAMESERVER1}, ${NAMESERVER2};
#ELSE
option domain-name-servers ${NAMESERVER1};
#ENDIF
#ENDIF
subnet ${NETADDR} netmask ${NETMASK} {
range ${RANGE_LOW} ${RANGE_HIGH};
}
#IF ${NETADDR2}
subnet ${NETADDR2} netmask ${NETMASK2} {
option routers ${DEFAULTGATEWAY2};
range ${RANGE_LOW2} ${RANGE_HIGH2};
}
#ENDIF
#IF ${NETADDR3}
subnet ${NETADDR3} netmask ${NETMASK3} {
option routers ${DEFAULTGATEWAY3};
range ${RANGE_LOW3} ${RANGE_HIGH3};
}
#ENDIF
**
Code: Alles auswählen
add extc_entry dhcp NETADDR2
add extc_entry dhcp NETMASK2
add extc_entry dhcp DEFAULTGATEWAY2
add extc_entry dhcp RANGE_LOW2
add extc_entry dhcp RANGE_HIGH2
add extc_entry dhcp NETADDR3
add extc_entry dhcp NETMASK3
add extc_entry dhcp DEFAULTGATEWAY3
add extc_entry dhcp RANGE_LOW3
add extc_entry dhcp RANGE_HIGH3
e.g.
Code: Alles auswählen
change extc_value dhcp NETADDR2 10.20.30.0
change extc_value dhcp NETMASK2 255.255.255.0
change extc_value dhcp DEFAULTGATEWAY2 10.20.30.40
change extc_value dhcp RANGE_LOW2 10.20.30.50
change extc_value dhcp RANGE_HIGH2 10.20.30.100
Note: I had no time to test this configuration, but it should work. Maybe the defaultgateway for the first subnet must be moved from global configuration to the subnet section, like we did it with the additional subnets.
edit: don't forget to make a backup before you save the new configuration
Zuletzt geändert von philipp am Mi 26.03.2008, 09:59, insgesamt 1-mal geändert.
Hallo,
seit einem der letzten Updates muss hier die dhcpd.conf wie folgt aussehen:
Gruß,
Rolf Gerold
seit einem der letzten Updates muss hier die dhcpd.conf wie folgt aussehen:
sonst "vergißt" die Securepoint nach einem "config save" wieder die modifizierte dhcpd.conf#$Id: dhcpd.conf 5849 2008-11-18 15:39:48Z basti $
ddns-update-style ad-hoc;
default-lease-time ${DEFAULTLEASETIME};
max-lease-time ${MAXLEASETIME};
#IF ${DEFAULTGATEWAY}
option routers ${DEFAULTGATEWAY};
#ENDIF
#IF ${NAMESERVER1}
#IF ${NAMESERVER2}
option domain-name-servers ${NAMESERVER1}, ${NAMESERVER2};
#ELSE
option domain-name-servers ${NAMESERVER1};
#ENDIF
#ENDIF
#IF ${WINSSERVER}
option netbios-name-servers ${WINSSERVER};
#ENDIF
subnet ${NETADDR} netmask ${NETMASK} {
range ${RANGE_LOW} ${RANGE_HIGH};
}
#IF ${NETADDR2}
subnet ${NETADDR2} netmask ${NETMASK2} {
option routers ${DEFAULTGATEWAY2};
range ${RANGE_LOW2} ${RANGE_HIGH2};
}
#ENDIF
Gruß,
Rolf Gerold
Sie sollten zusätzlich in der ersten Zeile des Templates dessen Build-Nummer (unten fettgedruckt) erhöhen, sonst kann es passieren, dass die manuell eingefügten Änderungen nach einem Update wieder weg sind:
Am besten die tragen "9999" ein, sodass das Template aller Wahrscheinlichkeit nach nie überschrieben wird.#$Id: dhcpd.conf 5849 2008-11-18 15:39:48Z basti $