Solved! - new graphics card wont allow me to access internet

Code:
+ 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: enp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:d8:61:fc:7d:e2 brd ff:ff:ff:ff:ff:ff
+ ip route
+ ping -c3 192.168.122.1
ping: connect: Network is unreachable

Code:
abigail@Abigails-Desktop:~$ nmcli device show enp4s0
GENERAL.DEVICE:                         enp4s0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         00:D8:61:FC:7D:E2
GENERAL.MTU:                            1500
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
WIRED-PROPERTIES.CARRIER:               off
IP4.GATEWAY:                            --
IP6.GATEWAY:                            --
abigail@Abigails-Desktop:~$
 


Is this the output from after you ran this?
sudo nmcli con add con-name enp4s0 ifname enp4s0 ipv4.addresses 192.168.1.222 ipv4.gateway 192.168.1.1 ipv4.dns 192.168.122.1 connection.autoconnect yes ipv4.method manual type ethernet
Can you also run the following.
Code:
nmcli connection show
 
Yup .. after running the nmcli conn add
Code:
NAME    UUID                                  TYPE      DEVICE

enp4s0  a9e220b3-6b3a-473e-9670-83cbde212109  ethernet  --
 
Can you try this.
Code:
sudo nmcli connection modify enp4s0 ifname enp4s0
sudo nmcli connection reload
sudo NetworkManager restart
The show the output of.
Code:
nmcli connection show
ip a
ip route
ping -c3 192.168.122.1
 
Can you try this.
Code:
sudo nmcli connection modify enp4s0 ifname enp4s0
sudo nmcli connection reload
sudo NetworkManager restart
The show the output of.
Code:
nmcli connection show
ip a
ip route
ping -c3 192.168.122.1
Code:
abigail@Abigails-Desktop:~$ sudo nmcli connection modify enp4s0 ifname enp4s0
abigail@Abigails-Desktop:~$ sudo nmcli connection reload
abigail@Abigails-Desktop:~$ sudo NetworkManager restart
abigail@Abigails-Desktop:~$ nmcli connection show
NAME    UUID                                  TYPE      DEVICE 
enp4s0  a9e220b3-6b3a-473e-9670-83cbde212109  ethernet  --     
abigail@Abigails-Desktop:~$ 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: enp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:d8:61:fc:7d:e2 brd ff:ff:ff:ff:ff:ff
abigail@Abigails-Desktop:~$ ip route
abigail@Abigails-Desktop:~$ ping -c3 192.168.122.1
ping: connect: Network is unreachable
 
Let's try this then.
1. sudo ip a a 192.168.1.222/24 dev enp4s0
2. sudo ip route add default via 192.168.1.1
3. Edit /etc/resolv.conf and comment everything out and add: nameserver 192.168.1.1
4. Save and close the file.
Then run these commands again and share the output.
Code:
ip a
ip route
ping -c3 192.168.122.1
ping -c3 linux.org
 
Let's try this then.
1. sudo ip a a 192.168.1.222/24 dev enp4s0
2. sudo ip route add default via 192.168.1.1
3. Edit /etc/resolv.conf and comment everything out and add: nameserver 192.168.1.1
4. Save and close the file.
Then run these commands again and share the output.
Code:
ip a
ip route
ping -c3 192.168.122.1
ping -c3 linux.org
Code:
abigail@Abigails-Desktop:~$ sudo ip a a 192.168.1.222/24 dev enp4s0
abigail@Abigails-Desktop:~$ sudo ip route add default via 192.168.1.1
Error: Nexthop has invalid gateway.
abigail@Abigails-Desktop:~$ sudo nano /etc/resolv.conf
abigail@Abigails-Desktop:~$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 192.168.1.1
#nameserver 127.0.0.53
#options edns0 trust-ad
abigail@Abigails-Desktop:~$ 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: enp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:d8:61:fc:7d:e2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.222/24 scope global enp4s0
       valid_lft forever preferred_lft forever
abigail@Abigails-Desktop:~$ ip route
abigail@Abigails-Desktop:~$ ping -c3 192.168.122.1
ping: connect: Network is unreachable
abigail@Abigails-Desktop:~$ ping -c3 linux.org
ping: linux.org: Name or service not known
abigail@Abigails-Desktop:~$
 
My bad I made a mistake while typing, can you share these two again.
Code:
ip route
ping -c3 192.168.1.1
 
My bad I made a mistake while typing, can you share these two again.
Code:
ip route
ping -c3 192.168.1.1
Code:
abigail@Abigails-Desktop:~$ ip route
abigail@Abigails-Desktop:~$ ping -c3 192.168.1.1
ping: connect: Network is unreachable
 
And when you have network connection with the temporarily replacement videocard in your system, what the does the output of the following look like because I asked you before but you seem to have missed it with your copy?
Code:
ip route
 
And when you have network connection with the temporarily replacement videocard in your system, what the does the output of the following look like because I asked you before but you seem to have missed it with your copy?
Code:
ip route
Code:
abigail@Abigails-Desktop:~$ ip route
default via 192.168.1.254 dev enp2s0 proto dhcp src 192.168.1.222 metric 100
192.168.1.0/24 dev enp2s0 proto kernel scope link src 192.168.1.222
192.168.1.254 dev enp2s0 proto dhcp scope link src 192.168.1.222 metric 100
abigail@Abigails-Desktop:~$

should I install net-tools or similar while I am connected?
 
That explains a lot can you try the following when you have your new video card in your system again.
1. sudo ip a a 192.168.1.222/24 dev enp4s0
2. sudo ip route add default via 192.168.1.254
3. Edit /etc/resolv.conf and comment everything out and add: nameserver 192.168.1.254
4. Save and close the file.
Then run these commands again and share the output.
Code:
ip a
ip route
ping -c3 192.168.1.254
ping -c3 linux.org
 
ok .. will swap things back and let you know how I get on.

when its working ...
the following
Code:
#!/bin/bash

set -x

ip a
ip route
ping -c3 192.168.122.1
ping -c3 1.1.1.1
ping -c3 linux.org
ping -c3 192.168.1.1
nmcli device show
nmcli conn show
gives
Code:
+ 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: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:d8:61:fc:7d:e2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.222/24 brd 192.168.1.255 scope global dynamic enp2s0
       valid_lft 85701sec preferred_lft 85701sec
    inet6 2a00:23c6:771b:2f01:2d8:61ff:fefc:7de2/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 257sec preferred_lft 77sec
    inet6 fe80::2d8:61ff:fefc:7de2/64 scope link 
       valid_lft forever preferred_lft forever
+ ip route
default via 192.168.1.254 dev enp2s0 proto dhcp src 192.168.1.222 metric 100 
192.168.1.0/24 dev enp2s0 proto kernel scope link src 192.168.1.222 
192.168.1.254 dev enp2s0 proto dhcp scope link src 192.168.1.222 metric 100 
+ ping -c3 192.168.122.1
PING 192.168.122.1 (192.168.122.1) 56(84) bytes of data.

--- 192.168.122.1 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2036ms

+ ping -c3 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=57 time=11.7 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=57 time=11.3 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=57 time=11.3 ms

--- 1.1.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 11.310/11.425/11.652/0.160 ms
+ ping -c3 linux.org
PING linux.org(2606:4700:3030::ac43:99d2 (2606:4700:3030::ac43:99d2)) 56 data bytes
64 bytes from 2606:4700:3030::ac43:99d2 (2606:4700:3030::ac43:99d2): icmp_seq=1 ttl=57 time=11.1 ms
64 bytes from 2606:4700:3030::ac43:99d2 (2606:4700:3030::ac43:99d2): icmp_seq=2 ttl=57 time=11.0 ms
64 bytes from 2606:4700:3030::ac43:99d2 (2606:4700:3030::ac43:99d2): icmp_seq=3 ttl=57 time=11.3 ms

--- linux.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 10.991/11.123/11.257/0.108 ms
+ ping -c3 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.222 icmp_seq=1 Destination Host Unreachable
From 192.168.1.222 icmp_seq=2 Destination Host Unreachable
From 192.168.1.222 icmp_seq=3 Destination Host Unreachable

--- 192.168.1.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2037ms
pipe 3
+ nmcli device show
GENERAL.DEVICE:                         enp2s0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         00:D8:61:FC:7D:E2
GENERAL.MTU:                            1500
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
WIRED-PROPERTIES.CARRIER:               on
IP4.ADDRESS[1]:                         192.168.1.222/24
IP4.GATEWAY:                            192.168.1.254
IP4.ROUTE[1]:                           dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 0
IP4.ROUTE[2]:                           dst = 192.168.1.254/32, nh = 0.0.0.0, mt = 100
IP4.ROUTE[3]:                           dst = 0.0.0.0/0, nh = 192.168.1.254, mt = 100
IP6.ADDRESS[1]:                         2a00:23c6:771b:2f01:2d8:61ff:fefc:7de2/64
IP6.ADDRESS[2]:                         fe80::2d8:61ff:fefc:7de2/64
IP6.GATEWAY:                            fe80::f286:20ff:fe3b:a2f9
IP6.ROUTE[1]:                           dst = ff00::/8, nh = ::, mt = 256, table=255
IP6.ROUTE[2]:                           dst = fe80::/64, nh = ::, mt = 256
IP6.ROUTE[3]:                           dst = ::/0, nh = fe80::f286:20ff:fe3b:a2f9, mt = 100
IP6.ROUTE[4]:                           dst = 2a00:23c6:771b:2f01::/64, nh = ::, mt = 100

GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            --
IP6.ADDRESS[1]:                         ::1/128
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = ::1/128, nh = ::, mt = 256
+ nmcli conn show
NAME    UUID                                  TYPE      DEVICE 
enp4s0  a9e220b3-6b3a-473e-9670-83cbde212109  ethernet  --
 
That explains a lot can you try the following when you have your new video card in your system again.
1. sudo ip a a 192.168.1.222/24 dev enp4s0
2. sudo ip route add default via 192.168.1.254
3. Edit /etc/resolv.conf and comment everything out and add: nameserver 192.168.1.254
4. Save and close the file.
Then run these commands again and share the output.
Code:
ip a
ip route
ping -c3 192.168.1.254
ping -c3 linux.org
Code:
abigail@Abigails-Desktop:~$ sudo ip a a 192.168.1.222/24 dev enp4s0
abigail@Abigails-Desktop:~$ sudo ip route add default via 192.168.1.254
Error: Nexthop has invalid gateway.
abigail@Abigails-Desktop:~$ sudo nano /etc/resolv.conf
abigail@Abigails-Desktop:~$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

#nameserver 127.0.0.53
#options edns0 trust-ad
nameserver 192.168.1.254
abigail@Abigails-Desktop:~$ 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: enp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:d8:61:fc:7d:e2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.222/24 scope global enp4s0
       valid_lft forever preferred_lft forever
abigail@Abigails-Desktop:~$ ip route
abigail@Abigails-Desktop:~$ ping -c3 192.168.1.254
ping: connect: Network is unreachable
abigail@Abigails-Desktop:~$ ping -c3 linux.org
ping: linux.org: Name or service not known
 
Strange that it doesn't accept it when adding the route manually. How many ethernet interfaces does your system have, I would think two? Because in the post where you show everything working I see enp2s0 and enp4s0? Since you can't get a route up makes me think there is no cable in enp4s0, could it be you put the cable into the wrong ethernet interface?
 
thank you so much for your help #lifesaver

when it was connected I installed net-tools

and looking around I saw the file /etc/netplan/01-netcfg.yaml referencing enp2s0
rather than enp4s0 - so I changed that..

Code:
abigail@Abigails-Desktop:~$ cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp4s0:
      dhcp4: yes
abigail@Abigails-Desktop:~$

then ran
Code:
sudo NetworkManager restart
sudo netplan apply

and now ip route returns
Code:
default via 192.168.1.254 dev enp4s0 proto dhcp src 192.168.1.222 metric 100
192.168.1.0/24 dev enp4s0 proto kernel scope link src 192.168.1.222
192.168.1.254 dev enp4s0 proto dhcp scope link src 192.168.1.222 metric 100

and I am now connected!

Great job - thanks again :)
 
Forgot about that annoying thing on Ubuntu called netplan, so I think netplan was in the way or something like that but important thing is that it's working. I told you it wasn't your graphics card, glad to have helped you figure it out. :)
 
yup = I think you are right - the new graphics card is somehow causing the ethernet device/connection? name to change from enp2s0 to enp4s0 - but that change is not reflected in the netplan file and that was overriding everything.
 
yup = I think you are right - the new graphics card is somehow causing the ethernet device/connection? name to change from enp2s0 to enp4s0 - but that change is not reflected in the netplan file and that was overriding everything.
I seriously hate netplan, it's easier to configure your network interface through the GUI or through nmcli or some other network manager. I guess each time I asked you to use nmcli that some how netplan did an override or something like that. It explains why the normal nmcli commands didn't do as expected I but find it strange that even when manually assigning an ip and route that it didn't accept the route. Could be that I did miss something but helping someone remotely it's easy to miss something. Oh well, doesn't matter you can enjoy your new graphics card now and be online at the same time.
 
Last edited:

Members online


Top