| Ubuntu This forum is for the discussion of Ubuntu Linux. |
| 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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
08-25-2011, 04:56 PM
|
#1
|
|
LQ Newbie
Registered: Jul 2011
Distribution: Slackware 13.37, Ubuntu Server 10.4.3, Ubuntu 10.4
Posts: 18
Rep: 
|
setting up dhcp3-server 10.04.4
trying to set up a dhcp server along with files and web but right now it wont even share a connection...
here is my ifconfig...
eth0 Link encap:Ethernet HWaddr 00:50:45:01:08:ba
inet addr:66.189.112.57 Bcast:255.255.255.255 Mask:255.255.252.0
inet6 addr: fe80::250:45ff:fe01:8ba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7613 errors:0 dropped:0 overruns:0 frame:0
TX packets:1814 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2500624 (2.5 MB) TX bytes:206021 (206.0 KB)
Interrupt:27
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:190 errors:0 dropped:0 overruns:0 frame:0
TX packets:190 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:24703 (24.7 KB) TX bytes:24703 (24.7 KB)
notice that eth1 is not listed it no longer has an address or subnet assigned to it .. trying to start over again...
i also dont understand what address should be assigned to eth1 honestly.
ok i first used dhcp3-server, with these settings in the dncpd.conf file ...
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name “yourdomainname.com”;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.200;
}
i used "mine.org" for the domain name cuz i really dont have one i guess.
i set eth1 to
sudo ifconfig eth1 broadcast 192.168.1.255 netmask 255.255.255.0
and i got it to give out ip addresses that did nothing lol.
the route -n had the gateway at 0.0.0.0
|
|
|
|
08-26-2011, 02:52 AM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,823
|
Fix one issue at a time. If eth1 is down then fix that as it is obviously nothing to do with.dhcpd in the slightest. Why do you care about broadcast addresses? There is no need to specify it.
The router address in etc dhcpd.conf needs to be within the subnet declaration for obvious reasons.
|
|
|
|
08-28-2011, 05:05 PM
|
#3
|
|
LQ Newbie
Registered: Jul 2011
Distribution: Slackware 13.37, Ubuntu Server 10.4.3, Ubuntu 10.4
Posts: 18
Original Poster
Rep: 
|
so i dont have to set a broadcast addy for eth1, and this ... option routers 192.168.1.254 needs to be with in the range of ip's ....
|
|
|
|
08-30-2011, 03:27 AM
|
#4
|
|
LQ Newbie
Registered: Jul 2011
Distribution: Slackware 13.37, Ubuntu Server 10.4.3, Ubuntu 10.4
Posts: 18
Original Poster
Rep: 
|
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway "my ip here"
|
|
|
|
08-31-2011, 03:55 PM
|
#5
|
|
LQ Newbie
Registered: Jul 2011
Distribution: Slackware 13.37, Ubuntu Server 10.4.3, Ubuntu 10.4
Posts: 18
Original Poster
Rep: 
|
ok i fixed the eth1 issue now it still gives out ip's that have no connection
|
|
|
|
08-31-2011, 04:29 PM
|
#6
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,823
|
An ip that has no connection?? That makes no sense at all. Something is missing / wrong in the lease data? What is it?
|
|
|
|
08-31-2011, 04:46 PM
|
#7
|
|
LQ Newbie
Registered: Jul 2011
Distribution: Slackware 13.37, Ubuntu Server 10.4.3, Ubuntu 10.4
Posts: 18
Original Poster
Rep: 
|
its gives out ip's that dont connet to the interweb...
heres the newest configuration info..
...route -n
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.252.0 U 0 0 0 eth1
66.189.112.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0
0.0.0.0 66.189.112.1 0.0.0.0 UG 100 0 0 eth0
..the dhcpd.conf
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.200;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domian-name "mine.org";
option routers 192.168.1.254;
option broadcast-address 192.168.1.255;
default-lease-time 600;
max-lease-time 7200;
}
..here is the /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 66.189.114.152
..and finally my ifconfig....
eth0 Link encap:Ethernet HWaddr 00:50:45:01:08:ba
net addr:66.189.114.152 Bcast:255.255.255.255 Mask:255.255.252.0
inet6 addr: fe80::250:45ff:fe01:8ba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7613 errors:0 dropped:0 overruns:0 frame:0
TX packets:1814 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2500624 (2.5 MB) TX bytes:206021 (206.0 KB)
Interrupt:27
eth1 Link encap:Ethernet HWaddr 00:50:45:01:08:bb
inet addr:192.168.1.2 Bcast:192.168.0.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0 MB) TX bytes:0 (0 KB)
Interrupt:27
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:190 errors:0 dropped:0 overruns:0 frame:0
TX packets:190 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:24703 (24.7 KB) TX bytes:24703 (24.7 KB)
|
|
|
|
08-31-2011, 05:06 PM
|
#8
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,823
|
IP addresses don't "connect " to anything. Systems with correctly configured interfaces and routing tables do. Sorry to sound pedantic but it does matter.
You have different subnet masks on that network. Some are 255.255.252.0 others are 255.255.255.0.
You need to actually look at a client configuration in the wild, not just server side files.
Last edited by acid_kewpie; 08-31-2011 at 05:08 PM.
|
|
|
|
08-31-2011, 05:12 PM
|
#9
|
|
LQ Newbie
Registered: Jul 2011
Distribution: Slackware 13.37, Ubuntu Server 10.4.3, Ubuntu 10.4
Posts: 18
Original Poster
Rep: 
|
At least your actually telling me where to look. I'm guessing as I go anyways. Ya the ip and mask from the modem is 255.255.252.0 so I'm guessing they all need to match that?
|
|
|
|
09-01-2011, 02:42 AM
|
#10
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,823
|
you don't just "guess", you need to understand. Ultimately they need to be *correct* not just the same. your local subnet is very very likely to need to be a /24, so 255.255.255.0 but you should know this already. You also need to look at a client and see how it's configured after receiving a lease, including looking at it's actual lease file, in somewhere like /var/lib/dhcp/leases, i forget what it's normally called.
Last edited by acid_kewpie; 09-01-2011 at 02:44 AM.
|
|
|
|
09-01-2011, 01:28 PM
|
#11
|
|
LQ Newbie
Registered: Jul 2011
Distribution: Slackware 13.37, Ubuntu Server 10.4.3, Ubuntu 10.4
Posts: 18
Original Poster
Rep: 
|
lease from server...
lease {
interface "eth0";
fixed-address 66.189.114.152;
option subnet-mask 255.255.252.0;
option time-offset -14400;
option routers 66.189.112.1;
option dhcp-lease-time 3600;
option dhcp-message-type 5;
option domain-name-servers 66.189.0.100,24.159.64.23,24.247.24.53;
option dhcp-server-identifier 68.114.38.40;
option interface-mtu 576;
option broadcast-address 255.255.255.255;
option host-name "server";
renew 4 2011/09/01 18:24:43;
rebind 4 2011/09/01 18:52:43;
expire 4 2011/09/01 19:00:13;
}
lease info from one "client"
lease {
interface "eth0";
fixed-address 192.168.1.11;
option subnet-mask 255.255.255.0;
option routers 192.168.1.254;
option dhcp-lease-time 600;
option dhcp-message-type 5;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option dhcp-server-identifier 192.168.1.5;
option broadcast-address 192.168.1.255;
option domain-name "mine.org;
renew 4 2011/09/01 18:19:14;
rebind 4 2011/09/01 18:23:12;
expire 4 2011/09/01 18:24:27;
}
i also dont know if this matters but...running traceroute on my ip returns this...
66-189-114-152.dhcp.oxfr.ma.charter.com (66.189.114.152)
it makes me wonder about the .dhcp. and if that would matter or not. and why when i have just the wireless router plugged in to the modem i get a completely different ip in its settings..
24-181-230-86.dhcp.oxfr.ma.charter.com.
if i could understand why's and how's this would be a lot easier. but the online guide and my server book dont troubleshoot this problem .....
|
|
|
|
09-01-2011, 02:04 PM
|
#12
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,823
|
ok, so what is 192.168.1.254?
|
|
|
|
09-01-2011, 02:07 PM
|
#13
|
|
LQ Newbie
Registered: Jul 2011
Distribution: Slackware 13.37, Ubuntu Server 10.4.3, Ubuntu 10.4
Posts: 18
Original Poster
Rep: 
|
an ip for a "router" from what i understand, the router being the server?
|
|
|
|
09-01-2011, 02:10 PM
|
#14
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,823
|
from what you understand? you're giving out an IP address, you clearly need to know what that IP address is don't you? I get the impression it doesn't even exist... What is 192.168.1.1 if the dhcp server is 192.168.1.2? That option needs to be whatever the router IP on that subnet is. That's the default gateway.
|
|
|
|
09-01-2011, 02:20 PM
|
#15
|
|
LQ Newbie
Registered: Jul 2011
Distribution: Slackware 13.37, Ubuntu Server 10.4.3, Ubuntu 10.4
Posts: 18
Original Poster
Rep: 
|
ok then, i am starting to see, slowly. 192.168.1.254 should actually be the eth1 ip address right?
Quote:
|
"What is 192.168.1.1 if the dhcp server is 192.168.1.2?"
|
option domain-name-servers 192.168.1.1, 192.168.1.2;
should read
option domain-name-servers 192.168.1.2, 192.168.1. ?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:23 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
|
|