Skip to content

Reading a machine's network settings

Module
Building Your Networking Lab
Difficulty
Easy
Updated
Tested on
Ubuntu 24.04.5 LTS Docker lab, netlab 1.0, GNU Bash 5.2.21
Prerequisites
On this page

The command prints a block of six lines containing numbers and abbreviations. When a connection fails, you start by reading settings like these. First, find which interface each block describes and which line gives its address. You do not need to understand every number yet.

By the end, you can label those parts on a lab machine. You can also find where it sends messages for other networks.

Finish Installing the lab. Have the lab running in its starting state. Begin in the Ubuntu terminal at the VM prompt, which names rootvolt.

Run the commands in this replay. netlab shell laptop opens a shell on the lab machine. If it asks for a password, type your Ubuntu password as before.

Enter laptop and list its interfaces
learner@rootvolt:~$ netlab shell laptop[sudo] password for learner: learner@laptop:~$ ip address1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
4: eth0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 02:77:10:00:00:10 brd ff:ff:ff:ff:ff:ff link-netns sw-home
    inet 10.77.10.10/24 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::77:10ff:fe00:10/64 scope link 
       valid_lft forever preferred_lft foreverlearner@laptop:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. The prompt changes from rootvolt to laptop before ip address reads laptop's settings.
Steps (9)
  1. Type netlab shell laptop
  2. Press Enter
  3. Output: [sudo] password for learner:
  4. Type the password (the terminal shows nothing)
  5. Press Enter
  6. The prompt names laptop. The following command reads this machine?s interfaces.
  7. Type ip address
  8. Press Enter
  9. Output: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 4: eth0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 02:77:10:00:00:10 brd ff:ff:ff:ff:ff:ff link-netns sw-home inet 10.77.10.10/24 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::77:10ff:fe00:10/64 scope link valid_lft forever preferred_lft forever

Check the word after @. It is laptop after entering the machine. The command ip address lists that machine’s interfaces. At the VM prompt, it would show the VM’s own settings instead.

An interface name tells a command which interface you mean. Read eth0 as a name, not an address. The output has one block per interface, starting with a number and a name. Read the lines below that heading as settings for that interface. The next numbered heading starts another interface’s block.

Follow the eth0 block in the stage below. The first part gives the number and name. The next marked part gives the state. Then link/ether introduces a MAC address, inet introduces an IPv4 address, and inet6 introduces an IPv6 address.

The slash and number after an IP address are its prefix notation. For now, find that part of the line. The table shows where you will learn what it means. You do not need to calculate anything here.

Read laptop?s network interface

4: eth0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 02:77:10:00:00:10 brd ff:ff:ff:ff:ff:ff link-netns sw-home
    inet 10.77.10.10/24 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::77:10ff:fe00:10/64 scope link 
       valid_lft forever preferred_lft forever
laptop
machine
eth0
Statestate UP
MAC address · Linklink/ether 02:77:10:00:00:10
IPv4 address · Internetinet 10.77.10.10/24
IPv6 address · Internetinet6 fe80::77:10ff:fe00:10/64

Reading the output

Pick a step to match a marked part of the output to the picture.

Step-by-step reading of a captured output · Output of ip address on laptop, on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. The values are the capture's. Read the captured eth0 block one part at a time, matching its name, state, and address lines to laptop's interface.
Steps (5)
  1. Number and name. Number and name: 4: eth0@if3. Shown on laptop's eth0 as: eth0. The leading number identifies this interface in the output. Its name is eth0. The number is not part of its address.
  2. State. State: state UP. Shown on laptop's eth0 as: State. Read the state for this interface. UP does not establish that every service can answer.
  3. MAC address. MAC address: link/ether 02:77:10:00:00:10. Link layer. Shown on laptop's eth0 as: MAC address. link/ether introduces the MAC address. This is link-layer information.
  4. IPv4 address. IPv4 address: inet 10.77.10.10/24. Internet layer. Shown on laptop's eth0 as: IPv4 address. inet introduces the IPv4 address and its prefix. This is internet-layer information.
  5. IPv6 address. IPv6 address: inet6 fe80::77:10ff:fe00:10/64. Internet layer. Shown on laptop's eth0 as: IPv6 address. inet6 introduces the IPv6 address and its prefix. Recognize the line here; the IPv6 module explains it.
Part of laptop’s output What it is Explained in
4: eth0@if3 Interface number and name; the suffix describes its virtual connection Building Your Networking Lab
state UP State of this interface Devices, Links, and Connections
link/ether 02:77:10:00:00:10 MAC address line Ethernet and Local Delivery
inet 10.77.10.10/24 IPv4 address and prefix Understanding IPv4 Addresses; Subnetting Foundations
inet6 fe80::77:10ff:fe00:10/64 IPv6 address and prefix IPv6 Foundations

Find the interface a machine uses to talk to itself

Section titled “Find the interface a machine uses to talk to itself”

The block named lo is the loopback interface, which a machine uses to communicate with itself. It is meant to be there. It is not another cable or a connection outside the lab.

Its state is UNKNOWN in this capture. That word on loopback is not a sign of a network problem. Check which interface you are reading before deciding that a word means an error.

Run the next replay’s commands on laptop. The -br option means brief: ip -br address puts each interface’s state and IP addresses on one row. It leaves out details such as the MAC line. Use the longer form to see those details.

Read compact settings, routes, and test web
learner@laptop:~$ ip -br addresslo               UNKNOWN        127.0.0.1/8 ::1/128 
eth0@if3         UP             10.77.10.10/24 fe80::77:10ff:fe00:10/64 learner@laptop:~$ ip routedefault via 10.77.10.1 dev eth0 
10.77.10.0/24 dev eth0 proto kernel scope link src 10.77.10.10 learner@laptop:~$ ping -c 1 10.77.20.80PING 10.77.20.80 (10.77.20.80) 56(84) bytes of data.
64 bytes from 10.77.20.80: icmp_seq=1 ttl=63 time=0.456 ms

--- 10.77.20.80 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.456/0.456/0.456/0.000 mslearner@laptop:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. Compare the brief interface list, the routes, and one reply from web while staying on laptop.
Steps (9)
  1. Type ip -br address
  2. Press Enter
  3. Output: lo UNKNOWN 127.0.0.1/8 ::1/128 eth0@if3 UP 10.77.10.10/24 fe80::77:10ff:fe00:10/64
  4. Type ip route
  5. Press Enter
  6. Output: default via 10.77.10.1 dev eth0 10.77.10.0/24 dev eth0 proto kernel scope link src 10.77.10.10
  7. Type ping -c 1 10.77.20.80
  8. Press Enter
  9. Output: PING 10.77.20.80 (10.77.20.80) 56(84) bytes of data. 64 bytes from 10.77.20.80: icmp_seq=1 ttl=63 time=0.456 ms --- 10.77.20.80 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.456/0.456/0.456/0.000 ms

ip route lists routes. The line starting default says where to send messages when no other route in this list matches their destination. Here, via 10.77.10.1 names the next machine and dev eth0 names the outgoing interface. This is the default route line. You will learn how the machine chooses a route later.

The final command asks web “are you there?” The option -c 1 limits ping to one request. The recorded summary reports 1 packets transmitted, 1 received. That shows this exchange worked. It does not show that every service works. The time changes between runs; your number will differ.

Type exit and press Enter when finished. The shell prints logout and returns to the prompt naming rootvolt.

Predict: router joins two networks. How many blocks will ip address print there, not counting lo?

Check your answer

Two: eth0 and eth1. This replay shows the brief list on router. There is a row for each interface, plus lo:

Read the router interfaces
learner@router:~$ ip -br addresslo               UNKNOWN        127.0.0.1/8 ::1/128 
eth0@if7         UP             10.77.10.1/24 fe80::77:10ff:fe00:1/64 
eth1@if9         UP             10.77.20.1/24 fe80::77:20ff:fe00:1/64 learner@router:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. The router lists one home interface, one site interface, and its loopback interface.
Steps (3)
  1. Type ip -br address
  2. Press Enter
  3. Output: lo UNKNOWN 127.0.0.1/8 ::1/128 eth0@if7 UP 10.77.10.1/24 fe80::77:10ff:fe00:1/64 eth1@if9 UP 10.77.20.1/24 fe80::77:20ff:fe00:1/64

“lo is a network problem.” It is the expected self connection. Read eth0 for the connection to other lab machines.

“The interface number is part of the address.” The number begins a block. The address appears later on its own labeled line. Interface numbers may differ on another run.

On Windows, ipconfig /all shows network settings too, including IP addresses and default gateways. The lines look different from Linux. Use the Ubuntu lab for this exercise.

From the VM, enter web with netlab shell web. Run ip address and ip route. Record the interface, state, both IP address lines, and where everything else is sent. Compare with laptop. Find lines that show the same kind of setting but have different values. Then exit.

Solution
Part Captured on web
Interface eth0
State UP
IPv4 line inet 10.77.20.80/24 scope global eth0
IPv6 line inet6 fe80::77:20ff:fe00:80/64 scope link
Default route default via 10.77.20.1 dev eth0

Both machines have address lines and a default-route line. The lines do the same jobs, but the values differ. Each machine has its own addresses and a route for its network.

Understanding IPv4 Addresses and Subnetting Foundations explain address numbers and prefixes. Ethernet and Local Delivery explains MAC addresses. Reaching Another Device explains routes and ping. IPv6 Foundations explains the IPv6 line.

  • Check the prompt before reading settings.
  • Read each interface block separately.
  • Find the address labels before working out what the numbers mean.
  • Find the default line, then test the address you want to reach.

Next, Resetting and recording experiments gives you a way back after changes.