Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Giving wlan0 priority over eth0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
thegrind
n00b
n00b


Joined: 22 Sep 2024
Posts: 12

PostPosted: Wed Nov 06, 2024 5:12 am    Post subject: Giving wlan0 priority over eth0 Reply with quote

I have installed Gentoo on my RPi5. The Pi has a connection for the ethernet cable and wifi. I have them both connected and they both have different local ips so for example eth0 has 192.168.1.10 and wlan0 has 192.168.1.11. My wifi connection is faster so I would like to use this is as the default interface but every time I boot it defaults to eth0. Does anyone know how I can set this up. I did it before with NetworkManager by using nmcli and setting a priority so I'd like to see if I could do something similar with iwd instead of having to switch to NM.
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1227
Location: Richmond Hill, Canada

PostPosted: Wed Nov 06, 2024 7:19 am    Post subject: Reply with quote

Have you tried with nmcli?

I don't use wifi for my rpi5, but nmcli does show
Code:
rpi5 ~ # nmcli
end0: connected to Wired connection 1
        "end0"
        ethernet (macb), 2C:xx:xx:xx:xx:xx, hw, mtu 1500
        ip4 default
        inet4 192.168.xx.xx/24
        route4 192.168.xx.0/24 metric 100
        route4 default via 192.168.xx.xx metric 100

docker0: connected (externally) to docker0
        "docker0"
        bridge, 02:42:C0:5D:C6:4F, sw, mtu 1500
        inet4 172.17.0.1/16
        route4 172.17.0.0/16 metric 0
        inet6 fe80::42:c0ff:fe5d:c64f/64
        route6 fe80::/64 metric 256

lo: connected (externally) to lo
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
        inet4 127.0.0.1/8
        inet6 ::1/128

wlan0: unavailable
        "Broadcom Wi-Fi"
        wifi (brcmfmac), xx:xx:xx:xx:xx:xx, sw disabled, hw, mtu 1500

DNS configuration:
        servers: 192.168.xx.xx
        domains: home
        interface: end0

Use "nmcli device show" to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.

Consult nmcli(1) and nmcli-examples(7) manual pages for complete usage details.
rpi5 ~ #


And networkcli show
Code:
rpi5 ~ # networkctl
IDX LINK    TYPE     OPERATIONAL SETUP   
  1 lo      loopback -           unmanaged
  2 end0    ether    -           unmanaged
  3 wlan0   wlan     -           unmanaged
  4 docker0 bridge   -           unmanaged

4 links listed.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3410

PostPosted: Wed Nov 06, 2024 9:01 am    Post subject: Reply with quote

1) Why not just unplug the wire if you don't want to use it anyway?
2) What do you use to manage wired connection? I though iwd handles wireless part and is a replacement for wpa_supplicant rather than networkmanager, am I wrong about it?
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum