Bluehost.com Web Hosting $6.95

dhcpd and two network interfaces

This is a discussion on dhcpd and two network interfaces within the Linux Networking forums, part of the Linux Forums category; Hi! I would like to set up dhcpd to use eth1 and eth2 (eth0 is in use for xdsl) the ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-18-2003
Andre Nottenkaemper
 
Posts: n/a
Default dhcpd and two network interfaces

Hi!
I would like to set up dhcpd to use eth1 and eth2 (eth0 is in use for xdsl)

the config(s) should looks liks this:
#eth1 config
ddns-update-style ad-hoc;
default-lease-time 1200;
max-lease-time 9200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
option domain-name-servers 192.168.1.1, 1.2.3.4ISPDNSSERVER;
option domain-name "workgroup.local";
option netbios-name-servers 192.168.1.1;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.199;
}

#eth2 config
ddns-update-style ad-hoc;
default-lease-time 1200;
max-lease-time 9200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.2.255;
option routers 192.168.2.1;
option domain-name-servers 192.168.2.1, 1.2.3.4ISPDNSSERVER;
option domain-name "workgroup.local";
option netbios-name-servers 192.168.2.1;
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.100 192.168.2.199;
}

but i dont know how to set it up properly :(
i couldnt find anything on google or so either...
has anyone tried to use dhcpd with 2 nics yet? any tutorials, guides or
howtos?
Reply With Quote
  #2 (permalink)  
Old 10-21-2003
W Cardwell
 
Posts: n/a
Default Re: dhcpd and two network interfaces

the best doc I know of is just the man page for dhcpd.conf

Try putting the global options (that are the same for both subnets) first,
and moving your subnet specific options inside the brackets for each subnet:

ddns-update-style
default-lease-time
max-lease-time
etc....

subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
etc...
}

subnet 192.168.2.0 netmask 255.255.255.0 {
option routers 192.168.2.1;
etc...
}



--

wcardwell at nc dot rr dot com


"Andre Nottenkaemper" <a@nottenkaemper.com> wrote in message
news:1825ibhas42ks$.1mz7nge9d984t$.dlg@40tude.net. ..
> Hi!
> I would like to set up dhcpd to use eth1 and eth2 (eth0 is in use for

xdsl)
>
> the config(s) should looks liks this:
> #eth1 config
> ddns-update-style ad-hoc;
> default-lease-time 1200;
> max-lease-time 9200;
> option subnet-mask 255.255.255.0;
> option broadcast-address 192.168.1.255;
> option routers 192.168.1.1;
> option domain-name-servers 192.168.1.1, 1.2.3.4ISPDNSSERVER;
> option domain-name "workgroup.local";
> option netbios-name-servers 192.168.1.1;
> subnet 192.168.1.0 netmask 255.255.255.0 {
> range 192.168.1.100 192.168.1.199;
> }
>
> #eth2 config
> ddns-update-style ad-hoc;
> default-lease-time 1200;
> max-lease-time 9200;
> option subnet-mask 255.255.255.0;
> option broadcast-address 192.168.2.255;
> option routers 192.168.2.1;
> option domain-name-servers 192.168.2.1, 1.2.3.4ISPDNSSERVER;
> option domain-name "workgroup.local";
> option netbios-name-servers 192.168.2.1;
> subnet 192.168.2.0 netmask 255.255.255.0 {
> range 192.168.2.100 192.168.2.199;
> }
>
> but i dont know how to set it up properly :(
> i couldnt find anything on google or so either...
> has anyone tried to use dhcpd with 2 nics yet? any tutorials, guides or
> howtos?



Reply With Quote
  #3 (permalink)  
Old 10-22-2003
Raqueeb Hassan
 
Posts: n/a
Default Re: dhcpd and two network interfaces

thats a real trouble ..... even if you run dhcpd with 2 interfaces ...


#/etc/rc.d/init.d/dhcpd eth1
it will run ....

then ....
#/etc/rc.d/init.d/dhcpd eth2
it will complain that there's another dhcpd running ... there's
something missing/should be done in pid file handling .... i guess.

raqueeb hassan
bunia, DRC
Reply With Quote
  #4 (permalink)  
Old 10-23-2003
Sachin
 
Posts: n/a
Default Re: dhcpd and two network interfaces

Try to make one nic as fixed ip address and make one as dhcp client
that will get the ip address from the the

eg. Make eth0 as dhcp nic that will listen to dhcpd.

and make eth1 will take ip lease from eth0
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:37 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0