Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

DI 2.13: Testing a network and recording results

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

60 minutes

It worked on my desk

A technician finishes setting up a new office. She pings one laptop. It answers. She says: done.

On Monday, the printer cannot be reached from the classrooms. She tested one path, and the problem was on another.

A good test covers every path that matters, and writes down what it found.

Key words

WordWhat it means
Test plana list of what to test, what you expect, and how to check
Functionalitywhether something does the job it was built to do
Performancehow well it does the job: how fast and how reliably
Scripta short program that runs commands for you
Latencythe delay for a packet to travel, in milliseconds
Packet losspackets that never arrive
Pinga tool that sends small packets and times the replies
Loga written record of what happened and when
Packeta small piece of data sent over a network
Networkcomputers and devices joined so they can share data

The cells students fill in are left blank in this preview.

By the end of this lesson

Note

I can test a network for functionality and performance with a short script, and record every result so it can improve the network.

Starter

Have a go

Starter

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Two kinds of test

KindThe questionAn example testA pass looks like
FunctionalityDoes it work at all?Can h1 reach h2?A reply comes back
FunctionalityIs the closed door still closed?Can h1 reach the management network?No reply: that is the right answer
PerformanceHow quick is it?The average ping timeUnder the limit in the plan
PerformanceHow reliable is it?Packets lost out of 100None, or under the limit

The cells students fill in are left blank in this preview.

Write down what you expect first

A test plan lists each test and the answer you expect. A FAIL is not always bad. If h1 must not reach the management network, then no reply is a pass for the plan.

Without the expected answer, you cannot tell a good result from a bad one.

A script that tests for you

Typing four pings is slow, and people forget one. A script does the same checks every time.

The next command is a loop (steps repeated for each item). For each pair of host and address it sends one ping, then prints PASS or FAIL. The lab routes were added in the earlier lesson. Press Start the lab.

Run the functionality tests

Command
for t in "h1 10.0.1.1" "h1 10.0.3.2" "h2 10.0.1.2" "h1 10.0.99.2"; do set -- $t; if sudo ip netns exec $1 ping -c 1 -W 1 $2 >/dev/null 2>&1; then echo "PASS $1 to $2"; else echo "FAIL $1 to $2"; fi; done

A command for the lesson’s lab terminal. It is shown here and not run.

The lesson goes on

11 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.