In many enterprise companies, service providers assign a single standard block of IPv4 addresses—such as 192.168.10.0/24. If you place all two hundred employees from Sales and Engineering into that single unsegmented block, their computers share all broadcast chatter, file-sharing protocols, and printer traffic. When Sales prints marketing banners, Engineering network latency spikes.
Rather than purchasing a second expensive internet circuit, network engineers carve the single block into multiple sub-networks using subnetting. In this chapter, you will split 192.168.10.0/24 into two equal halves, configure router gateway interfaces for both sides, and route traffic securely between departments.
Borrowing a Bit: The Step to /25
To divide one network into two equal subnets, we must borrow one host bit and convert it into a network bit. In a standard /24 network, the fourth octet contains eight host bits (00000000). When we borrow the very first bit of that octet, it can only have two possible values: 0 or 1.
If that borrowed bit is 0, the fourth octet starts at numerical value 0. If that borrowed bit is 1, its decimal weight is 128. Because we borrowed one bit, the prefix length changes from /24 to /25, and the dotted-decimal subnet mask changes from 255.255.255.0 to 255.255.255.128.
This single bit flip cuts the original 256-address space cleanly down the middle. Subnet 0 encompasses all numerical values from 0 to 127. Subnet 128 encompasses all numerical values from 128 to 255. Both departments receive a generous allocation of 126 usable host addresses, which is more than enough for everyday team growth.
| Department Subnet | Network ID | Usable Host Range | Broadcast Address | Gateway Router IP |
|---|---|---|---|---|
| Sales (Subnet 0) | 192.168.10.0 | 192.168.10.1 - 192.168.10.126 | 192.168.10.127 | 192.168.10.1 |
| Engineering (Subnet 128) | 192.168.10.128 | 192.168.10.129 - 192.168.10.254 | 192.168.10.255 | 192.168.10.129 |
The Magic Number Method for Fast Calculations
In high-pressure certification exams and fast-paced field deployments, calculating binary conversions by hand takes too much time. Experienced network engineers rely on a mental shortcut known as the Magic Number Method to find subnet boundaries in seconds.
To find the magic number, simply take the number 256 and subtract the interesting octet of your subnet mask. In our /25 example, the interesting octet is 128. Subtracting 128 from 256 yields exactly 128 (256 - 128 = 128). This result tells you the block size: your subnets increment by multiples of 128. Subnet 1 starts at 0, Subnet 2 starts at 128, and the next would start at 256 (which marks the end of the octet).
This simple formula works universally across all subnet masks. If you were working with a /26 mask (255.255.255.192), your calculation would be 256 - 192 = 64. Your subnets would increment cleanly in steps of 64: 0, 64, 128, and 192. Mastering this mental math eliminates guesswork during emergency outages.
Assigning Router Gateway Addresses
Each department now lives inside its own independent broadcast island. To allow controlled communication between Sales and Engineering, the company central router must possess an active interface inside both subnets.
Industry convention reserves the very first usable host address in each subnet for the default gateway. Interface GigabitEthernet0/0 connects to the Sales switch with IP 192.168.10.1 and mask 255.255.255.128. Interface GigabitEthernet0/1 connects to the Engineering switch with IP 192.168.10.129 and the exact same mask 255.255.255.128.
These gateway addresses serve as the default exit doors for all workstation traffic. When a workstation wants to send data outside its immediate team, it packages the frame and directs it toward this gateway IP address. The router inspects the incoming frame, determines the correct outbound port, and forwards the packet toward the destination department.
Packet Journey Across the Subnet Border
When a Sales representative at 192.168.10.10 pings an Engineer at 192.168.10.130, the sending computer compares the destination IP against its local /25 mask. Because 192.168.10.130 falls outside its local 0 to 126 range, the workstation recognizes that the destination is on a foreign network.
Instead of broadcasting an ARP request for the engineer computer, the Sales workstation broadcasts an ARP request for its default gateway at 192.168.10.1. The router receives the frame on Gi0/0, strips the Layer 2 header, looks at its internal routing table, and forwards the packet out of Gi0/1 directly to the Engineering department.
During this transit, the router decrements the Time to Live (TTL) value by one. If you inspect the ping reply on the Sales workstation, the reported TTL value drops from 64 to 63. This confirms that the packet genuinely crossed a Layer 3 routing boundary rather than flowing across a flat switch.
Hands-On Lab Practice
In this lab exercise, you will verify the router dual-interface configuration, test inter-departmental ping reachability, and observe how the router decrements the TTL hop counter while passing traffic between the two /25 departmental subnets.
Take your time to inspect the routing table on the central router. Observe how directly connected routes are automatically registered in the table as soon as the interface IPs are activated with valid masks.
