You are not logged in.

#1 2015-04-26 20:49:33

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

[SOLVED] ipv6 avahi

Hi,

I am dealing with a problem and need some help to understand/figure it out.

I have a static IP on my eth0 interface (home desktop).
My systemd network-static-eth0.service is build according to wiki instructions.

The last couple days I trying to add an IPv6 connectivity over PPPoE.

When network-static-eth0.service is started:


Apr 26 23:07:11 myhomepc systemd[1]: Stopping Static interface on eth0...
Apr 26 23:07:11 myhomepc systemd[1]: Starting Static interface on eth0...
Apr 26 23:07:11 myhomepc kernel: r8169 0000:02:00.0 eth0: link down
Apr 26 23:07:11 myhomepc kernel: r8169 0000:02:00.0 eth0: link down
Apr 26 23:07:11 myhomepc kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Apr 26 23:07:11 myhomepc avahi-daemon[24682]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.3.
Apr 26 23:07:11 myhomepc avahi-daemon[24682]: New relevant interface eth0.IPv4 for mDNS.
Apr 26 23:07:11 myhomepc avahi-daemon[24682]: Registering new address record for 192.168.1.3 on eth0.IPv4.
Apr 26 23:07:11 myhomepc systemd[1]: Started Static interface on eth0.
Apr 26 23:07:11 myhomepc polkitd[641]: Unregistered Authentication Agent for unix-process:25874:12071296 (system bus name :1.64, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale el_GR.UTF-8) (disconnected from bus)
Apr 26 23:07:12 myhomepc kernel: r8169 0000:02:00.0 eth0: link up
Apr 26 23:07:12 myhomepc kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Apr 26 23:07:14 myhomepc avahi-daemon[24682]: Registering new address record for fe80::96de:80ff:fe6a:de0e on eth0.*.

avahi-daemon is providing an IPv6 fe80 link local interface (I am guessing for multicast ? - not sure),
even if:

# grep -ri ipv6 /etc/avahi/*
/etc/avahi/avahi-daemon.conf:use-ipv6=no
/etc/avahi/avahi-daemon.conf:publish-a-on-ipv6=no

Avahi also adds a default IPv6 fe80 route:

eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 94:de:80:6a:de:0e brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.3/24 scope global eth0
       valid_lft forever codeferred_lft forever
    inet6 fe80::96de:80ff:fe6a:de0e/64 scope link 
       valid_lft forever codeferred_lft forever

# ip -6 r 
fe80::/64 dev eth0  proto kernel  metric 256 
default via fe80::1 dev eth0  proto ra  metric 1024  expires 1710sec hoplimit 64

So here is the problem, when using PPPoE to my ISP provider I am getting IPv6 connectivity (prefix et all)
but I am getting two default IPv6 routes  (one from avahi on eth0, the other from IPv6 on ppp0) !!!

# ip -6 r  | grep ^def
default via fe80::1 dev eth0  proto ra  metric 1024  expires 1636sec hoplimit 64
default via fe80::90:1a00:1a0:80be dev ppp0  proto ra  metric 1024  expires 1790sec

with PPPoE, i need the default route on ppp0 interface

# ip route del default via fe80::1 dev eth0

after that (and before wide-dhcpv6)

$ sudo ping6 -c3 2a00:1450:4001:804::1001
PING 2a00:1450:4001:804::1001(2a00:1450:4001:804::1001) 56 data bytes
64 bytes from 2a00:1450:4001:804::1001: icmp_seq=1 ttl=55 time=72.0 ms
64 bytes from 2a00:1450:4001:804::1001: icmp_seq=2 ttl=55 time=71.7 ms
64 bytes from 2a00:1450:4001:804::1001: icmp_seq=3 ttl=55 time=72.2 ms

--- 2a00:1450:4001:804::1001 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 71.759/72.026/72.248/0.298 ms

So ...... how to tell avahi go f#ck it self on IPv6 matters ?


Any help would be appreciated.

Thanks in advance

Last edited by ebal (2015-04-28 13:37:43)


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#2 2015-04-26 21:02:50

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,795
Website

Re: [SOLVED] ipv6 avahi

ebal wrote:

So ...... how to tell avahi go f#ck it self on IPv6 matters ?

You could try the nuclear option:

# systemctl mask avahi-daemon.service

Jin, Jîyan, Azadî

Offline

#3 2015-04-27 15:55:29

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: [SOLVED] ipv6 avahi

I think you have the wrong end of the stick. With IPv6 each interface gets a fe80:: address - the link-local address. This is needed for IPv6 to work.
Avahi is merely registering this address with mDNS which is fine.

default via fe80::1 dev eth0  proto ra  metric 1024  expires 1636sec hoplimit 64

Looks to me like eth0 received a RA from another router on your network - it's common for these routers to advertise themselves as fe80::1 which is what you got.
So the solution is to disable something on your eth0 interface that's advertising the RA - like say a router.

Offline

#4 2015-04-27 20:30:19

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: [SOLVED] ipv6 avahi

First of all, thanks everyone for your help/answers.


@rsmarples

My router does not provide IPv6 or even DHCP on my network.
I've doubled checked this.

In fact the main reason I am using/trying this PPPoE setup is NOT to use the router my ISP provided me with.
I would like to use this archlinux box as a router.

So there is not a network device that provides network settings to this archlinux box.

@Head_on_a_Stick

Not even MASK did the trick. After a reboot, avahi is still running!


I have a basic knowledge on how IPv6 is working and what fe80::/10 IPv6 link local addresses are (or i think i have) and as I am of understanding someone does not need a Gateway to communicate in an ethernet network (IPvX). The gateway is from moving IP Packets outside (or inside) this network/domain - as every PC can communicate directly with another in the same network.

The kernel or probably the avahi-daemon (or a similar service/project) is providing the IPv6 fe80 link local addresses and that's ok.
No problem there.




The problem is the activation (if i can use that term) of the default fe80::1 gw on the eth0 interface.

After the reboot the related msgs from journalct for the eth0 interface are these:

# journalctl -b | grep eth0
Apr 27 22:47:54 myhomepc kernel: r8169 0000:02:00.0 eth0: RTL8168evl/8111evl at 0xffffc90000c6e000, 94:de:80:6a:de:0e, XID 0c900800 IRQ 28
Apr 27 22:47:54 myhomepc kernel: r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
Apr 27 22:52:41 myhomepc systemd[1]: Starting Static interface on eth0...
Apr 27 22:52:41 myhomepc kernel: r8169 0000:02:00.0 eth0: link down
Apr 27 22:52:41 myhomepc kernel: r8169 0000:02:00.0 eth0: link down
Apr 27 22:52:41 myhomepc kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Apr 27 22:52:41 myhomepc systemd[1]: Started Static interface on eth0.
Apr 27 22:52:42 myhomepc avahi-daemon[390]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.3.
Apr 27 22:52:42 myhomepc avahi-daemon[390]: New relevant interface eth0.IPv4 for mDNS.
Apr 27 22:52:42 myhomepc avahi-daemon[390]: Registering new address record for 192.168.1.3 on eth0.IPv4.
Apr 27 22:52:43 myhomepc kernel: r8169 0000:02:00.0 eth0: link up
Apr 27 22:52:43 myhomepc kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Apr 27 22:52:44 myhomepc avahi-daemon[390]: Registering new address record for fe80::96de:80ff:fe6a:de0e on eth0.*.


... so ... I am still believing that the problem is on the avahi-daemon.

Of course I dont have more info on how to solve this problem and thats why i am asking for your help.


The work-around (i would like to hope/think that this is a short-term solution) is to delete the default route on eth0 via the /etc/ppp/ipv6-up script (after the PPPoE is established) so that the default gw is on the ppp0 interface (as it should).


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#5 2015-04-27 22:46:50

branch
Member
Registered: 2014-03-16
Posts: 209

Re: [SOLVED] ipv6 avahi

Avahi does not assign addresses, nor does it set routes. What you see in the log is that avahi-daemon has been notified that eth0 has acquired a new address and that avahi-daemon has registered that new address in its internal database.

Run radvdump (from the radvd package) for ten minutes or so. This should give you a good idea of what routes are being advertised on your network. If you cannot prevent the offending hardware from sending unwanted advertisements, you can work around it by setting putting the following:

net.ipv6.conf.eth0.accept_ra = 0

in a file in /etc/sysctl.d

Alternately, if you do not need IPv6 on eth0 for other purposes, you can turn off IPv6 for eth0 through whatever tool you use to configure the interface (you did not mention what configures this interface). For example, in netctl you would use:

IP6=no

.

Offline

#6 2015-04-27 23:09:16

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: [SOLVED] ipv6 avahi

ebal wrote:

@rsmarples

My router does not provide IPv6 or even DHCP on my network.
I've doubled checked this.

Check again.
Your route clearly shows the kernel received a RA advertising a default route on eth0.
Maybe another device attached to the router?

In fact the main reason I am using/trying this PPPoE setup is NOT to use the router my ISP provided me with.
I would like to use this archlinux box as a router.

Are you sure the router you don't want is disconnected?

The kernel or probably the avahi-daemon (or a similar service/project) is providing the IPv6 fe80 link local addresses and that's ok.

It's the kernel.
dhcpcd can do it to, but I'm assuming your not running dhcpcd.

The problem is the activation (if i can use that term) of the default fe80::1 gw on the eth0 interface.

After the reboot the related msgs from journalct for the eth0 interface are these:

# journalctl -b | grep eth0
Apr 27 22:47:54 myhomepc kernel: r8169 0000:02:00.0 eth0: RTL8168evl/8111evl at 0xffffc90000c6e000, 94:de:80:6a:de:0e, XID 0c900800 IRQ 28
Apr 27 22:47:54 myhomepc kernel: r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
Apr 27 22:52:41 myhomepc systemd[1]: Starting Static interface on eth0...
Apr 27 22:52:41 myhomepc kernel: r8169 0000:02:00.0 eth0: link down
Apr 27 22:52:41 myhomepc kernel: r8169 0000:02:00.0 eth0: link down
Apr 27 22:52:41 myhomepc kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Apr 27 22:52:41 myhomepc systemd[1]: Started Static interface on eth0.
Apr 27 22:52:42 myhomepc avahi-daemon[390]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.3.
Apr 27 22:52:42 myhomepc avahi-daemon[390]: New relevant interface eth0.IPv4 for mDNS.
Apr 27 22:52:42 myhomepc avahi-daemon[390]: Registering new address record for 192.168.1.3 on eth0.IPv4.
Apr 27 22:52:43 myhomepc kernel: r8169 0000:02:00.0 eth0: link up
Apr 27 22:52:43 myhomepc kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Apr 27 22:52:44 myhomepc avahi-daemon[390]: Registering new address record for fe80::96de:80ff:fe6a:de0e on eth0.*.


... so ... I am still believing that the problem is on the avahi-daemon.

All the journal shows is that avahi spots a IPv6 link-local address on eth0 and registers it with mDNS.
It does NOT show any indication of a RA received (and afaik the kernel doesn't) or any IPv6 default route being added.

What I would do is try and run tcpdump or wireshark on eth0 and capture the RA frame that's at fault.
That will show the MAC address of the offending router.

If you want to trigger a RA solicit, try unplugging and replugging the cable - but that may or may not interfere with tcpdump working on eth0.
Another way is to install dhcpcd and run this command

dhcpcd -dBT6 --nodhcp6 eth0

That will even show the majority of the RA received, just not the sending MAC address.

Offline

#7 2015-04-28 13:36:48

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: [SOLVED] ipv6 avahi

After further investigation (with your help of-course) I found that indeed the router is providing IPv6 Router Advertisement on it's Ethernet port even if in the entire menu all options for IPv6 are checked-out.

I removed the cable and fired up tcpdump, from the mac address i could pin-point the router port.

Indeed it wasnt very smart for me to suggest that avahi could be messing with the IPv6 routing, I now understand why.

The radvdump didnt help much:

#
# radvd configuration generated by radvdump 2.11
# based on Router Advertisement from fe80::1
# received by interface eth0
#

interface eth0
{
        AdvSendAdvert on;
        # Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump
        AdvManagedFlag off;
        AdvOtherConfigFlag off;
        AdvReachableTime 0;
        AdvRetransTimer 0;
        AdvCurHopLimit 64;
        AdvDefaultLifetime 1800;
        AdvHomeAgentFlag off;
        AdvDefaultPreference medium;
        AdvLinkMTU 1500;

        RDNSS fe80::1
        {
                AdvRDNSSLifetime 1800;
        }; # End of RDNSS definition

}; # End of interface definition

but tcpdump did:

16:24:31.435024 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 32) fe80::1 > ff02::1:ff6a:de0e: [icmp6 sum ok] ICMP6, neighbor solicitation, length 32, who has fe80::96de:80ff:fe6a:de0e
          source link-address option (1), length 8 (1): cc:1a:fa:41:3b:78
            0x0000:  cc1a fa41 3b78

cc:1a:fa:41:3b:78 is the mac address of Lan1 Port


I'll try to contact the helpdesk of my ISP to find out if i can disable IPv6 completely from the router.


Thank you all.


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#8 2015-04-28 13:41:33

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: [SOLVED] ipv6 avahi

OR disable eth0 listening to RA's

sysctl -w net.ipv6.conf.enp3s0.accept_ra=1

No idea where you would put that with systemd, but it needs to run and complete before any networking stuff even starts.

Last edited by rsmarples (2015-04-28 13:42:01)

Offline

Board footer

Powered by FluxBB