LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   dhcpd not working properly (https://www.linuxquestions.org/questions/linux-networking-3/dhcpd-not-working-properly-353577/)

bwarsh 08-15-2005 04:04 PM

dhcpd not working properly
 
OK, this is going to be a little long winded, but this is somewhat of a complicated setup. Here goes. I need to build a DHCP server to provide several buildings with automatic IP addressing. Each building is within it's own VLAN, but is also part of the same domain. There are cisco switches in each building, and all are configured to point DHCP requests to my dhcp server.
However, when I am connected to these VLANs, I am completely unable to obtain an IP address. If i manually configure and IP, netmask, and gateway, I can get out fine, so I know my VLAN configurations are correct.

I have my dhcp configuration as follows:
Code:

#dhcpd.conf
option subnet-mask 255.255.254.0;
option domain-name "my.domain";
option domain-name-servers ns1 ns2;
option netbios-name-servers ns1;
allow client-updates;
authoritative ;
allow unknown-clients;
use-host-decl-names on;
max-lease-time 10518975;
ddns-update-style none;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

default-lease-time 10518975;
class "foo" {
  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
}

shared-network my.domain.name {
  authoritative ;
  allow client-updates;
  allow unknown-clients;
  ddns-updates on;
  ddns-domainname "my.domain.name";
               
  subnet xxx.xxx.102.0 netmask 255.255.254.0 {
    option routers xxx.xxx.102.1;
    pool {
      range xxx.xxx.102.80 xxx.xxx.103.249;
    }
  }
  subnet xxx.xxx.82.0 netmask 255.255.254.0 {
    option routers xxx.xxx.82.1;
    ddns-updates on;
    range xxx.xxx.82.55 xxx.xxx.82.65;
    pool {
      range xxx.xxx.82.80 xxx.xxx.83.249;
    }
  }
               
  subnet xxx.xxx.126.0 netmask 255.255.254.0 {
    option routers xxx.xxx.126.1;
    pool {
      range xxx.xxx.126.80 xxx.xxx.127.249;
    }
  }
               
  subnet xxx.xxx.140.0 netmask 255.255.254.0 {
    option routers xxx.xxx.140.1;
    pool {
      range xxx.xxx.140.80 xxx.xxx.141.249;
    }
  }
       
  subnet xxx.xxx.144.0 netmask 255.255.254.0 {
    option routers xxx.xxx.144.1;
    pool {
      range xxx.xxx.144.80 xxx.xxx.145.249;
    }
  }
               
  subnet xxx.xxx.146.0 netmask 255.255.254.0 {
    option routers xxx.xxx.146.1;
    pool {
      range xxx.xxx.146.80 xxx.xxx.147.249;
    }
  }
               
  subnet xxx.xxx.148.0 netmask 255.255.254.0 {
    option subnet-mask 255.255.254.0;
    option domain-name-servers xxx.xxx.12.20, 128.143.2.7;
    option domain-name "";
    option routers xxx.xxx.148.1;
    pool {
      range xxx.xxx.148.80 xxx.xxx.149.249;
    }
  }
               
  subnet xxx.xxx.152.0 netmask 255.255.254.0 {
    option routers xxx.xxx.152.1;
    pool {
      range xxx.xxx.152.80 xxx.xxx.153.249;
    }
  }
               
  subnet xxx.xxx.30.0 netmask 255.255.254.0 {
    option routers xxx.xxx.30.1;
    pool {
      range xxx.xxx.30.80 xxx.xxx.31.249;
    }
  }
               
  subnet xxx.xxx.40.0 netmask 255.255.254.0 {
    option routers xxx.xxx.40.1;
    pool {
      range xxx.xxx.40.80 xxx.xxx.41.249;
    }
  }
               
  subnet xxx.xxx.48.0 netmask 255.255.254.0 {
    option routers xxx.xxx.48.1;
    pool {
      range xxx.xxx.48.80 xxx.xxx.49.249;
    }
  }
               
  subnet xxx.xxx.56.0 netmask 255.255.254.0 {
    option routers xxx.xxx.56.1;
    pool {
      range xxx.xxx.56.80 xxx.xxx.57.249;
    }
  }
        # eth0
        subnet xxx.xxx.6.102 netmask 255.255.255.255 {
                range xxx.xxx.6.102;
                }
}
subnet xxx.xxx.84.0 netmask 255.255.254.0 {
        option routers xxx.xxx.84.1;
        range xxx.xxx.84.80 xxx.xxx.85.254;
        }

               
  subnet xxx.xxx.152.0 netmask 255.255.254.0 {
    option routers xxx.xxx.152.1;
    pool {
      range xxx.xxx.152.80 xxx.xxx.153.249;
    }
  }
               
  subnet xxx.xxx.30.0 netmask 255.255.254.0 {
    option routers xxx.xxx.30.1;
    pool {
      range xxx.xxx.30.80 xxx.xxx.31.249;
    }
  }
               
  subnet xxx.xxx.40.0 netmask 255.255.254.0 {
    option routers 150.175.40.1;
    pool {
      range xxx.xxx.40.80 xxx.xxx.41.249;
    }
  }
               
  subnet xxx.xxx.48.0 netmask 255.255.254.0 {
    option routers xxx.xxx.48.1;
    pool {
      range xxx.xxx.48.80 xxx.xxx.49.249;
    }
  }
               
  subnet xxx.xxx.56.0 netmask 255.255.254.0 {
    option routers xxx.xxx.56.1;
    pool {
      range xxx.xxx.56.80 xxx.xxx.57.249;
    }
  }
        # eth0
        subnet xxx.xxx.6.102 netmask 255.255.255.255 {
                range xxx.xxx.6.102;
                }
}
subnet xxx.xxx.84.0 netmask 255.255.254.0 {
        option routers xxx.xxx.84.1;
        range xxx.xxx.84.80 xxx.xxx.85.254;
        }

When I start the dhcpd service, I can get the following out of my syslog:
Code:

Aug 15 13:11:19 hostname dhcpd: Wrote 0 leases to leases file.
Aug 15 13:11:19 hostname dhcpd: Listening on Socket/eth0/my.domain.com
Aug 15 13:11:19 hostname dhcpd: Sending on  Socket/eth0/my.domain.com
Aug 15 13:11:19 hostname dhcpd: Sending on  Socket/fallback/fallback-net

The my.domain.com part is somewhat confusing to me, as when it is not the hostname of the server, however when I ping that address it resolves to the IP of the DHCP server, which is, incidently, the DNS server as well.

The other part I'm not 100 percent sure about is the eth0 declaration in my dhcpd.conf file... I wasn't able to start dhcpd without a declaring the subnet my server resides in. Incedently, I also will not be providing DHCP services to the subnet that the server actually resides in. Will this be a problem?

I have tested and can reach ports 67/68 UDP, but NOT TCP from the subnets I am trying to provide dynamic addressing to.

I am becoming extremely pressed for time here, so ANY help you guys can give will be greatly appreciated. And yes, I've googled it, and looking in all my O'Reilly books, and read the man pages! :-)

Thanks in advance,

Brian

fragos 08-15-2005 04:24 PM

I don't have a solution but I do have information. All implementations of DCHP are not created equal. I've come across devices that I had to configure with static IP. A simple example is that I use DCHP on my wireless Netgear router that works fine with SuSE. My Palm Zire 71 however could never get an address from the router. Given that I knew what address would be assigned, I configured my Palm with static IPs. All works well in this limited case anyway.

The second point I would like to make is that Cisco doesn't always adhear to standards. Their market penetration makes them the defacto standard. They are IMHO arrogant about standards. For example, their HDLC is different than the standard and equipment can require a configuration parameter to work with their routers. I can't speak to DCHP on Cisco but would't be surprised if it was a little different.


All times are GMT -5. The time now is 06:05 PM.