Can't connect to WiFi when the wired and the wireless interfaces are bonded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently I'm not residing at home were I use both interfaces to connect
to the same network, so I can't test this setup right now. In the
following experiments results following your suggestions, I didn't
connect any Ethernet cable.

> 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

When I connect to the WiFi network only after boot, the command you used
above doesn't produce any output.

> 
> 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.

Well first of all, running `dhcpcd bond0` when I connect to the WiFi network only after
boot gives me this:

    dhcp6_listen: Address already in use
    DUID 00:01:00:01:22:58:f0:ec:34:13:e8:35:48:e6
    bond0: IAID c4:ca:ef:aa
    bond0: soliciting an IPv6 router
    bond0: soliciting a DHCP lease
    bond0: no IPv6 Routers available

And it's stuck there for a really long time..

As for `ping`ing `192.168.43.1`, I get this output:

    connect: Network is unreachable

My network infrastructure at the moment is a WiFi hotspot of my Android
device.

> 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.

As for moving away and returning to the range of a WiFi networks, it
should be noted that it works great without having a bonding
configuration - when using just a dumb `wireless.network` with:

    [Match]
    Name=wlp2s0

    [Network]
    DHCP=yes

> 
> 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

Adding the entry `RouteMetric=1` for the `[DHCP]` section in my
`bonding.network` doesn't help at all.

Should I open an issue on systemd's issues tracker?

> 
> 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
> 


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux