• Debian 11 and IPv4 static IP address

    From David Christensen@21:1/5 to All on Fri Jul 5 04:10:01 2024
    debian-user:

    I have built a VirtualBox virtual machine and installed Debian 11 with
    SSH server and standard system utilities only. I plan to use the VM to
    run the UniFi Network Controller to manage the UniFi equipment on my
    SOHO LAN:

    root@unifi:~# cat /etc/debian_version ; uname -a
    11.10
    Linux unifi 5.10.0-30-amd64 #1 SMP Debian 5.10.218-1 (2024-06-01) x86_64 GNU/Linux


    The VM currently has a DHCP address. I would like to set a static IPv4 address. The Debian wiki tells me to edit /etc/network/interfaces and
    provides some example settings that I believe I can adapt to my use-case:

    https://wiki.debian.org/NetworkConfiguration#Configuring_the_interface_manually

    auto eth0
    iface eth0 inet static
    address 192.0.2.7/24
    gateway 192.0.2.254


    The Debian wiki also says:

    "Make sure to disable all DHCP services, e.g. dhcpcd."


    What is the correct method to "disable all DHCP services"?


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Felix Miata@21:1/5 to All on Fri Jul 5 04:40:01 2024
    David Christensen composed on 2024-07-04 19:06 (UTC-0700):

    debian-user:

    I have built a VirtualBox virtual machine and installed Debian 11 with
    SSH server and standard system utilities only. I plan to use the VM to
    run the UniFi Network Controller to manage the UniFi equipment on my
    SOHO LAN:

    root@unifi:~# cat /etc/debian_version ; uname -a
    11.10
    Linux unifi 5.10.0-30-amd64 #1 SMP Debian 5.10.218-1 (2024-06-01) x86_64 GNU/Linux

    The VM currently has a DHCP address. I would like to set a static IPv4 address. The Debian wiki tells me to edit /etc/network/interfaces and provides some example settings that I believe I can adapt to my use-case:

    https://wiki.debian.org/NetworkConfiguration#Configuring_the_interface_manually

    auto eth0
    iface eth0 inet static
    address 192.0.2.7/24
    gateway 192.0.2.254

    The Debian wiki also says:

    "Make sure to disable all DHCP services, e.g. dhcpcd."

    What is the correct method to "disable all DHCP services"?

    I think there are more than one. One thing is to check what is enabled, then disable or uninstall whatever owns the unit(s):

    systemctl list-unit-files | egrep 'net|dhcp'

    Do the same with whatever "manages" /etc/resolv.conf, and create a regular file of
    your own design.

    I don't use VMs, but I did several hours ago instruct several hours ago using systemd-network to setup static IP service for a *buntu user who couldn't get netplan sorted: <https://www.linuxquestions.org/questions/ubuntu-63/netplan-apply-no-longer-setting-static-ip-address-4175738702/#post6512274>

    I've been using systemd-network static IPs on everything for several years, including Bullseye.
    --
    Evolution as taught in public schools is, like religion,
    based on faith, not based on science.

    Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

    Felix Miata

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Christensen@21:1/5 to Felix Miata on Fri Jul 5 05:40:01 2024
    On 7/4/24 19:30, Felix Miata wrote:
    David Christensen composed on 2024-07-04 19:06 (UTC-0700):
    I have built a VirtualBox virtual machine and installed Debian 11 with
    SSH server and standard system utilities only. I plan to use the VM to
    run the UniFi Network Controller to manage the UniFi equipment on my
    SOHO LAN:
    <snip>
    The VM currently has a DHCP address. I would like to set a static IPv4
    address. The Debian wiki tells me to edit /etc/network/interfaces and
    provides some example settings that I believe I can adapt to my use-case:
    <snip>
    The Debian wiki also says:
    "Make sure to disable all DHCP services, e.g. dhcpcd."
    What is the correct method to "disable all DHCP services"?

    I think there are more than one. One thing is to check what is enabled, then disable or uninstall whatever owns the unit(s):

    systemctl list-unit-files | egrep 'net|dhcp'


    2024-07-04 20:26:35 root@unifi ~
    # systemctl list-unit-files | egrep 'net|dhcp'
    networking.service enabled enabled systemd-network-generator.service disabled disabled systemd-networkd-wait-online.service disabled disabled systemd-networkd.service disabled enabled systemd-networkd.socket disabled enabled network-online.target static -
    network-pre.target static -
    network.target static -


    Do the same with whatever "manages" /etc/resolv.conf,


    How do I determine what manages /etc/resolv.conf?


    and create a regular file of your own design.

    I don't use VMs, but I did several hours ago instruct several hours ago using systemd-network to setup static IP service for a *buntu user who couldn't get netplan sorted: <https://www.linuxquestions.org/questions/ubuntu-63/netplan-apply-no-longer-setting-static-ip-address-4175738702/#post6512274>

    I've been using systemd-network static IPs on everything for several years, including Bullseye.


    2024-07-04 20:15:43 root@laalaa ~
    # man systemd-network
    No manual entry for systemd-network


    How do you use systemd-network to configure an interface with a static
    IP address?


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Felix Miata@21:1/5 to All on Fri Jul 5 06:10:01 2024
    David Christensen composed on 2024-07-04 20:29 (UTC-0700):

    Felix Miata wrote:

    David Christensen composed on 2024-07-04 19:06 (UTC-0700):

    I have built a VirtualBox virtual machine and installed Debian 11 with
    SSH server and standard system utilities only. I plan to use the VM to
    run the UniFi Network Controller to manage the UniFi equipment on my
    SOHO LAN:
    <snip>
    The VM currently has a DHCP address. I would like to set a static IPv4
    address. The Debian wiki tells me to edit /etc/network/interfaces and
    provides some example settings that I believe I can adapt to my use-case: >>> <snip>
    The Debian wiki also says:
    "Make sure to disable all DHCP services, e.g. dhcpcd."
    What is the correct method to "disable all DHCP services"?

    I think there are more than one. One thing is to check what is enabled, then >> disable or uninstall whatever owns the unit(s):

    systemctl list-unit-files | egrep 'net|dhcp'

    2024-07-04 20:26:35 root@unifi ~
    # systemctl list-unit-files | egrep 'net|dhcp'
    networking.service enabled enabled systemd-network-generator.service disabled disabled systemd-networkd-wait-online.service disabled disabled systemd-networkd.service disabled enabled systemd-networkd.socket disabled enabled network-online.target static -
    network-pre.target static -
    network.target static -

    Usually the only unit among the above I need enabled is systemd-networkd.socket.

    Do the same with whatever "manages" /etc/resolv.conf,

    How do I determine what manages /etc/resolv.conf?

    I expect whatever /etc/resolv.conf symlinks to could be the clue you need, if you
    can't grep some "solv" from list-unit-files output, and if it's not just a symlink
    to something in the /run/ tree. /etc/resolv.d/ might be another place to look. I've been using systemd-network so long I don't remember the hodgepodge of old ways to "manage" this file that normally needs no management with static IP usage.
    NetworkMangler is probably one candidate not installed here. Could be part of what
    networking.service does too. It's also not available here. Packages named knot-resolver, resolvconf and systemd-resolved exist, perhaps others.

    and create a regular file of your own design.

    I don't use VMs, but I did several hours ago instruct several hours ago using
    systemd-network to setup static IP service for a *buntu user who couldn't get
    netplan sorted:
    <https://www.linuxquestions.org/questions/ubuntu-63/netplan-apply-no-longer-setting-static-ip-address-4175738702/#post6512274>

    I've been using systemd-network static IPs on everything for several years, >> including Bullseye.

    2024-07-04 20:15:43 root@laalaa ~
    # man systemd-network
    No manual entry for systemd-network

    systemd-network is the package name in newer versions of systemd. That URL shows
    the relevant systemd unit names are systemd-networkd.*. man systemd-networkd works
    here in the newer releases I have booted.

    How do you use systemd-network to configure an interface with a static
    IP address?

    That URL shows how I did it, a file in /etc/systemd/network/ with the vitals, similar to more traditional NIC setup files.
    --
    Evolution as taught in public schools is, like religion,
    based on faith, not based on science.

    Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

    Felix Miata

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Christensen@21:1/5 to All on Sat Jul 6 03:20:01 2024
    On 7/4/24 21:08, Felix Miata wrote:
    <snip>

    On 7/4/24 21:10, jeremy ardley wrote:
    <snip>

    On 7/5/24 11:44, Franco Martelli wrote:
    <snip>


    Thank you all for the replies.


    I can find no statement in The Debian Administrator's Handbook regarding disabling DHCP when using a static IP:

    https://www.debian.org/doc/manuals/debian-handbook/sect.network-config.en.html#sect.interface-ethernet


    Similarly, when STFW "Debian 11 static IP" and reading articles.


    Browsing the Debian Wiki page "NetworkConfiguration" -> "Info" link:

    https://wiki.debian.org/NetworkConfiguration?action=info

    The following sentence:

    "Make sure to disable all DHCP services, e.g. dhcpcd."

    Was added at revision 97:

    97 2017-12-27 10:50:07 25741 to previous ?mrsgreen note for static
    ip's: disable dhcp services view


    Who is "mrsgreen"?


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Christensen@21:1/5 to All on Sat Jul 6 07:00:01 2024
    On 7/5/24 19:06, Max Nikulin wrote:
    <snip>

    On 7/5/24 21:14, George at Clug wrote:
    <snip>


    Thank you for your replies.


    The underlying issue appears to be that my old-school Linux console
    network administration skills have been rendered obsolete by systemd and NetworkManager. I typically install Xfce when installing Debian, and
    the panel NetworkManager Applet has made it too easy to "monkey see,
    monkey do" without understanding the details.


    What I really need is a good book or document that explains the design
    and implementation of networking with systemd and Network Manager on
    modern Debian GNU/Linux systems. Recommendations?


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From George at Clug@21:1/5 to All on Sat Jul 6 06:20:01 2024
    David,

    How are your efforts toward setting a static IP address going? Have you succeeded.

    I set up a lot of test servers (for fun and no profit), and hence work with Hypervisors (KVM more than Virtual Box), and have some experience in this area. But at this point I am not sure if you need assistance or were just generally asking questions
    about the comment in the documentation about dhcpcd.

    After checking my computers (VM and physical), I cannot find dhcpcd installed. Hence I guess the comment in the documentation was simply a reminder to anyone how may have been using that service, to ensure they disable it for their Static IP addressed
    interface?

    If you have having any challenges getting your VM to access your "UniFi equipment", please let me know.

    If the dhcpcd service was installed and running I presume:

    # systemctl stop dhcpcd.service will stop (deactivate) dhcpcd
    # systemctl disable dhcpcd.service will prevent it from restarting

    George.

    In my research before replying I found the following information which I found interesting. Thank you for raising your question.

    # systemctl list-units --type=service | grep dhcp

    https://wiki.debian.org/NetworkConfiguration
    Make sure to disable all DHCP services, e.g. dhcpcd.

    https://support.qacafe.com/cdrouter/knowledge-base/prevent-network-manager-from-controlling-an-interface/
    The preferred way to tell Network Manager to stop controlling an interface is by creating/updating a file in the /etc/NetworkManager/conf.d/ directory and giving it the following content. You can name the file anything with a .conf suffix, but all files
    in that directory will be read in asciibetical order. Files read later override snippets of files read earlier. Make sure the keyfile plugin is listed. Other plugins may be listed too.

    [main]
    plugins=ifcfg-rh,keyfile

    [keyfile]
    unmanaged-devices=interface-name:eth0;interface-name:wifi1

    The keyfile section can also include wildcards and exceptions as follows:

    [keyfile] unmanaged-devices=interface-name:eth*,except:interface-name:eth0,except:interface-name:eth3;interface-name:wifi*

    Interfaces can also be defined by their MAC addresses (in lower case):

    [keyfile]
    unmanaged-devices=mac:00:11:22:33:44:55;mac:66:77:88:99:00:aa

    Reboot for the changes to take effect.

    https://wiki.debian.org/NetworkConfiguration#Setting_up_an_Ethernet_Interface


    Gnome:
    sudo apt-get remove --purge network-manager-gnome network-manager network-manager-pptp network-manager-pptp-gnome
    KDE:
    sudo apt-get remove --purge knetworkmanager network-manager

    https://wiki.debian.org/SystemdNetworkd


    On Saturday, 06-07-2024 at 11:16 David Christensen wrote:
    On 7/4/24 21:08, Felix Miata wrote:
    <snip>

    On 7/4/24 21:10, jeremy ardley wrote:
    <snip>

    On 7/5/24 11:44, Franco Martelli wrote:
    <snip>


    Thank you all for the replies.


    I can find no statement in The Debian Administrator's Handbook regarding disabling DHCP when using a static IP:

    https://www.debian.org/doc/manuals/debian-handbook/sect.network-config.en.html#sect.interface-ethernet


    Similarly, when STFW "Debian 11 static IP" and reading articles.


    Browsing the Debian Wiki page "NetworkConfiguration" -> "Info" link:

    https://wiki.debian.org/NetworkConfiguration?action=info

    The following sentence:

    "Make sure to disable all DHCP services, e.g. dhcpcd."

    Was added at revision 97:

    97 2017-12-27 10:50:07 25741 to previous ?mrsgreen note for static
    ip's: disable dhcp services view


    Who is "mrsgreen"?


    David



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From George at Clug@21:1/5 to All on Sat Jul 6 09:40:02 2024
    On Saturday, 06-07-2024 at 14:51 David Christensen wrote:
    On 7/5/24 19:06, Max Nikulin wrote:


    On 7/5/24 21:14, George at Clug wrote:



    Thank you for your replies.


    The underlying issue appears to be that my old-school Linux console
    network administration skills have been rendered obsolete by systemd
    and
    NetworkManager.  I typically install Xfce when installing Debian,
    and
    the panel NetworkManager Applet has made it too easy to "monkey see,

    monkey do" without understanding the details.


    What I really need is a good book

    Thanks for that question about books.
    A 'book' ?  What is a 'book' ??
    I recall mother reading from such things when I was a child.

    (so hard to keep a straight face and not be laughing as I try to
    pretend that 'books' are old school, but sadly it is not far from the
    truth. My children know not the age before 'the Internet and Google
    were how to find knowledge', the idea of going to a library to
    research though 'books' seem so foreign to them. Soon asking an AI
    system for the answer will be the way, and Google and Internet
    searching, will be thought of as historic research techniques.)


    or document that explains the design
    and implementation of networking with systemd and Network Manager on

    modern Debian GNU/Linux systems.  Recommendations?

    Sadly I have not found any documentation (or books) for any thing
    Linux. It seems to be a 'piecing together of random statements' from
    comments and howtos on the Internet, and much personal
    experimentation.

    The closest to any systematic learning method I have seen would be Red
    Hat certifications. Not that I have even done any.

    As far as general networking books, CISCO certification books have
    been useful to me, but I am not a good reader, and they are lengthy.

    For Internet doco, see pages like   https://wiki.debian.org/NetworkConfiguration#Setting_up_an_Ethernet_Interface

    https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_virtualization/configuring-virtual-machine-network-connections_configuring-and-managing-virtualization

    https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/configuring-a-network-bridge_configuring-and-managing-networking#configuring-a-network-bridge-using-nmcli-commands_configuring-a-network-
    bridge

    https://www.ibm.com/docs/en/linux-on-systems?topic=choices-kvm-default-nat-based-networking

    https://wiki.libvirt.org/page/Libvirtd_and_dnsmasq

    https://wiki.libvirt.org/page/Networking



    David



    If it helps, two things I have done is;

    1) Set manual IP address in Network Manager so that it is managing the networking on my behalf. Particularly if I use a GUI, of which my
    favourite for VMs is XFCE as it is lightweight and works well with
    spice (that is not a Dune reference, btw). Network Manager can even do
    bridges, though I have had issues on initial power on.

    2) I have had success, uninstalling Network Manager and then
    configuring /etc/network/interfaces.

    Below are two examples from my own 'play' test environments.  

    Over time I have used bridging many times, so my VMs can be on the
    same network as my other PCs, servers, etc. Bridges are not necessary
    when all VMs are test VMs in their own private network running in the
    same Hypervisor. Some times I have  set up a route from my PCs' own
    network to the Hypervisor's provided network for its VMs.

    /etc/hosts              

    /etc/resolv.conf      (Generated by NetworkManager, if
    installed)

    /etc/network/interfaces

    Examples for Static IP addresses.

    # cat /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    source /etc/network/interfaces.d/*

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    allow-hotplug enp1s0
    iface enp1s0 inet static
        address 192.168.100.101/24
        gateway 192.168.100.1
        # dns-* options are implemented by the resolvconf package, if
    installed
        dns-nameservers 192.168.100.1
        dns-search tstenv.net


    # cat /etc/resolv.conf
    search tstenv.net
    nameserver 192.168.100.1


    $ cat /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    source /etc/network/interfaces.d/*

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    #allow-hotplug enp1s0
    auto enp1s0
    iface enp1s0 inet manual
    iface enp1s0 inet6 manual

    # bridge
    auto brRed

    iface brRed inet static
        address 192.168.100.103/24
        gateway 192.168.100.1
            network 192.168.100.0
            broadcast 192.168.100.255
            bridge_ports enp1s0
            bridge_stp off
            bridge_fd 0
            bridge_maxwait 0
        # dns-* options are implemented by the resolvconf package, if
    installed
        dns-nameservers 192.168.100.1
        dns-search tstenv.net

    # bridge allow auto conf for ipv6
    iface brRed inet6 auto
            accept_ra 1

    <html>
    <head>
    <style type="text/css">
    body,p,td,div,span{
    font-size:13px; font-family:Arial, Helvetica, sans-serif;
    };
    body p{
    margin:0px;
    }
    </style>
    </head>
    <body>On Saturday, 06-07-2024 at 14:51 David Christensen wrote:<br>
    &gt; On 7/5/24 19:06, Max Nikulin wrote:<br>
    &gt; &lt;snip&gt;<br>
    &gt; <br>
    &gt; On 7/5/24 21:14, George at Clug wrote:<br>
    &gt; &lt;snip&gt;<br>
    &gt; <br>
    &gt; <br>
    &gt; Thank you for your replies.<br>
    &gt; <br>
    &gt; <br>
    &gt; The underlying issue appears to be that my old-school Linux console <br> &gt; network administration skills have been rendered obsolete by systemd and <br>
    &gt; NetworkManager.&nbsp;&nbsp;I typically install Xfce when installing Debian, and <br>
    &gt; the panel NetworkManager Applet has made it too easy to "monkey see, <br> &gt; monkey do" without understanding the details.<br>
    &gt; <br>
    &gt; <br>
    &gt; What I really need is a good book<br>

    Thanks for that question about books. <br>
    A 'book' ?&nbsp;&nbsp;What is a 'book' ??<br>
    I recall mother reading from such things when I was a child.<br>

    (so hard to keep a straight face and not be laughing as I try to pretend that 'books' are old school, but sadly it is not far from the truth. My children know not the age before 'the Internet and Google were how to find knowledge', the idea of going to a
    library to research though 'books' seem so foreign to them. Soon asking an AI system for the answer will be the way, and Google and Internet searching, will be thought of as historic research techniques.)<br>


    &gt; or document that explains the design <br>
    &gt; and implementation of networking with systemd and Network Manager on <br> &gt; modern Debian GNU/Linux systems.&nbsp;&nbsp;Recommendations?<br>

    Sadly I have not found any documentation (or books) for any thing Linux. It seems to be a 'piecing together of random statements' from comments and howtos on the Internet, and much personal experimentation.<br>

    The closest to any systematic learning method I have seen would be Red Hat certifications. Not that I have even done any.<br>

    As far as general networking books, CISCO certification books have been useful to me, but I am not a good reader, and they are lengthy.<br>

    For Internet doco, see pages like&nbsp;&nbsp;<br>
    <a href="https://wiki.debian.org/NetworkConfiguration#Setting_up_an_Ethernet_Interface" target="_blank" class="normal-link">https://wiki.debian.org/NetworkConfiguration#Setting_up_an_Ethernet_Interface</a><br>

    <a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_virtualization/configuring-virtual-machine-network-connections_configuring-and-managing-virtualization" target="_blank" class="normal-link">
    https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_virtualization/configuring-virtual-machine-network-connections_configuring-and-managing-virtualization</a><br>

    <a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/configuring-a-network-bridge_configuring-and-managing-networking#configuring-a-network-bridge-using-nmcli-commands_configuring-a-
    network-bridge" target="_blank" class="normal-link">https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/configuring-a-network-bridge_configuring-and-managing-networking#configuring-a-network-
    bridge-using-nmcli-commands_configuring-a-network-bridge</a><br>

    <a href="https://www.ibm.com/docs/en/linux-on-systems?topic=choices-kvm-default-nat-based-networking" target="_blank" class="normal-link">https://www.ibm.com/docs/en/linux-on-systems?topic=choices-kvm-default-nat-based-networking</a><br>

    <a href="https://wiki.libvirt.org/page/Libvirtd_and_dnsmasq" target="_blank" class="normal-link">https://wiki.libvirt.org/page/Libvirtd_and_dnsmasq</a><br>

    <a href="https://wiki.libvirt.org/page/Networking" target="_blank" class="normal-link">https://wiki.libvirt.org/page/Networking</a><br>

    &gt; <br>
    &gt; <br>
    &gt; David<br>
    &gt; <br>
    &gt; <br>

    If it helps, two things I have done is;<br>

    1) Set manual IP address in Network Manager so that it is managing the networking on my behalf. Particularly if I use a GUI, of which my favourite for VMs is XFCE as it is lightweight and works well with spice (that is not a Dune reference, btw). Network
    Manager can even do bridges, though I have had issues on initial power on.<br>

    2) I have had success, uninstalling Network Manager and then configuring /etc/network/interfaces. <br>

    Below are two examples from my own 'play' test environments.&nbsp;&nbsp;<br>

    Over time I have used bridging many times, so my VMs can be on the same network as my other PCs, servers, etc. Bridges are not necessary when all VMs are test VMs in their own private network running in the same Hypervisor. Some times I have&nbsp;&nbsp;
    set up a route from my PCs' own network to the Hypervisor's provided network for its VMs.<br>

    /etc/hosts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>

    /etc/resolv.conf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Generated by NetworkManager, if installed)<br>

    /etc/network/interfaces<br>

    Examples for Static IP addresses.<br>

    # cat /etc/network/interfaces<br>
    # This file describes the network interfaces available on your system<br>
    # and how to activate them. For more information, see interfaces(5).<br>

    source /etc/network/interfaces.d/*<br>

    # The loopback network interface<br>
    auto lo<br>
    iface lo inet loopback<br>

    # The primary network interface<br>
    allow-hotplug enp1s0<br>
    iface enp1s0 inet static<br>
    &nbsp;&nbsp;&nbsp;&nbsp;address 192.168.100.101/24<br> &nbsp;&nbsp;&nbsp;&nbsp;gateway 192.168.100.1<br>
    &nbsp;&nbsp;&nbsp;&nbsp;# dns-* options are implemented by the resolvconf package, if installed<br>
    &nbsp;&nbsp;&nbsp;&nbsp;dns-nameservers 192.168.100.1<br> &nbsp;&nbsp;&nbsp;&nbsp;dns-search tstenv.net<br>


    # cat /etc/resolv.conf<br>
    search tstenv.net<br>
    nameserver 192.168.100.1<br>


    $ cat /etc/network/interfaces<br>
    # This file describes the network interfaces available on your system<br>
    # and how to activate them. For more information, see interfaces(5).<br>

    source /etc/network/interfaces.d/*<br>

    # The loopback network interface<br>
    auto lo<br>
    iface lo inet loopback<br>

    # The primary network interface<br>
    #allow-hotplug enp1s0<br>
    auto enp1s0<br>
    iface enp1s0 inet manual<br>
    iface enp1s0 inet6 manual<br>

    # bridge<br>
    auto brRed<br>

    iface brRed inet static<br>
    &nbsp;&nbsp;&nbsp;&nbsp;address 192.168.100.103/24<br> &nbsp;&nbsp;&nbsp;&nbsp;gateway 192.168.100.1<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;network 192.168.100.0<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;broadcast 192.168.100.255<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bridge_ports enp1s0<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bridge_stp off<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bridge_fd 0<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bridge_maxwait 0<br> &nbsp;&nbsp;&nbsp;&nbsp;# dns-* options are implemented by the resolvconf package, if installed<br>
    &nbsp;&nbsp;&nbsp;&nbsp;dns-nameservers 192.168.100.1<br> &nbsp;&nbsp;&nbsp;&nbsp;dns-search tstenv.net<br>

    # bridge allow auto conf for ipv6<br>
    iface brRed inet6 auto<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;accept_ra 1</body></html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Detlef Vollmann@21:1/5 to jeremy ardley on Sat Jul 6 12:40:01 2024
    On 7/6/24 06:37, jeremy ardley wrote:

    As I said in my earlier post, it's not necessary to disable dhcpd and in
    fact it is likely undesirable.

    Note that the warning in the wiki talks about dhcpcd, not about dhcpd.

    Though as a pointed out before, your machine very likely will have NetworkManager running and it's probably a good idea to disable it.

    NetworkManager reliably ignores all interfaces that have an entry
    in /etc/network/interfaces.
    If I setup my laptop as AP I have an entry for it in
    /etc/network/interfaces, but let the NetworkManager handle the
    wired network.

    I don't know how well systemd-networkd cooperates with
    /etc/network/interfaces.

    Detlef

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Detlef Vollmann@21:1/5 to David Christensen on Sat Jul 6 12:50:01 2024
    On 7/6/24 06:51, David Christensen wrote:

    The underlying issue appears to be that my old-school Linux console
    network administration skills have been rendered obsolete by systemd and NetworkManager.

    I don't think that these skills are obsolete.
    I still use /etc/network/interfaces for everything special
    (and use the NetworkManager applet on my laptop to manage
    wifi networks.

    The only thing that's always annoying is that too many programs
    believe they have to overwrite /etc/resolv.conf...

    Detlef

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Detlef Vollmann@21:1/5 to Max Nikulin on Sat Jul 6 12:30:01 2024
    On 7/6/24 04:06, Max Nikulin wrote:
    On 06/07/2024 08:16, David Christensen wrote:

    The following sentence:

    "Make sure to disable all DHCP services, e.g. dhcpcd."

    Was added at revision 97:

    From my point of view this warning makes sense. Primary it is a troubleshooting step if an attempt to configure static has IP failed.
    The assumption is that a reader is either aware what network management
    tools are installed on their machine or is able to review installed
    packages, active services, running processes. DHCP client activity may
    appear in logs.

    I think this warning is very misleading: if an interface specification
    in /etc/network/interfaces uses the 'static' method, no DHCP client
    for this interface will be started.

    On a laptop you may have the wifi with DHCP and wired network
    with a static address.
    Or on a workstation you may have the office LAN interface with DHCP
    and a development LAN with a static IP address.
    So disabling DHCP may cause additional problems and will solve none.

    Detlef

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to David Christensen on Sat Jul 6 16:10:02 2024
    On Fri, Jul 05, 2024 at 21:51:09 -0700, David Christensen wrote:
    What I really need is a good book or document that explains the design and implementation of networking with systemd and Network Manager on modern Debian GNU/Linux systems. Recommendations?

    The main thing to understand is that there IS NOT a single unified
    way of doing network configuration in Debian. Instead, there are
    many choices.

    So, the first thing you have to discover on your system is which
    choices are in play. Once you know which things to investigate and
    poke, then you can learn how those particular things work, by reading
    the documentation that's specific to those things.

    So, let's start at the interface level. Interfaces are named by the
    kernel, when you boot. The kernel performs hardware probes, to discover
    the network interfaces, both ethernet and wireless. The kernel
    assigns TEMPORARY NAMES to each interface it finds, in the order in
    which its probes happen to find them. These temporary names look like
    "eth0", "eth1" and so on for ethernet interfaces, and "wlan0", "wlan1"
    and so on for wireless.

    If you've told your kernel NOT to perform the second step, then these semi-randomly assigned temporary names become the permanent names of
    your interfaces. Otherwise, the kernel performs some gymnastics to
    try to assign "predictable" names to each interface. An onboard
    ethernet interface, for example, may be renamed to "eno1", or a PCI
    ethernet interface may be renamed to something like "enp2s0" based
    on the PCI slot.

    Or, if you don't want the kernel to assign names, you may choose your
    own names for your interfaces, by configuring systemd.link(5) files.

    To learn what your interface names are, you can start with this
    command:

    ip link

    From the output of that, you can deduce which naming scheme is being
    used. You should be able to figure out which interfaces are ethernet
    and which are wireless (hint: look at the first letter), and you might
    be able to guess whether the names will remain stable over time, or
    whether you should do something to switch naming schemes.

    Once you have your interface names, there are three basic ways to
    configure them:

    1) /etc/network/interfaces a.k.a. /e/n/i a.k.a. ifupdown

    2) NetworkManager

    3) systemd.network(5)

    Option 1 is the way Debian has always supported, for three decades.
    See interfaces(5) for documentation of the main configuration file.

    Option 2 is often installed by default if you install a Desktop
    Environment package. In Debian, /e/n/i and NM will work together --
    if an interface is configured in /e/n/i, NM will leave that interface
    alone. There are three different ways to interact with NM -- a
    set of command line tools (nmcli), a terminal-based interface (nmtui),
    and a graphical interface (click things provided by your DE).

    Option 3 is obviously part of systemd, and is not used in a default
    Debian installation. However, you're free to use it if you wish.
    Or, if someone else installed Debian for you, such as a VPS provider,
    it's *possible* that they used this. Therefore, it's good to be
    aware that it exists, and *might* be in play on your system, if you
    weren't the one who installed Debian.

    Once you figure out which option is being used, you can read the
    documentation. I've provided man page references for the ones that
    have them, and I've done my best to supply what little information I
    have about NM.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michel Verdier@21:1/5 to George at Clug on Sat Jul 6 17:00:01 2024
    On 2024-07-06, George at Clug wrote:

    What I really need is a good book
    or document that explains the design
    and implementation of networking with systemd and Network Manager on
    modern Debian GNU/Linux systems.  Recommendations?

    Sadly I have not found any documentation (or books) for any thing
    Linux. It seems to be a 'piecing together of random statements' from
    comments and howtos on the Internet, and much personal
    experimentation.

    Of course uptodate informations are as you say dispatched on
    internet. For systemd I would suggest:
    https://wiki.archlinux.org/title/Systemd
    For Network Manager:
    https://wiki.debian.org/NetworkManager

    Still some fundamentals could be learned more easily with a book. This
    one is rather good: https://debian-handbook.info/about-the-book/?ref=itsfoss.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc SCHAEFER@21:1/5 to Detlef Vollmann on Sat Jul 6 17:20:01 2024
    Hello,

    On Sat, Jul 06, 2024 at 12:49:32PM +0200, Detlef Vollmann wrote:
    The only thing that's always annoying is that too many programs
    believe they have to overwrite /etc/resolv.conf...

    chattr +i # immutable
    still works :)

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