Koozali.org: home of the SME Server

dhcp on 2nd internal nic.

john

dhcp on 2nd internal nic.
« on: October 24, 2003, 10:17:50 AM »
I need help enabling dhcp  on the 2nd internal nic. I am able to access  ibays and browse the internet with no problem with pc configured with static ips..

thx in advance
John

Craig

Re: dhcp on 2nd internal nic.
« Reply #1 on: October 26, 2003, 05:14:54 PM »
Do you mean that the second nic needs to get its ip address from dhcp, or do you mean it needs to give to others?

If it needs to give, login to you SME server as admin (either physically or using ssh/telnet, preference to ssh).  The chose option nunber 2 - Configure this server.

One of the options should be to allocate IPs (dhcp) to the clients.

john

Re: dhcp on 2nd internal nic.
« Reply #2 on: October 27, 2003, 05:48:17 PM »
thx for your reply & suggestion.. I need the 3rd nic (eth2) set as second internal lan to  provided dhcp  service to 2nd local networt work .. console can only provide DHCP service to local network throught nic 1 (eth0)

thx
john

Craig

Re: dhcp on 2nd internal nic.
« Reply #3 on: October 27, 2003, 07:04:13 PM »
Now that I understand what you want can you please try the following from the command line (login as root either at the server or using ssh).

Run (change X to you existing internal interface):
/etc/init.d/dhcpd stop
route add -host 255.255.255.255 dev ethX eth2
daemon /usr/sbin/dhcpd ethX eth2

Now try getting in IP address allocated to a pc on both networks.

Let me know the results of this.

Regardless of a failure or success then run:
killproc dhcpd
rm -f /var/lock/subsys/dhcpd
/etc/init.d/dhcpd start

This resets it so that you can continue to give dhcp on your normal interface.

Craig

john

Re: dhcp on 2nd internal nic.
« Reply #4 on: October 28, 2003, 06:17:07 AM »
thx again..
I am encountering problem executing this command line:
route add -host 255.255.255.255 dev ethX eth2

generates --help info..
please let me know if I am missing or typo.

thx
john

Craig

Re: dhcp on 2nd internal nic.
« Reply #5 on: October 28, 2003, 12:14:18 PM »
I wasn't sure 100% that it would work.

Try running them like this then:
route add -host 255.255.255.255 dev ethX
route add -host 255.255.255.255 dev eth2

and see if that fails or works.

Craig

john

Re: dhcp on 2nd internal nic.
« Reply #6 on: October 28, 2003, 04:57:11 PM »
when use command:  daemon /usr/sbin/dhcpd eth0 eth2
I get; bash: daemon command not found

I then use command  /usr/sbin/dhcp eth0 eth2;

I get:
Listening on Socket/eth0/192.168.110.0
Sending on Socket/eth0/192.168.110.0

no subnet declaration for eth2 (192.168.100.1).
Please write a subnet declaration in your dhcpd.conf file for the network segment to which inferace eth2 is attached.
exiting..

your assistance is appreciated in advance.

john

Craig

Re: dhcp on 2nd internal nic.
« Reply #7 on: October 28, 2003, 06:07:28 PM »
Did you run the route command?  That could by why you are getting this error message.

It can't find a route for eth2.

john

Re: dhcp on 2nd internal nic.
« Reply #8 on: October 28, 2003, 06:34:17 PM »
I have already run the route add

How can I add subnet 192.168.100.0 netmask 255.255.255.0  using custom template to /etc/dhcpd.conf.



I check the /etc/dhcpd.conf file
# Addresses from 192.168.110.250 to 192.168.110.250 taken for PPTP sessions

subnet 192.168.110.0 netmask 255.255.255.0
{
        option broadcast-address 192.168.110.255'
        deny bootp;
        option domain-name  "domain.com";
        option domain-name-servers   192.168.110.1;
        default-lease-time                  86400;
        max-lease-time                     604800;


        option subnet-mask              255.255.255.0;
        range       192.168.110.65 192.168.110.249;
        option routers 192.168.110.1;
}




thx again..

john

Re: dhcp on 2nd internal nic.
« Reply #9 on: October 28, 2003, 06:59:27 PM »

Charlie Brady

Re: dhcp on 2nd internal nic.
« Reply #10 on: October 28, 2003, 07:48:36 PM »
john wrote:

> I am encountering problem executing this command line:
> route add -host 255.255.255.255 dev ethX eth2

That's probably not required with the new linux kernels.

Charlie

Charlie Brady

Re: dhcp on 2nd internal nic.
« Reply #11 on: October 28, 2003, 08:11:38 PM »
Craig wrote:
>
> Did you run the route command?  That could by why you are
> getting this error message.

No, the error message is due to lack of a second config file for the second network (which will need to be specified on the dhcpd command line).

C.