missing point-to-point option in netplan configuration

Bug #1767607 reported by Christoph Neukirch
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Netplan
Triaged
Wishlist
Unassigned
netplan.io (Ubuntu)
Triaged
Wishlist
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

Revision history for this message
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.

Revision history for this message
Christoph Neukirch (launchpam) wrote :

Hi Dimitri,

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

kind regards
Christoph

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

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
Revision history for this message
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

Revision history for this message
Lukas Märdian (slyon) wrote :

As there is a workaround available, I'll be lowering the Importance of this bug. I guess it would still be nice to have an easier way to define a point-to-point connection.

Changed in netplan.io (Ubuntu):
importance: High → Wishlist
Changed in netplan:
importance: High → Wishlist
Revision history for this message
Ryan Murray (ubuntu-hz) wrote :

The workaround creates a rather complicated routing table compared to pointopoint, which can start to be a problem when you have many pointopoint interfaces, and many routes. It's really not the same.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.