Linux for network engineers lab 1 of 14

iproute2: addresses, routes, neighbours and sockets

A new Linux box arrives at the depot with nothing configured. You give it addresses, routes and neighbours with `ip`, see its sockets with `ss`, and make a host's settings permanent.

Run this lab

It needs Lite: its 3 nodes are set to 3 vCPU and 1,536 MB in total. That fits the free demo too.

In your workspace: Shared, then Linux for network engineers guided labs, then 01 - iproute2 - addresses routes neighbours and sockets

Try it free for 30 minutesRun it on Lite from £3 a day

The free demo needs no card and no email. Every lab plan includes every guided lab.

Level
Beginner
Time
About 50 minutes
Nodes need
3 vCPU, 1,536 MB
Smallest plan
Lite

The scenario

You've just joined the network team at Kestrel Couriers. The new Linux box at the Leeds depot, LNX1, arrived with nothing configured. It has to reach the depot router R1 and the office PC H2 by lunchtime, and the team's rule is simple: use ip and ss, the iproute2 tools you'll find on every current distribution.

DeviceInterfaceAddressRole
LNX1eth010.1.10.10/24, then 10.1.10.11/24the new box (you configure it)
R1Gi0/010.1.10.1/24depot gateway
R1Gi0/110.1.20.1/24office gateway
R1Loopback110.1.99.1/24head office, as far as this lab goes
H2eth010.1.20.20/24office PC
DeviceRunsHow to log in
H2Alpine Linux 3.20root, no password.
R1Cisco IOSv 15.9The console opens at >; enable has no password.
LNX1Alpine Linux 3.16 with iptables and iproute2Opens on a menu: press 5, then Enter, for a root shell.

What you’ll practise

  • Read interfaces, addresses, routes and neighbours with iproute2
  • Add primary and secondary addresses and choose the source address
  • Add static and default routes and prove the longest-prefix match
  • Read and set neighbour entries
  • List listening and established sockets with ss
  • Make network settings persistent on Alpine and name the equivalents on other distributions

The tasks

  1. Start the Linux nodes
  2. Read the box before you touch it
  3. Bring up the port and add an address
  4. Add a second address
  5. Routes and the longest match
  6. Neighbours
  7. Sockets with ss
  8. Make H2's settings survive a reboot

The Lab Tasks pane has the scenario, these tasks, the checks to run, hints and the full solution.

Topology and devices

The network as it opens in EVE-NG, drawn from the lab’s own canvas, and the image each node runs.

Topology of iproute2 - addresses routes neighbours and sockets3 nodes, 2 links. Every link is listed as text below the diagram.H2R1LNX1eth0Gi0/0Gi0/1eth0
3 nodes, with the interface names each link uses. On a narrow screen, scroll the diagram sideways.
Nodes in iproute2: addresses, routes, neighbours and sockets, with the image each runs and the vCPU and RAM it’s set to
NodeDeviceImage in Add NodeSet to
H2Alpine Linuxclbalpinebase-alpine-base-3-20-31 vCPU, 512 MB
R1Cisco IOSvvios-adventerprisek9-m.spa.159-3.m91 vCPU, 512 MB
LNX1Alpine WAN emulatorclbalpinewanem-alpine-3-16-2-wanem1 vCPU, 512 MB

How to open this lab

  1. Sign in to your workspace at lab.cloudlabbox.com.

  2. In File Manager, open Shared, then the folder Linux for network engineers guided labs.

  3. Open 01 - iproute2 - addresses routes neighbours and sockets and start its nodes, then open Lab Tasks for the scenario and the steps.

The lab is read-only. You can start the nodes and configure the devices, but changes to the topology can’t be saved. To change it, rebuild it in your own folder.

More Linux for network engineers labs

All Linux for network engineers labs

CloudLabBox is independent of Cisco, CompTIA, the Linux Foundation and the Linux Professional Institute. The lab follows exam topics and isn’t vendor training material; vendor names identify the exams and the images in the workspace.