[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DHCP for 2 networks



On Tue, 05 Mar 2002 09:47:30 -0600, you wrote:

>First, thanks for the kick in the head Cristian.
>
>Second, Simon, thanks for the help.  In the dhcp init script, does the order
>of the "eth2 eth1" stuff correspond to the order of the subnets in the
>dhcp.conf file?  I.E. In your example eth2 is for 192.168.1.x and eth1 id
>192.168.2.x?
>

The order (eth2 eth1) is IFAIK irrelevant.

IIRC, the order of the subnets in my system is due to

/etc/modutils/aliases which includes...

alias eth0 ng_tulip
alias eth1 ne
alias eth2 natsemi

(run update-modules after editing this file)

Therefore I know what networks are where, due to the fact the NIC's
use separate drivers, and I plug the cables in! With non PnP cards
this also could be achieved. 

However, do you really need to know? If the clients IP is dynamic,
does it matter if their subnet is dynamic too? 

Simon.

>Thanks,
>-Tom
>
>
>On 3/4/02 6:27 PM, "Simon Higgs" <please.use@reply.to> wrote:
>
>> On Mon, 04 Mar 2002 17:45:55 -0600, you wrote:
>> 
>>> I have a Debian firewall that connects my internet connection to my network.
>>> Internet is on eth0.  The network is subdivided into two sections, eth1 a
>>> DMZ for my servers witch is in the 10.10.0.0/24 range, and and eth2 my
>>> protected lab computers in the 10.0.0.0/24 range.
>>> 
>>> I want to install a DHCP server on the firewall to give out addresses to the
>>> two networks, but I am having trouble with the dhcp.conf file.
>> 
>> I have a similar setup [using the ISC server].
>> Modify /etc/init.d/dhcp as below.
>> 
>> _part_ of mine says...
>> 
>> case "$1" in
>>       start)
>>               start-stop-daemon --start --quiet --pidfile $DHCPDPID
>>                       --exec /usr/sbin/dhcpd eth2 eth1
>>               ;;
>>       stop)
>>               start-stop-daemon --stop --quiet --pidfile $DHCPDPID
>>               ;;
>>       restart)
>>               start-stop-daemon --stop --quiet --pidfile $DHCPDPID
>>               sleep 2
>>               start-stop-daemon --start --quiet --pidfile $DHCPDPID
>>                       --exec /usr/sbin/dhcpd eth2 eth1
>>               ;;
>>       *)
>>               echo "Usage: /etc/init.d/dhcp {start|stop|restart}"
>>               exit 1
>> esac
>> 
>> and,just in case,  _part_ of /etc/dhcp.conf says...
>> 
>> subnet 192.168.1.0 netmask 255.255.255.0 {
>> range 192.168.1.10 192.168.1.254;
>> option broadcast-address 192.168.1.255;
>> option routers 192.168.1.1;
>> }
>> 
>> subnet 192.168.2.0 netmask 255.255.255.0 {
>> range 192.168.2.10 192.168.2.254;
>> option broadcast-address 192.168.2.255;
>> option routers 192.168.2.1;
>> }
>> 
>> [Hope this displays correctly....posting from a windows email client]
>> 
>> HTH, Simon.
>
>
>Sent using the Entourage X Test Drive.



Reply to: