LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 09-12-2008, 03:58 AM   #1
a2brute
Member
 
Registered: Feb 2005
Location: State of Denial
Distribution: (X/K)Ubuntu for desktop/laptop, DSL for old machines, Debian for Servers.
Posts: 36

Rep: Reputation: 15
Question Unable to get debian + dhcpd to work.


This is a long explanation, but I figured I should give as many details as possible.

I installed Debian 4.0 on an old Celeron 700 MHz system with 2 PCI NICs. I installed dchp3-server and configured the /etc/dhcp3/dhcpd.conf file as follows..

Quote:
ddns-update-style none;

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

subnet 192.168.37.0 netmask 255.255.255.0 {
range 192.168.37.20 192.168.37.254;
option domain-name "intra-landings.pbr-net.com";
option broadcast-address 192.168.37.255;
option routers 192.168.37.1;
option domain-name-servers 192.168.37.1;
}
I then configured /etc/default/dhcp3-server as follows...

Quote:
INTERFACES="eth1"
/etc/network/interfaces reads as follows...

Quote:
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
address 192.168.37.1
netmask 255.255.255.0
My purpose is to build a router. Eth0 is supposed to get an address via DHCP from my 192.168.0.0 subnet, and eth1 is supposed to hand out IP addresses to computers on the 192.168.37.0 subnet.

Eth0 works just fine. It receives an address just fine and I can ping outside addresses. However, even though the output of "ifconfig eth1" is;

Quote:
eth1 Link encap:Ethernet HWaddr 00:A0:CC:33:79:62
inet addr:192.168.37.1 Bcast:192.168.37.255 Mask:255.255.255.0
inet6 addr: fe80::2a0:ccff:fe33:7962/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:6 dropped:0 overruns:0 carrier:12
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:10 Base address:0xe800
...it does not seem to receive any connections from the computers I hook up to it. None of the lights come on, on that NIC, when I plug a computer into it. The DHCP server gives no errors after running "/etc/init.d/dhcp3-server start" yet no computers can receive an address from it. When I run "tcpdump -vvv -n -s 2000 -i eth1" I get no output whatsoever. Also, if I change the /etc/network/interfaces file to the following;

Quote:
auto lo
iface lo inet loopback

auto eth0
iface eth1 inet static
address 192.168.37.1
netmask 255.255.255.0

auto eth1
iface eth0 inet dhcp
...and then bind dchpd to eth0 instead of eth1, the problem reverses. Then I get no lights on eth0 but eth1 works just fine.

So I know the hardware of both NICs is working. The dhcp server will not function on either one though. And whichever one I set to a static IP does not seem to receive any packets.

Perhaps someone can see where I've gone wrong in my setup. Any help is greatly appreciated.
 
Old 09-12-2008, 05:50 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Uh - if you're connecting computer-to-computer, are you sure you're using a "crossover" cable? If you're not, the lights won't even come on. Most modern switches are somewhat intelligent and reconfigure themselves so it doesn't matter what type of cable you use, but most computer NICs are set to work one way only.
 
Old 09-12-2008, 12:10 PM   #3
a2brute
Member
 
Registered: Feb 2005
Location: State of Denial
Distribution: (X/K)Ubuntu for desktop/laptop, DSL for old machines, Debian for Servers.
Posts: 36

Original Poster
Rep: Reputation: 15
Well... I am currently trying to decide between hemlock and cyanide, because clearly I am too stupid to live.

I can't believe I was up till 3am last night analyzing and editing configuration files when I know darn well I can't use a patch cable to go directly between two computers.

Thanks so much for pointing that out, as there's no telling how long I would have wracked my brain before realizing that.

I hooked the router up to a switch, and then the test computer to the switch, and everything worked right off.

Thanks again.
 
  


Reply



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
DHCPd not seeming to work... GeekMasterFlash Linux - Networking 2 07-31-2006 06:39 AM
debian dhcpd? nonnormman Linux - Networking 1 05-28-2006 10:06 PM
dhcpd.conf (Unable to boot Kernel) Eileen Linux - Networking 3 11-16-2004 09:13 AM
dhcpd (server) doesn't work !!! exalik Mandriva 1 09-03-2003 04:44 AM
DHCPD unable to get Ip info from my router Photon Linux - Networking 6 02-09-2002 04:21 PM

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

All times are GMT -5. The time now is 10:50 AM.

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