What Routers Do

Why do we even need network routers? A router connects different networks. Without routing every network space is isolated, all sad and alone with no one to talk to but the same boring old nodes. Suppose you have a and a network. Your two networks cannot talk to each other without a router connecting them. These are Class C private networks with 254 usable addresses each. Use ipcalc to get nice visual information about them:

$ ipcalc
Address:          11000000.10101000.00000001. 00000000
Netmask: = 24   11111111.11111111.11111111. 00000000
Wildcard:            00000000.00000000.00000000. 11111111
Network:       11000000.10101000.00000001. 00000000
HostMin:          11000000.10101000.00000001. 00000001
HostMax:        11000000.10101000.00000001. 11111110
Broadcast:        11000000.10101000.00000001. 11111111
Hosts/Net: 254                   Class C, Private Internet

Ipcalc is a Linux command line tool that takes an IP address and netmask and calculates the resulting broadcast, network, Cisco wildcard mask, and host range.

I like that ipcalc's binary output makes a visual representation of how the netmask works. The first three octets are the network address, and the fourth octet is the host address, so when you are assigning host addresses you "mask" out the network portion and use the leftover. Your two networks have different network addresses, and that is why they cannot communicate without a router in between them.

Each octet is 256 bytes, but that does not give you 256 host addresses because the first and last values, 0 and 255, are reserved. 0 is the network identifier, and 255 is the broadcast address, so that leaves 254 host addresses. ipcalc helpfully spells all of this out.

This does not mean that you never have a host address that ends in 0 or 255. Suppose you have a 16-bit prefix:

$ ipcalc
Address:          11000000.10101000. 00000000.00000000
Netmask: = 16     11111111.11111111. 00000000.00000000
Wildcard:          00000000.00000000. 11111111.11111111
Network:       11000000.10101000. 00000000.00000000
HostMin:          11000000.10101000. 00000000.00000001
HostMax:      11000000.10101000. 11111111.11111110
Broadcast:      11000000.10101000. 11111111.11111111
Hosts/Net: 65534                 Class C, Private Internet

ipcalc lists your first and last host addresses, and You may have host addresses that end in 0 and 255, for example and, because those fall in between the HostMin and HostMax.

The same principles apply regardless of your address blocks, whether they are private or public, and don't be shy about using ipcalc to help you understand.

Excerpt from "Linux LAN Routing for Beginners: Part 1" by Carla Schroder February 22, 2018 posted on

Learn more at

More Networking Basics:
• What is Cloud Computing?
• Network Administrator Street Smarts: A Real World Guide to CompTIA Network+ Skills
• Packet Switching Store-and-Forward Transmission
• What is the Internet of Things?
• Basics of Bluetooth Technology
• Fiber Broadband Internet Service
• The Function of the Three Planes of Junos Network OS
• Cloud Service Models
• What Routers Do
• Fiber Optic Cabling For Beginners