Find the answer to your Linux question:
Results 1 to 6 of 6
I have been trying, unsuccessfully, to set up DHCP on my Mandrake box to serve my Wintendo machine and a small LAN I have in my apartment block. Here's my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2005
    Location
    Costa Rica
    Posts
    1

    DHCP server with two NICs - not working


    I have been trying, unsuccessfully, to set up DHCP on my Mandrake box to serve my Wintendo machine and a small LAN I have in my apartment block. Here's my setup:

    I have a Pentium IV as my main machine, running Mandrake 9.2. It has two NICs. The first one, eth0, is bound to 192.168.1.3. It is connected to a Linksys router (i.e. its default gateway) on 192.168.1.1. The second NIC, eth1, is bound to 192.168.2.1. Heres what ifconfig says:

    eth0 Link encap:Ethernet HWaddr 00:0F:3D:EB:1B:0D
    inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:1860960 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2123439 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:848275533 (808.9 Mb) TX bytes:212123022 (202.2 Mb)
    Interrupt:11 Base address:0xe800

    eth1 Link encap:Ethernet HWaddr 000:B7:1C:9C:07
    inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:21679 errors:0 dropped:0 overruns:0 frame:0
    TX packets:21474 errors:0 dropped:0 overruns:0 carrier:0
    collisions:1547 txqueuelen:100
    RX bytes:3078578 (2.9 Mb) TX bytes:25830583 (24.6 Mb)
    Interrupt:11 Base address:0x1000

    The scripts for configuring the interfaces (/etc/sysconfig/network-scripts/ifcfg-eth*) look like this:

    eth0:
    DEVICE=eth0
    BOOTPROTO=static
    IPADDR=192.168.1.3
    NETMASK=255.255.255.0
    NETWORK=192.168.1.0
    BROADCAST=192.168.1.255
    ONBOOT=yes
    MII_NOT_SUPPORTED=yes

    eth1:
    DEVICE=eth1
    BOOTPROTO=static
    IPADDR=192.168.2.1
    NETMASK=255.255.255.0
    NETWORK=192.168.2.0
    BROADCAST=192.168.2.255
    ONBOOT=yes
    MII_NOT_SUPPORTED=yes

    IP packet forwarding is enabled in /etc/sysctl.conf: net.ipv4.ip_forward = 1
    The routing table (route -n) looks like this:

    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
    0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0

    My Windows machine is running WinXP SP1 and is connected to the Mandrake box via an old 10BaseT hub I had spare. If I configure the connection manually, it works fine.

    I have installed the DHCP server. I invoke it with dhcpd -d -f eth1. It says:

    Internet Systems Consortium DHCP Server V3.0.1rc14
    Copyright 2004 Internet Systems Consortium.
    All rights reserved.
    For info, please visit http://www.isc.org/sw/dhcp/
    Wrote 0 leases to leases file.
    Listening on LPF/eth1/00:d0:b7:1c:9c:07/192.168.2.0/24
    Sending on LPF/eth1/00:d0:b7:1c:9c:07/192.168.2.0/24
    Sending on Socket/fallback/fallback-net

    Here is my /etc/dhcpd.conf file:

    ddns-update-style interim;

    subnet 192.168.2.0 netmask 255.255.255.0 {
    range 192.168.2.100 192.168.2.150;
    default-lease-time 43200;
    max-lease-time 86400;
    option subnet-mask 255.255.255.0;
    option broadcast-address 192.168.2.255;
    option routers 192.168.2.1;
    option domain-name-servers 196.40.31.66, 196.40.31.67, 196.40.3.10;
    option domain-name "anayancy.net";
    }

    If I switch my WinXP machine to use DHCP, I get absolutely nothing. There is no acknowledgement from the DHCP server that anything has even been sent. I am aware that older configurations sometimes need a static route to know through which interface to send the DHCPOFFER message. I have tried using route add -host 255.255.255.255 dev eth1, to no avail.

    Can anyone tell me what I am doing wrong? Is it the physical network configuration? Am I misunderstanding how broadcast UDP packets are propagated?

  2. #2
    Just Joined!
    Join Date
    Dec 2006
    Posts
    3

    Same problem, would love to know the solution

    I have the same problem, trying to get DHCPD to work. DHCPREQUEST is followed by DHCPOFFER, but then just another DHCPREQUEST from client.

    I have 3 NICS, eth0 for internet, and then eth1 & eth2 for two LAN subnets. I am running Mandriva 2007.

    I have been weeks on this problem, no solution.

  3. #3
    Just Joined! Amano's Avatar
    Join Date
    Dec 2006
    Location
    Montreal, Canada
    Posts
    61
    One solution to these kinds of problems, regardless of the OS you use, is static settings.

    To get your connection working though, you need to contact your ISP to ask for their host IP address. Ask them for two, so you have a backup. You won't have to talk to them again for the rest of your life, btw (I haven't called them in 2 years since).

    Anyway, you go into your network card config, set up your local address (since you're using a router), the subnet mask, and the default gateway. Then, find the field labelled 'host name' or 'DNS server', and enter the IPs from your ISP. Save everything, and there you go.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Dec 2006
    Posts
    3
    Thank you for the reply. The problem is not with the external gateway NIC connected to internet. The problem is configuring the Linux box to be a DHCP server for the other two NICs. I only have I simply can't get DHCPd working. As with the first posting from daggilli, I have dhcpd.conf set up pretty much the same, though with two subnets, one for each internal NIC (eth1 & eth2). I do not set up a range for the external interface (eth0). Eth0 is working fine, i have internet access. My routing table is comparable to daggili's, I have ip_forwarding set, DHCPD loads and is listening, DCHP -d -f (also tcpdump) show that it is up and running and listening. When I connect a client computer and it starts the process of signing up for an IP with the linux DHCP server, the client broadcasts a DCHPREQUEST, followed by the server giving a DHCPOFFER, but then the client just responds with another DHCPREQUEST, like it didn't receive the offer at all.

    I have DCHPCD (client) running on eth0 to get the internet access from the ISP. It doesn't matter if I have that running or not, it doesn't matter if I give eth0 a static IP -- DHCPD still does not work on eth1 & eth2. I thought maybe the problem is the particular hardware I have:
    eth0 is an onboard Intel 82566DM Gigabit controller
    eth1 & eth2 are PCI Intel 82541 gigabit cards. All three use the e1000 driver.

    I have tried switching out eth2 with a different (older) PCI card -- still the same result. I have tried using only eth1, with same result.

    I am at a loss.

  6. #5
    Just Joined! Amano's Avatar
    Join Date
    Dec 2006
    Location
    Montreal, Canada
    Posts
    61
    Try some different drivers. I forget the command line instructions to do it, but you should be able to find a reference to those on this forum (or through google).

  7. #6
    Just Joined!
    Join Date
    Dec 2006
    Posts
    3
    I tried searching for other drivers, but the only one I could come up for the Intel 82566 & 82541 interfaces I have is the "e1000" driver. Perhaps I am not understanding what to look for?

    While scanning different forums, I have come across other situations that also seem to have this same dhcp problem, but never a solution. Those threads are also very old, from 2004-2005. For instance:

    http://mailman.uclinux.org/pipermail...ne/026508.html

    https://lists.sdsc.edu/pipermail/npa...ry/009281.html

    http://content.ix2.net/arc/t-5351.html

    The most interesting thread I found was from Sourceforge back in July '05, but I'm afraid it was way over my head.
    http://sourceforge.net/mailarchive/f...&forum_id=6401

    They talk about this problem I have (in a different context), and fixes for the e1000 driver, but that was around version 5.4.0. I am currently using version 7.3.15 of the driver, so shouldn't that already include all earlier fixes?

    I'm still fairly new to Linux, and a lot of this material is still overwhelming. I know there must be a solution somewhere in all this, but I can't seem to find it.

    Also, is there a better place I should be posting this problem??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •