LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-22-2006, 04:48 AM   #1
_ AsiF
Member
 
Registered: Nov 2006
Location: Malaysia
Posts: 47

Rep: Reputation: 15
Dhcp Dhcp


Greetingz..

I'm trying to allocate one PC as DHCP server (Running Fedora 1). In the configuration file, i put subnet is 192.16.0.0 and netmask is 255.255.0.0

This machines ip is : 192.16.71.1

And range is from 192.16.71.2 to 192.16.71.5

Other two PC in the network is also on Fedora.

But nothing is happening and the other two PC's getting their ip from main server.

I also provided the workgroup name in the configuration file. this workgroup name is same for all other PC in the whole network starting ip with 192.----. We've another workgroup having starting ip 172.-----

i configured the NIC's of other two PCs to get information from DHCP server i set up, I also provided the hostname (though they say optional). What is the correct way to tell the other two PC to get information from my DHCP server. I've started the service several times after making any change using : service dhcpd restart, and all seems fine here.

But no improvement. What to do now? what is the rules for assigning subnet and netmast, and how they are related. What should i do in this situation?

Plz help. Thx.

Last edited by _ AsiF; 11-22-2006 at 04:49 AM.
 
Old 11-22-2006, 08:52 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
I think there are some tings you don't understand about DHCP. You should have only one server per sub-net. What happens when a host doesn't have an IP address, it broadcasts a request for a DHCP server to issue an IP address. This is done with the MAC address. The first server to see the request will issue an IP address from its pool, assuming it has one available.

The mask you are using is a class B mask, and the subnet is a class C subnet. A mask of 255.255.255.0 ( you could mask bits in the forth octet also ) would be correct.

Host name, work group name have nothing to do with this process.

If you define a static IP address on a failing machine, can you ping the DHCP server you are trying to get going?
 
Old 11-22-2006, 08:11 PM   #3
_ AsiF
Member
 
Registered: Nov 2006
Location: Malaysia
Posts: 47

Original Poster
Rep: Reputation: 15
Ya i've pinged and it is OK, I also reconfigured the subnet mask. But nothing's happening, the other two PC still getting there IP from main server. This is my dhcp.conf file:

**
ddns-update-style none;
ignore client-updates;

subnet 172.16.0.0 netmask 255.255.0.0 {

# --- default gateway
option routers 172.16.100.6;
option subnet-mask 255.255.255.0;

option nis-domain "domain.org";
option domain-name "Mshome";
option domain-name-servers 202.188.0.133;

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

range dynamic-bootp 172.16.0.2 172.16.0.5;
default-lease-time 21600;
max-lease-time 43200;

# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
}
**

What is the problem? IP of the dhcp server is : 172.16.119.99

Also how to instruct the other two PC to get the information from the DHCP? I mean where should i put the DHCP machine name or it's ip in the dhcp client machine?

Last edited by _ AsiF; 11-22-2006 at 08:29 PM.
 
Old 11-23-2006, 09:02 AM   #4
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
First of all, let me correct someting I said earlier, that is incorrect.

Your original mask is O.K. although that is not your problem. A mask of 255.255.0.0 is a standard class B address, and you are using private class B addresses here. This quote explains this.

Quote:
Network class Usable range of first byte values (decimal)
A 1 to 126
B 128 to 191
C 192 to 254


There are also special addresses that are reserved for 'unconnected' networks - that is networks that use IP but are not connected to the Internet, These addresses are:-

One A Class Network
10.0.0.0
16 B Class Networks
172.16.0.0 - 172.31.0.0
256 C Class Networks 192.168.0.0 - 192.168.255.0
Keep in mind the mask does not have to be 255.255.0.0, you can choose to mask off bits in octet 3 and 4, if you wanted to, to allow for more sub-neting.

I don't see anyting wrong with your definition file. There may be, but I don't see it.

The things you need to be sure about, are the machines that you want to use this DHCP server on the same lan segment? You can not have routers or bridges separating the requester and the DHCP server. There is no IP address, until the rquest is serviced, and that is what is not working.

Second thing, from what you have said, there is another DHCP server on this network, and some machines get an IP form it. There should be only one, uless you are trying to do some load balancing. If you are offering many more addresses, athan there are machines, it is quite possible the other server is servicing the requests first. To test that theory, could you shut down the other DHCP server and test only the this one? If it works, you will know it is the other server that is filling the requests first.
 
Old 11-23-2006, 09:32 PM   #5
_ AsiF
Member
 
Registered: Nov 2006
Location: Malaysia
Posts: 47

Original Poster
Rep: Reputation: 15
Dear Camorri!!!

I've tried altering the DHCP ip to 172.16.0.2 and also changed the range accordingly. But no improvement. I shut down the DHCP, and the other 2 PCs still getting their ip from the main server.

Ours is mainly a college network whre i'm trying to setup a linux machine as server. But all my 3 PC's are also connected to the main network.

The only thing i see is now completely disconnect all these PC's from the main network and setup a private one using switch.

Anyways, thx for all your comments.

 
Old 11-24-2006, 08:34 AM   #6
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
If you are in a colledge environment, I would guess you don't have dircet control over the cabling. I would bet you have a router or a bridge separating the machines you are trying to get to use your DHCP server. A private separate net should work. You could also try and get in touch with the people who do the cabling and discuss the issue with them.
 
  


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
How To know if a host configured with DHCP has obtained IP address from DHCP server? Prassanta SUSE / openSUSE 1 06-29-2006 09:48 AM
eth0 ip assigned by dhcp , how would i know the ip address of the dhcp server where.. kublador Linux - Networking 14 05-16-2006 06:33 AM
ADSL DHCP A-OK, but Mandrake 10.1 to be DHCP for other subnet is a problem turnbui Linux - Networking 2 08-20-2005 09:34 AM
why DHCP client not sending own host name in DHCP request packet? sonika_singhi Linux - Networking 7 05-28-2005 05:18 AM
XP Pro Build 2600/sp1 v.1105 DHCP Client to Redhat 8.0 DHCP Server - Problems atomant Linux - Networking 5 06-28-2003 11:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:05 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