For some reason my router went down the other day. It’s now working, but only on devices that use a wireless connection, including my OpenSUSE laptop. My pc, which uses ethernet, does not work. In yast, my device “eth0” is visible, and I am using wicked. What are some diagnostics I could run in the terminal to determine the cause?
There are usually more than one eth port on a router
Mine for eg has 4
Is it the same on all of them
It’s not a problem with the router itself. There is a windows PC that uses Ethernet and it’s working fine. My problem is not with the router, which works fine, but with my Linux OS. Are they any diagnostics I can run in the terminal to determine if my Ethernet connection is being refused or something?
From doing some other looking around I think the problem is from DNS, but I really have no way of knowing
Then remove /etc/resolv.conf and restart the system.
Report back when it does not help, because in that case we will try a more step by step approach.
Is your interface configured to use DHCP? If removing the /etc/resolv.conf (see this for another approach) doesn’t resolve this, could you paste the output of
cat /etc/sysconfig/network/ifcfg-eth0
There are guides for common troubleshooting…
First, check your physicla connections, and pay attention to your link lights (They should be green and blink when there is active traffic. If you don’t see green link lights lit or they’re simply a solid color when there is traffic, then those are problems).
Use ping and traceroute utilities like sonar to test your connection to your gateway device, then beyond.
First test using IP addresses for basic connectivity, and then run the same tests with names to test name resolution.
If necessary, disable IPv6 but nowadays it’s becoming quite common for DHCP and routers to set up clients with IPv6 instead of IPv4.
Inspect the DHCP leases and permitted devices in your router, it may be set up to accept your machine using WiFI but not using wired ethernet.
TSU
Removing etc/resolv.conf didn’t help.
The output of
cat /etc/sysconfig/network/ifcfg-eth0
is:
BOOTPROTO= 'dhcp'
BROADCAST= ' '
DHCLIENT_SET_DEFAULT_ROUTE= 'yes'
ETHTOOL_OPTIONS= ' '
IPADDR= ' '
MTU = ' '
NAME = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller'
NETMASK= ' '
NETWORK= ' '
REMOTE_IPADDR= ' '
STARTMODE= 'auto'
ZONE=public
Does eth0 receive an ip address? What is the default route? As tsu2 already pointed out, there are plenty of troubleshooting guides out there.
node:~ # /usr/lib/wicked/bin/wickedd-dhcp4 --test --log-level debug eth0
node:~ # ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc pfifo_fast state UP group default qlen 1000
link/ether fa:16:3e:65:98:9d brd ff:ff:ff:ff:ff:ff
inet 192.168.124.11/24 brd 192.168.124.255 scope global eth0
valid_lft forever preferred_lft forever
node:~ # ip route list
default via 192.168.124.1 dev eth0 proto dhcp
169.254.169.254 via 192.168.124.1 dev eth0 proto dhcp
192.168.124.0/24 dev eth0 proto kernel scope link src 192.168.124.11
node:~ # ping 192.168.124.1
PING 192.168.124.1 (192.168.124.1) 56(84) bytes of data.
64 bytes from 192.168.124.1: icmp_seq=1 ttl=64 time=0.449 ms
64 bytes from 192.168.124.1: icmp_seq=2 ttl=64 time=0.293 ms
node:~ # ping google.com
If you get an ip, can you reach the gateway? If you can reach the gateway, but not the outside world, do you have firewall rules, apparmor or other components blocking your requests?
And there it stops at ping google. Just as it starts to be intersting, it stops. Why?
BTW the steps are:
You check from bottom to top:
-
Is the NIC up with an IP address?
ip addr
-
Can you connect to another system on your LAN?
ping -c1 <IP-address of your router>
(I hope you know that address)
-
Do you have a default route to the Internet?
ip route
-
Can you connect to a system on the internet?
ping -c1 130.57.66.6
-
Can you resolve host/domain names?
ping -c1 forums.opensuse.org
Take care. As soon a one step fails, that must be resolved first. It is useless to go to the next step before it is resolved.
So start with 1. and do not hesitate to post the output here to get help on the interpretation.
Now you did already check 1, 2 and 3. Thus carry on with 4.
I’m not the OP, just to make that clear I just wanted to show some commands and their expected output, sorry if that caused confusion.
Yes, it did. But that is also my fault :shame:. Should have seen that.
So back to the OP and his problem. As far as I can see, he should start the process at step #1.
@OP ( and others seeing the same issue ): this is a bug ( not for everyone, but still ) and can be easily resolved :). Run
sudo netconfig -f update
or
sudo rm /etc/resolv.conf
sudo rcnetwork restart
and you should be online
I know this thread has become a bit confused, but removing /etc/resolv.conf and restarting (which includes of course a network restart) was advised in post #5 and reported as not helping in post #8.
So I tested the ethernet connection on my Windows laptop, and encounteres the same problem (no internet). The problem was the DHCP was disabled, so after it was enabled it worked fine. How do I enable DHCP on OpenSUSE 15?
More than likely you should already be configured as a DHCP client.
You can run the following command which should return the network configuration including IP addresses for your two (or more) network interfaces
ip addr
If for some reason your network interface didn’t get an ip address, you can run the following to try to obtain an address again (then run the above command again to see if you have your new address)
systemctl restart network
If the above didn’t get an IP address from your DHCP server, then you may have to check whether your network interface is configured as a DHCP client, to do so and assuming you’re set up using wicked netowrk management (which is default),
YaST > System > Network Settings > Select your network device > Edit…
HTh,
TSU
From the command “ip addr” I got:
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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:30:67:83:b4:8d brd ff:ff:ff:ff:ff:ff
inet6 2601:1c0:6e00:fdc0:2886:5fad:b690:faf8/64 scope global temporary dynamic
valid_lft 345599sec preferred_lft 81630sec
inet6 2601:1c0:6e00:fdc0:cb7:c382:94f8:9637/64 scope global temporary deprecated dynamic
valid_lft 345599sec preferred_lft 0sec
inet6 2601:1c0:6e00:fdc0:230:67ff:fe83:b48d/64 scope global mngtmpaddr dynamic
valid_lft 345599sec preferred_lft 345599sec
inet6 fe80::230:67ff:fe83:b48d/64 scope link
valid_lft forever preferred_lft forever
I’m already using Wicked and I see my device (eth0) in the network settings, but tis just not being used and part of the options are greyed out.
Then,
As I described you need to inspect how your network adapter is configured and whether it’s configured as a DHCP client,
You can see your adapter’s settings in YaST as I described.
This assumes your network’s DHCP is handing out IPv4 addresses…
You might know to be true if you inspect the IP address of the other machine you say is working.
Else,
You could run a quick check from your openSUSE to test IPv6 connectivity with the following, if returns successful pings then IPv6 to the Internet is working
ping6 www.opensuse.org
TSU
I solved it! I did
sudo netconfig -f update
intially but I didn’t restart my network. I did it again and restarted my network and everything works great. Thanks for everyones help!