I have a Fedora 35 machine with both ethernet and wifi and while I had the ethernet offline I found that wifi connection worked very weird, while DHCP assigns both ipv4 and ipv6 addresses, the entire ipv4 stack is not really working.
ping -4 google.com
ping: connect: Network is unreachable
# same happens with 220.127.116.11
# but with ipv6 works file
# but ping 192.168.33.1 (local-gateway) works but anything that needs to be routed does not.
IPv6 seems to be working but that is not of much use as most services require ipv4, especially things like docker and podman which fail to pull any image.
I am almost sure that if I connect the ethernet cable it will start to work, but only because wired has priority. The point here is why ipv4 does not work on wifi?
nmcli device show
GENERAL.STATE: 100 (connected)
IP4.ROUTE: dst = 192.168.32.0/23, nh = 0.0.0.0, mt = 600
If you are using gnome then settings → wifi → gear (settings for the active wifi connection) gives you 5 tabs, of which IPv4 & IPv6 are two. Each of those tabs has several settings and you can disable IPv6 if you choose. Try out things and see what works for you.
The fact that you do not have a default route (IP4.GATEWAY) seems the likely issue, and that may be due to your router settings as well. This address assigned by DHCP and no default route/gateway implies it may have been configured on the ethernet instead of wifi.
Also be aware that 2 different interfaces on the same subnet will cause network errors unless you are very careful and expert in the configs.
Any way to configure these from cli? — i am using internet this host in a headless mode.
The ethernet interface is offline / unplugged so I doubt it influences the wifi one. What is weird is that ipv4 works fine for all other devices i have on my network so i doubt is a router issue (opnsense).
I am quite curious to narrow down this issue without having to wire it again, mostly because i like the idea of having fully working networking on wifi.
Afaik the router is configured to handle a gateway over dhcp so it is bit wierd not to see 18.104.22.168 reported there, i will double check that.
nmcli connection edit <device>
The router’s IP in the middle of a
/23 pool could very well be the cause of the issue.
Reconfigure the netmask to
/24 or change the IP to
192.168.32.1 on the router.
Did you get the address and Gateway configuration via DHCP?
What puzzles me is the
Unless you have a global default gateway configured - there should be your routers address in it.
Having a /23 network shouldn’t be the issue here as long as the router knows that its in 192.168.32.0/23 and not 192.168.33.0/24.
Although you might want to think about switching out of the 192.168.x.x space if you are using subnets bigger than /24 for things other than superneting.
In general I can only recommend using full Class Networks (/8 /16 /24) when possible.
10.0.0.0/8 gives you 65536 possible Class C (/24) Subnets - Much easier to debug…
You are right that the gateway is the reason. The strange thing is that even after I reconfigured the DHCP server to report the gateway as 192.168.33.1 and used
dhclient -r to renew the lease i still see
-- listed. What do I need to configure to force it to set the gateway received from dhcp? – i do not want to hardcode it. I tried even a reboot and I see no change.
One weird thing I seen is that nmtui does not allow me to edit my wifi connection. I can edit the wired one but nothing happens when I try to edit the wifi one. Is that some weird protection for not locking myself out?
Update: I was able to open the edit option for wifi connection by manually calling
nmtui edit 42picky but the hilarious thing is that the Gateway field seems to not be editable at all. I and override addresses, dns servers, search domains but gateway remains a
_____, that cannot be edited.
I activated to wired connection just to see what happens and I think I found few things:
- wired connection gets the gateway correctly from the same dhcp server (192.168.33.1)
- one wired, I and use nmtui to edit wireless connections
- i am still unable to configure any gateway for wifi connections
I suppose that nm is refussing to configure a gateway for wifi connection if the same gateway exists/existed for a wired one? That seems as a serious problem for anyone using a single network for both wireless and wired, something that 99% of home users will want to do.
You might want to think about setting the default gateway as a workaround if you cant configure the device.
There are reasons for coupling the gateway with the device, but I doubt it’ll make any difference for a server that only uses one device anyway.