LinuxQuestions.org
Review your favorite Linux distribution.
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 05-11-2010, 07:21 AM   #1
dpeterson3
Member
 
Registered: Jun 2008
Distribution: Debian
Posts: 157

Rep: Reputation: 16
DHCP3 Not handing out leases


I set up a DHCP server for the robotics lab at school. The machine is running Ubuntu Lucid amd64. I have 5 subnets as per the original network. I have two problems with the setup.

Problem 1: I have several machines I am filtering by MAC address that can recieve a DHCP address just fine. Nothing else will take an address.

Problem 2: The machines that will take an address can not access the internet. I have IP tables forwarding all requests both ways, but still nothing.

Thanks in advance
 
Old 05-11-2010, 12:36 PM   #2
Steviepower
Member
 
Registered: May 2010
Location: Eindhoven
Distribution: ubuntu/debian
Posts: 152

Rep: Reputation: 25
I'm actually having the same problem and I issued some of the problem here: http://www.linuxquestions.org/questi...ubnets-806806/

could you post the output of cat /etc/init.d/dhcp3/dhcp.conf (I accidentally pressed tab 4 times typing this...) and the output of ifconfig?

I'm wondering if you use the allow/deny unknown-clients option and how you do the subnetting. I'm new on IPtables but some people seem to understand the output of iptables-save too so it might come in handy if you post it here too.
 
Old 05-11-2010, 02:50 PM   #3
dpeterson3
Member
 
Registered: Jun 2008
Distribution: Debian
Posts: 157

Original Poster
Rep: Reputation: 16
The cat of my file is rather long. I would just attach the file, but I can't for some reason. I don't know why. Anyway
Code:
#
# Sample configuration file for ISC dhcpd for Debian
#
# Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as
# configuration file instead of this file.
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# option definitions common to all supported networks...

default-lease-time 84000;
max-lease-time 100000;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

# 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;


#subnet 10.0.0.0 netmask 255.255.0.0 {
#}

#LAB constants
subnet 10.0.0.0 netmask 255.255.0.0 {

#no dhcp ranges here
host wireless { 
	hardware ethernet 00:02:6F:34:AC:09;
	fixed-address 10.0.0.2;
	}

host printer {
	hardware ethernet 00:60:B0:CA:7D:FE;
	fixed-address 10.0.0.3;
	}
}

# Lab subnet

subnet 10.0.1.0 netmask 255.255.255.0 {
  range 10.0.1.200 10.0.1.254;
  option broadcast-address 10.0.1.255;
  option routers 10.0.0.1;

#
# Lab network static routes (comptuer that stay in the lab)
#

host sparky {
	hardware ethernet 08:00:20:b7:12:f3;
	fixed-address 10.0.1.1;
	option host-name "sparky";
	}

host aapel {
	hardware ethernet 03:04:05:00:01:02;
	fixed-address 10.0.1.2;
	option host-name "aapel";
	}	

host alien_warez {
	hardware ethernet 00:01:6c:38:8d:98;
	fixed-address 10.0.1.4;
	option host-name "alien";
	}

host doorman {
	hardware ethernet 00:01:03:28:7d:ae;
	fixed-address 10.0.1.5;
	option host-name "doorman";
	}
}

# Aluminator subnet
subnet 10.0.100.0 netmask 255.255.255.0 {

# Aluminator network
#
host black_box {
	hardware ethernet 00:01:02:03:04:05;
	fixed-address 10.0.100.1;
	}
}


#Stereo
subnet 10.0.101.0 netmask 255.255.255.0 {
#
# Stereo Network
#
host curly {
	hardware ethernet 01:02:03:04:05:00;
	fixed-address 10.0.101.1;
	}
}

#Miniprime
subnet 10.0.102.0 netmask 255.255.255.0 {

# Mini-prime network
#
host gum_stix {
	hardware ethernet 02:03:04:05:00:01;
	fixed-address 10.0.102.1;
    }
}



# You can declare a class of clients and then do address allocation
# based on that.   The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

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

#shared-network 224-29 {
#  subnet 10.17.224.0 netmask 255.255.255.0 {
#    option routers rtr-224.example.org;
#  }
#  subnet 10.0.29.0 netmask 255.255.255.0 {
#    option routers rtr-29.example.org;
#  }
#  pool {
#    allow members of "foo";
#    range 10.17.224.10 10.17.224.250;
#  }
#  pool {
#    deny members of "foo";
#    range 10.0.29.10 10.0.29.230;
#  }
#}
Relevant output of ifconfig (no loopback)
Code:
eth0      Link encap:Ethernet  HWaddr 00:80:ad:82:5d:5a  
          inet addr:131.151.8.67  Bcast:131.151.8.255 Mask:255.255.255.0
          inet6 addr: fe80::280:adff:fe82:5d5a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2109915 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2747368 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:515639642 (515.6 MB)  TX bytes:2934657526 (2.9 GB)
          Interrupt:17 Base address:0xcc00 

eth1      Link encap:Ethernet  HWaddr 00:12:3f:3d:6d:55  
          inet addr:10.0.0.1  Bcast:10.0.255.255  Mask:255.255.0.0
          inet6 addr: fe80::212:3fff:fe3d:6d55/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:18289 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1431 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:1749595 (1.7 MB)  TX bytes:587426 (587.4 KB)
I shouldn't have the allow/deny option set. I am starting to wonder if it has something to do with the multiple subnets.


EDIT: Put all my subnets inside a shared network statement and I can now hand out leases. Now I don't know how to allow each subnet to see each other. I think that has to do with subnet masks. That should also allow the clients to see the server as a router.

Last edited by dpeterson3; 05-11-2010 at 03:50 PM. Reason: More Info
 
Old 05-11-2010, 07:06 PM   #4
Steviepower
Member
 
Registered: May 2010
Location: Eindhoven
Distribution: ubuntu/debian
Posts: 152

Rep: Reputation: 25
well putting them in a shared network would solve the first problem. making subnets see eachother should be done by routing all traffic to the gateway of the other subnet.with adapting the mask to 255.0.0.0 it would be possible for all the hosts to see eachother but then you would only have one subnet and I don't think that is what you want.
if you want to make network 10.0.1.0/24 (subnetmask 255.255.255.0 and ipadresses 10.0.1.*) available for the hosts in network 10.0.2.0/24 you should add a route to the gateway of this network for this traffic.
Quote:
route add net 10.0.1.0 netmask 255.255.255.0 10.0.2.1
Here I do assume 10.0.2.1 is the gateway and it's running on the same machine as the default gateway
see: http://www.tcpipguide.com/free/t_IPR...ngTables-2.htm there is a clear explanation there.
and linux specific: http://www.cyberciti.biz/tips/tag/route-add
 
Old 05-12-2010, 12:12 PM   #5
dpeterson3
Member
 
Registered: Jun 2008
Distribution: Debian
Posts: 157

Original Poster
Rep: Reputation: 16
Here is another post I put up no one replied to. It has the break down of the network I need to replicate (I didn't design it. The server had to be rebuilt and I can't find the original configs).

http://ubuntuforums.org/showthread.php?t=1476422

My gateway is 10.0.0.1 according to the original design. I learned last night that the first robot can access the network. Here is the output of route on it.
Code:
robot@Aluminator:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        *               255.255.0.0     U     1      0        0 eth0
10.0.0.0        *               255.255.0.0     U     2      0        0 wlan0
link-local      *               255.255.0.0     U     1000   0        0 eth0
default         lagr-desktop.lo 0.0.0.0         UG    0      0        0 eth0
lagr-desktop is the name of the DHCP server/gateway and it has an IP of 10.0.0.1. I am not sure how that works correctly as I don't have host names configured on this network. All the subnets need to be able to speak to each other, so I think I will leave the netmask as it is. The reason for that is to be able to tell what machine is what.

Last edited by dpeterson3; 05-12-2010 at 12:13 PM.
 
  


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
[SOLVED] DHCP not handing out dns mbostwick Linux - Server 7 10-29-2009 11:03 PM
Wrote 0 leases to leases file - DHCP server lionel.rpm Linux - Server 3 07-22-2009 06:05 PM
DHCP handing out the wrong dns servers PCC Linux - Networking 2 05-17-2007 07:25 PM
Linux is handing gjagadish Linux - Networking 1 10-28-2005 11:54 AM
fetchmail not handing off ryedunn Linux - Software 1 12-21-2004 09:02 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration