I am trying to set up a IPIP tunnel in Ubuntu 18.04 LTS via Netplan config.
I managed to set up the tunnel with routes from server A to server B with those ip commands:
85.ll.ll.ll is server A
85.rr.rr.rr is server B
ip tunnel add tunnel-to-b mode ipip remote 85.rr.rr.rr local 85.ll.ll.ll ip link set tunnel-to-b up ip addr add 10.0.0.18/24 dev tunnel-to-b ip route add 10.0.0.0/8 dev tunnel-to-b ip route add 172.16.0.0/12 dev tunnel-to-b ip route add 192.168.0.0/16 dev tunnel-to-b
but I like to have this configured with Netplan config
and have tried this out
network: version: 2 renderer: networkd ethernets: ens7: addresses: - 10.6.170.1/24 nameservers: addresses: - 220.127.116.11 - 18.104.22.168 search: [private.local] optional: false ens8: dhcp4: yes dhcp6: yes gateway4: 85.ll.ll.1 tunnels: tunnel-to-b: mode: ipip addresses: - 10.0.0.0/8 local: 85.ll.ll.ll remote: 85.rr.r.rr mtu: 1480 routes: - to: 10.0.0.0/8 via: tunnel-to-b
and I get the following error message:
/etc/netplan/01-netcfg.yaml:27:8: Error in network definition: expected sequence to: 10.0.0.0/8 ^
The question is how to setup the tunnel with routes with Netplan?