An address tells you something about the guest's local configuration. It does not tell you that the guest can reach an intended destination. A route lookup adds another piece of evidence, but still does not show that a packet arrived, a name resolved or an application answered.
You will save actual guest address and route observations in one owned note. Then compare them with supplied examples of a missing route and a different private network. Every network command here is an inspection; you will not create a failure by removing a real route or changing an interface.
1. Build a small vocabulary for the evidence
An interface is a network attachment visible to Linux. A guest can have a virtual network interface as well as loopback, the local path for communication within that same guest. Loopback is not a connection to the VM host or another machine.
An IPv4 address has four decimal parts. A prefix length after / identifies
how many leading bits form the network prefix. In the supplied example
192.168.122.23/24, the first 24 bits are the prefix, corresponding here to
the first three dotted parts. The associated connected network is
192.168.122.0/24. The address belongs to an interface; the prefix is not
an instruction to contact every address in that range.
A route describes where the kernel should send traffic for a destination
or destination prefix. A gateway is a next-hop address used on the way
to another destination. A default route covers destinations without a
more specific applicable route in the ordinary case. It is often displayed
as default, representing the IPv4 prefix 0.0.0.0/0.
Private ranges such as the worked 192.168.122.0/24 and later 10.77.4.0/24
belong inside the larger private IPv4 ranges. Their addresses do not by
themselves identify publicly reachable services. The selected course setup
uses host-side NAT: outbound guest traffic can be translated at that host
boundary. Guest address/route observations alone do not prove the host's
translation configuration is working.

Read the schematic as the selected course setup's conceptual outbound path.
Solid green arrows relate the illustrative interface, route and gateway;
the dashed continuation marks the later named-destination question.
The guest and gateway values are illustrative, not values to configure or
assume on your VM. The later ubuntu.com naming question is separate from
this lesson's numeric documentation-address route lookups. No address or
response from that named destination is established here. The diagram does
not make the guest output evidence of host NAT operation or an inbound service.
2. Check the guest and choose the observation scope
Complete Diagnose the owned service using its journal and settle its cleanup first. Use the ordinary nonzero-UID account in the declared full Ubuntu guest, with its selected NAT setup. Run one command line at a time, inspect the result and stop after an unexpected error. There are no privileged commands, package changes or network probes here.
Inspect the already-taught command origins:
type cd pwd printf set type id ps mkdir ls cat rm rmdir ip
type -a ls
type -P ls
Require the expected Bash builtins and guest utilities. For ls, accept only the understood color-only alias, if present, and expected executable paths; stop for hidden functions or other origins. The ip command must be the expected guest utility, not a custom wrapper or alias. If it is missing, reconcile the declared tool readiness rather than installing anything here.
Then inspect identity, shell and options:
id -u
id -un
ps -p $ -o comm=
ps -p 1 -o comm=
set -o
Require your recorded nonzero account, Bash and the expected full guest's
systemd PID 1. Keep the taught errexit-off baseline so an unsuccessful
lookup can be interpreted; preserve different settings rather than changing
them in this task.
The new network commands use the ip utility, which groups operations by
object, such as address or route. Read the scope before reading the output:
| Form | Question it asks |
|---|---|
ip -4 -brief address show | Which IPv4 addresses and brief interface states are visible in this guest? |
ip -4 route show | Which IPv4 routes are displayed from the default main-table listing? |
ip -4 route get 203.0.113.10 | Which route would the kernel select for this numeric destination in the lookup's current context? |
-4 selects IPv4. It does not disable IPv6 or establish anything about
IPv6 connectivity. -brief selects compact address output; it changes the
display, not the interface. show reads the selected object's information.
route get asks for a route decision; it sends no packet to the destination.
It is not a promise of no internal lookup/cache effects, and it changes no
configured address or route.
The 203.0.113.0/24 range is reserved for documentation. We use numeric
.10 and .20 only as harmless route-lookup inputs, not as real services
to contact. No DNS lookup is needed for a numeric input. Name resolution,
bounded reachability tests and listener evidence belong to later lessons.
3. Create one note for actual observations
The task owns ~/linux-practice/inspect-interfaces-and-routes/ and its single
network-evidence.txt file. Inspect the shared parent and prospective task:
ls -ld ~/linux-practice
ls -ld ~/linux-practice/inspect-interfaces-and-routes
Require the ordinary directory owned by your recorded account and the task name absent. Use the resume section for an existing entry. After acceptance:
mkdir ~/linux-practice/inspect-interfaces-and-routes
ls -ld ~/linux-practice/inspect-interfaces-and-routes
Accept its ordinary owned identity, then enter and verify separately:
cd ~/linux-practice/inspect-interfaces-and-routes
pwd
ls -a
Require the exact recorded task path and only dot entries before creating the absent evidence file:
printf '%s\n' 'Guest IPv4 observations' 'Actual address and route evidence; no reachability probe.' > network-evidence.txt
ls -ld -- network-evidence.txt
cat network-evidence.txt
Require an ordinary owned single-link file with exactly those two lines.
For every later section, recheck that identity and require each header,
append and redirection to succeed. The taught >> file 2>&1 appends stdout
and directs stderr to the same destination; it does not promise an arrival
order between streams. Save the preceding command's immediate $? before
another command replaces it. Retain actual diagnostics and values; never
replace them with the supplied successful example below.
4. Observe addresses before drawing a route conclusion
Capture the actual brief IPv4 address report:
printf '%s\n' '--- Actual guest IPv4 addresses ---' >> network-evidence.txt
ip -4 -brief address show >> network-evidence.txt 2>&1
printf 'address query exit: %s\n' "$?" >> network-evidence.txt
cat network-evidence.txt
Require a successful query before interpreting its fields. This is a supplied illustrative report, not your guest's expected exact values:
lo UNKNOWN 127.0.0.1/8
enp1s0 UP 192.168.122.23/24
| Part | Interpretation |
|---|---|
lo and 127.0.0.1/8 | Loopback evidence for this guest. It is not the VM host's address. |
enp1s0 | This example's virtual interface name. Actual names may differ. |
UP | An operational-state observation, not proof of an end-to-end connection. |
UNKNOWN | The operational-state information is not expressed as a known state here; this label alone does not prove failure. Loopback can show it. |
192.168.122.23/24 | The example's assigned IPv4 address and prefix length. |
Read your actual rows. Identify loopback separately from each other interface and record the addresses that are actually present. More than one address or interface is possible. Do not rename an interface or replace your values to match the example. No non-loopback IPv4 address is a finding to record, not permission to assign one.
Predict: if the guest has the example address but no route for a remote destination, does its UP label solve the missing route? Keep that question open while collecting the next two observations.
5. Read route entries, then ask about one destination
Capture the actual default main-table IPv4 listing:
printf '%s\n' '--- Actual guest IPv4 main-table routes ---' >> network-evidence.txt
ip -4 route show >> network-evidence.txt 2>&1
printf 'route listing exit: %s\n' "$?" >> network-evidence.txt
cat network-evidence.txt
A successful empty listing is still an observation. It does not mean the query failed. This supplied illustrative listing fits the worked address:
default via 192.168.122.1 dev enp1s0 proto dhcp src 192.168.122.23 metric 100
192.168.122.0/24 dev enp1s0 proto kernel scope link src 192.168.122.23 metric 100
| Field | Meaning in this example |
|---|---|
default | Broad fallback destination prefix in this ordinary routing example. |
via 192.168.122.1 | Next-hop gateway, not the final remote destination. |
dev enp1s0 | Interface selected by that route entry. |
192.168.122.0/24 ... scope link | A directly connected prefix; traffic for it does not use the example's default gateway route. |
src 192.168.122.23 | Preferred source address associated with the entry. It is not a remote reply. |
proto dhcp / proto kernel | Route origin/protocol labels. They do not establish present remote connectivity. |
metric 100 | A route preference value used where applicable. Do not choose a route by comparing this number alone; destination matching and other context matter. |
The default main-table display is not every possible Linux route or policy. A missing default row alone does not prove that every destination is unroutable; another specific route or policy may apply. Loopback/local routing information need not appear in this main-table view either. This lesson uses a targeted lookup rather than adding advanced routing commands or changing policy.
Ask the kernel for its selected route to the documentation-only numeric destination, using the current ordinary guest context:
printf '%s\n' '--- Actual route lookup: 203.0.113.10 ---' >> network-evidence.txt
ip -4 route get 203.0.113.10 >> network-evidence.txt 2>&1
printf 'first selected-route query exit: %s\n' "$?" >> network-evidence.txt
cat network-evidence.txt
Read the actual result and status together. A successful lookup can report the destination, via gateway, dev interface and src source address. Extra fields/annotations can vary; preserve them. A uid field, when shown, describes the lookup's user context rather than an account at the destination. A cache annotation is lookup information, not a response packet.
For the worked example, these are selected fields from a supplied successful lookup, not a complete live transcript:
203.0.113.10 via 192.168.122.1 dev enp1s0 src 192.168.122.23
That evidence describes a local route choice for this lookup context. It does not show a reachable gateway, working host NAT, a return path, an allowed application connection or a listening service. A real application can also use a different destination, address family or context. No packet was sent by this route query, and no hostname was resolved.
If the lookup fails, read the actual diagnostic. A kernel route-unreachable result differs from a tool/permission error; neither should be replaced with the example's fields. Preserve the observation and explain its limited scope. Do not add a route, reset an interface or edit host networking.
6. Diagnose the supplied missing-default case
The following is a separate supplied teaching case, not a change to your VM. It retains the same address and connected route. For this case, the shown lookup has no usable route for the selected destination.
Address report:
lo UNKNOWN 127.0.0.1/8
enp1s0 UP 192.168.122.23/24
Main-table route listing:
192.168.122.0/24 dev enp1s0 proto kernel scope link src 192.168.122.23 metric 100
Result of the supplied numeric 203.0.113.10 route lookup:
RTNETLINK answers: Network is unreachable
The address and UP label did not establish the needed route. The absent default is relevant to the simple displayed setup; the failed targeted lookup is the direct evidence that this lookup context has no route to that numeric destination. It is not a name-resolution failure, because the input was numeric, and it is not a remote service refusal, because no connection probe was made.
Do not reproduce the case by deleting a real default route. Compare its evidence with your actual note and state the difference. In a less simple setup, no default row could coexist with a working specific/policy route; that is why the targeted observation matters.
Independent task: read another private range, then compare reality
These are supplied teaching records for a different guest, not values to configure on yours:
lo UNKNOWN 127.0.0.1/8
ens3 UP 10.77.4.18/24
default via 10.77.4.1 dev ens3 proto dhcp src 10.77.4.18 metric 100
10.77.4.0/24 dev ens3 proto kernel scope link src 10.77.4.18 metric 100
Selected fields from that guest's supplied lookup:
203.0.113.20 via 10.77.4.1 dev ens3 src 10.77.4.18
Before hints or the answer:
- Identify this case's interface, guest address/prefix, connected network and default gateway without reusing the first example's name or range.
- Explain what the supplied selected-route result adds and what it still cannot establish about a remote system, name or application.
- In your actual guest, repeat the taught route-get form for the second
documentation address,
203.0.113.20. Append a newly labelled section, actual output/diagnostics and its immediate status to your note. - Compare actual via/dev/src fields, or the actual error, with your earlier
.10query and with the separate supplied case. Do not claim that your guest has ens3 or10.77.4.18unless your real output shows it.
Success: correctly interpret both private-range examples, retain all four actual query sections and statuses, and explain differences without changing configured addresses or routes. A successful route choice is not connectivity proof; an honest failed lookup is useful evidence with a stated scope.
Graduated hints
- Read
dev,viaandsrcas separate roles. The prefix in the address identifies the connected range; the gateway is not the guest's own address. - The input is numeric and route get sends no packet. Which questions therefore have not been tested?
- Reuse the exact capture method with a new header and
.20target. The supplied table is a comparison object, not a source for your actual note.
Answer and Reasoning
The second supplied case uses interface ens3, guest address 10.77.4.18/24,
connected network 10.77.4.0/24 and default gateway 10.77.4.1. Its lookup
selects that gateway/interface and source address for 203.0.113.20.
Those roles remain the same even though every example-specific name and
private range changed from the first case.
The route choice adds evidence beyond merely having an address. It does not prove that any packet arrived, that host NAT translated it, that a hostname resolved or that an application listener exists. IPv6 and other lookup/application contexts are also outside these selected IPv4 observations.
After rechecking the actual note's ordinary owned identity and exact task cwd, a complete independent observation is:
printf '%s\n' '--- Actual independent route lookup: 203.0.113.20 ---' >> network-evidence.txt
ip -4 route get 203.0.113.20 >> network-evidence.txt 2>&1
printf 'second selected-route query exit: %s\n' "$?" >> network-evidence.txt
cat network-evidence.txt
Require every append to succeed. Read this actual section before comparing it. The two documentation targets may choose the same route on your guest, but that is an observation to establish rather than assume. If the route, source or state changed, record the difference; do not rewrite the first section or infer an unchanged network from memory.
Your complete note should contain the actual address query, main-table listing and two separately labelled selected-route lookups, with each immediate status. Explain loopback, each relevant non-loopback address, the displayed connected/default route evidence and the targeted outcomes. Keep the supplied no-route and second-range records out of those actual sections. No automatic grading or remote reachability test is implied.
Diagnose a difference without changing the network
| Observation | Meaning and next bounded step |
|---|---|
| Actual interface name differs | Interpret its actual row; do not rename it to match a lesson example. |
| Loopback says UNKNOWN | That label alone is not a failure diagnosis. Read the actual address and separate route evidence. |
| Non-loopback interface says UP | It still does not prove a route, gateway response or application connection. |
| No non-loopback IPv4 address | Record the family-specific local observation and reconcile guest readiness; do not assign an address here. |
| Main table has no default | Inspect the targeted lookup; missing default alone is not a universal no-route conclusion. |
| Numeric route lookup reports unreachable | Preserve the current-context routing diagnostic; it is not a DNS failure or a remote service response. |
| Lookup succeeds but another task cannot connect | Route selection was only one layer. Later lessons separately inspect names, bounded responses and listeners. |
| Tool or permission error | The intended observation is unavailable; preserve its diagnostic rather than treating it as a network route result. |
Cleanup and resume
After the independent comparison and explanation, no network configuration needs restoration because this task changed none. Remove only the owned local note if you no longer need its learning evidence. Recheck the known parents first:
ls -ld ~/linux-practice
ls -ld ~/linux-practice/inspect-interfaces-and-routes
Require ordinary directories owned by your recorded account, then enter and verify separately:
cd ~/linux-practice/inspect-interfaces-and-routes
pwd
Require the exact recorded task path before inspecting the note:
ls -a
ls -ld -- network-evidence.txt
cat network-evidence.txt
Require only the recognized ordinary owned single-link note and dot entries. Preserve an unexpected link, owner, file or unfinished observation. Establish the actual documented interactive response convention; English y/n examples do not justify guessing unfamiliar affirmative responses. After acceptance:
rm -i -- network-evidence.txt
If declined, leave the note and stop cleanup. After accepted removal:
ls -a
Require the task directory empty, then return and verify:
cd ~/linux-practice
pwd
Require the recorded shared-root path before inspecting the task entry:
ls -ld -- inspect-interfaces-and-routes
Only after accepting that ordinary owned empty directory:
rmdir -- inspect-interfaces-and-routes
Retain the shared root and every host/guest network setting. There is no interface, route, firewall, DNS or NAT cleanup command to run.
On interruption, recheck the same guest, ordinary identity, origins, exact
cwd and note identity. Read complete captured sections and their statuses.
A missing status cannot be reconstructed from a later $?. Append a clearly
labelled new observation after a new query, preserving earlier records;
network values may change over time. Never insert the supplied fixture into
an actual section or rerun an inspection as an excuse to mutate networking.
Sources and other study views
- S15 — Ubuntu Libvirt: selected host-side NAT model
- S18 — Bash 5.2: status capture and evidence redirection
- S19 — GNU Coreutils: owned note and scoped cleanup
- S25 — Ubuntu Noble ps: selected shell and PID 1 evidence
- S31 — Ubuntu Noble ip utility
- S86 — iproute2 6.1: command and address-family options
- S87 — iproute2 6.1: interface address observations
- S88 — iproute2 6.1: route listing and selected lookup
- S89 — RFC5737: documentation-only IPv4 addresses
- S90 — RFC1918: private IPv4 address ranges
- S91 — Linux 6.8: interface operational states
- S92 — RFC1122: host-loopback address meaning, section 3.2.1.3
The iproute2 companions document version 6.1.0, the selected Noble family; distribution revisions and output details can differ. The operational-state reference is versioned for Linux 6.8. The Coreutils manual is newer than the selected 9.4 tools; only the bounded, established file/status forms are used. RFC examples define address roles, not evidence that this guest or a remote endpoint has been tested. Interpret the actual guest observations separately from every supplied example.
Revision reconstructs the limits of each observation. Quick Reference retrieves the read-only command forms.