dhcpd

Program that operates as a daemon on a server to provide Dynamic Host Configuration Protocol (DHCP) service to a network.

Configuration to push extra static route

Extra static route to network 10.0.0.0/24 through router 192.168.1.128.

File /etc/dhcp/dhcpd.conf on CentOS 6.3:

ddns-update-style none;
default-lease-time 600; # 10 minutes
max-lease-time 3600; #one hour
authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.100 192.168.1.240;
  option routers 192.168.1.1; #default router
  option domain-name-servers 8.8.8.8, 8.8.4.4;
  option broadcast-address 192.168.1.255;
}
# extra router 
option classless-routes code 121 = array of unsigned integer 8;
option classless-routes 24, 10,0,0, 192,168,1,128;
option classless-routes-win code 249 = array of unsigned integer 8;
option classless-routes-win 24, 10,0,0, 192,168,1,128;

Add routes to routers on machines

Linux: route add -net 10.196.0.0 netmask 255.255.0.0 gw 192.168.1.134

Windows:route ADD 10.196.0.0 MASK 255.255.0.0 192.168.1.134

Delete route to routers on machines

Linux: route del -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.123

dhcpd (last edited 2013-11-08 09:23:55 by bl13-22-115)