Linux Labs

Networking / Stage 1 of 14

Interfaces, addresses and subnets

Not running Starting usually ~20 s
Leave the lesson

Step 1 of 8 · on a machine · 4 min

The server does not answer

What you will learn

  • Read interfaces and their addresses in the output of ip.
  • Tell from the prefix whether two addresses are in the same subnet.
  • Fix an interface address and check that the neighbour answers.

A colleague has built a practice network of a client and the server 192.0.2.1, and writes: "The server does not answer from the client, although the interface is up." Take a look yourself.

The client and the server run inside your machine. Start on the card builds this network, and commands containing lab-client run on the client.

Exercise · look

The client's address and the server's reply

Look at the client's addresses, then send the server 192.0.2.1 two echo requests: ping sends short requests and prints the replies.

First, predict

The client's interface is up and has an address. What will ping to the server print?

Now start the exercise, run the command and compare your prediction with the output.

Sign in and start The machine is available after signing in
Check yourself 1 question

Why did ping not send the server a single request?

  • In the ip output lab0@if2 is in state UP: the interface is up.

  • The client and the server are connected directly inside your machine: the way to 192.0.2.1 does not go through the internet.

  • A switched-off server would simply not answer the requests. But ping never sent them: the error appeared at once, on the client.

The client's address is in the 192.0.3 network while the server 192.0.2.1 is in 192.0.2, and the client knows no way to it.

Ubuntu 24.04
Loading…