Menu
Coddy logo textTech

Loopback

Lesson 30 of 46 in Coddy's IP Addressing and Subnetting course.

The whole block 127.0.0.0/8 is loopback: packets sent there never leave your machine. They loop straight back, which makes 127.0.0.1 (also known as localhost) the address of "this computer, talking to itself".

Loopback is the first thing to test when networking misbehaves: if ping 127.0.0.1 fails, the problem is inside the machine, not in any cable or router.

ping -c 1 sends a single probe; combined with && and || you can turn the result into a clean yes or no.

challenge icon

Challenge

Easy

Prove your own network stack is alive: ping 127.0.0.1 exactly once, silence the ping output, and print alive if it answered or silent if it did not.

Expected output:

alive

Try it yourself

Terminal

All lessons in IP Addressing and Subnetting

Practice on your own: Terminal playground