• Re: How to create a persistent loopback address

    From john doe@21:1/5 to Timothy M Butterworth on Sat Nov 30 14:10:01 2024
    On 11/30/24 08:22, Timothy M Butterworth wrote:
    I created a loopback interface with the following commands:

    sudo ip link add name ospf-lo type dummy
    sudo ip link set ospf-lo up
    sudo ip addr add 10.0.0.1/32 dev ospf-lo

    How do I make this interface persistent? I am on Debian Trixie and using NetworkManager.


    By using NM ([1]) and googling to manage the dummy interface.

    [1] https://unix.stackexchange.com/questions/513578/modern-way-to-configure-dummy0-in-etc-network-interfaces-or-similar

    --
    John Doe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to Timothy M Butterworth on Sat Nov 30 20:10:02 2024
    Hi,

    On Sat, Nov 30, 2024 at 01:47:42PM -0500, Timothy M Butterworth wrote:
    On Sat, Nov 30, 2024 at 2:22 AM Timothy M Butterworth < timothy.m.butterworth@gmail.com> wrote:
    sudo ip link add name ospf-lo type dummy
    sudo ip link set ospf-lo up
    sudo ip addr add 10.0.0.1/32 dev ospf-lo

    How do I make this interface persistent? I am on Debian Trixie and using NetworkManager.

    I tried the following but no success.

    Surely if you are using NetworkManager you would just do it with nmcli.
    I can't recite the incantations off the top of my head but I imagine
    that creating a new interface is pretty simple.

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to Timothy M Butterworth on Sat Nov 30 20:20:01 2024
    Hi,

    On Sat, Nov 30, 2024 at 02:10:58PM -0500, Timothy M Butterworth wrote:
    On Sat, Nov 30, 2024 at 2:22 AM Timothy M Butterworth < timothy.m.butterworth@gmail.com> wrote:
    How do I make this interface persistent? I am on Debian Trixie and using >> NetworkManager.

    I got it to work with:
    sudo cat /etc/network/interfaces.d/ospf.cfg
    auto ospf
    iface ospf inet static
    address 10.0.0.1/32
    pre-up ip link add ospf type dummy

    I personally would not use ifupdown config files on a system that was
    managed with NetworkManager unless absolutely necessary. It just seems confusing for whichever admin comes next, such as me one week later.

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From john doe@21:1/5 to Andy Smith on Sat Nov 30 20:20:01 2024
    On 11/30/24 20:04, Andy Smith wrote:
    Hi,

    On Sat, Nov 30, 2024 at 01:47:42PM -0500, Timothy M Butterworth wrote:
    On Sat, Nov 30, 2024 at 2:22 AM Timothy M Butterworth <
    timothy.m.butterworth@gmail.com> wrote:
    sudo ip link add name ospf-lo type dummy
    sudo ip link set ospf-lo up
    sudo ip addr add 10.0.0.1/32 dev ospf-lo

    How do I make this interface persistent? I am on Debian Trixie and using >>> NetworkManager.

    I tried the following but no success.

    Surely if you are using NetworkManager you would just do it with nmcli.
    I can't recite the incantations off the top of my head but I imagine
    that creating a new interface is pretty simple.



    Not sure what the OP is trying to do here [1].

    --
    John Doe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to Andy Smith on Sat Nov 30 20:20:01 2024
    On Sat, Nov 30, 2024 at 07:04:22PM +0000, Andy Smith wrote:
    Surely if you are using NetworkManager you would just do it with nmcli.
    I can't recite the incantations off the top of my head but I imagine
    that creating a new interface is pretty simple.

    My first web search led me to:

    $ sudo nmcli conn add \
    type dummy \
    ifname ospf-lo \
    ipv4.method manual \
    ipv4.address 10.0.0.1/32 \
    ipv6.method disable
    Connection 'dummy-ospf-lo' (c21bdb21-375f-484b-9c7e-4d088c139fc3) successfully added.
    $ ip a sh dev ospf-lo
    6: ospf-lo: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 42:39:23:bd:ab:e1 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.1/32 scope global noprefixroute ospf-lo
    valid_lft forever preferred_lft forever

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From john doe@21:1/5 to john doe on Sat Nov 30 20:30:02 2024
    On 11/30/24 20:11, john doe wrote:
    On 11/30/24 20:04, Andy Smith wrote:
    Hi,

    On Sat, Nov 30, 2024 at 01:47:42PM -0500, Timothy M Butterworth wrote:
    On Sat, Nov 30, 2024 at 2:22 AM Timothy M Butterworth <
    timothy.m.butterworth@gmail.com> wrote:
    sudo ip link add name ospf-lo type dummy
    sudo ip link set ospf-lo up
    sudo ip addr add 10.0.0.1/32 dev ospf-lo

    How do I make this interface persistent? I am on Debian Trixie and
    using
    NetworkManager.

    I tried the following but no success.

    Surely if you are using NetworkManager you would just do it with nmcli.
    I can't recite the incantations off the top of my head but I imagine
    that creating a new interface is pretty simple.



    Not sure what the OP is trying to do here [1].


    [1] https://lists.debian.org/debian-user/2024/11/msg00827.html

    Sorry for forgetting the URL.

    --
    John Doe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to john doe on Sat Nov 30 20:40:01 2024
    Hi,

    On Sat, Nov 30, 2024 at 08:25:31PM +0100, john doe wrote:
    On 11/30/24 20:11, john doe wrote:
    Not sure what the OP is trying to do here [1].

    [1] https://lists.debian.org/debian-user/2024/11/msg00827.html

    Yes, I too was confused why they had ignored your advice (to use nmcli).
    I was more asking in the hope they would elaborate, but so far we see
    only ifupdown.

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)