First and Last Host
Lesson 22 of 46 in Coddy's IP Addressing and Subnetting course.
With the bookends known, the machine range is simple: the first host is the network address plus one, and the last host is the broadcast minus one.
For 10.1.1.0/26: network 10.1.1.0, broadcast 10.1.1.63, so machines live from 10.1.1.1 to 10.1.1.62.
By convention the first host often goes to the router of the subnet, which is why gateway addresses so often end in .1.
Challenge
BeginnerFor the subnet 10.1.1.0/26, print the first usable host address, then the last, each on its own line.
Expected output:
10.1.1.1
10.1.1.62Try 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