"

Part II | Exercises

These exercises will provide a refresher/introduction to basic networking commands and binary to decimal conversions.

Getting Started with Networking Commands

Let’s learn to use basic network commands to identify your computer’s IP address, test connectivity, and observe your local network setup.

What You Need:

  • Access to either a Windows, Linux, or Mac computer with Internet access
  • A terminal (command prompt)

Part 1: Find Your IP Address

Commands by OS:

OS Command to use
Windows ipconfig
Linux ip a or ifconfig (if installed)
macOS ifconfig

Instructions:

  1. Open your terminal or command prompt.
  2. Run the command for your OS.
  3. Look for the section that shows your IP address, Subnet Mask, Default Gateway, and MAC address.

Tip: Your MAC address might be called a Physical Address or ether address. It’s usually in a format such as 00:1A:2B:3C:4D:5E.

 Questions:

  • What is your IP address?
  • What is your subnet mask?
  • What is your default gateway?
  • What is your MAC address, and what do you think it is used for?

Part 2: Test Network Connectivity

Command:

ping

What It Does:
Sends small test packets to another device (like a website) to check if it’s reachable.

Try These Commands:

  1. ping 127.0.0.1 (This tests your own computer – called the loopback address.)
  2. ping google.com or another website.

Note: On macOS/Linux, press Ctrl + C to stop the ping loop.

Questions:

  • Did your ping to 127.0.0.1 work? What does this tell you?
  • Did your ping to Google work? If not, what might be wrong?

Part 3: Trace the Path to a Website

Commands:

  • Windows: tracert google.com
  • Linux/macOS: traceroute google.com (You may need to install traceroute on Linux)

What It Does:

Shows each stop (or “hop”) your data takes on the way to a website.

Instructions:

  1. Run the appropriate command for your OS.
  2. Watch as the output lists each “hop” between routers.

Questions:

  • How many hops did it take to reach Google?
  • What do you think each hop represents?
  • Did the traceroute stop partway or reach the final destination?

Part 4: See MAC Addresses on Your Network

Command:

arp -a (all OSs)

What It Does:

Shows a list of IP addresses and their associated MAC addresses that your computer has communicated with.

Try It Out:

  • Run arp -a and look at the list.
  • Can you match the MAC address of your default gateway?

This command is helpful for understanding how devices are identified on a local network.

Reflections

  1. What surprised you most about the results of these commands?
  2. Which command do you think you would use to troubleshoot internet problems at home? Why?
  3. Did you notice any differences between Windows, Linux, and macOS when using these commands?

Converting an IPv4 Address to its Binary Equivalent 

Remember your IP address from the prior exercise? Let’s convert it to its binary equivalent of 0s and 01. This will be useful later on for understanding subnetting. For an overview of binary to decimal, watch this video: An Introduction to Binary Numbers (Burke, 2017) [10:03].

Part 1: Write Down Your IP address

From your earlier networking exercise (use ipconfig, ip a, or ifconfig):

My IP address is: ___.___.___.___

Part 2: Break Your IP Address into Four Octets

Each number between the dots is an octet. Write them out below:

For example, let’s say your IP address is: 192.168.1.25

You would write out each octet separately in this example:

192    168    1    25

Each octet is 8 bits (8 binary digits). Let’s convert each number:

  • 192 →
    192 = 128 + 64 → 11000000
  • 168 →
    168 = 128 + 32 + 8 → 10101000
  • 1 →
    1 = 1 → 00000001
  • 25 →
    25 = 16 + 8 + 1 → 00011001

Part 3: Put It All Together

Now cpmbine the binary octets in IPv4 dotted format. So in the example:

192.168.1.25 = 11000000.10101000.00000001.00011001

Try It Yourself!

To recap, the eight-bit binary format (each result should have 8 digits, using leading 0s if needed). Use your own IP address (from the earlier exercise), and fill out this table:

Octet Decimal Value     Binary Equivalent
1st
2nd
3rd
4th

Now write your full binary IP address:
______.______.______.______

Need help? To convert a decimal number to binary, you can use this chart:

Decimal Binary
128 10000000
64 01000000
32 00100000
16 00010000
8 00001000
4 00000100
2 00000010
1 00000001

Reflections

  1. What part of this activity was easiest for you and which part was most challenging?
  2. Why do you think IP addresses are stored as binary under the hood?
  3. What do you notice about IPs with low vs. high decimal numbers when looking at their binary forms?

Comments Box 

Do you have any comments (errors, suggestions, etc.) about this section? Please ping us by clicking on the link below and sharing your feedback/suggestions. Thank you!

Comments Box | Telecommunications and Networking | Part II Exercises

 

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Telecommunications and Networking Copyright © by Rita Mitra; Glenn Brown; Melanie Huffman; and Hongyi Zhu is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.