[systemd-devel] Can't connect to WiFi when the wired and the wireless interfaces are bonded

Bruce A. Johnson bjohnson at blueridgenetworks.com
Wed May 16 16:01:17 UTC 2018


Mantas seems to be correct that I was giving you a bum steer about
putting the DHCP=Yes into 25-wireless.network. I haven't used bonding
before, either. So please consider advice from someone who actually
knows what he/she's doing in preference to anything I suggest.

Have a look at how systemd obtains the IP address on the [presumably
working] wired connection.

# journalctl -b | grep DHCP
May 16 15:32:47 rl-000db948364a systemd-networkd[382]: en01: DHCPv4 address 192.168.3.200/24 via 192.168.3.1

My Ethernet interface is called /en01/. I would expect your log to say
it's /bond0/. Given that wireless interfaces look a lot like Ethernet
interfaces, I don't see that you've done anything wrong, and maybe if
you run dhcpd manually on  bond0 for diagnostic purposes, you'll see a
better result in your test. The other thing would be to ping the default
gateway (192.168.43.1 in your log), in case ICMP to the outside world is
blocked. (The router might also block ICMP pings, though. It depends on
the paranoia level of the network administrator.) If you've just brought
up dhcpd, it's still running, and the IP layer is down already, that
suggests to me that systemd-networkd has gotten in the way.

With wired interfaces, I swap the cable around all the time and
systemd-networkd properly picks up the new IP configuration from DHCP.
Maybe try a setup without the bond interface and see whether you can get
IP working over wireless. I would expect systemd-networkd to gracefully
handle DHCP configuration when you go out of range of the transmitter
and return, or if you move to another SSID that's set up in
wpa-supplicant. If that works, it suggests an issue with interface bonding.

Another thing you might do is set up .network files for the interfaces
that include a route metric of 0 for the wired (preferred) interface and
1 for the wireless:

[Match]
Name=en02

[Network]
Description=WAN connection on en02
DHCP=yes

[DHCP]
RouteMetric=1

I'm using those successfully in my set-up, but the two interfaces are
separate subnets. Still, I would expect it to work were they on the same
subnet.

I hope this helps, and I'm looking forward to learning more from what
you find out and what others suggest.

Bruce A. Johnson
Herndon, Virginia

On 2018-05-16 07:10, Doron Behar wrote:
> I agree. This is what I understood from the manual pages. I've even
> tried to run `dhcpcd wlp2s0` manually after I've connected to the WiFi
> network and it didn't help either. Here is `dhcpcd`'s output:
>
> 	DUID 00:01:00:01:22:58:f0:ec:34:13:e8:35:48:e6
> 	wlp2s0: IAID c4:ca:ef:aa
> 	wlp2s0: adding address fe80::bf80:8309:6514:f4ff
> 	wlp2s0: soliciting a DHCP lease
> 	wlp2s0: soliciting an IPv6 router
> 	wlp2s0: offered 192.168.43.146 from 192.168.43.1
> 	wlp2s0: probing address 192.168.43.146/24
> 	wlp2s0: leased 192.168.43.146 for 3600 seconds
> 	wlp2s0: adding route to 192.168.43.0/24
> 	wlp2s0: adding default route via 192.168.43.1
> 	forked to background, child pid 1142
>
> It does seem to be working yet I'm not really connected to the internet,
> `ping 8.8.8.8` doesn't work.
>
> On Wed, May 16, 2018 at 09:14:01AM +0300, Mantas Mikulėnas wrote:
        .     .    .
>> I believe the individual bonded interfaces don't *need* to speak IP
>> at all;
>> only the 'main' bond itself does.
>>
>> -- 
>> Mantas Mikulėnas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180516/6973176a/attachment-0001.html>


More information about the systemd-devel mailing list