Linux networking: ip, ss, ping, dig
ip, ss, ping, traceroute and network configuration.
Level 101 · 18 lessons · 15 practice labs
Lessons
Interfaces and addresses
- Interfaces and link state: You will use the ip command to see a machine's network interfaces and whether each link is up or down.
- IP addresses and loopback: You will read the IP addresses assigned to a machine and understand what the loopback address, which points back to itself, is for.
- Temporary IP settings and a second address: On your lab machine you add a temporary IP address and a second address to an interface and see it disappear after a restart.
- Persistent IP settings with nmcli and netplan: You will set a fixed IP address that survives a reboot using nmcli and netplan, and then verify it.
- Short task: give a server a new address that survives a reboot
Testing the connection
- ping and packet loss: You will use ping to check whether a device is reachable, measure delay and packet loss, and interpret the results.
- Name resolution tools: host, dig, resolv.conf: You will use host, dig and resolv.conf to see how a name is resolved and which DNS server is being used.
- Listening sockets: from port to process: You will find which program is listening on which port and learn to spot a listener you did not expect.
- HTTP from the terminal: curl, wget, headers: You will request a web page from the terminal with curl and wget and read the response headers to see what the server returns.
- Network or service: telling faults apart: You will tell whether a problem comes from the network or from a service that is not running, by checking step by step.
- Short task: narrow down why an internal site will not open, layer by layer
Routing and VLANs
- Static routes and the return path with ip route: You will define both the outbound and return routes with ip route so two separate subnets can reach each other.
- Turning Linux into a router between two subnets: You will enable packet forwarding with the ip_forward setting so a Linux machine can pass traffic between two networks, and test it.
- VLAN interfaces and trunk links with ip link: You will create VLAN-tagged interfaces with ip link that carry several virtual networks over one cable, and verify them.
- Measuring speed, latency and path quality with iperf3 and mtr: You will measure a link’s real throughput and find the hop where it slows down using iperf3 and mtr, then explain it with numbers.
- Serving the same service over IPv4 and IPv6: You will confirm with ss and curl that a service listens on both IPv4 and IPv6 addresses, and spot the missing side.
- Short task: add a route to a new subnet and measure the link quality
Wrap-up
- Capstone: collect the evidence for a fault: For an access fault at a fictional company you gather evidence from ping, ip and ss output and write your findings in a short note.
Practice labs
- Interface down: the server can’t see the network: Find the network interface that was left down, bring it up and show that it has an address and reaches the gateway.
- Cut-over day: a second address for the server: Add a second IP to the server without breaking the old one and show with curl that the service answers on both addresses.
- The address disappears after a restart: Fix the broken netplan or nmcli configuration and prove that the address, route and DNS setting persist after the network service restarts.
- resolv.conf points at the wrong server: Fix the resolv.conf setting that breaks name resolution and show with dig that the internal domain resolves.
- A connection that drops now and then: measure the loss: Measure two targets with ping and mtr, and report which one has packet loss and at which hop the loss begins.
- Sometimes instant, sometimes five seconds: Prove with dig timings that intermittent delays come from one of two DNS servers not answering, and fix it in resolv.conf.
- The service only listens to itself: Make a web service that only listens on 127.0.0.1 reachable from the network and show it with curl from another machine.
- The site returns a blank page: read the headers: Inspect request and response headers with curl to find why the page is blank (redirect loop, wrong Host or status code), and write it down with evidence.
- Atlas Clinic: the booking system is down, two faults at once: Separate two faults, one in the network path and one in the service, fix both and collect the evidence for each layer in one note.
- No route to the new branch: Add the static route to the newly opened branch subnet and show with traceroute that the branch server is reachable.
- The ping goes out, no reply comes back: Use tcpdump to spot the missing return route on the far side, add it and prove two-way communication.
- The Linux router won’t pass packets: Find the settings stopping a Linux router from forwarding between two subnets (ip_forward, routes, firewall), fix them and prove it with a ping across.
- Create an interface for the guest VLAN: Create a sub-interface with the given VLAN ID, give it an address and show that it reaches the gateway in that VLAN.
- Is the backup link slow? Measure it: Measure TCP throughput with iperf3 and latency with mtr between two servers, and write a short note comparing the result with the expected value.
- The service works over IPv4 but not IPv6: Find why a web service doesn’t answer over IPv6 (listen address, address assignment or AAAA record) and show with curl -4 and -6 that it is reachable over both.
About this course
ip, ss, ping, traceroute and network configuration.
What you will learn
- Interfaces and addresses
- Testing the connection
- Routing and VLANs
- Wrap-up
Prerequisites
No prior knowledge is needed; the course starts from zero.
Lab environment
Lessons run in your own Kali Linux terminal in the browser, connected to a private lab network. Nothing to install.
Frequently asked questions
- Is this course right for my level?
- The course is at beginner level; every term is explained where it first appears.
- Is there anything to install?
- No. Every lesson runs in your own lab environment that opens in the browser.
- How do lessons work?
- Each lesson has 8 to 10 steps and a short quiz. Early steps show the command to type, later steps give less help; if two attempts fail, the solution opens.
- Can I try it for free?
- Yes. The first three lessons of every course are free.