Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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?
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:
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?
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.