1

How to translate the below to a Netplan yaml file with networkd as the renderer?

At the command line these commands work and build a GRE tunnel with an MTU of 1476.

ip tunnel add gre1 mode gre remote [x.x.x.x] local [y.y.y.y] ttl 255
ip link set gre1 up
ip addr add [z.z.z.z]/30 dev gre1

Where [x.x.x.x] is the remote GRE endpoint, [y.y.y.y] is the private IP of GRE endpoint and [z.z.z.z] is the address assigned to the local GRE interface.

Tried using the following yaml fragment the tunnel is defined but MTU is 'ignored' and the LAN i/f MTU-24 is set.

    tunnels:
        gre1:
            mode: gre
            local: [y.y.y.y]
            remote: [x.x.x.x]
            mtu: 1476
            addresses:
                - [z.z.z.z]/30

The output from various commands:

# systemctl status systemd-networkd | grep gre1
Sep 16 11:49:40 ip-y-y-y-y systemd-networkd[1283]: gre1: Cannot enable IPv6 for interface gre1: No such file or directory
Sep 16 11:49:40 ip-y-y-y-y systemd-networkd[1283]: gre1: Could not bring up interface: Address family not supported by protocol

# 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
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000
    link/ether 16:74:7e:e0:07:46 brd ff:ff:ff:ff:ff:ff
    inet [y.y.y.y]/24 brd [y.y.y.255] scope global dynamic ens5
       valid_lft 2631sec preferred_lft 2631sec
    inet6 fe80::1474:7eff:fee0:746/64 scope link
       valid_lft forever preferred_lft forever
3: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN group default qlen 1000
    link/gre 0.0.0.0 brd 0.0.0.0
4: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
5: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
6: gre1@NONE: <POINTOPOINT,NOARP> mtu 8977 qdisc noop state DOWN group default qlen 1000
    link/gre [y.y.y.y] peer [x.x.x.x]
    inet [z.z.z.z]/30 brd [z.z.z.255] scope global gre1
       valid_lft forever preferred_lft forever
0

:embarrassed: The yaml fragment in the question is effective after a system restart, Just running 'netplan apply' wasn't enough.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.