Why all developers should learn how to perform basic network troubleshooting

Regardless of whether you work on the front-end or back-end, I think all developers should gain some proficiency in network troubleshooting. This is especially true if you find yourself gravitating towards lower level systems programming.

The ability to troubleshoot the network and systems separates good developers from great developers. Great developers understand not just code abstraction, but understand the TCP/IP model:

Source: https://www.guru99.com/tcp-ip-model.html

Some basic network troubleshooting skills

If you are just getting into networking, here are some basic tools you should add to your toolbelt:

  • Perform a DNS query (e.g. dig or nslookup command)
  • Send an ICMP echo request to test end to end IP connectivity (i.e. ping command)
  • Analyze the various network hops (i.e. traceroute X.X.X.X)
  • Check whether you can establish a TCP socket connection (e.g. telnet X.X.X.X [port])
  • Test application layer (i.e. curl https://somedomain)
  • Perform a packet capture (e.g. tcpdump -i any) and what bits are sent on the wire

What IP address is my browser connecting to?

% dig dev.to

; <<>> DiG 9.10.6 <<>> dev.to
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39029
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 512
;dev.to.                IN  A

dev.to.         268 IN  A
dev.to.         268 IN  A
dev.to.         268 IN  A
dev.to.         268 IN  A

Is the web server listening on the HTTP port?

% telnet 443
Connected to
Escape character is '^]'.

Each of the above tools helps you isolate connectivity issues. For example, if your client receives an HTTP 5XX error, you can immediately rule out any TCP level issue. That is, you don’t need to use telnet to check whether there’s a firewall issue or whether the server is listening in on the right socket: the server already sent an application level response.


Learning more about the network stack helps you quickly pinpoint and isolate problems:

  • Is it my client-side application?
  • Is it a firewall blocking certain ports?
  • Is there a transient issue on the network?
  • Is the server up and running?