$ 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


Reply via email to