[WBEL-users] Re: wbel-u] DHCPD on multiple interfaces?

R P Herrold herrold@owlriver.com
Mon, 10 Jan 2005 21:28:37 -0500 (EST)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--365859691-687509248-1105410517=:26341
Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8BIT

> But is there any way for dhcpd to respond and service queries on multiple
> interfaces?  (each interface is a different subnet).

sure -- no need for third party tools.

It is simply the configs matching the interfaces -- the two 
network segments are the 'FIRST-LAN' and the 'CAOS-LAN' - on 
10.16.1.0/24 and 172.16.11.0/24, through eth0 and eth1.  Here 
is a live sample:

[root@ftp etc]# grep -v ^# /etc/dhcpd.conf | grep -v ^$
ddns-update-style none ;
server-identifier ftp.first.lan ;
option domain-name-servers 10.16.1.253, 10.16.33.105 ;
option time-offset 300;
default-lease-time 600;
max-lease-time 14400;
option option-128 code 128 = string;
option option-129 code 129 = text;

shared-network FIRST-LAN {
option routers 10.16.1.1; # router being our router;
option domain-name "first.lan";
default-lease-time 6000 ;
max-lease-time 144000 ;
option subnet-mask 255.255.255.0;
allow booting;
allow bootp;
next-server 10.16.1.253;
filename  "/rhl/pxe/pxelinux.0" ;
subnet 10.16.1.0 netmask 255.255.255.0 {
 	next-server 10.16.1.253 ;
 	filename  "/rhl/pxe/pxelinux.0" ;
         range dynamic-bootp 10.16.1.222 10.16.1.229 ;
         option broadcast-address 10.16.1.255;
         dynamic-bootp-lease-length 36000;
 	range  10.16.1.230 10.16.1.239 ;
         option routers 10.16.1.1; # router being our router;
         default-lease-time 600;
         max-lease-time 7200;
 	}
}

shared-network CAOS-LAN {
subnet 172.16.11.0 netmask 255.255.255.0 {
option domain-name "caos.lan" ;
option subnet-mask 255.255.255.0 ;
option domain-name-servers 172.16.11.253  ;
option log-servers        172.16.11.253 ;
default-lease-time 1200 ;
max-lease-time 14400 ;
pool {
         range 172.16.11.2 172.16.11.98 ;
         authoritative ;
         allow unknown-clients;
                 }
         }
}

[root@ftp etc]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS  Window  irtt Iface
10.16.1.0       0.0.0.0         255.255.255.0   U         0 0           0 eth0
172.16.11.0     0.0.0.0         255.255.255.0   U         0 0           0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0           0 eth1
0.0.0.0         10.16.1.1       0.0.0.0         UG        0 0           0 eth0
[root@ftp etc]#

--365859691-687509248-1105410517=:26341--