Forum › Forums › New users › New Users and General Questions › How to disable ipv4 link-local assignment?
- This topic has 9 replies, 4 voices, and was last updated Jun 26-7:51 pm by Xecure.
-
AuthorPosts
-
June 21, 2021 at 1:10 am #62089Member
wb8tyw
Having a problem with networking.
Randomly and more frequently my eth0 device is assigned a link-local device and I can not find a way to disable this behavior.The eth0 device is bridged to br0, and the br0 has an DHCP assigned address.
The eth0 device should not have an IP address assigned to it at all.I just added the “method manual” to the configuration, but it did not help.
$ sudo cat /etc/network/interfaces.d/ifcfg-br0 iface eth0 inet manual method manual auto br0 iface br0 inet dhcp bridge_ports eth0On initial boot everything works for a short while, and it still works for a little bit after restarting the networking service.
$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.208 0.0.0.0 UG 0 0 0 wlan0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 192.168.1.208 0.0.0.0 255.255.255.255 UH 0 0 0 wlan0 192.168.5.0 0.0.0.0 255.255.255.0 U 0 0 0 br3But after a period of time, the link-local address shows up, and all ethernet traffic switches to the much slower wlan0 device.
$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.208 0.0.0.0 UG 0 0 0 wlan0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 192.168.1.208 0.0.0.0 255.255.255.255 UH 0 0 0 wlan0 192.168.5.0 0.0.0.0 255.255.255.0 U 0 0 0 br3Based on some articles I have tried this to disable link-local addressing, but no change in behavior.
$ sudo cat /etc/default/avahi-daemon # 1 = Try to detect unicast dns servers that serve .local and disable avahi in # that case, 0 = Don't try to detect .local unicast dns servers, can cause # troubles on misconfigured networks AVAHI_DAEMON_DETECT_LOCAL=0June 21, 2021 at 12:55 pm #62116Member
Xecure
::Not really knowledgeable in networks and bridges, but maybe setting the IPV4 address t manual in connman helps. (As I assume you already tried with ceni).
Launch connman interface (cmst), go to the Details tab, select your ethernet connection, and click “Configuration”. There are many categories. Select “IPV4” Method > Manual and configure there. Click OK to save and see if it works.
You may have to remove first the eth0 configuration in /etc/network/interfaces* for it to work with connman (and may require a restart).You could also disable wifi in connman to avoid switching to it.
antiX Live system enthusiast.
General Live Boot Parameters for antiX.June 21, 2021 at 4:24 pm #62122MemberModdIt
::Maybe the instructions under below link can help out, I used the description and commands to set free dns servers.
It survived a reboot and seems to work as expected. It will I think work for you. Setting in connmann was pretty much hit
and miss and did not survive rebooting due resolvconf workings.https://www.ricmedia.com/set-permanent-dns-nameservers-ubuntu-debian-resolv-conf/
An easy permanent DNS setup is one of very few things I really would like to see in antix, dhcp seems to push me to google
and cloudflare which are not exactly the epicenter of freedom and privacy.June 21, 2021 at 4:32 pm #62124Anonymous
::This linked page (from a “disable link-local address assignment” websearch)
mentions “add denyinterfaces eth0 to the /etc/dhcpcd.conf file”
https://askubuntu.com/questions/1293208/cant-disable-local-addresses-on-network-interfacesJune 22, 2021 at 12:22 am #62140Memberwb8tyw
::Trying sudo apt-get remove avahi-daemon.
Had no effect even with a network restart, but will try a reboot next.June 22, 2021 at 1:07 am #62143Memberwb8tyw
::And after the reboot, the link-local daemon seems to be either dead or dormant.
A secondary issue showed up, something is giving preference to the wlan0 becoming the default gateway.
If I use connman to shut the wlan0 off, and so a service networking restart, my wired networking then becomes the default gateway.Then I can start the wlan0 again.
So now I need to find out how to set the priorities for the routes automatically.
But at least this should stop suddenly having the traffic routed to the wlan0 interface unexpectedly.
There should have been a simple configuration setting for avahi to leave the interface alone. None of the methods that I could find work.
For my network, I do not ever need link-local addressing, so just removing the feature is good enough.
Another item only partially solved.
June 22, 2021 at 4:02 am #62148Anonymous
::need to find out how to set the priorities for the routes automatically.
idunno (so I websearched) linux networking routing priorities
https://netbeez.net/blog/linux-set-route-priorities/
^— —v these top 2 search results both mention “sudo apt install ifmetric” (and the easy commandline for its use)
https://superuser.com/questions/331720/how-do-i-set-the-priority-of-network-connections-in-ubuntu
June 22, 2021 at 11:20 am #62160Member
Xecure
::So now I need to find out how to set the priorities for the routes automatically.
I hope this still applies
If you are talking about Connman, you need to edit /etc/connman/main.conf as root, and change the preferred option to:
[General] PreferredTechnologies=ethernet,wifianswer based on:
https://wiki.archlinux.org/index.php/ConnMan#Prefer_ethernet_to_wirelessantiX Live system enthusiast.
General Live Boot Parameters for antiX.June 26, 2021 at 5:52 pm #62356Memberwb8tyw
::Editing the /etc/connman/main.conf file had no effect at all.
The background display of network activity since removing the avahi-daemon also no longer tracks the eth0 activity.
Is there a ticketing system to be filing bug reports on?
June 26, 2021 at 7:51 pm #62359Member
Xecure
::antiX related bugs can be reported here, but I think this is more connman related.
If you are using /etc/network/interfaces to connect to the net using your Ethernet cable, and disable connman, if I am not mistaken, the order of devices in the file is the preference order (so if eth0 is above wlan0, then eth0 has priority).
Not sure if anyone else can advise further.
antiX Live system enthusiast.
General Live Boot Parameters for antiX. -
AuthorPosts
- You must be logged in to reply to this topic.