Address family not supported by protocol

Same problem with any kernel:

# ping www.google.com
ping: socket: Address family not supported by protocol

IOW, no network beyond the router, OK on lan either by IP or hostname. All hosts on LAN are on static IP and use identical large hosts file, except on LAN server, which has 0.0.0.0 and 127.0.0.1 entries for some ad servers.

TW20210423 32bit
ipv6.enable=0 is (normally) on kernel command line.
/etc/sysctl.conf contains: net.ipv6.all.disable_ipv6 = 1. It’s also in /etc/sysctl.d/99-sysctl.conf.
Network driver is e1000 on device 8086:100e.
Avahi, NSCD, Wicked and NetworkManager are not installed.
Systemd-networkd is enabled.
/etc/resolv.conf is valid, same file in use for since November, on all local hosts; contains 1.1.1.1 as first nameserver.

ip route show is exactly as expected

Upgrading to 20210430 via chroot didn’t help.
This is different from what I’m used to seeing (with ipv6.disable=1), extra 2 lines in loopback description:

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet 192.168.###.###/24 brd 192.168.0.255 scope global lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:12:##:##:##:## brd ff:ff:ff:ff:ff:ff
    altname enp2s12
    inet 192.168.###.###/24 brd 192.168.0.255 scope global eth0
       valid_lft forever preferred_lft forever

This is without ipv6.disable=1:

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet 192.168.###.###/24 brd 192.168.0.255 scope global lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:12:3f:37:c1:4b brd ff:ff:ff:ff:ff:ff
    altname enp2s12
    inet 192.168.###.###/24 brd 192.168.0.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 ####:####:####:#:#:####:####:####/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 2124sec preferred_lft 1524sec
    inet6 ####::###:####:####:####/64 scope link 
       valid_lft forever preferred_lft forever

Installing and enabling wicked makes ping work, but only after a long wait, following:

ping: socket: Address family not supported by protocol

Other commands dependent on network are delayed as well, such as zypper ref, and inexplicably, mc, which takes around half a minute to start instead of <3sec. ip a remains the same too. systemd-resolved.service is disabled.

When attempting a noauto NFS mount listed in fstab, this results:

Created symlink /run/system/remote-fs.target.wants/rpc-statd.service -> /usr/lib/systemd/rpc-statd.service.
mount.nfs: Connection refused

What’s left to check? What’s going on here?

Show full output of “strace -f ping www.google.com”.

I hope this will do:

# strace -fo straceping.txt ping -c3 www.google.com
ping: socket: Address family not supported by protocol
PING www.google.com (64.233.177.99) 56(84) bytes of data.
64 bytes from yx-in-f99.1e100.net (64.233.177.99): icmp_seq=1 ttl=109 time=29.6 ms
64 bytes from yx-in-f99.1e100.net (64.233.177.99): icmp_seq=2 ttl=109 time=31.7 ms
64 bytes from yx-in-f99.1e100.net (64.233.177.99): icmp_seq=3 ttl=109 time=32.6 ms

--- www.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 29.556/31.286/32.568/1.269 ms

https://paste.opensuse.org/64787030

So it works. And what made you pretend that it does not? What prevented you from showing this output from the very beginning? This changes serious problem into cosmetic issue.

Anyway

1514  socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP) = 3
1514  socket(AF_INET6, SOCK_DGRAM, IPPROTO_ICMPV6) = -1 EAFNOSUPPORT (Address family not supported by protocol)
1514  write(2, "ping: ", 6)             = 6
1514  write(2, "socket", 6)             = 6
1514  write(2, ": Address family not supported b"..., 42) = 42
1514  write(2, "
", 1)                 = 1

ping tries to open both IP4 and IP6 sockets and it fails because you prohibited IPv6. So what exactly is your question?

I got the title wrong. I didn’t pretend anything. The real problem is name resolution failure using systemd-networkd instead of wicked.

What prevented you from showing this output from the very beginning?
1-Not knowing how to use strace; 2-Not knowing to use strace; 3-Not knowing what to look for in strace output.

Anyway

1514  socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP) = 3
1514  socket(AF_INET6, SOCK_DGRAM, IPPROTO_ICMPV6) = -1 EAFNOSUPPORT (Address family not supported by protocol)
1514  write(2, "ping: ", 6)             = 6
1514  write(2, "socket", 6)             = 6
1514  write(2, ": Address family not supported b"..., 42) = 42
1514  write(2, "
", 1)                 = 1

ping tries to open both IP4 and IP6 sockets and it fails because you prohibited IPv6. So what exactly is your question?[/QUOTE]Apparently more than one question.

  1. Why did reverting from systemd-networkd to wicked stop the name resolution failure?
  2. Where else is besides ipv6.disable=1 on kernel command line is it required to configure prevention of any attempts to use IPV6?
  3. Why did ivp6.disable on kernel command line stop being enough to prevent any attempts to use IPV6?
  4. Why has it started to take 50+ seconds to start MC when there is a name resolution failure?
  5. Why does attempting a noauto NFS mount configured in fstab generating a “Created symlink…” message, and a connection refused response?
  6. Why is stop job for Network Time Synchronization delaying shutdown when the NTS start job couldn’t complete in the first place?

All these failures and delays are new since the previous zypper dup (TW20210423). I’ve been switching all my TW installations from Wicked to Systemd little by little in recent days and weeks. This is the first to have DNS failures because of this switching. It’s one of two 32 bit TW upgrades within the past two weeks. The other was not a problem, done on the 19th. I just finished upgrading a 64bit to 20210430 which was already using systemd-networkd. While it reports the same unsupported protocol error, a red herring, there is no DNS caused delay with ping or MC.

I’ve switched back from wicked to systemd-networkd, which has restored name resolution failure. So, I’ve run strace -fo straceping-systemd.txt ping -c3 -4 www.google.com and uploaded it to SUSE Paste .

Many packages meanwhile try to use ipv6 sh… eeehm stuff.

If you go with wicked, show output of ip a, most likely you have an IPv6 address for your NIC then (if not disabled in Yast 1. generally for Wicked and 2. for EACH interface DHCP settings (change to IPv4 only).

I disable it (besides kernel parameter on boot) in Yast (Network settings) and for each interface in NetworkManager (IPv6: Ignored), there is not much more you can do. If your router (and your clients) uses IPv6 besides IPv4 on your LAN, in my opinion there is a side-channel that is hard to protect against.

Even my router (OPNsense) is not capable to turn off ALL ipv6 functionality (even for the kernel). Although there is hardly any way to really control traffic on the level of specific clients on your LAN with ipv6. Nobody really cares, apparently. It’s like cancer, some day they tell you “it’s normal, deal with it…”.

I refrained from setting net.ipv6.all.disable_ipv6 = 1 but turned off ipv6 on a link basis: Systemd-networkd - openSUSE Wiki