Back to cert prep

Practice area

LPIC-1 102: Networking Fundamentals

Separate address, route, resolver, socket, firewall, and remote-service failures with safe command-line checks.

Linux One Liners is an independent study and practice resource. It is not affiliated with, endorsed by, or approved by LPI, The Linux Foundation, CompTIA, or any certification provider. This site does not provide exam dumps or real exam questions.

Source status

Source status: LPI LPIC-1 overview verified July 3, 2026. Current version 5.0; exams 101-500 and 102-500.

This page paraphrases study areas into command practice. It does not copy official objective text wholesale and is not an exam dump.

Plain-English goal

Practice area: IPv4, IPv6, ports, routes, persistent network configuration, sockets, DNS, and client troubleshooting. Exam/domain: 102-500.

read the situation

Command, output, and next step

Command anatomy

ip -br addr; ip route get 1.1.1.1
ip route
show which route would be used
resolvectl/dig
test name resolution
ss
show listening sockets when relevant
destination
the host, name, or port being tested

Annotated output

1.1.1.1 via 192.168.10.1 dev wlan0 src 192.168.10.132 uid 1000
example.com: 93.184.216.34 -- link: wlan0
93.184.216.34

What to notice

via
the gateway used
dev
the interface selected
src
the local address chosen
resolved address
whether DNS returned an answer

Safe vs unsafe move

Common wrong move

Calling it a DNS outage when the route or gateway is wrong.

Next safe command

resolvectl status

Troubleshooting ladder

  1. Name the symptom.
  2. Inspect read-only state.
  3. Find the owner, service, file, device, mount, or route.
  4. Read the decisive output field.
  5. Choose the next narrow command.
  6. Avoid broad or destructive changes.
  7. Make the smallest justified change if required.
  8. Verify and record what changed.

How to get help

  1. Know the commandUse command --help, then man command for the full reference.
  2. Know the conceptUse apropos keyword or man -k keyword to discover command names.
  3. Maybe a shell builtinUse type command, command -V command, then help command.
  4. Service behaviorUse systemctl status service and journalctl -u service before restarting.
  5. Package ownershipUse dpkg -S, rpm -qf, or the distro package tool for the installed file.

Study plan

  1. Practice network facts in layers: interface address, route choice, resolver configuration, DNS answer, socket listener, and application response.
  2. Learn enough IPv4/IPv6, subnet, CIDR, TCP/UDP/ICMP, and common ports to interpret output instead of memorizing isolated numbers.
  3. Review persistent network configuration through NetworkManager and systemd-networkd awareness while avoiding blind config edits.
  4. Use DNS client tools to compare local resolver behavior, public resolver answers, and application-level name resolution.

Command labs

Run these in a lab shell or disposable machine first. The point is to explain the output, not just memorize the command.

Check route and address

ip -br addr; ip route get 1.1.1.1

Interface, source address, gateway, and route decision should be visible.

Annotated output
1.1.1.1 via 192.168.10.1 dev wlan0 src 192.168.10.132 uid 1000
example.com: 93.184.216.34 -- link: wlan0
93.184.216.34

What to notice: via, dev, src, resolved address.

Next safe command: resolvectl status

Compare DNS paths

getent hosts example.com; resolvectl query example.com 2>/dev/null || true; dig +short example.com

System NSS, systemd-resolved, and DNS query results can be compared.

Annotated output
1.1.1.1 via 192.168.10.1 dev wlan0 src 192.168.10.132 uid 1000
example.com: 93.184.216.34 -- link: wlan0
93.184.216.34

What to notice: via, dev, src, resolved address.

Next safe command: resolvectl status

Inspect listeners

ss -ltnp 2>/dev/null | head -30

Listening TCP sockets should show local address, port, and owning process when permitted.

Annotated output
Usage: command [OPTION]... TARGET
Try 'command --help' for common flags.
Try 'man command' for full reference.

What to notice: Usage, --help, man.

Next safe command: command --help

command families

Commands to practice

  • ip
  • ss
  • ping
  • tracepath
  • nmcli
  • systemd-networkd
  • resolvectl
  • dig
  • host
  • getent
  • ssh
  • scp
  • rsync

Related drills

Flashcards

What does ip route get show?

The route, source address, and interface the kernel would use for a destination.

Why compare getent hosts and dig?

getent uses system name-service configuration; dig queries DNS directly.

Why does bind address matter?

A service listening on 127.0.0.1 is not reachable like one listening on 0.0.0.0 or a LAN address.

What does ss -ltn show?

Listening TCP sockets in numeric form.

Quick quiz

Check the reasoning locally in your browser. Answers are not sent anywhere.

Which command shows the route the kernel would use to reach 1.1.1.1?
Show answer

Answer: ip route get 1.1.1.1

Why: ip route get calculates the route decision.

  • df -h: That does not answer the question the output is asking you to prove first.
  • tar -tzf: That does not answer the question the output is asking you to prove first.
  • chage -l: That does not answer the question the output is asking you to prove first.
Which command uses the system's configured name-service path?
Show answer

Answer: getent hosts example.com

Why: getent follows NSS configuration.

  • rpm -qf /bin/ls: That does not answer the question the output is asking you to prove first.
  • ps -ef: That does not answer the question the output is asking you to prove first.
  • namei -l: That does not answer the question the output is asking you to prove first.
Which tool lists listening sockets?
Show answer

Answer: ss -ltnp

Why: ss reports sockets; -ltnp filters listening TCP with process info when allowed.

  • lsblk -f: That does not answer the question the output is asking you to prove first.
  • locale: That does not answer the question the output is asking you to prove first.
  • lpq: That does not answer the question the output is asking you to prove first.

case practice

Routing table challenge

Given a route table and destination, choose the interface or gateway the kernel will use.

Destination: 8.8.8.8

default via 192.168.10.1 dev wlan0
192.168.10.0/24 dev wlan0 proto kernel scope link src 192.168.10.132

Which path is used?

Destination: 192.168.10.55

default via 192.168.10.1 dev wlan0
192.168.10.0/24 dev wlan0 proto kernel scope link src 192.168.10.132

Which path is used?

Self-test before moving on