Preliminaries:
- WiFi is running
- No ethernet
- External Monitor plugged in
- In a small terminal window, start the nmcli monitor
- A terminal window in sudo
- A terminal window not in sudo
See Troubleshooting
Home Local Area Networks using Linux command line network tools rev B
(on Google Slides) .
- Verify that the network is working properly (11:40)
- http http://google.com
http https://amazon.com
ssh -4 -T git@github.com
ssh -6 -T git@gitlab.com
- Is there a generic link problem? (11:43)
- ip --stats link show dev
wlp2s0 # GOOD!
ip --stats link show dev
eno1 # bad!
- Does Network Manager think there is a problem? (11:45)
- nmcli g
rfkill
rfkill block wlan
nmcli g
rfkill unblock wlan
nmcli g
- Diagnose the NIC: hardware problem? (11:50)
- sudo lshw -C network
lspci -nnk | grep -i -A 2 net
find /sys/devices/ -iname "*net*"
lsusb | sort -k 6
- The physical layer (Wires) (See slide
13 to see a bad ethernet, see slide
14 to see a good ethernet, and slide
15 to see a flakey ethernet ).
- ip link show dev eno1
- The Physical Layer (Radio, WiFi)
- sudo iw phy phy0 info
- sudo iw dev wlp2s0 info
sudo iw dev wlp2s0 link
sudo iw dev wlp2s0 scan | fgrep
SSID:
# look at SSIDs
- The Physical Layer (Radio, WiFi)
- ip --stats link show dev wlp2s0
- Any SSIDs? Use iw if NetworkManager not helpful
- sudo iw dev wlp2s0 scan | fgrep SSID:
- Media Access Control (MAC)
- ip neigh list
ip -6 neigh list
ip -4 neigh list
arp -an
- Routing
- ip -4 route list
ip -6 route list
- Who is my local default router?
- ip -4 route show default
ip -6 route show default
- Look at IPv6 routing announcements
- tcpdump -n -i eth0 icmp6
tcpdump -n -i eth0 icmp6 and ip6[40] == 134
- Check your ISPs routing. f5 is a short name.
- tracepath -4 f5.com
tracepath -6 f5.com
ping -4 f5.com
ping -6 f5.com
- Why IPv6?
- python3 -c 'print(f"{2**128:,}")'
python3 -c 'print(f"{2**32:,}")'
- Checking DNS
- dig google.com
dig -t aaaa google.com
dig @8.8.8.8 jeffsilverm.ddns.net
dig @2001:4860:4860::8888 jeffsilverm.ddns.net
dig +short usps.gov
nmcli
- Is network manager even running?
- systemctl status NetworkManager
- nmcli
general and nmcli
network and nmcli
radio
- nmcli g
nmcli n
nmcli radio
- nmcli
monitor
- nmcli monitor
- nmcli connections
- nmcli c s --active
nmcli c s Wire and hit the TAB button
- nmcli
device
- nmcli d
- nmcli device
disconnect and connect a device
- nmcli d disconnect wlp2s0
nmcli d disconnect wlp2s0
- Maybe you are using the wrong WiFi password? Use nmcli
- nmcli --show-secrets c s "ohiawaikiki" | fgrep psk:
For a good time, try nmcli
--show-secrets c show and hit the TAB button
- How to find all of the SSIDs using NetworkManager.
- sudo nmcli dev wifi list --rescan yes
Other command line networking tools
- Transport issues: nmap. This is a borderline hacking tools. If
you don't want to attempt OS detection, then do not use -O
and you won't need root privs.
- sudo nmap -O -sT jeffsilverm.ddns.net -p
20,21,22,23,25,53,80,135-139,161,162,443,445,3306 -T4
nmap -sT jeffsilverm.ddns.net -p
20,21,22,23,25,53,80,135-139,161,162,443,445,3306 -T4
- egrep "22/tcp|80/tcp|3306/tcp" /etc/services
nmap -sT jeffsilverm.ddns.net -p
ftp-data,ftp,ssh,telnet,smtp,domain,http,epmap,netbios-ns,netbios-dgm,netbios-dgm,snmp,snmp-trap,https,microsoft-ds,mysql
-T4
Find this file at http://jeffsilverm.ddns.net/Troubleshooting_Home_Local_Area_Networks_using_Linux_command_Linux_network_tools_rev_B.html
.
Find the presentation on Google
Slides.