There is a yellow exclamation mark near my network and I can't access to the web

I open my computer and I can’t access to the web.
There is a yellow exclamation mark near my network.
I reboot and then it can’t work.It’s my first time to use linux.
I don’t know how to show the configurations.
Hope some can help me!

First, be sure your computer has configured an network interface:

$ 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: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether dc:a6:32:80:5b:d6 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether dc:a6:32:80:5b:d7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.171/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
       valid_lft 85768sec preferred_lft 85768sec
    inet6 fe80::aa07:2d67:144f:6c0f/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
$

This results shows 192.168.1.171 is active. (Ignore 127.0.0.1)
Next, see if your computer is on an active local area network:

$ ip route list
default via 192.168.1.1 dev wlan0 proto dhcp src 192.168.1.171 metric 600 
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.171 metric 600 
$

This result show the default route to the internet is via routing address 192.168.1.1
See if communications work to the routing address:

$ ping -c 4 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=11.4 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=9.62 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=72.2 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=10.6 ms

--- 192.168.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 9.620/25.955/72.246/26.732 ms
$

Next, see if your computer can communicate through the router to the internet:

$ ping -c 4 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=27.5 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=18.8 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=118 time=12.8 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=118 time=12.6 ms

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 12.602/17.936/27.484/6.047 ms
$

Finally, check to see if DNS services are working:

$ ping -c 4 stanford.edu
PING stanford.edu (171.67.215.200) 56(84) bytes of data.
64 bytes from web.stanford.edu (171.67.215.200): icmp_seq=1 ttl=245 time=77.9 ms
64 bytes from web.stanford.edu (171.67.215.200): icmp_seq=2 ttl=245 time=87.7 ms
64 bytes from web.stanford.edu (171.67.215.200): icmp_seq=3 ttl=245 time=92.8 ms
64 bytes from web.stanford.edu (171.67.215.200): icmp_seq=4 ttl=245 time=77.0 ms

--- stanford.edu ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 76.962/83.837/92.818/6.666 ms
$

If all these test work, your are able to use the internet. If there is failure, the first one that fails is where you should start looking for the problem.

Thanks for your help.
I find that my network card can’t work.
I will fix it by replacing a network card.

Next step, before you spend money, using the device identifier that applies to your computer, check to see if a DHCP request was answered providing an address and other network information:

$ sudo dhclient -v  wlan0
Internet Systems Consortium DHCP Client 4.4.3
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/dc:a6:32:80:5b:d7
Sending on   LPF/wlan0/dc:a6:32:80:5b:d7
Sending on   Socket/fallback
DHCPREQUEST for 192.168.1.200 on wlan0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.200 from 192.168.1.1
RTNETLINK answers: File exists
bound to 192.168.1.200 -- renewal in 38451 seconds.
$

If you get a result like this, your DHCP service might be down, or more likely if you are hard wired, the cable is not connected:


$ sudo dhclient -v  eth0
Internet Systems Consortium DHCP Client 4.4.3
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/dc:a6:32:80:5b:d6
Sending on   LPF/eth0/dc:a6:32:80:5b:d6
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
^C
$

I had a similar problem way back. Turned out my Ethernet cable was faulty enough to start acting up. Windows doesn’t care about those faults as much as Linux does. The way Linux does it is better for data integrity, so fair enough. For me, the problem was solved by buying a new cable. If you are using the Net through a wired connection, I recommend to you to get new cables before buying a whole new card.