LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   subneting + dhcp3 (http://www.linuxquestions.org/questions/linux-networking-3/subneting-dhcp3-630561/)

sudoku 03-25-2008 01:54 PM

subneting + dhcp3
 
1st of all

One big HELLO to all and each of every member of this comunity (aka 1st post)

now here i go with my problem:

To put it on a slammer scale.. lets say i have like ... 3 machines

- 1 debian4 (server ;) )
- 2 winxp (clients)

i want to use 3 subnets
- 1 for servers
- 2 for separate networks


so here i go

dhcp.conf:

PHP Code:

server-identifier 192.168.5.1;

ddns-update-style none;

autoritative;

log-facility local7;

option domain-name-servers 193.231.236.30;
option routers 192.168.5.1;

### 00:0c:29:29:19:e3
#00:0c:29:35:9b:88
#00:0c:29:54:ad:36

### ### ###

class "srvs" {
match option dhcp-client-identifier;
# lease limit 2;
}

class 
"wm1" {
match option dhcp-client-identifier;
# lease limit 2;
}

class 
"wm2" {
match option dhcp-client-identifier;
# lease limit 2;
}

subclass "srvs" 1:00:0c:29:29:19:e3;

subclass "wm1" 1:00:0c:29:35:9b:88;

subclass "wm2" 1:00:0c:29:54:ad:36;

shared-network s-b-t-{

subnet 192.168.5.0 netmask 255.255.255.224 # s
option broadcast-address 192.168.2.31;
default-
lease-time 120;
max-lease-time 120;
}

subnet 192.168.5.32 netmask 255.255.255.224 # b
option broadcast-address 192.168.2.63;
default-
lease-time 120;
max-lease-time 120;
}

subnet 192.168.5.64 netmask 255.255.255.224 # f
option broadcast-address 192.168.2.95;
default-
lease-time 120;
max-lease-time 120;
}

pool {
range 192.168.5.1 192.168.5.30;
allow members of "srvs";
deny members of "wm1";
deny members of "wm2";
deny unknown-clients;
}

pool {
range 192.168.5.33 192.168.5.62;
allow members of "srvs";
allow members of "wm1";
deny members of "wm2";
deny unknown-clients;
}

pool {
range 192.168.5.65 192.168.5.94;
allow members of "srvs";
deny members of "wm1";
allow members of "wm2";
deny unknown-clients;
}


syslog

PHP Code:

debianTST:~# tail -n 20 /var/log/syslog
Mar 13 01:46:42 debianTST dhcpdCopyright 2004-2006 Internet Systems Consortium.
Mar 13 01:46:42 debianTST dhcpdAll rights reserved.
Mar 13 01:46:42 debianTST dhcpd: For infoplease visit ]
Mar 13 01:46:42 debianTST dhcpdInternet Systems Consortium DHCP Server V3.0.4
Mar 13 01
:46:42 debianTST dhcpdCopyright 2004-2006 Internet Systems Consortium.
Mar 13 01:46:42 debianTST dhcpdAll rights reserved.
Mar 13 01:46:42 debianTST dhcpd: For infoplease visit 
Mar 13 01
:47:15 debianTST dhcpdInternet Systems Consortium DHCP Server V3.0.4
Mar 13 01
:47:15 debianTST dhcpdCopyright 2004-2006 Internet Systems Consortium.
Mar 13 01:47:15 debianTST dhcpdAll rights reserved.
Mar 13 01:47:15 debianTST dhcpd: For infoplease visit 
Mar 13 01
:47:15 debianTST dhcpdInternet Systems Consortium DHCP Server V3.0.4
Mar 13 01
:47:15 debianTST dhcpdCopyright 2004-2006 Internet Systems Consortium.
Mar 13 01:47:15 debianTST dhcpdAll rights reserved.
Mar 13 01:47:15 debianTST dhcpd: For infoplease visit 
Mar 13 01
:47:15 debianTST dhcpdInternet Systems Consortium DHCP Server V3.0.4
Mar 13 01
:47:15 debianTST dhcpdCopyright 2004-2006 Internet Systems Consortium.
Mar 13 01:47:15 debianTST dhcpdAll rights reserved.
Mar 13 01:47:15 debianTST dhcpd: For infoplease visit 
Mar 13 01
:47:15 debianTST dhcpdWrote 0 leases to leases file.
debianTST:~

dhcp.leases

PHP Code:

debianTST:~# tail -n 20 /var/lib/dhcp3/dhcpd.leases
# All times in this file are in UTC (GMT), not your local timezone. This is
# not a bug, so please don't ask about it. There is no portable way to
# store leases in the local timezone, so please don't request this as a
# feature. If this is inconvenient or confusing to you, we sincerely
# apologize. Seriously, though - don't ask.
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-V3.0.4

debianTST:~


/etc/network/interfaces

PHP Code:

DebWM:~# tail -n 20 /etc/network/interfaces
iface eth0 inet static
        
address 192.168.1.10
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
        
# dns-* options are implemented by the reseolconf package, if installed
        
dns-nameserver 193.231.236.30

# The secodary eth
auto eth1
#iface eth1 inet dhcp
iface eth1 inet static
        
address 192.168.5.1
        netmask 255.255.255.224
        network 192.168.5.0
        broadcast 192.168.5.31
        
#gateway 192.168.1.1
        # dns-* options are implemented by the reseolconf package, if installed
        #dns-nameserver 193.231.236.30
DebWM:~


in all this text somethin is wrong for sure.. couse my clients would not take ip's unless i tell the conf file that i want to allow unknowwn-clients;

si mi mind suspects the class/subclass syntax of being uncomplete somehow..

i am sincerly expecting replyes..

10x in advance..

acid_kewpie 03-25-2008 05:51 PM

well you haven't actually listed any known clients. e.g.
Code:

group {
  filename "Xncd19r";
  next-server ncd-booter;

  host ncd1 { hardware ethernet 0:c0:c3:49:2b:57; }
  host ncd4 { hardware ethernet 0:c0:c3:80:fc:32; }
  host ncd8 { hardware ethernet 0:c0:c3:22:46:81; }
}


sudoku 03-28-2008 08:16 AM

10x for youre reply mate, i solved my problem ....
there are known clients defined in the subclass statements.... what is wrong there is that every pool end's with deny unknown clients;, and by default unknown clients are denied.. so.. that statement should be erased and everyting works well.. i have to test alltough is some machine is staticaly setted with an ip from one of the pools how the subnet rescts...

tnx again.. good luck

acid_kewpie 03-28-2008 08:27 AM

huh? that makes no sense... what else did you think "deny unknown clients" meant??

sudoku 03-29-2008 12:29 PM

Quote:

Originally Posted by acid_kewpie (Post 3103067)
huh? that makes no sense... what else did you think "deny known clients" meant??


when i think at clients from classes i think of them like they are known clients...

unknown clients i think that theyarn't defined anywhere... .. so...

acid_kewpie 03-29-2008 01:32 PM

heh, managed to miss the "un" out there in "unknown"... kinda critical typo methinks...

fdelval 06-23-2010 02:15 PM

is it necessary to connect each lan to a separated interface, or can you connect all pc's to the same router?

acid_kewpie 06-23-2010 03:03 PM

I don't understand what you're asking there. If you have different subnets then you either need to listen directly on each subnet or have a DHCP relay agent on each subnet if they are not directly connected.


All times are GMT -5. The time now is 04:42 PM.