dhcpcd-discuss

Re: raw-ip modem questions

Roy Marples

Wed Apr 22 13:20:53 2020

On 22/04/2020 11:19, Tor Rune Skoglund wrote:
So by default, dhcpcd won't work on POINTOPOINT interfaces without some kind of config.
putting this at the top of /etc/dhcpcd.conf might fix it for you:
allowinterfaces wwp*

I just tried this, and still to no avail. Here's the test case. The starting point is a newly booted system with dhcpcd running in the background. enp1s0 (cable) has received an ip address, and wwp* not - as expected - since the mobile connection is not started yet.

head -n 10 /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# ww* is disabled from P2P by default. Also, need to add other interfaces as
# they will not be enabled by default when allowinterfaces is present.
allowinterfaces ww* en* wl*

# Trying to enable dhcp for all interfaces globally. Does not seem to work? Needs to be set per interface?
dhcp

# Setting it on the interface directly for testing. (Problem for later: We do not necessarily know the interface name on beforehand.)
tail -n 4 /etc/dhcpcd.conf

interface wwp0s20u5u1i8
dhcp

# Taking link down to be able to switch to raw-ip
ip link set dev wwp0s20u5u1i8 down

# Switching system to raw-ip
qmicli -d /dev/cdc-wdm0 --set-expected-data-format=raw-ip -p
[/dev/cdc-wdm0] expected data format set to: raw-ip

# Making sure that the card is in raw-ip mode
qmicli -d /dev/cdc-wdm0 --wda-get-data-format -p
[/dev/cdc-wdm0] Successfully got data format
                    QoS flow header: no
                Link layer protocol: 'raw-ip'
   Uplink data aggregation protocol: 'disabled'
Downlink data aggregation protocol: 'disabled'
                      NDP signature: '0'
   Uplink data aggregation max size: '0'
Downlink data aggregation max size: '0'

# Starting the network
qmicli -d /dev/cdc-wdm0 --wds-start-network=ip-type=4 -p --client-no-release-cid
[/dev/cdc-wdm0] Network started
         Packet data handle: '1137719400'
[/dev/cdc-wdm0] Client ID not released:
         Service: 'wds'
             CID: '9'

# Checking that it did connect
qmicli -d /dev/cdc-wdm0 --wds-get-current-settings -p
[/dev/cdc-wdm0] Current settings retrieved:
            IP Family: IPv4
         IPv4 address: 10.214.215.169
     IPv4 subnet mask: 255.255.255.252
IPv4 gateway address: 10.214.215.170
     IPv4 primary DNS: 193.213.112.4
   IPv4 secondary DNS: 130.67.15.198
                  MTU: 1430
              Domains: none

# Up'ing the interface again
ip link set dev wwp0s20u5u1i8 up

Messages in syslog when doing that:

Apr 22 09:37:21 platform dhcpcd[2221]: wwp0s20u5u1i8: carrier acquired
Apr 22 09:37:21 platform dhcpcd[2221]: wwp0s20u5u1i8: IAID 9a:60:5f:91
Apr 22 09:37:22 platform dhcpcd[2221]: wwp0s20u5u1i8: soliciting a DHCP lease

And that's it. At this point, I would have expected the interface to receive the address.

However, when running the same procedure *without* dhcpcd already running in the background, and then running:

dhcpcd wwp0s20u5u1i8
DUID 00:01:00:01:1a:82:6f:53:08:00:27:00:9e:58
wwp0s20u5u1i8: IAID 00:00:00:05
wwp0s20u5u1i8: soliciting a DHCP lease
wwp0s20u5u1i8: offered 10.214.215.169 from 10.214.215.170
wwp0s20u5u1i8: leased 10.214.215.169 for 7200 seconds
wwp0s20u5u1i8: adding route to 10.214.215.168/30
wwp0s20u5u1i8: adding default route via 10.214.215.170
forked to background, child pid 6814

works.

Any suggestions what I might be doing wrong? In dhcpcd.conf we have xidhwaddr and noipv4ll enabled in addition to Gentoo's defaults.

Can you add this to dhcpcd.conf please?

debug
logfile /var/log/dhcpcd.log

Redo the test. After uping the interface, wait for a minute and then email the whole file please.

Roy

Follow-Ups:
Re: raw-ip modem questionsRoy Marples
References:
raw-ip modem questionsTor Rune Skoglund
Re: raw-ip modem questionsRoy Marples
Re: raw-ip modem questionsTor Rune Skoglund
Archive administrator: postmaster@marples.name