Score:0

Setup DSL connection via netplan?

cn flag

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.

Score:1
us flag

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.

DenisZ avatar
cn flag
Thanks @slangsek, When I ran pppoeconf it will create 2 files in `/etc/ppp/peers`, so I was able to check, update config there in the dsl-provider file, and it has a full setup. I didn't try with networkd-dispacher, not sure if any better. It's too bad netplan doesn't have that option
us flag
`pppoeconf` generates the config for ppp, but does not address the question of how you manage the connection. You can do it manually from the commandline, but if you want the connection to start automatically and stay up, interfacing with either networkd-dispatcher or NetworkManager is still a good idea.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.