How configure an IPv6 gateway inside a systemd-nspawn container using Mac-Vlan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux