LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Debian as home router; dhcp doesnt give out ips (https://www.linuxquestions.org/questions/linux-networking-3/debian-as-home-router%3B-dhcp-doesnt-give-out-ips-468620/)

Tangshan 07-28-2006 01:17 PM

Debian as home router; dhcp doesnt give out ips
 
Hi,

I want to use my debian server as a router for my home network. My debian server is currently behind my sitecom (whatever you do dont buy a sitecom) router, as i have no monitor or keyboard connected to it i try to config it remotely. I pretty much followed the instructions on linux4you.be/netwerken.php?id=2 This website is in dutch so i will write down what i did in english.

I added the following to /etc/network/interfaces:

auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255

apt-get install ipmasq

Should PPP connections recompute the firewall? no
When should ipmasq be started? After network interfaces are brought up

apt-get install dhcp

I added the folowing to /etc/dhcpd.conf

option domain-name "pandora.be";
option domain-name-servers 195.130.130.133, 195.130.131.5;

option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;

option routers 192.168.0.1;

default-lease-time 600;
max-lease-time 7200;

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.2 192.168.0.100;

next i added the following to /etc/default/dhcp

INTERFACES="eth1"

next i restarted dhcp (/etc/init.d/dhcp restart)

My problem is; the server wont give out ips.

As i mentioned before the server is connected to a sitecom router atm therefore i have had to edit the routing table, i dont know if this information is relevant but i will add it anyway.

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
192.168.123.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.123.254 0.0.0.0 UG 0 0 0 eth0

ifconfig:
eth0 Link encap:Ethernet HWaddr 00:02:44:3B:6F:60
inet addr:192.168.123.137 Bcast:192.168.123.255 Mask:255.255.255.0
EtherTalk Phase 2 addr:65280/59
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5019 errors:0 dropped:0 overruns:0 frame:0
TX packets:4124 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:805457 (786.5 KiB) TX bytes:412473 (402.8 KiB)

eth1 Link encap:Ethernet HWaddr 00:10:5A:F8:2B:D3
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:65 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:342 (342.0 b) TX bytes:11995 (11.7 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
EtherTalk Phase 2 addr:0/0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:660 (660.0 b) TX bytes:660 (660.0 b)

The tutorial mentions a couple of files and what they should look like, (linux4you.be/netwerken.php?id=2#files) My files look the same.

I understand you will need more information to help me with this problem. Please tell me wich details you need.

Thanks!

IsaacKuo 07-29-2006 09:53 AM

I'm just a newbie at DHCP server configuration myself, but I'll ask the obvious. Did you remember to restart the DHCP server after editing the config file (with "/etc/init.d/dhcp3-server restart")?

[edit] Oh, nevermind. I didn't read carefully enough. ^_^;

sal_paradise42 07-31-2006 11:52 PM

Is your DHCP server listening to the right port?
Code:

netstat -anp | egrep '67'
If its not, then it may not be running correctly, if its not there, then it could be a problem when starting your server
Code:

tail -f /var/log/messages &
/etc/init.d/dhcp restart

If it is running, maybe there is some issue with the clients, you can try sniffing the line from the server to make sure the request is coming in. During a DHCP-REQUEST:
Code:

tcpdump -vvv -n -s 2000 -i eth1 port bootps
and paste your result sniff here.


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