0

I haven't seen any options to setup up DSL connection in /etc/netplan?
I know it's possible via pppoeconf, but I'm not sure how to modify the dsl-provider file/name (I need to setup for 2 different providers), so that it will still use it on boot time.

DenisZ
  • 223

1 Answers1

1

netplan does not directly support PPPoE connections today (netplan 0.105). There are two possible solutions using the supported tools in Ubuntu main.

  • I use a networkd-dispatcher script in /etc/networkd-dispatcher/routable.d which starts the ppp connection whenever the ethernet device comes up:

    #!/bin/sh
    

    set -e

    if [ "$IFACE" != wan ]; then exit 0 fi

    pppd call centurylink

    sleep 5

    ip route change default dev ppp0 advmss 1482

    I then have an additional script linked from each of /etc/networkd-dispatcher/{degraded,dormant,no-carrier,off}.d/ which stops it when it goes down:

    #!/bin/sh
    

    set -e

    if [ "$IFACE" != wan ]; then exit 0 fi

    if [ -e /run/ppp-centurylink.pid ]; then pid=$(cat /run/ppp-centurylink.pid) kill "$pid" fi

    This approach connects the ppp configuration you have created (via pppoeconf or other means) to networkd.

  • You can configure your PPPoE connection directly in NetworkManager.

slangasek
  • 5,828