I'm studying for certification and during a simulation I stumbled in question that made me realize I wasn't so sure about calculating IPs and masks stuff.
There it is:
A company has a forest with 4 sites. Subnets are as follows:
MainOffice 172.16.1.0 Subnet: 255.255.255.0 Gateway 172.16.1.254
Site1 192.168.12.0 Subnet: 255.255.255.0
Site 2 192.168.13.0 Subnet: 255.255.255.0
Site 3 192.168.14.0 Subnet: 255.255.255.0
Site 4 192.168.15.0 Subnet: 255.255.255.0
You add a new server to the MainOffice and it needs to be able to communicate to all sites. Which route command would you run?
route add -p 192.168.12.0 netmask 255.255.240.0 172.16.1.254
route add -p 192.168.8.0 netmask 255.255.252.0 172.16.1.254
route add -p 192.168.0.0 netmask 255.255.248.0 172.16.1.254
route add -p 192.168.12.0 netmask 255.255.252.0 172.16.1.254
I know the answer of the question, but I don't know how to get to the netmask based only in the usable IPs 192.168.12.0
, 192.168.13.0
, 192.168.14.0
and 192.168.15.0
.
I used an IP calculator to discover that 192.160.12.1
to 192.160.15.254
is 255.255.252.0
and the Subnet mask in bites is 22, but how to calculate this in an exam? Can someone enlighten me, please??!!