missing point-to-point option in netplan configuration

Bug #1767607 reported by Christoph Neukirch on 2018-04-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netplan
High
Unassigned
netplan.io (Ubuntu)
High
Unassigned

Bug Description

Hi,

missing an option in netplan configuration to use point-to-point interfaces.

Example /etc/network/interfaces configuration:

iface ens3 inet static
  address 10.20.30.40
  netmask 255.255.255.255
  gateway 10.10.10.1
  pointopoint 10.10.10.1

# ip addr show ens3
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:e3:a0:c8 brd ff:ff:ff:ff:ff:ff
    inet 10.20.30.40 peer 10.10.10.1/32 scope global ens3
       valid_lft forever preferred_lft forever

Currently I'm trying to workaround with /usr/lib/networkd-dispatcher/routable.d/10-point-to-point, which doesn't seem to work while booting, but with a following `netplan apply`:

#! /bin/bash

while [ ! $(ip link show ens3 | perl -nE 'say /state\ UP/') ] ; do
  wait 1
done

ip addr add 10.20.30.40/32 peer 10.10.10.1 dev ens3
ip route add default via 10.10.10.1 dev ens3

If implemented, maybe something like the following two ideas?

network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      addresses:
        - 10.20.30.40/32 peer 10.10.10.1
      gateway4: 10.10.10.1

or:

network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      addresses:
        - peer: 10.10.10.1
          10.20.30.40/32
      gateway4: 10.10.10.1

Dimitri John Ledkov (xnox) wrote :

https://systemd.network/systemd.network.html#Peer=:
.network supports [Address] Peer=
with same input as Address= in there.

Not sure about NetworkManager.

Christoph Neukirch (launchpam) wrote :

Hi Dimitri,

the report is for netplan.io, not for systemd.network.

kind regards
Christoph

Won't this work?

network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      addresses:
        - 10.20.30.40/32
      routes:
        - to: 0.0.0.0/0
          via: 10.10.10.1
          on-link: true

Clearly we need to do better for how to easily define a peer-to-peer interface, since this isn't so easily discoverable.

Changed in netplan.io (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in netplan:
status: New → Triaged
importance: Undecided → High
Christoph Neukirch (launchpam) wrote :

Thanks very much Mathieu,

I can affirm your suggested configuration is working.

Haven't found any considerations or recommendations about better to use a pointopoint interface with an IP as default route or the (for me) new way with the on-link route. Perhaps it would be good to have the choice for both ways and at least - as you already have mentioned - a better discoverable documentation how to reach the goal :-)

kind regards
Christoph

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers