Linux Labs

Networking / Stage 1 of 14

Interfaces, addresses and subnets

Not running Starting usually ~20 s
Leave the lesson

Step 5 of 8 · on a machine · 3 min

Give the client its neighbour back

Now you can fix the client's address so that the server becomes its neighbour.

Two commands change an interface's addresses. The address is written together with its prefix:

text
ip address del ADDRESS/PREFIX dev INTERFACE   # remove an address
ip address add ADDRESS/PREFIX dev INTERFACE   # add an address

add puts an address next to the ones already assigned: the old one stays until del removes it. Changes made with ip last until the network restarts; the lesson on Netplan shows how to keep them for good.

Exercise · do it

A new address for lab0

Leave lab0 in lab-client with a single address from the server's subnet, 192.0.2.1/24, and check that the server answers ping. Do not change the server.

Sign in and start The machine is available after signing in

Goals · 0 of 2

  • Leave lab0 with one address from the server's subnet not done yet
  • Get the server to answer ping not done yet

Step goals

0 of 2
  • Leave lab0 with one address from the server's subnet — not done yet
  • Get the server to answer ping — not done yet
Ubuntu 24.04

Step goals

0 of 2
  • Leave lab0 with one address from the server's subnet — not done yet
  • Get the server to answer ping — not done yet
Loading…