So I had a bit of a hard time configuring networking on my server:

My network environment requires me to configure a gateway outside the
subnet. This worked fine for IPv4 by adding two entries to
/etc/route.conf, one route to the gateway and one default route via the
gateway. However, for IPv6 it does not seem to work. Attempting to open
an IPv6 connection results in "sendmsg: Network is down". See the
details of my configuration and the errors below.

I am aware of IPv6 router advertisements and stateless
auto-configuration, but I have my reasons for not using that.

-bash-5.0$ cat /etc/ifconfig.vioif0
up
inet 195.39.247.17 netmask 255.255.255.255
inet6 2a0f:4ac0::17 prefixlen 128 alias

-bash-5.0$ cat /etc/route.conf
inet 195.39.247.8 -static -link -iface vioif0
inet default 195.39.247.8
inet6 2a0f:4ac0::8 -static -link -iface vioif0
inet6 default 2a0f:4ac0::8

-bash-5.0$ /sbin/ping6 petabyte.dev
PING6(56=40+8+8 bytes) 2a0f:4ac0::17 --> 2a0f:4ac0::4
ping6: sendmsg: Network is down
ping6: wrote petabyte.dev 16 chars, ret=-1
ping6: sendmsg: Network is down
ping6: wrote petabyte.dev 16 chars, ret=-1
^C
--- petabyte.dev ping6 statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss

-bash-5.0$ /sbin/ifconfig
vioif0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ec_capabilities=0x1<VLAN_MTU>
        ec_enabled=0
        address: 52:54:00:d6:7a:24
        inet 195.39.247.17/32 broadcast 195.39.247.17 flags 0
        inet6 fe80::5054:ff:fed6:7a24%vioif0/64 flags 0 scopeid 0x1
        inet6 2a0f:4ac0::17/128 flags 0
lo0: flags=0x8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33624
        inet 127.0.0.1/8 flags 0
        inet6 ::1/128 flags 0x20<NODAD>
        inet6 fe80::1%lo0/64 flags 0 scopeid 0x2
-bash-5.0$ /sbin/route show
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use    Mtu
Interface
default            osmium             UGS         -        -      -  vioif0
127/8              localhost          UGRS        -        -  33624  lo0
localhost          lo0                UHl         -        -  33624  lo0
osmium             76:69:6f:69:66:30  UHS         -        -      -  vioif0
amethyst           link#1             UHl         -        -      -  lo0
195.39.247.17/32   link#1             UC          -        -      -  vioif0
osmium             52:54:00:ea:f5:eb  UHL         -        -      -  vioif0

Internet6:
Destination        Gateway            Flags    Refs      Use    Mtu
Interface
::/104             localhost          UGRS        -        -  33624  lo0
::/96              localhost          UGRS        -        -  33624  lo0
default            osmium.petabyte.de UGS         -        -      -  vioif0
localhost          lo0                UHl         -        -  33624  lo0
::127.0.0.0/104    localhost          UGRS        -        -  33624  lo0
::224.0.0.0/100    localhost          UGRS        -        -  33624  lo0
::255.0.0.0/104    localhost          UGRS        -        -  33624  lo0
::ffff:0.0.0.0/96  localhost          UGRS        -        -  33624  lo0
2001:db8::/32      localhost          UGRS        -        -  33624  lo0
2002::/24          localhost          UGRS        -        -  33624  lo0
2002:7f00::/24     localhost          UGRS        -        -  33624  lo0
2002:e000::/20     localhost          UGRS        -        -  33624  lo0
2002:ff00::/24     localhost          UGRS        -        -  33624  lo0
osmium.petabyte.de 76:69:6f:69:66:30  UHS         -        -      -  vioif0
amethyst.petabyte. link#1             UHl         -        -      -  lo0
fe80::/10          localhost          UGRS        -        -  33624  lo0
fe80::%vioif0/64   link#1             UC          -        -      -  vioif0
fe80::5054:ff:fed6 link#1             UHl         -        -      -  lo0
fe80::%lo0/64      fe80::1            U           -        -      -  lo0
fe80::1            lo0                UHl         -        -      -  lo0
ff01:1::/32        link#1             UC          -        -      -  vioif0
ff01:2::/32        localhost          UC          -        -  33624  lo0
ff02::%vioif0/32   link#1             UC          -        -      -  vioif0
ff02::%lo0/32      localhost          UC          -        -  33624  lo0
fe80::5054:ff:feea 52:54:00:ea:f5:eb  UHL         -        -      -  vioif0

-bash-5.0$

Reply via email to