0

I'm trying to break my network into different subnets.

Server is located into 192.168.15.0/24 subnet.

I have the following declaration in my dhcp.conf:

subnet 192.168.15.0 netmask 255.255.255.0 {

range 192.168.15.100  192.168.15.250;   
option routers 192.168.15.236; 

};

When I'm trying to change it to another range:

subnet 192.168.14.0 netmask 255.255.255.0 {

range 192.168.14.100  192.168.14.250;   
option routers 192.168.15.236; 

};

No addresses are allocated. Even if I'm trying to create fixed address:

host mee-laptop {

   hardware ethernet 10:(..);
   fixed-address 192.168.14.115;

}

Server won't assign this address to my computer.

I tried to created virtual interface in 192.168.14.0/24 subnet, but it didn't help.

Also, when I'm setting my computer address manually it works and I'm able to access 192.168.15.0/24 network as well as 192.168.14.0/24 network, but when I'm creating server virtual interface with address in 14.0/24 network again I'm not able to reach server and other networks from my computer.

UPDATE:

My /etc/networking/interfaces file:

auto lo
iface lo inet loopback

auto eth0
        iface eth0 inet static
        address 192.168.15.236
        netmask 255.255.0.0
        #broadcast 192.168.240.127
        gateway 192.168.15.254

auth eth0.2
iface eth0.2 inet static
        address 192.168.14.1
        netmask 255.255.255.0
        vlan-raw-device eth0

Here is a part of dhcpd.log with information about my interface:

Feb 13 14:26:52 mario dhcpd: uid lease 192.168.15.101 for client 7c:c3:a1:a7:54:c3 is duplicate on 192.168.15.0/24
Feb 13 14:26:52 mario dhcpd: DHCPREQUEST for 192.168.15.98 from 7c:c3:a1:a7:54:c3 via eth0
Feb 13 14:26:52 mario dhcpd: DHCPACK on 192.168.15.98 to 7c:c3:a1:a7:54:c3 via eth0

And here is what's going on in tcpdump:

14:29:21.498248 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 7c:c3:a1:a7:54:c3, length 300
14:29:21.498469 IP 192.168.15.236.67 > 192.168.15.98.68: BOOTP/DHCP, Reply, length 300
  • Can you clarify if your 14 and 15 networks are on the same physical network without any router between them ? – Bertrand SCHITS Feb 13 '14 at 10:29
  • @BertrandSCHITS same physical network, but there is a media converter and router between my computer and server. – Mee Feb 13 '14 at 10:30
0

This should be a comment asking for more information but i don't have enough rep to do that :-/

You should add details of your network interfaces on the server (ifconfig output) and possibly add the output of /var/log/dhcpd.log (or whatever configuration file you use). You can get information on how to do that on http://prefetch.net/articles/iscdhcpd.html

Dhcpd doesn't give addresses if it hasn't an interface binded to that subnet. It gives an error like

No subnet declaration for eth0 (no IPv4 addresses).
dhcpd: ** Ignoring requests on eth0.  If this is not what
dhcpd:    you want, please write a subnet declaration
dhcpd:    in your dhcpd.conf file for the network segment
dhcpd:    to which interface eth0 is attached. **

Tcpdump of dhcp negotiation will be useful as well to debug the problem.

  • thanks! I've updated my post with details. Maybe I should remove my host from subnet pool then? – Mee Feb 13 '14 at 12:30
  • 1
    Double check if you really want netmask 255.255.0.0 in eth0 configuration. I think it collides with the alias on 192.168.14.0/24 – Andrea Feb 13 '14 at 12:58
  • thanks, unfortunately that didn't help. What's strange now, that DHCP assigns me address reserved for another mac address. – Mee Feb 13 '14 at 14:06
0

I am not fully sure what you are trying to achieve. I can see two possibilities:

  1. You have TWO subnets with router in between and want to have ONE DHCP server responsible for IP address assignement. In this case you likely should have a look at dhcprelay (which is also a part of isc-dhcp) or so called "ip helper" or "dhcp helper" on a switch / router.
  2. You want two SHARE single physical network segment between TWO subnets. In this case you have to put both subnets in shared-network statement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.