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: Linux Distributed Switch Architecture with Local Option82 ISC DHCP server/DHCP relay (glenn.satch...@uniq.com.au) 2. Re: How to use dhcp relay over ipsec0/wwan0 with zero MAC address? (Qingtao Cao) ---------------------------------------------------------------------- Message: 1 Date: Tue, 24 Nov 2020 08:48:49 +1100 From: glenn.satch...@uniq.com.au To: Users of ISC DHCP <dhcp-users@lists.isc.org> Subject: Re: Linux Distributed Switch Architecture with Local Option82 ISC DHCP server/DHCP relay Message-ID: <984363393f1efc6e03dee50abf13d...@uniq.com.au> Content-Type: text/plain; charset=US-ASCII; format=flowed Hi Remi So it looks like the circuit-id is not matching. Can you do a packet trace and verify the exact content of the circuit-id values? Perhaps there is a trailing non-print character? Is it possible the initial packet is getting through - the one without the added circuit-id? I can see the customer's hardware limitations, but it seems to me a different switch with inbuilt dhcp-relay would make this a very simple solution. :( regards, Glenn On 2020-11-23 22:31, remi rsd wrote: > Hello Simon. Thanks for your messages. > Some news from the field. > > > Option82 was effectively "sold" to the customer. Mandatory. > Switch cannot be replaced by another one. > For the moment, I would like to avoid any monitoring daemon. > > > I applied your recommendation about declaring shared-network (and > hacked a > bit dhcrelay for debugging purpose): > effectively, now DHCPd receive relayed packets with circuit-id > > > I found also this http://www.miquels.cistron.nl/isc-dhcpd/ > Added the patch patch in order to log circuit-id info. > > Then I updated my config: > > > first try: > > stash-agent-options true; > > log-facility local7; > > if exists agent.circuit-id > { > log (info, concat("Lease for ", option agent.circuit-id)); > } > > host port1 { > host-identifier option agent.circuit-id "port1"; > fixed-address 192.168.1.31; > } > > host port2 { > host-identifier option agent.circuit-id "port2"; > fixed-address 192.168.1.32; > } > > host port3 { > host-identifier option agent.circuit-id "port3"; > fixed-address 192.168.1.33; > } > > host port4 { > host-identifier option agent.circuit-id "port4"; > fixed-address 192.168.1.34; > } > > shared-network my_bridge { > subnet 172.20.31.0 netmask 255.255.255.0 {} > subnet 172.20.32.0 netmask 255.255.255.0 {} > subnet 172.20.33.0 netmask 255.255.255.0 {} > subnet 172.20.34.0 netmask 255.255.255.0 {} > > subnet 192.168.1.0 netmask 255.255.255.0 { > option routers 192.168.1.20; > option broadcast-address 192.168.1.255; > option domain-name-servers 192.168.1.20; > option domain-name "bus-1"; > } > } > > Result: > "DHCPDISCOVER from 28:d2:44:50:a5:05 via dsa_br0: network my_bridge: no > free > leases" > > => No lease > > If I add a default pool, lease provided and a log for circuit-id is > displayed, confirming that DHCPd received packet from relay agent > > > I tried another way: > > shared-network my_bridge { > subnet 172.20.31.0 netmask 255.255.255.0 {} > subnet 172.20.32.0 netmask 255.255.255.0 {} > subnet 172.20.33.0 netmask 255.255.255.0 {} > subnet 172.20.34.0 netmask 255.255.255.0 {} > > subnet 192.168.1.0 netmask 255.255.255.0 { > option routers 192.168.1.20; > option broadcast-address 192.168.1.255; > option domain-name-servers 192.168.1.20; > option domain-name "bus-1"; > > > class "port1" { > match if option agent.circuit-id = "port1"; > } > pool { > allow members of "port1"; > range 192.168.1.31; > } > > class "port2" { > match if option agent.circuit-id = "port2"; > } > pool { > allow members of "port2"; > range 192.168.1.32; > } > > class "port3" { > match if option agent.circuit-id = "port3"; > } > pool { > allow members of "port3"; > range 192.168.1.33; > } > > class "port4" { > match if option agent.circuit-id = "port4"; > } > pool { > allow members of "port4"; > range 192.168.1.34; > } > } > } > > Result: > "DHCPDISCOVER from 28:d2:44:50:a5:05 via dsa_br0: network my_bridge: no > free > leases" > > => same result, no lease. > > > The difference with the example un in the link above is the HW address. > Is it really necessary to declare HW address of device ? Circut-id > match is > not enough ? > > > > > > > -- > Sent from: http://isc-dhcp-users.2343191.n4.nabble.com/ > _______________________________________________ > ISC funds the development of this software with paid support > subscriptions. Contact us at https://www.isc.org/contact/ for more > information. > > dhcp-users mailing list > dhcp-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/dhcp-users ------------------------------ Message: 2 Date: Tue, 24 Nov 2020 10:31:38 +1000 From: Qingtao Cao <qingtao.cao...@gmail.com> To: Users of ISC DHCP <dhcp-users@lists.isc.org>, tm...@isc.org Subject: Re: How to use dhcp relay over ipsec0/wwan0 with zero MAC address? Message-ID: <CAPcThSFunG7S_NoqwQHcbaxCPF=aBNPmn-r3zrFB=jktb3n...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi Thomas and other DHCP ISC developers, Good day! This is my very first attempt to contribute back to the DHCP ISC community. How could I generate and send pull requests for the g...@gitlab.isc.org:isc-projects/dhcp.git repo properly? Anyway, currently I attached my patchset to the following issue: https://gitlab.isc.org/isc-projects/dhcp/-/issues/152 Looking forward to hearing from you, much appreciated! Harry On Thu, Nov 5, 2020 at 12:09 PM Qingtao <qingtao.cao...@gmail.com> wrote: > Hi, > > I am trying to use the dhcrelay on an ipsec0 interface that was built upon > a > cellular modem interface, wwan0 for example. The problem I am running into > is that, the QMI qmi_wwan.c kernel driver for the cellular modem works in > the raw_ip mode and will setup wwanX relevant net_device with type == > ARPHRD_NONE and hard_header_len == 0, since the MAC address for wwan0 only > makes sense for the host and not used on the USB link from the host to the > cellular modem. > > Then the ipsec0 interface will inherit both the IP address and the MAC > address, which will upset the dhcp relay daemon: in lpf.c get_hw_addr(), > the > switch(sa->sa_family) case structure will thow out the following error: > > Unsupported device type 65534 for "ipsec0" > > The 65534 == 0xFFFE, or ARPHRD_NONE. I am wondering if it is feasible to > change the get_hw_addr() to regard it as an normal case, for example: > > +@@ -522,6 +522,11 @@ get_hw_addr(const char *name, struct har > + hw->hbuf[0] = HTYPE_FDDI; > + memcpy(&hw->hbuf[1], sa->sa_data, 6); > + break; > ++ case ARPHRD_NONE: > ++ /* When the qmi_wwan.c kernel driver works in the > ++ * raw_ip mode the length of MAC address is zero */ > ++ memset(hw, 0, sizeof(struct hardware)); > ++ break; > + default: > + log_fatal("Unsupported device type %ld for \"%s\"", > + (long int)sa->sa_family, name); > > Would this work? > > Thanks in advance! > > Harry > > > > > -- > Sent from: http://isc-dhcp-users.2343191.n4.nabble.com/ > _______________________________________________ > ISC funds the development of this software with paid support > subscriptions. Contact us at https://www.isc.org/contact/ for more > information. > > dhcp-users mailing list > dhcp-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/dhcp-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20201124/161b7c84/attachment-0001.htm> ------------------------------ Subject: Digest Footer _______________________________________________ ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. dhcp-users mailing list dhcp-users@lists.isc.org https://lists.isc.org/mailman/listinfo/dhcp-users ------------------------------ End of dhcp-users Digest, Vol 145, Issue 18 *******************************************