LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-28-2007, 06:24 AM   #1
dianarani
Member
 
Registered: May 2007
Posts: 63

Rep: Reputation: 15
problem withdhcp in rhel4


Hello,
i am configured my server with dhcp.I am having error on subnet declaration.Could anyone help me on this task?
 
Old 07-28-2007, 06:53 AM   #2
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
could you please post your daemons config file as well as the error it turns out when executing?
 
Old 07-30-2007, 04:02 AM   #3
dianarani
Member
 
Registered: May 2007
Posts: 63

Original Poster
Rep: Reputation: 15
Hello ichrispa,
Thanks for your reply.
First of all i need to about the basic requirements for DHCP server configuration.
1)what ip should ba given for router option in dhcpd.conf?public or private?
2)is it essential to give ddns-update-style?interim or ht-doc?
3)what should given for dns server?
4)i have configured dhcp and the service is started but dhcpclients can't access net? they get ip address of my range.....but i din't find any details in my/var/lib/dhcp/dhcpclient-leases file.........
Please help me to configure this.
Thanks,
Diana.K.
 
Old 07-30-2007, 05:32 AM   #4
suhas!
Member
 
Registered: Mar 2007
Posts: 100

Rep: Reputation: 17
Hi, I can give you answer to your following question.

1)what ip should ba given for router option in dhcpd.conf?public or private?

Ans : The router IP address is nothing but the IP that client machine should use as their Default Gateway. It must be an internal IP address of your router where your local LAN resides.


3)what should given for dns server?

Ans : If your network has the DNS server, then that you have to specify in dns server option. So that client will obtain the Proffered and Alternate DNS servers automatically. If your network does not have one, you dont need to care about dns servers option.

4)i have configured dhcp and the service is started but dhcpclients can't access net? they get ip address of my range.....but i din't find any details in my/var/lib/dhcp/dhcpclient-leases file.........

Ans : the lease file is normally /var/lib/dhcp/dhcpd.leases on your server. If there is no entry about your lease, you may have a look at ipconfig /all command on client. See what is the IP address of the dhcp server who provided the IP.

And about your second question, even I am not sure. I will be glad to know it from anybody else.
 
Old 07-30-2007, 03:26 PM   #5
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
First of all I will suppose that you are running ISC dhcpd.

Quote:
2)is it essential to give ddns-update-style?interim or ht-doc?
2) ddns update is a method aimed at dns servers that change their IP's. let's say that you are running a dns server on a different host then that which you dhcp daemon runs on. now let's suppose that this dns server has no static ip, i.e. he gets a new IP at every IP refresh. ddns would inform your clients of that new IP so they can continue to resolve addresses. I suppose that you are using a static dns server or none of your own at all. hence this option should not be necessary ->

ddns-update-style=none

Quote:
3)what should given for dns server?
3) There are two options, depending on your network structure. usually your ISP will be running a couple of static DNS servers. These are the default option if you are running an LAN.
The second option is that your dhcp server is running on a cooperate network which offers its own intranet web services. In that case, there is a dns server present inside your network which you should define. You can also define both as a comma separated list.
This is not a parameter, this is an option, hence the syntax would look like:

option domain-name-servers IP1, IP2, IP3,...;

This is not part of the actual job of the dhcp server (i.e. handing out IPs to clients). consider it a bonus of modern software engineering.
Quote:
4)i have configured dhcp and the service is started but dhcpclients can't access net? they get ip address of my range.....but i din't find any details in my/var/lib/dhcp/dhcpclient-leases file.........

4) This indicates a problem. first of all you will have to find out whether the dhcpd is even running or has quietly shut down. do a "netstat -natup". this will list which programs have associated which address : port locally to which remote address : port using what protocol. You are looking for a program using UDP on port 67, that's dhcpd. If it does not show up, there is no server.

If the server is running execute "dhclient <interface>". this will run the dhcp client in the forground (not as server). it should exit after sending one or several DHCP_DISCOVER, REQUEST and ACCEPTS by displaying the IP. If it continuously sends DISCOVERs it indicates that the dhcps is not answering.

Did this help?

Last edited by ichrispa; 07-30-2007 at 03:29 PM.
 
Old 08-01-2007, 01:35 AM   #6
dianarani
Member
 
Registered: May 2007
Posts: 63

Original Poster
Rep: Reputation: 15
Hi everybody,
First of all my heartly thanks to suhas and ichrispa.
I need one more detail, I have configured my /etc/dhcpd.conf,

#######################/etc/dhcpd.conf/##############################################
ddns-update-style none;
subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.2 10.0.0.100;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
# --- default gateway
option routers x.x.x.x(router ip);
option subnet-mask 255.255.255.248;


option domain-name-servers x.x.x.x(statis dns ip);

option time-offset -18000; # Eastern Standard Time


default-lease-time 21600;
max-lease-time 43200;

}
#####################################################################################

All the client is getting ip from my server but clients can't access net.do you any suspicions on it.
2) Can't my server get the first ip of my specified range dynamically as such in windows? Should i give static ip to my server?

Thanks,
Diana.K.
 
Old 08-01-2007, 11:20 AM   #7
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
I would highly advise that you assign a static IP to your server (at least the gateway and dns servers, dhcp answers by itself since DHCP_DISCOVER is a UDP broadcast).

In order to assign static IP's to a host, you need to add the following line to your config file:

host hostname {
hardware ethernet yourhostsMACaddress;
fixed-address Desired IP address;
}


I suggest you assign 10.0.0.1 to your server. you can get the mac address of your server be doing a "ifconfig -a". Please note that if your server is acting as a router, you have to pick the ethernet or token-ring interface responsible for you ethernet.
 
Old 08-03-2007, 04:21 AM   #8
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Rep: Reputation: 30
Quote:
Originally Posted by dianarani
Hi everybody,
First of all my heartly thanks to suhas and ichrispa.
I need one more detail, I have configured my /etc/dhcpd.conf,

#######################/etc/dhcpd.conf/##############################################
ddns-update-style none;
subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.2 10.0.0.100;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
# --- default gateway
option routers x.x.x.x(router ip);
option subnet-mask 255.255.255.248;


option domain-name-servers x.x.x.x(statis dns ip);

option time-offset -18000; # Eastern Standard Time


default-lease-time 21600;
max-lease-time 43200;

}
#####################################################################################

All the client is getting ip from my server but clients can't access net.do you any suspicions on it.
2) Can't my server get the first ip of my specified range dynamically as such in windows? Should i give static ip to my server?

Thanks,
Diana.K.
what i am thinking umm..
are you using 2 NIC ?.. if so just change your your option routers x.x.x.x(Ip of the fist ethernet)and it work ..
 
  


Reply



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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL4 bonding problem sc425000 Linux - Networking 4 07-15-2009 11:59 PM
Sendmail problem in RHEL4 vedang Linux - Enterprise 0 06-20-2007 01:22 AM
RHEL4 /etc/hosts problem wfaulk Red Hat 3 06-07-2007 08:54 PM
remote backup from RHEL4 to another RHEL4? dkgoalie Linux - Newbie 2 10-27-2006 11:14 PM
RHEL4 up2date problem gireesha_ks Linux - Enterprise 2 06-15-2006 08:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration