LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   dhcp server configueation (https://www.linuxquestions.org/questions/linux-server-73/dhcp-server-configueation-575588/)

soroccoheaven 08-08-2007 06:02 AM

dhcp server configueation
 
hi,
I have configured DHCP on mandriva and having a doubt about the config.
As there is nothing about the ethernet which will act as dhcp server (provide IP )
Say ..i am having two NIC one with 192.168.2.2 static IP, for Internet access and other in with 192.168.3.1 static IP and using IP forwarding ..now when i configured the dhcp server which eth is going to serve as dhcp ?..i am using 192.168.3.0/24 network in my dhcpp.conf
with 192.168.3.1 as default gateway and using my ISP's dns .
( This is because i am getting following messages in my var/log/messages ..

Aug 8 16:26:33 server1 dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Aug 8 16:26:33 server1 dhcpd: Wrote 0 deleted host decls to leases file.
Aug 8 16:26:33 server1 dhcpd: Wrote 0 new dynamic host decls to leases file.
Aug 8 16:26:33 server1 dhcpd: Wrote 0 leases to leases file.
Aug 8 16:26:33 server1 dhcpd:
Aug 8 16:26:33 server1 dhcpd: No subnet declaration for eth0 (192.168.2.2).
Aug 8 16:26:33 server1 dhcpd: ** Ignoring requests on eth0. If this is not what
Aug 8 16:26:33 server1 dhcpd: you want, please write a subnet declaration
Aug 8 16:26:33 server1 dhcpd: in your dhcpd.conf file for the network segment
Aug 8 16:26:33 server1 dhcpd: to which interface eth0 is attached. **
Aug 8 16:26:33 server1 dhcpd:
[root@server1 ~]#

As you can see it is asking subnet for eth0 but eth0 is connected to my access-point for internet access..eth1 is the ethernet which should delever the IP's to the pc's connected to the switch.
pls. advice.

bathory 08-08-2007 06:26 AM

You can use
Code:

/usr/sbin/dhcpd eth1
so dhcpd uses only eth1.
You may also edit your dhcpd startup script accordingly.

soroccoheaven 08-08-2007 06:37 AM

Quote:

Originally Posted by bathory
You can use
Code:

/usr/sbin/dhcpd eth1
so dhcpd uses only eth1.
You may also edit your dhcpd startup script accordingly.

i am not able to understand will you pls make it little clear ..

bathory 08-08-2007 07:14 AM

I'm, not familiar with Mandriva startup scripts, but I guess there are under /etc/init.d, or /etc/rc.d.
For testing, stop the service and run manually the command I gave you. If that works, kill the dhcpd daemon and then look there for a file named dhcpd or similar in the above locations and edit it (after making a backup first) so the line that contains "/usr/sbin/dhcpd" becomes "/usr/sbin/dhcpd eth1"

TylerD75 08-08-2007 07:30 AM

I believe that warning is only informational.
What it means is that the dhcp server will NOT give out IPs to requests from the internet side (on the external interface).
So it shouldn't be a problem ;)

From what I could understand your internet access is through eth0? (with ip 192.168.2.2)
The declaration of the external net (192.168.2.0) has no subnetmask defined in the dhcpd.conf, and thus has no idea of what broadcast address to use.
So the log message just states that it can not use eth0 for distributing ips (which is what you want, from what I can understand).

soroccoheaven 08-08-2007 11:56 AM

Quote:

Originally Posted by TylerD75
I believe that warning is only informational.
What it means is that the dhcp server will NOT give out IPs to requests from the internet side (on the external interface).
So it shouldn't be a problem ;)


From what I could understand your internet access is through eth0? (with ip 192.168.2.2)
The declaration of the external net (192.168.2.0) has no subnetmask defined in the dhcpd.conf, and thus has no idea of what broadcast address to use.
So the log message just states that it can not use eth0 for distributing ips (which is what you want, from what I can understand).

thaks to TylerD75 and bathory
Yeah.. you are right but when i gave subnet declaration for 192.168.2.0 networkin dhcp.conf (for testing only ) but i was getting the same error ....
i am not getting it right now ..any way my dhcp is working now ..i am geting IP from it no more prob..

Thanks


All times are GMT -5. The time now is 04:13 AM.