On Fri, 24 Jan 2025 16:14:05 +0100 Thomas Anderson <thomas.ander...@little-beak.com> wrote:
> Thanks for thorough reply. > > 1. I am talking about basic network connection. I have an ip, so I > can ping local machines, including the gateway router itself. > > 'ip a' shows the following > > 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 forever What is probably my problem is the > noprefixroute? 'cat /etc/network/interfaces.d/*' shows > 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 > I have commented out all the enps27s0 so that the NetworkManager can > handle it. When, I uncomment them > the results are the same, no gateway. > I can manually add the route 'sudo ip route add default via > 192.168.1.1' and this will add it (just like I have done > in the network manager UI, but in both cases, i reboot without a > gateway. thanks in advance.. > In Network Manager, Edit Connections, choose the Ethernet entry as there is presumably no other, then settings. In the IPv4 tab, you will have Method as Manual, and there will be a table for Addresses below. You have your chosen static IP address, then the netmask, then the gateway. What is in the gateway box? Are the characters correct, no commas instead of full stops etc? I don't remember if NM will allow malformed addresses, but this problem has to be something simple. As I think others have said, if you are using a static address on a workstation, you would probably do better making the settings in /etc/interfaces in the old-fashioned way and not bothering with NM. NM is useful on a travelling laptop where wifi is often used and possibly VPNs. Having said that, I run NM on my workstation, but use DHCP with a reservation on the server to provide a static address. It's what Debian defaulted to, and it works, so I'm not fixing it. -- Joe