View previous topic :: View next topic |
Author |
Message |
piotr5 Tux's lil' helper
Joined: 14 Dec 2012 Posts: 121
|
Posted: Sat Jan 06, 2024 1:23 pm Post subject: how do I make avahi preferably use ipv4? |
|
|
I#m using KDE with systemd and avahi starts without problems. however
Code: | systemctl status avahi-daemon
...
avahi-daemon[4340]: Joining mDNS multicast group on interface enp1s0.IPv6 with address fe80::534f:cd02:ca2a:6eee.
avahi-daemon[4340]: New relevant interface enp1s0.IPv6 for mDNS.
avahi-daemon[4340]: Registering new address record for fe80::534f:cd02:ca2a:6eee on enp1s0.*.
avahi-daemon[4340]: Joining mDNS multicast group on interface enp1s0.IPv4 with address 192.168.0.52.
|
so it seems to be using both, my ipv4 address as registered on the hub, and a new ipv6 address. it might be my firewall's fault, but ping on my avahi domain name says I'm at addreess 0.0.0.17 although all packets there are lost and not even noticed by firewall. however, when I connect another linux (without systemd) to the network and ping it, I get again all packets lost to the address fe80::2b22:1e46:274:1685 which sounds like ipv6. (on the other computer ping actually sends data to the correct ipv4 address successfully.) I tried to use the piv6 address "sftp://p@fe80::2b22:1e46:274:1685:22/home/p" in dolphin and get the error that webpages are not supported and browser is being started with "http://sftp/p@fe80::2b22:1e46:274:1685:22/home/p/" revealing that dolphin does not support ipv6.
needless to say, at my current configuration everything worked in past, an update on this computer without updating the other is what lead to the current problem. a temporaty fix was to go to the other computer, write down its ipv4 address and use that in dolphin. but isn't avahi supposed to do that automatically? instead dolphin gives me an error about an invalid argument when using the other computer's domain-name... |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3432
|
Posted: Sat Jan 06, 2024 2:27 pm Post subject: |
|
|
Why do you put ipv6 address in the browser in the first place?
You have avahi, just use machine's name and let it be resolved automagically for you. Do you have nss-mdns installed and enabled in /etc/nsswitch.conf ? |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 451 Location: Naarm/Melbourne, Australia
|
Posted: Sun Jan 07, 2024 12:51 am Post subject: |
|
|
Addressing the specific question in the subject line of your post, i don't know how to specify "try ipv4, and only use ipv6 if ipv4 isn't available", but one can disable either protocol in /etc/avahi/avahi-daemon.conf:
Code: | use-ipv4=yes
use-ipv6=no |
|
|
Back to top |
|
|
|
|
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
|
|