Ntuc Learninghub interview question

How to calculate IP classes?