Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-30-2012, 07:09 AM
|
#1
|
LQ Newbie
Registered: Apr 2012
Posts: 2
Rep: 
|
Having problems with DHCP config
i'm currently in a Linux server class. installed & configured DHCP, the config file is as follows:
subnet 10.1.1.20 netmask 255.255.255.0 {
range 10.1.1.150 10.1.1.250;
option routers 10.1.1.254;
option domain-name-servers 10.1.1.10, 10.1.1.20;
option domain-name "cpt161-02-04.local";
default-lease-time 518400;
max-lease-time 691200;
}
When I restart the service, I keep getting the output "bad subnet number/mask combination. That is the ip address and subnet mask of the server I installed DHCP on so I don't understand the problem. Help plz?
Last edited by daigle.ne; 04-30-2012 at 07:28 AM.
|
|
|
04-30-2012, 07:34 AM
|
#2
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep: 
|
Change
Code:
subnet 10.1.1.20 netmask 255.255.255.0
To this and try
Code:
subnet 10.1.1.0 netmask 255.255.255.0
|
|
1 members found this post helpful.
|
04-30-2012, 07:37 AM
|
#3
|
Member
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190
Rep:
|
you are using wrong network and subnet mask. you should use a network mask in SUBNET field not a actual IP address.
#RIGHT
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.150 10.1.1.250;
#WRONG
subnet 10.1.1.20 netmask 255.255.255.0 {
range 10.1.1.150 10.1.1.250;
Thanks,
em31amit
Amit M.
|
|
1 members found this post helpful.
|
04-30-2012, 07:38 AM
|
#4
|
LQ Newbie
Registered: Apr 2012
Posts: 2
Original Poster
Rep: 
|
I actually just tried that before you posted. It seem to work when I restart the service, but when I go to my client and issue the command "sudo dhclient eth0" i get no output, so I can't verify my configurations worked.
|
|
|
04-30-2012, 07:41 AM
|
#5
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep: 
|
Check if your client got the network information from the server.
|
|
|
04-30-2012, 07:46 AM
|
#6
|
Member
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190
Rep:
|
check what your client and server /var/log/messages file saying ....
|
|
|
04-30-2012, 07:55 AM
|
#7
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep: 
|
Also check the dhcpd.leases file located usually in /etc. If you do not find it, search for the file. It should contain all the leases the server has given to the clients.
|
|
|
All times are GMT -5. The time now is 01:27 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|