Frequently Asked Questions for Networking

How to see active connections and bandwidth usage on Linux

Show actual bandwidth usage and active connections using the iftop tool on Linux.

Summary

Show actual bandwidth usage

How to see errors on dropped packets on a network interface on Linux

Show the network link details using the ip command to find out if a network has errors or dropped packets on a Linux system.

Summary

Show network link statistics to discover errors or dropped packets

How to see open ports on Linux

Show which UDP/TCP ports are opened on a Linux system, including the related process. Use the ss tool to see more details about these sockets.

Summary

Show open network ports such as TCP and UDP

How to see the default gateway on Linux

Show the network routing table to discover the default gateway used on a Linux system.

Summary

Show network table to discover the default gateway

How to see the number of open connections on Linux

Show the number of open connections using the ss command on Linux.

Summary

Show number of open connections per protocol

How to see the TTL value of a DNS record

Learn how to query the Time To Live (TTL) for a DNS record by using the dig tool.

Summary

Query DNS to reveal the TTL value of a DNS record.

How to see which process is using a port

Show which process is already opened an UDP or TCP port on Linux by using the ss command.

Summary

Show which process is listening to a port

How to show network TCP statistics and counters

Show counters related to the TCP connections by using the nstat command. This small utility will quickly retrieve the related statistics and display them.

Summary

Show TCP connection statistics

Show to clear the DNS cache with systemd

Learn how to inspect and clear the DNS cache when using the systemd resolver daemon.

Summary

Clear DNS cache using resolvectl