I intend to use systemd-nspawn for various services. Host is a Fedora 32 box. So far
everything works except for IPv6 accessibility from outside my subnet. So I guess the
configuration of the gateway is wrong.
What I did:
- on host in /etc/systemd/nspawn/test.nspawn:
[Network]
VirtualEthernet=yes
MACVLAN=enp4s0
bridge=vbr6s0
- inside container test
I find 2 interfaces: host0@if6 and mv-enp4s0@if2 as expected.
Configuration in /etc/systemd/network/10-mv.network:
[Match]
name=mv-enp*
[Network]
DHCP=no
DNS=10.10.10.1
IPv6AcceptRA=True
[Address]
Address=134.102.x.y/27
[Address]
Address=2001:xxx:yyy:zzz::131/64
[Route]
Gateway=2001:xxx:yyy:zzz::1
GatewayOnlink=yes
[Route]
Gateway=134.102.x.y
GatewayOnlink=yes
These results in:
[...]# ip a
1: lo: ....
2: host0@if6: ... (internal network via bridge, works fine)
3: mv-enp4s0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
group default qlen 1000
link/ether 56:41:75:d2:3b:e8 brd ff:ff:ff:ff:ff:ff:ff link-netnsid 0
inet 134.102.x.y/27 brd 134.102.x.y scope global mv-enp4s0
valid_lft forever preferred_lft forever
inet6 2001:xxx:yyy:zzz::131/0 scope global
valid_lft forever preferred_lft forever
inet6 fe80::5441:75ff:fed2:3be8/64 scope link
valid_lft forever preferred_lft forever
Via IPv4 everything works without problems. Via IPv6 I can connect to all machines within
my subnet, but not beyond.
I'm wondering about the /0 in the IPv6 address though.
On the host, both IPv4 and IPv6 work fine. There the configuration is done by
NetworkManager. The IPv6 gateway is configured using
/etc/sysconfig/network-scripts/ifcfg-enp4s0
...
IPV6_DEFAULTGW="2001:xxx:yyy:zzz::1%enp4s0"
…
(The %enp4s0 part is required)
Every hint greatly appreciated.
Show replies by date