LinuxQuestions.org
Visit Jeremy's Blog.
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 07-28-2006, 01:17 PM   #1
Tangshan
LQ Newbie
 
Registered: Jul 2006
Posts: 1

Rep: Reputation: 0
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:2B3
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!
 
Old 07-29-2006, 09:53 AM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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. ^_^;
 
Old 07-31-2006, 11:52 PM   #3
sal_paradise42
Member
 
Registered: Jul 2003
Location: Utah
Distribution: Gentoo FreeBSD 5.4
Posts: 150

Rep: Reputation: 16
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Home network: connecting to a Linksys router for DHCP IP address - no ping gunther Linux - Networking 28 05-20-2005 10:14 PM
Lynksys router, no DHCP. Have to use IP manualy, some one give me low down. RHLinuxGUY Linux - Networking 1 07-08-2004 02:16 AM
Home network using linksys router -- DHCP server? GoinEasy9 Linux - General 12 04-01-2004 11:32 PM
Questions around a home webserver DHCP and using Linux as Router hiplainsdrifter Linux - Networking 23 03-25-2004 03:29 PM
Debian Router/DHCP retiqlum Linux - Networking 0 01-30-2004 01:42 PM

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

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