LinuxQuestions.org
Review your favorite Linux distribution.
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 12-22-2003, 05:23 PM   #1
spony
LQ Newbie
 
Registered: Dec 2003
Distribution: Debian (kernel 2.4.22)
Posts: 11

Rep: Reputation: 0
Question Linux machine as DHCP server


I'm trying to install a DHCP Server (DHCPd) on my debian linux machine (kernel 2.4.22). My setup is a cable internet connection fed into one ethernet port (eth0) on my linux machine, a cross-cable from my second ethernet port (dummy0, called it this during linux installation i think) to a mac.

When I try to start the Server i get the following:

Code:
spony:/# dhcpd dummy0
Internet Software Consortium DHCP Server 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit ... (Don't have 5 points)

No subnet declaration for dummy0 (0.0.0.0).
Please write a subnet declaration in your dhcpd.conf file for the
network segment to which interface dummy0 is attached.
exiting.
But the wierd thing is, ifconfig says this:

Code:
dummy0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          inet addr:192.168.1.5  Bcast:192.168.254.255  Mask:255.255.255.0
          UP BROADCAST RUNNING NOARP  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:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

eth0      Link encap:Ethernet  HWaddr 00:04:61:4E:3F:63
          inet addr:62.107.12.251  Bcast:62.107.31.255  Mask:255.255.224.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12140 errors:0 dropped:0 overruns:0 frame:0
          TX packets:687 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:1048163 (1023.5 KiB)  TX bytes:103222 (100.8 KiB)
          Interrupt:11

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:56 errors:0 dropped:0 overruns:0 frame:0
          TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3640 (3.5 KiB)  TX bytes:3640 (3.5 KiB)
Which according to the documentation means that both dummy0 and eth0 are active and running. Also I think it's rather strange that the hardware address on dummy0 is: "HWaddr 00:00:00:00:00:00". Both these ethernet ports are integrated into the motherboard so they should have the same hardware address?

Here is how i have edited /etc/network/interfaces:

Code:
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
auto eth0
iface eth0 inet dhcp

# Second network card - assign static ip to enable local dhcp server

auto dummy0
iface dummy0 inet static
address 192.168.1.5
netmask 255.255.255.0
broadcast 192.168.254.255
gateway 192.168.254.255
Likewise here is my /etc/dhcpd.conf:

Code:
#
# Sample configuration file for ISC dhcpd for Debian
#
# $Id: dhcpd.conf,v 1.4.2.2 2002/07/10 03:50:33 peloy Exp $
#

# option definitions common to all supported networks...
option domain-name "spony.net";
option domain-name-servers 192.168.1.1;

default-lease-time 36000;
max-lease-time 86400;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;

subnet 192.168.1.0 netmask 255.255.255.0 {
   range 192.168.1.10 192.168.1.100;
}

subnet 192.168.36.0 netmask 255.255.255.0 {
   deny booting;
}
These 2 files should be correct in my opinion, but i'm a newbie so maybe not. This might also be of interest, I see this in /var/log/syslog:

Code:
Dec 22 22:45:42 spony kernel: 8139too Fast Ethernet driver 0.9.26
Dec 22 22:45:42 spony kernel: eth0: RealTek RTL8139 Fast Ethernet at 0xe0800000, 00:04:61:4e:3f:63, IRQ 11
Dec 22 22:45:42 spony kernel: eth0:  Identified 8139 chip type 'RTL-8139C'
But no mention of dummy0.

Thanks in advance guys, I've been google'ing all day with no succes.

 
Old 12-22-2003, 09:09 PM   #2
enyawix
Member
 
Registered: Sep 2003
Location: ky
Distribution: gentoo
Posts: 409

Rep: Reputation: 32
Lightbulb dhcp server

You do not need the dummy device. I like to use webmin to setup me dhcp server it is fast and easy.
 
Old 12-22-2003, 09:59 PM   #3
spony
LQ Newbie
 
Registered: Dec 2003
Distribution: Debian (kernel 2.4.22)
Posts: 11

Original Poster
Rep: Reputation: 0
Yes I've realised the dummy device has nothing to do with a second ethernet controller. Unfortunatly my setup still requires a second ethernet controller and ifconfig still shows I only have one operating even though there are two hardwired into my EPOX motherboard.

At this point I think the problem may be that the kernel was built with only one type of ethernet controller (they are both realtek ethernet controllers) and so it only expects that I have one during setup.

So I've tried to follow the steps in the debian.org HOWTO under "Linux Ethernet-Howto" concerning "2.4 Using More than one Ethernet Card per Machine". I've gone as far as compiling a new kernel loading the realtek driver as a modual, but no luck. The other option was telling lilo explicitly that it must look for two ethernet cards.

Here are the corrections to "/etc/modules.conf" per the modules solution:

Code:
alias eth0 8139too
alias eth1 8139too
options 8139too io=0x3FG,0x2FG
I'm really not sure these are the hex adresses of the 2 ethernet cards. How do you figure out what these addresses are for sure?

Here are the corrections to "lilo.conf" per the installed in kernel solution:

Code:
append="ether=0,0,eth1"
Neither of the two corrections made any differance. I'm really at a loss here.

Thanks for the pointer about webmin, once i get that far it'll be handy.

 
Old 12-23-2003, 07:46 AM   #4
spony
LQ Newbie
 
Registered: Dec 2003
Distribution: Debian (kernel 2.4.22)
Posts: 11

Original Poster
Rep: Reputation: 0
Well I've finnaly solved my eth1 problem. Despite what the epox manual says i infact have 2 differant types of ethernet controllers.

lspci gave me this:
Code:
spony:/home/spony# lspci
00:00.0 Host bridge: nVidia Corporation nForce2 AGP (different version?) (rev c1)
00:00.1 RAM memory: nVidia Corporation nForce2 Memory Controller 1 (rev c1)
00:00.2 RAM memory: nVidia Corporation nForce2 Memory Controller 4 (rev c1)
00:00.3 RAM memory: nVidia Corporation nForce2 Memory Controller 3 (rev c1)
00:00.4 RAM memory: nVidia Corporation nForce2 Memory Controller 2 (rev c1)
00:00.5 RAM memory: nVidia Corporation nForce2 Memory Controller 5 (rev c1)
00:01.0 ISA bridge: nVidia Corporation nForce2 ISA Bridge (rev a4)
00:01.1 SMBus: nVidia Corporation nForce2 SMBus (MCP) (rev a2)
00:02.0 USB Controller: nVidia Corporation nForce2 USB Controller (rev a4)
00:02.1 USB Controller: nVidia Corporation nForce2 USB Controller (rev a4)
00:02.2 USB Controller: nVidia Corporation nForce2 USB Controller (rev a4)
00:04.0 Ethernet controller: nVidia Corporation nForce2 Ethernet Controller (rev a1)
00:06.0 Multimedia audio controller: nVidia Corporation nForce2 AC97 Audio Controler (MCP) (rev a1)
00:08.0 PCI bridge: nVidia Corporation nForce2 External PCI Bridge (rev a3)
00:09.0 IDE interface: nVidia Corporation nForce2 IDE (rev a2)
00:1e.0 PCI bridge: nVidia Corporation nForce2 AGP (rev c1)
01:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
01:0d.0 FireWire (IEEE 1394): Lucent Microelectronics FW323 (rev 61)
02:00.0 VGA compatible controller: nVidia Corporation: Unknown device 0314 (rev a1)
So the other controller is a "nVidia Corporation nForce2 Ethernet Controller (rev a1)". Damn frustraighting to discover this after a day or so of troubleshooting.

The driver is not included with debian so I compiled it from source and installed as a module, corrected /etc/module.conf and it works.

ifconfig now gives me this:

Code:
spony:/home/spony# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:04:61:4E:3F:63
          inet addr:62.107.12.251  Bcast:62.107.31.255  Mask:255.255.224.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:30839 errors:0 dropped:0 overruns:0 frame:0
          TX packets:878 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:2281976 (2.1 MiB)  TX bytes:127206 (124.2 KiB)
          Interrupt:11

eth1      Link encap:Ethernet  HWaddr 00:04:61:AA:AA:AA
          inet addr:192.168.1.5  Bcast:192.168.254.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:158 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:18634 (18.1 KiB)  TX bytes:1836 (1.7 KiB)
          Interrupt:5

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:57 errors:0 dropped:0 overruns:0 frame:0
          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3716 (3.6 KiB)  TX bytes:3716 (3.6 KiB)
Have no idea why dummy0 is now down but then again i'm not really missing it

Started dhcp on eth1 at bootup by editing this file /etc/default/dhcp

Code:
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/dhcp by the maintainer scripts

#
# This is a POSIX shell fragment
#

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#	Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth1"
and now dhcp days this :

Code:
spony:/etc/default# dhcpd -f
Internet Software Consortium DHCP Server 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit http://www.isc.org/dhcp-contrib.html

Listening on LPF/eth1/00:04:61:aa:aa:aa/192.168.1.0
Sending on   LPF/eth1/00:04:61:aa:aa:aa/192.168.1.0
No subnet declaration for eth0 (62.107.12.251).
Please write a subnet declaration in your dhcpd.conf file for the
network segment to which interface eth0 is attached.
exiting.
So all in all total success. Unfortunately not quite since my mac is issued a local ip from the DHCPd server but can't seem to get on the internet. Anyone know what i've done wrong, missing?

Hope this thread helps someone else out - spony
 
Old 12-23-2003, 08:47 AM   #5
enyawix
Member
 
Registered: Sep 2003
Location: ky
Distribution: gentoo
Posts: 409

Rep: Reputation: 32
COOL

Now you can try webmin
 
  


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
Linux DHCP server joperami Linux - Networking 3 05-17-2005 10:34 AM
how do i view linux server on my windows machine? fogurt Linux - Newbie 1 05-12-2004 11:21 PM
Configuration DHCP and Gateway on linux machine zowey Linux - Networking 4 04-03-2004 02:17 PM
Can i turn my linux machine into an adsl server? Barneythelegend Linux - General 1 03-08-2004 06:11 AM
Redhat Linux server not getting ip comcast dhcp server munisp Linux - Networking 1 03-24-2003 12:26 PM

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

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