• Re: Fwd: weird networking anomaly whereby my gateway always defaults to

    From Greg Wooledge@21:1/5 to Thomas Anderson on Fri Jan 24 17:40:01 2025
    On Fri, Jan 24, 2025 at 17:11:06 +0100, Thomas Anderson wrote:
    Here is updated version with <CR>

    CR in this context means carriage returns. Which is actually not the
    correct term -- they meant LF (line feed) or newlines.

    But what they *really* meant was for you to send the message as plain
    text, not HTML.

    'ip a' <CR>

    1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp27s0: mtu 1500 qdisc
    pfifo_fast state UP group default qlen 1000 link/ether 30:9c:23:b7:48:8c brd ff:ff:ff:ff:ff:ff inet 192.168.1.6/24 brd 192.168.1.255 scope global noprefixroute enp27s0 valid_lft forever preferred_lft forever inet6 fe80::329c:23ff:feb7:488c/64 scope link valid_lft forever preferred_lft

    Your mail software is probably composing your message as HTML, and then generating a plain text part in a very simplistic way. The result is
    this mess, with all the lines joined together and then re-wrapped.

    The line breaks from the command output are lost.

    If you can't convince your mail software to send plain text, then we'll
    just have to live with whatever you can do.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Anderson@21:1/5 to Greg Wooledge on Fri Jan 24 18:50:01 2025
    I see. Thanks Greg. Let's see if this works

    ip a ->

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: enp27s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
    state UP group default qlen 1000
        link/ether 30:9c:23:b7:48:8c brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.6/24 brd 192.168.1.255 scope global noprefixroute enp27s0
           valid_lft forever preferred_lft forever
        inet6 fe80::329c:23ff:feb7:488c/64 scope link
           valid_lft forever preferred_lft forever

    cat /etc/network/interfaces


    source /etc/network/interfaces.d/*

    # The loopback network interface
    auto lo
    iface lo inet loopback
    #allow-hotplug eth0
    #iface eth0 inet dhcp

    #added these lines for network
    #auto enp27s0
    #iface enp27s0 inet static
    #    address 192.168.1.6  #static ip i want
    #    netmask 255.255.255.0 #netmask
    #    gateway 192.168.1.1 #my router
    #    dns-nameservers 192.168.1.8 #my dns server

    In the past, I had used the above configuration -- but in truth, it also
    didn't work. my gateway really only worked if i turn off/on my networking.

    I also think it has to be something simple, just can't seem to isolate it.


    On 24/01/2025 17:30, Greg Wooledge wrote:
    On Fri, Jan 24, 2025 at 17:11:06 +0100, Thomas Anderson wrote:
    Here is updated version with <CR>
    CR in this context means carriage returns. Which is actually not the
    correct term -- they meant LF (line feed) or newlines.

    But what they *really* meant was for you to send the message as plain
    text, not HTML.

    'ip a' <CR>

    1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope >> host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever 2: enp27s0: mtu 1500 qdisc
    pfifo_fast state UP group default qlen 1000 link/ether 30:9c:23:b7:48:8c brd >> ff:ff:ff:ff:ff:ff inet 192.168.1.6/24 brd 192.168.1.255 scope global
    noprefixroute enp27s0 valid_lft forever preferred_lft forever inet6
    fe80::329c:23ff:feb7:488c/64 scope link valid_lft forever preferred_lft
    Your mail software is probably composing your message as HTML, and then generating a plain text part in a very simplistic way. The result is
    this mess, with all the lines joined together and then re-wrapped.

    The line breaks from the command output are lost.

    If you can't convince your mail software to send plain text, then we'll
    just have to live with whatever you can do.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to Thomas Anderson on Sat Jan 25 00:30:01 2025
    Hi Thomas,

    On Fri, Jan 24, 2025 at 06:48:08PM +0100, Thomas Anderson wrote:
    ip a ->
    2: enp27s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
    state UP group default qlen 1000
        link/ether 30:9c:23:b7:48:8c brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.6/24 brd 192.168.1.255 scope global noprefixroute enp27s0        valid_lft forever preferred_lft forever
        inet6 fe80::329c:23ff:feb7:488c/64 scope link
           valid_lft forever preferred_lft forever

    Seems reasonable.

    cat /etc/network/interfaces

    This file, for you, is basically empty (everything except "lo" is
    commented out. I'm guessing you don't have anything special inside /etc/network/interfaces.d/ directory, so networking is set up by
    NetworkManager as we would expect.

    NetworkManager can be configured both by GUI application and by command
    line, which is useful when doing support over email like this.

    Can you do:

    $ nmcli connection show

    and then of the ones shown, do a further

    $ nmcli connection show THATNAME

    where "THATNAME" is the name from the "NAME" column that seem relevant.
    For you it's probably "enp27s0" or "default" or something.

    As a workaround, if you know that your router should be 192.168.1.1 then
    you can at each boot, as root, type:

    # ip route add default via 192.168.1.1

    and that will temporarily set the default gateway. But this should be
    fixable in N-M settings.

    Thanks,
    Andy

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Anderson@21:1/5 to Andy Smith on Sat Jan 25 08:20:01 2025
    $ nmcli connection show

    NAME                UUID TYPE      DEVICE
    Wired connection 1  fc7feb2f-f189-44c3-b06c-88d053fd087f ethernet  enp27s0

    $ nmcli connection show "Wired connection 1"

    nnection.id:                          Wired connection 1
    connection.uuid: fc7feb2f-f189-44c3-b06c-88d053fd087f connection.stable-id:                   -- connection.type:                        802-3-ethernet connection.interface-name:              enp27s0 connection.autoconnect:                 yes connection.autoconnect-priority:        0 connection.autoconnect-retries:         -1 (default) connection.multi-connect:               0 (default) connection.auth-retries:                -1 connection.timestamp:                   1737788891 connection.read-only:                   no connection.permissions:                 -- connection.zone:                        -- connection.master:                      -- connection.slave-type:                  -- connection.autoconnect-slaves:          -1 (default) connection.secondaries:                 -- connection.gateway-ping-timeout:        0 connection.metered:                     no connection.lldp:                        default connection.mdns:                        -1 (default) connection.llmnr:                       -1 (default) connection.wait-device-timeout:         -1 802-3-ethernet.port:                    -- 802-3-ethernet.speed:                   0 802-3-ethernet.duplex:                  -- 802-3-ethernet.auto-negotiate:          no 802-3-ethernet.mac-address:             30:9C:23:B7:48:8C 802-3-ethernet.cloned-mac-address:      30:9C:23:B7:48:8C 802-3-ethernet.generate-mac-address-mask:-- 802-3-ethernet.mac-address-blacklist:   -- 802-3-ethernet.mtu:                     auto 802-3-ethernet.s390-subchannels:        -- 802-3-ethernet.s390-nettype:            -- 802-3-ethernet.s390-options:            -- 802-3-ethernet.wake-on-lan:             default 802-3-ethernet.wake-on-lan-password:    -- ipv4.method:                            manual ipv4.dns:                               192.168.1.8
    ipv4.dns-search:                        -- ipv4.dns-options:                       -- ipv4.dns-priority:                      0 ipv4.addresses:                         192.168.1.6/24 ipv4.gateway:                           192.168.1.1 ipv4.routes:                            -- ipv4.route-metric:                      -1 ipv4.route-table:                       0 (unspec) ipv4.routing-rules:                     -- ipv4.ignore-auto-routes:                no ipv4.ignore-auto-dns:                   no ipv4.dhcp-client-id:                    -- ipv4.dhcp-iaid:                         -- ipv4.dhcp-timeout:                      0 (default) ipv4.dhcp-send-hostname:                yes ipv4.dhcp-hostname:                     -- ipv4.dhcp-fqdn:                         -- ipv4.dhcp-hostname-flags:               0x0 (none) ipv4.never-default:                     no ipv4.may-fail:                          no ipv4.dad-timeout:                       -1 (default) ipv4.dhcp-vendor-class-identifier:      -- ipv4.dhcp-reject-servers:               -- ipv6.method:                            ignore ipv6.dns:                               -- ipv6.dns-search:                        -- ipv6.dns-options:                       -- ipv6.dns-priority:                      0 ipv6.addresses:                         -- ipv6.gateway:                           -- ipv6.routes:                            -- ipv6.route-metric:                      -1 ipv6.route-table:                       0 (unspec) ipv6.routing-rules:                     -- ipv6.ignore-auto-routes:                no ipv6.ignore-auto-dns:                   no ipv6.never-default:                     no ipv6.may-fail:                          yes ipv6.ip6-privacy:                       2 (enabled, prefer temporary IP)
    ipv6.addr-gen-mode:                     eui64 ipv6.ra-timeout:                        0 (default) ipv6.dhcp-duid:                         -- ipv6.dhcp-iaid:                         -- ipv6.dhcp-timeout:                      0 (default) ipv6.dhcp-send-hostname:                yes ipv6.dhcp-hostname:                     -- ipv6.dhcp-hostname-flags:               0x0 (none) ipv6.token:                             -- proxy.method:                           none proxy.browser-only:                     no proxy.pac-url:                          -- proxy.pac-script:                       -- GENERAL.NAME:                           Wired connection 1
    GENERAL.UUID: fc7feb2f-f189-44c3-b06c-88d053fd087f GENERAL.DEVICES:                        enp27s0 GENERAL.IP-IFACE:                       enp27s0 GENERAL.STATE:                          activated GENERAL.DEFAULT:                        yes GENERAL.DEFAULT6:                       no GENERAL.SPEC-OBJECT:                    -- GENERAL.VPN:                            no GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/4 GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/1 GENERAL.ZONE:                           -- GENERAL.MASTER-PATH:                    -- IP4.ADDRESS[1]:                         192.168.1.6/24 IP4.GATEWAY:                            192.168.1.1 IP4.ROUTE[1]:                           dst = 192.168.1.0/24, nh =
    0.0.0.0, mt = 100 IP4.ROUTE[2]:                           dst = 0.0.0.0/0, nh =
    192.168.1.1, mt = 100 IP4.DNS[1]:                             192.168.1.8 IP6.ADDRESS[1]: fe80::329c:23ff:feb7:488c/64 IP6.GATEWAY:                            -- IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 256


    # ip route add default via 192.168.1.1

    I can add it manually, no problem but it doesn't persist. The gateway
    always will set itself properly when I turn networking off and back on,
    without any other command. So, it is set properly. Just something during
    the boot process is not setting it on reboot. hmm
    The N-M settings are also set properly with gate, and static IP. I have
    had this problem for quite some time, but never bothered to fix it because
    my server is running 24/7. But, on those rare occasions of  a restart, I
    have to turn off networking and back on again which is kind of annoying,
    and very bad if I am not physically near the machine, since I naturally
    cannot ssh into the machine.

    On 25/01/2025 00:28, Andy Smith wrote:
    Hi Thomas,

    On Fri, Jan 24, 2025 at 06:48:08PM +0100, Thomas Anderson wrote:
    ip a ->
    2: enp27s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
    state UP group default qlen 1000
        link/ether 30:9c:23:b7:48:8c brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.6/24 brd 192.168.1.255 scope global noprefixroute enp27s0
           valid_lft forever preferred_lft forever
        inet6 fe80::329c:23ff:feb7:488c/64 scope link
           valid_lft forever preferred_lft forever

    Seems reasonable.

    cat /etc/network/interfaces
    This file, for you, is basically empty (everything except "lo" is
    commented out. I'm guessing you don't have anything special inside /etc/network/interfaces.d/ directory, so networking is set up by NetworkManager as we would expect.

    NetworkManager can be configured both by GUI application and by command
    line, which is useful when doing support over email like this.

    Can you do:

    $ nmcli connection show

    and then of the ones shown, do a further

    $ nmcli connection show THATNAME

    where "THATNAME" is the name from the "NAME" column that seem relevant.
    For you it's probably "enp27s0" or "default" or something.

    As a workaround, if you know that your router should be 192.168.1.1 then
    you can at each boot, as root, type:

    # ip route add default via 192.168.1.1

    and that will temporarily set the default gateway. But this should be
    fixable in N-M settings.

    Thanks,
    Andy


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to Thomas Anderson on Sat Jan 25 22:10:01 2025
    Hi Thomas,

    On Sat, Jan 25, 2025 at 08:17:44AM +0100, Thomas Anderson wrote:
    $ nmcli connection show "Wired connection 1"

    nnection.id:                          Wired connection 1 ipv4.method:                            manual ipv4.dns:                               192.168.1.8 ipv4.addresses:                         192.168.1.6/24 ipv4.gateway:                           192.168.1.1

    SO this all looks okay. I was wondering if it was going to show it
    configured by DHCP which would have suggested maybe a DHCP lease was
    changing the default gateway, but it's clearly completely static config.

    I think something else other than N-M might be responsible for changing
    your default gateway, if indeed this is what is happening.

    Are you able to post what your routing table actually looks like when
    things go wrong?

    $ ip route show

    Thanks,
    Andy

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

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