In this section, you’ll discover some of the fundamental concepts of computer networking through a series of video tutorials. You can work through them at your own pace. Try not to watch them all in one go, as it’s a lot to take in – so pace yourself.
Video 1: Network Computing [21m]
Introduction to computer networking. In this video, you’ll learn about some of the fundamental concepts involved with network computing and introduce some of the key components of a computer network
Video 2: Network Communications [23m 52s]
In this video, you’ll learn about the fundamental concepts involved with network communication and discuss the underpinnings of the TCP/IP suite.
Video 3: Internet Primer [13m 34s]
In this video on the basics of the internet, you’ll learn about some of the fundamental concepts involved with the Internet and discuss how and why it works.
Video 4: Networking Security [9m 9s]
This video covers the key concepts of network security. You’ll learn about several key offerings designed to help you secure networks.
Video 5: Modern Communications [25m 21s]
This video covers the new ways in which we can communicate over computer networks, including wide-area mobile connectivity, VoIP, IP telephony, the Internet of Things (IoT) and 5G.
Video 6: Virtualisation and Cloud Technologies [17m 33s]
This video covers the key aspect of virtualisation and cloud technologies. You’ll learn about what we mean by these two terms, and what they mean for you in terms of security considerations.
Video 7: Network Troubleshooting [4m 32s]
Introduction to network troubleshooting tools - using ping, route, traceroute, tracepath, and netcat to troubleshoot Linux network problems.
When you’re ready, click ‘next’ to continue.
In previous videos from this course, we discussed how to identify, configure, and start network interfaces. Now it's time to learn about troubleshooting connections when things don't work. So we'll assume that our interface shows up in dmesg, as it should, and that ifconfig or ip a reports that it has an appropriate IP address. We'll also assume that the route command shows a working route to a live network gateway. But you're still not sure that you're properly connected. Does Linux offer any diagnostic tools? You bet it does. A whole whack of them.
Using ping, route, traceroute, tracepath, and netcat to troubleshoot Linux network problems
The first weapon you should pull out is the simplest, ping. As we've mentioned before, ping sends very small data packets to an address you specify, using the ICMP protocol, and requests that the packets are echoed back. When they are, then we'll know two things: that the host you're accessing is, in fact, available, but also that you have network connectivity, at least that far. You should first try an internet-based host, like Google.com. Or if you're not sure you've got DNS service, and easy to remember IP address, like 220.127.116.11, which happens to be Google's name server. If either of these work, then you'll know that connectivity is not your problem. If they don't work, then it's time for plan B, identifying the shaky link in the network. You could try pinging your gateway address, meaning the address of the device, like a router linking you to the larger network. If you don't know your gateway address, you can usually figure it out by looking at your own system IP address, using ifconfig or ip a.
In my case, if the IP address is 10.0.3.133, then the gateway is probably 10.0.3.1. You can run route to confirm this. Now let's ping 10.0.3.1. If that works, then the problem most likely exists somewhere between the router and your internet provider.
If you can't ping your router, then you should check the hardware connection, whether wired or wireless, that connects your PC to the router. It can't hurt to confirm that the router is plugged in and powered on. Believe me, you wouldn't be the first guy to miss that one. You can also use trace route against a network address to display information about each step packets take along their journey.
Traceroute, or its newer cousin, trace path will often show you exactly where connectivity breaks down. Incidentally, ping, traceroute, and tracepath all have special versions for handling IPv6 connectivity, called appropriately enough, ping6, traceroute6, and tracepath6.
Actually, getting your system ready for IPv6 can be a bit complicated, and is beyond the scope of the LPIC-1 exam. Now what if you've got all of the network and internet connectivity you need, but you're having trouble accessing a particular host that's supposed to be available. Or what if somebody's having trouble accessing your service. You should test to make sure the necessary ports are open. From a different computer or network, you can use a terrific little tool called netcat.
While you should bear in mind that netcat, which can also be used as NC, is not at all secure, it can be used to create quick host client network connections for communications or even streaming files, but it can also be used to test for open ports. Here, we'll run it with -Z and -V against Google.com to see if the http port 80 is open. If the port you need was not open, this test would fail and you'd be much closer to figuring out your problem.
You can also run netcat against a range of ports, but that can take a very long time. Netstat can check for listening and non-listening sockets, to confirm that the sockets you need are accessible. Finally, netstat -s can show you a really useful diagnostic data for each network protocol.
Let's review. You can use ping to test for connectivity to specified hosts, route to display your gateway address, trace route or trace path to track packets along their network journey, netcat to check for open ports, and netstat to check for listening and non-listening sockets. You should be aware that ping6, traceroute6, and tracepath6 are all versions of those tools, meant for IPv6 systems.