dhcpcd-discuss

Re: Support for "raw-ip" mode

Yegor Yefremov

Tue Aug 20 13:27:57 2019

On Tue, Aug 20, 2019 at 3:13 PM Roy Marples <roy@xxxxxxxxxxxx> wrote:
>
> On 20/08/2019 13:43, Yegor Yefremov wrote:
> > Unfortunately, it is not working. Config file was wrong and the
> > interface must have been configured before via udhcpc (that's why it
> > says static address applied). Sorry.
>
> It was still useful - otherwise dhcpcd would be waiting for an address,
> but with the patches it can now start DHCP.
>
> >
> > I've corrected the /etc/dhcpcd.conf so that I see the O_DHCP was applied:
> >
> > # dhcpcd wwan0
> > dhcpcd-8.0.2 starting
> > YY: O_DHCP
> > wwan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
> > wwan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
> > DUID 00:01:00:01:c7:92:bc:92:74:6a:8f:ff:50:55
> > wwan0: IAID 00:00:00:06
> > wwan0: delaying IPv6 router solicitation for 0.4 seconds
> > wwan0: delaying IPv4 for 0.4 seconds
> > wwan0: soliciting an IPv6 router
> > wwan0: delaying Router Solicitation for LL address
> > wwan0: needs a clientid to configure
> > wwan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' FAIL
> > timed out
> > dhcpcd exited
> >
> > I've sniffed with tcpdump and if catches nothing. I've attached a
> > sniff for udhcpc.
>
> This is the important line
> wwan0: needs a clientid to configure
>
> We can see from the tcpdump that it sends a blank hardware address AND a
> blank clientid. From a DHCP *server* perspective how would we know what
> IP to lease?
>
> Do you have a second QMI device you can dual test with on the same DHCP
> server using udhcpc? Do they get different IPs or do they try and
> contend the same IP? If different, how do you differentiate the leases
> on the server?

Even with same card I get different leases. If I understand the whole
QMI stuff correctly then the card itself has a DHCP server inside the
firmware. And all we need to do is to setup IP configuration for wwan0
interface. Hence it doesn't matter whether we get the same of a
different IP as we always have only one client.

> > I'm trying to understand what was made in this patch that adds raw-ip
> > support to the ISC DHCP [1]. Seems like there is no way to avoid
> > packet header manipulation.
> >
> > [1] https://mail.gnome.org/archives/networkmanager-list/2015-December/msg00044.html
>
> The attached patch may help dhcpcd get further.

With the patch applied:

# dhcpcd wwan0
dhcpcd-8.0.2 starting
[  150.103174] 8021q: 802.1Q VLAN Support v1.8
[  150.107618] 8021q: adding VLAN 0 to HW filter on device eth0
[  150.113994] 8021q: adding VLAN 0 to HW filter on device eth1
wwan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
wwan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER
wwan0: waiting for carrier
wwan0: carrier acquired
wwan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
DUID 00:01:00:01:c7:92:bc:92:74:6a:8f:ff:50:55
wwan0: IAID 00:00:00:06
wwan0: delaying IPv6 router solicitation for 0.6 seconds
wwan0: delaying IPv4 for 0.9 seconds
wwan0: soliciting an IPv6 router
wwan0: delaying Router Solicitation for LL address
wwan0: soliciting a DHCP lease
wwan0: sending DISCOVER (xid 0x53b45005), next in 4.6 seconds
dhcp_openbpf: wwan0: Invalid argument
wwan0: sending DISCOVER (xid 0x53b45005), next in 8.8 seconds
dhcp_openbpf: wwan0: Invalid argument
wwan0: sending DISCOVER (xid 0x53b45005), next in 16.2 seconds
dhcp_openbpf: wwan0: Invalid argument

Follow-Ups:
Re: Support for "raw-ip" modeRoy Marples
Re: Support for "raw-ip" modeRoy Marples
References:
Support for "raw-ip" modeYegor Yefremov
Re: Support for "raw-ip" modeRoy Marples
Re: Support for "raw-ip" modeYegor Yefremov
Re: Support for "raw-ip" modeRoy Marples
Re: Support for "raw-ip" modeYegor Yefremov
Re: Support for "raw-ip" modeRoy Marples
Re: Support for "raw-ip" modeRoy Marples
Re: Support for "raw-ip" modeYegor Yefremov
Re: Support for "raw-ip" modeRoy Marples
Archive administrator: postmaster@marples.name