Send dhcp-users mailing list submissions to dhcp-users@lists.isc.org
To subscribe or unsubscribe via the World Wide Web, visit https://lists.isc.org/mailman/listinfo/dhcp-users or, via email, send a message with subject or body 'help' to dhcp-users-requ...@lists.isc.org You can reach the person managing the list at dhcp-users-ow...@lists.isc.org When replying, please edit your Subject line so it is more specific than "Re: Contents of dhcp-users digest..." Today's Topics: 1. Re: dhcpd v4.4.1 failed to start when built with --enable-use-sockets option (Cathy Almond) 2. cannot get option 160 to work in isc-dhcp-server 4.4.1 (Michael Mears) ---------------------------------------------------------------------- Message: 1 Date: Fri, 17 Jan 2020 19:12:24 +0000 From: Cathy Almond <cat...@isc.org> To: dhcp-users@lists.isc.org Subject: Re: dhcpd v4.4.1 failed to start when built with --enable-use-sockets option Message-ID: <f3da6861-f710-cbd0-bf9e-dc834ec3a...@isc.org> Content-Type: text/plain; charset=utf-8 On 29/01/2019 15:18, Zhengjing Jim Yang wrote: > Hi, > > ? > > Here is some additional information why I tested DHCPD v4.4.1 building > with --enable-use-sockets option. > > ? > > When the server is running with DHCPD v4.4.1 building WITHOUT using > --enable-use-sockets option, > > from the tcpdump results and the dhcp logs listed below, we can find > that the client 10.155.129.193 sent one DHCPREQUEST to the dhcp-server > (10.0.0.249), > > but the dhcp-server replied with three DHCPACKs to the client (one > DHCPACK via each interface). > > ? > > Note: there are three IP service addresses bonded to one NIC on this > dhcp-server. > > ? > > sudo tcpdump -n -tttt -i bond0 port 67 and port 68 > > ? > > --- tcpdump results --- > > 2019-01-29 09:51:28.594948 IP 10.155.129.193.bootpc > 10.0.0.249.bootps: > BOOTP/DHCP, Request from 80:ce:aa:aa:aa:aa, length 300 > > 2019-01-29 09:51:28.595959 IP 10.0.0.249.bootps > 10.155.129.193.bootpc: > BOOTP/DHCP, Reply, length 300 > > 2019-01-29 09:51:28.596320 IP 10.0.0.249.bootps > 10.155.129.193.bootpc: > BOOTP/DHCP, Reply, length 300 > > 2019-01-29 09:51:28.596722 IP 10.0.0.249.bootps > 10.155.129.193.bootpc: > BOOTP/DHCP, Reply, length 300 > > ? > > --- the corresponding dhcp log lines ---- > > Jan 29 09:51:28 dhcp-server dhcpd: DHCPREQUEST for 10.155.129.193 from > 80:ce:aa:aa:aa:aa (client host name) via bond0:2 > > Jan 29 09:51:28 dhcp-server dhcpd: DHCPACK on 10.155.129.193 to > 80:ce:aa:aa:aa:aa (client host name) via bond0:2 > > Jan 29 09:51:28 dhcp-server dhcpd: DHCPREQUEST for 10.155.129.193 from > 80:ce:aa:aa:aa:aa (client host name) via bond0:1 > > Jan 29 09:51:28 dhcp-server dhcpd: DHCPACK on 10.155.129.193 to > 80:ce:aa:aa:aa:aa (client host name) via bond0:1 > > Jan 29 09:51:28 dhcp-server dhcpd: DHCPREQUEST for 10.155.129.193 from > 80:ce:aa:aa:aa:aa (client host name) via bond0 > > Jan 29 09:51:28 dhcp-server dhcpd: DHCPACK on 10.155.129.193 to > 80:ce:aa:aa:aa:aa (client host name) via bond0 > > ? > > When the server was running with DHCPD v4.3.5 with the same > configuration, I did not see this kind of behavior (1 client request, 3 > server replies sent from each interface). > > ? > > As I reported yesterday, the DHCPD v4.4.1 failed to start when building > with --enable-use-sockets option. > > ? > > I also tested running the DHCPD v4.3.5 when building with > --enable-use-sockets option. It started up successfully using the same > configuration file. > > ? > > Is this a bug? > > ? > > Thank you for your time. > > ? > > Jim > > *From: *Zhengjing Yang <z...@cornell.edu> > *Date: *Monday, January 28, 2019 at 3:42 PM > *To: *Users of ISC DHCP <dhcp-users@lists.isc.org> > *Subject: *dhcpd v4.4.1 failed to start when built with > --enable-use-sockets option > > ? > > Hi, > > ? > > I have some issue with dhcpd v4.4.1 when building it with > --enable-use-sockets option. > > The binary was built successfully on Red Hat Enterprise Linux 6. > > ? > > $ ./configure ?--enable-use-sockets > > $ make > > $ make install > > ? > > When I tried to start up the server, it failed to start with the > following errors in the logs below. > > ? > > The same configuration works for dhcpd v4.3.5 with the same build option. > > The same configuration also works for dhcpd v4.4.1 when built without > using --enable-use-sockets option. > > ? > > Did I miss something? > > ? > > Thank you for your time. > > ? > > Jim > > ? > > ----Log ---- > > ? > > Jan 28 14:47:46 test1 dhcpd: Wrote 0 class decls to leases file. > > Jan 28 14:47:46 test1 dhcpd: Wrote 0 deleted host decls to leases file. > > Jan 28 14:47:46 test1 dhcpd: Wrote 0 new dynamic host decls to leases file. > > Jan 28 14:47:47 test1 dhcpd: Wrote 1233 leases to leases file. > > Jan 28 14:47:47 test1 dhcpd: Multiple interfaces match the same subnet: > bond0 bond0:1 > > Jan 28 14:47:47 test1 dhcpd: Multiple interfaces match the same shared > network: bond0 bond0:1 > > Jan 28 14:47:47 test1 dhcpd: Multiple interfaces match the same subnet: > bond0 bond0:2 > > Jan 28 14:47:47 test1 dhcpd: Multiple interfaces match the same shared > network: bond0 bond0:2 > > Jan 28 14:47:47 test1 dhcpd: Multiple interfaces match the same subnet: > bond0 bond0:3 > > Jan 28 14:47:47 test1 dhcpd: Multiple interfaces match the same shared > network: bond0 bond0:3 > > Jan 28 14:47:47 test1 dhcpd: Multiple interfaces match the same subnet: > bond0 bond0:4 > > Jan 28 14:47:47 test1 dhcpd: Multiple interfaces match the same shared > network: bond0 bond0:4 > > Jan 28 14:47:47 test1 dhcpd: setsockopt: SO_BINDTODEVICE: No such device > > Jan 28 14:47:47 test1 dhcpd: > > Jan 28 14:47:47 test1 dhcpd: If you think you have received this message > due to a bug rather > > Jan 28 14:47:47 test1 dhcpd: than a configuration issue please read the > section on submitting > > Jan 28 14:47:47 test1 dhcpd: bugs on either our web page at www.isc.org > or in the README file > > Jan 28 14:47:47 test1 dhcpd: before submitting a bug.? These pages > explain the proper > > Jan 28 14:47:47 test1 dhcpd: process and the information we find helpful > for debugging. > > Jan 28 14:47:47 test1 dhcpd: > > Jan 28 14:47:47 test1 dhcpd: exiting. > > ? > >> uname -a > > Linux? 2.6.32-754.6.3.el6.x86_64 #1 SMP Tue Sep 18 10:29:08 EDT 2018 > x86_64 x86_64 x86_64 GNU/Linux > > ? > >>ifconfig > > bond0???? Link encap:Ethernet? HWaddr aa:bb:cc:dd:ee:ff > > ????????? inet addr:10.0.1.20? Bcast:10.0.1.63? Mask:255.255.255.192 > > ????????? > > ??????????UP BROADCAST RUNNING MASTER MULTICAST? MTU:1500? Metric:1 > > ????????? RX packets:899836753 errors:0 dropped:0 overruns:0 frame:0 > > ????????? TX packets:668845942 errors:0 dropped:0 overruns:0 carrier:0 > > ????????? collisions:0 txqueuelen:0 > > ????????? ... > > ? > > bond0:1?? Link encap:Ethernet? HWaddr aa:bb:cc:dd:ee:ff > > ????????? inet addr:10.0.1.21? Bcast:10.0.1.63? Mask:255.255.255.192 > > ????????? UP BROADCAST RUNNING MASTER MULTICAST? MTU:1500? Metric:1 > > ? > > bond0:2?? Link encap:Ethernet? HWaddr aa:bb:cc:dd:ee:ff > > ????????? inet addr:10.0.1.22? Bcast:10.0.1.63? Mask:255.255.255.192 > > ????????? UP BROADCAST RUNNING MASTER MULTICAST? MTU:1500? Metric:1 > > ? > > bond0:3?? Link encap:Ethernet? HWaddr aa:bb:cc:dd:ee:ff > > ????????? inet addr:10.0.1.23? Bcast:10.0.1.63? Mask:255.255.255.192 > > ????????? UP BROADCAST RUNNING MASTER MULTICAST? MTU:1500? Metric:1 > > ? > > ? > > # dhcp configuration: > > local-address 10.0.1.21; > > server-identifier 10.0.1.21; > > pid-file-name "/opt/dhcp/var/dhcpd.pid"; > > lease-file-name "/opt/dhcp/etc/dhcpd.leases"; > > ddns-update-style none; > > option ntp-servers 10.0.1.50 > > default-lease-time 3600;? > > max-lease-time 3600; > > deny bootp; > > authoritative; > > ping-check true; > > omapi-port 1000; > > omapi-key omapi-key; > > ? > > failover peer "test" { > > ??????? primary; > > ??????? address 10.0.1.21; > > ? ??????port 647; > > ??????? peer address 10.0.2.21; > > ??????? peer port 847; > > ??????? max-response-delay 60; > > ??????? max-unacked-updates 10; > > ??????? mclt 900; > > ??????? split 128; > > ??????? load balance max seconds 3; > > } > > ? > > subnet 10.0.1.0 netmask 255.255.255.192 { > > ??????? option routers 10.0.1.1; > > } > Answering belatedly as a similar question arose recently and the explanation might be helpful to others encountering the same or similar problems when upgrading to versions of ISC DHCP that use the newer interface discovery logic. When ISC DHCP is started with no interfaces listed on the command line, it will attempt to discover and listen on all running interfaces. (This is convenient, but it might not be what you want in all situations). But significantly, if you're depending on discovery versus specifying the interfaces explicitly, be aware that the interface discovery logic was changed in 4.3.6 to use getifaddrs(). This allows the server to see VLANs which the old code did not do properly. This also means it will now see multiple addresses per interface such as aliases. In the configuration shown above, servers prior to 4.3.6 will only see bond0 while beginning with 4.3.6, they will see bond0, bond0:1, bond0:2 etc. This explains why, when you start a 4.4.1 server, compiled without --enable-use-sockets, in your configuration, without explicitly specifying to listen upon only bond0 via the command line, the server starts. However it is now listening on bond0 *as well as* on all the aliases because it can now 'see' them - which it couldn't do on the older version of dhcpd. This means that client packets that are broadcast on that subnet are seen on ALL of those interfaces. So one DHCPDISCOVER becomes many - hence the multiple responses. You also tried to run dhcpd compiled with --enable-use-sockets. With this mode of operation, the socket initialization code attempts to set the SO_BINDTODEVICE socket option via a call to setsocktopt. This call fails with an error of "no such device" when invoked on aliases. The server code treats this as a fatal error and exits. Thus when you start a 4.4.1 server, compiled with --enable-use-sockets, in your configuration, without explicitly specifying only bond0 via the command line, the server falls down when it attempt to call setsockopt on bond0:1. Whether or not you choose to compile with --enable-use-sockets, we suggest you specify only bond0 (and any other actual interfaces you want the server to listen on explicitly) on the command line invocation, such as this: dhcpd <options> bond0 The end result should be the behavior you had before. Hoping that this helps! Cathy ------------------------------ Message: 2 Date: Fri, 17 Jan 2020 23:03:30 +0000 From: Michael Mears <mme...@vertical.com> To: "dhcp-users@lists.isc.org" <dhcp-users@lists.isc.org> Subject: cannot get option 160 to work in isc-dhcp-server 4.4.1 Message-ID: <e244b9ff9c6f774e93d9e40642e6420802ef1d2...@phxex2.vertical.com> Content-Type: text/plain; charset="us-ascii" Trying to get option 160 to work but when I configure it as a custom option the server fails to start. I have tried several configs and none of them work. The latest one is: option phone-config code 160 = text; option phone-config http://192.168.0.254; I am thinking that maybe option 160 is already defined in the code but if it is I do not know what to call it. For instance option 66 is "tftp-server-name". Is there a name defined for option 160? Option 160 appears in the list of standard DHCP options defined in ISC DHCP and Kea and lists it as DHCP Captive Portal. If that is the case I am not sure what to call it out as in the options. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20200117/42eb2280/attachment-0001.htm> ------------------------------ Subject: Digest Footer _______________________________________________ dhcp-users mailing list dhcp-users@lists.isc.org https://lists.isc.org/mailman/listinfo/dhcp-users ------------------------------ End of dhcp-users Digest, Vol 135, Issue 9 ******************************************