problem with configuring dhcpd for "unknown" networks

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with configuring dhcpd for "unknown" networks

Boris Behrens
Hi,
I would like to run a dhcpd behind a dhcp relay. And it does not have any address from the network it should serve.
These are the dhcp and network config:
--
# cat /etc/dhcp/dhcpd.conf
local-address 10.200.200.31;
subnet 10.200.200.31 netmask 255.255.255.255 {
  # I thought this one would help, but it doesn't
}

authoritative;
option domain-name "example.com";
option domain-name-servers ns01.example.com;

default-lease-time 3600; #  1 std
max-lease-time 86400;    # 24 std

log-facility local7;

subnet 10.20.0.0 netmask 255.255.128.0 {
  range 10.20.0.1 10.20.127.250;
  option domain-name "users.example.com";
  option routers 10.20.127.254;
  option broadcast-address 10.20.127.255;
  default-lease-time 3600; #  1 std
  max-lease-time 86400;    # 24 std
}
--
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default
    link/void
    inet 127.0.0.1/32 scope host venet0
       valid_lft forever preferred_lft forever
    inet 10.10.10.31/32 brd 10.10.10.31 scope global venet0:0
       valid_lft forever preferred_lft forever
--
But I always the the error "Not configured to listen on any interfaces!".

How do I tell the dhcpd to just listen to the interface and serve dhcp requests without giving it an address in this network?

Cheers
 Boris

--
Die Selbsthilfegruppe "UTF-8-Probleme" trifft sich diesmal abweichend im groüen Saal.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: problem with configuring dhcpd for "unknown" networks

perl-list
You need to have:

subnet 10.10.10.31 netmask 255.255.255.255 {
}

in your config.  That, obtusely, tells the server to listen on that interface.  Not sure where you came up with the 10.200.200.31 address - i don't see that listed in your network config anywhere.


From: "Boris Behrens" <[hidden email]>
To: "Users of ISC DHCP" <[hidden email]>
Sent: Wednesday, February 20, 2019 9:02:58 AM
Subject: problem with configuring dhcpd for "unknown" networks
Hi,
I would like to run a dhcpd behind a dhcp relay. And it does not have any address from the network it should serve.
These are the dhcp and network config:
--
# cat /etc/dhcp/dhcpd.conf
local-address 10.200.200.31;
subnet 10.200.200.31 netmask 255.255.255.255 {
  # I thought this one would help, but it doesn't
}

authoritative;
option domain-name "example.com";
option domain-name-servers ns01.example.com;

default-lease-time 3600; #  1 std
max-lease-time 86400;    # 24 std

log-facility local7;

subnet 10.20.0.0 netmask 255.255.128.0 {
  range 10.20.0.1 10.20.127.250;
  option domain-name "users.example.com";
  option routers 10.20.127.254;
  option broadcast-address 10.20.127.255;
  default-lease-time 3600; #  1 std
  max-lease-time 86400;    # 24 std
}
--
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default
    link/void
    inet 127.0.0.1/32 scope host venet0
       valid_lft forever preferred_lft forever
    inet 10.10.10.31/32 brd 10.10.10.31 scope global venet0:0
       valid_lft forever preferred_lft forever
--
But I always the the error "Not configured to listen on any interfaces!".

How do I tell the dhcpd to just listen to the interface and serve dhcp requests without giving it an address in this network?

Cheers
 Boris

--
Die Selbsthilfegruppe "UTF-8-Probleme" trifft sich diesmal abweichend im groüen Saal.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: problem with configuring dhcpd for "unknown" networks

Boris Behrens
Hi,

On Wed, Feb 20, 2019 at 3:17 PM perl-list <[hidden email]> wrote:
You need to have:

subnet 10.10.10.31 netmask 255.255.255.255 {
}
Well it is there. I have no clue why I wrote 10.200.200.31 in the mail, but I have exactly THIS in line 2 and 3 in the config.
 

in your config.  That, obtusely, tells the server to listen on that interface.  Not sure where you came up with the 10.200.200.31 address - i don't see that listed in your network config anywhere.

Cheers
 Boris 

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: problem with configuring dhcpd for "unknown" networks

Boris Behrens
We managed to work it out. The problem is the virtual ethernet from the openvz software.
We need to bridge it. I thought we could just use the dhcpd like a webserver which just serves answers.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: problem with configuring dhcpd for "unknown" networks

Simon Hobson
Boris Behrens <[hidden email]> wrote:

> I thought we could just use the dhcpd like a webserver which just serves answers.

You can - provided you have a relay agent on the client network.

The server must have an IP address in it's own network(s), and there must be IP routing between client networks and server, and you need a subnet declaration for each served network.
There is no requirement for teh DHCP server to have an interface in every network it serves.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: problem with configuring dhcpd for "unknown" networks

Boris Behrens


On Wed, Feb 20, 2019 at 10:47 PM Simon Hobson <[hidden email]> wrote:

You can - provided you have a relay agent on the client network.

The server must have an IP address in it's own network(s), and there must be IP routing between client networks and server, and you need a subnet declaration for each served network.
There is no requirement for teh DHCP server to have an interface in every network it serves.

Yes, but I get another error with "unknow interface type 65565" when I use the default virtual ethernet from openvz. I need an bridge interface to bind it, BUT this interface does not need to be connected and it doesn't even need a usable ip address.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: problem with configuring dhcpd for 'unknown' networks

glenn.satchell
Hi Boris,

The dhcp relay *only* relays broadcast requests from a local subnet to the
dhcp server. All other unicast traffic, eg ack, renew, etc, messages must
be able to route to the IP address of the dhcp service.

So make sure you can, for example, ping the dhcp IP address from a device
on the network where your dhcp clients will be. I'm thinking the /32
address is not looking like it is routable to the dhcp server when it
starts.

regards,
-glenn

On Thu, February 21, 2019 9:27 am, Boris Behrens wrote:

> On Wed, Feb 20, 2019 at 10:47 PM Simon Hobson <[hidden email]>
> wrote:
>
>
>>
>> You can - provided you have a relay agent on the client network.
>>
>>
>> The server must have an IP address in it's own network(s), and there
>> must be IP routing between client networks and server, and you need a
>> subnet declaration for each served network. There is no requirement for
>> teh DHCP server to have an interface in every network it serves.
>>
>> Yes, but I get another error with "unknow interface type 65565" when I
>> use
> the default virtual ethernet from openvz. I need an bridge interface to
> bind it, BUT this interface does not need to be connected and it doesn't
> even need a usable ip address.
> _______________________________________________
> dhcp-users mailing list [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
>


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users