Network and Host
Lesson 7 of 46 in Coddy's IP Addressing and Subnetting course.
Every address splits into two parts. The network part says which network the machine lives on, like a street name. The host part says which machine it is on that network, like a house number.
Where the split happens is written after a slash. In 192.168.7.42/24, the first 24 bits (three whole octets: 192.168.7) are the network, and the rest (42) is the host.
Two machines can talk directly only when their network parts match. That single rule is why the split matters so much.
Challenge
BeginnerFor the address 192.168.7.42/24, print the network part on the first line and the host part on the second line.
Expected output:
192.168.7
42Try it yourself
All lessons in IP Addressing and Subnetting
10Capstone - The Office
The Floor PlanSizing Each TeamCarving the BlockThe Router's ViewRecap - Ship the PlanPractice on your own: Terminal playground