Search code examples
ip-addressipv4subnetcidr

IP v 4 subnetting and addresses


Hello I am struggling working out IP address and their subnet networks. I am faced with the following question as an example I would like to know if the answers I came up with are indeed correct.

The Question is as follows Question

And my answers to the problem.

a i) 255.255.254.0 ii) 137.215.214.0/23 iii) 137.215.215.255

b i) 255.255.240.0 ii) 137.215.208.0/20 iii) 137.215.223.255

c i) 255.255.255.240 ii) 137.215.215.208/28 iii) 137.215.215.223

Thanks for any help in advance. I am struggling to wrap me head around this since my textbook is not that great.


Solution

  • the prefix 137.x.x.x dictates the class of IP address class B. In general class B addresses are in format N.N.H.H/16 . so generic netmask without subnetting is 16. subnetting is a process by which you can borrow few host bits to accomodate more networks. In this example you have 16 host bits.

    case1: n = 100 c= 300 to have 100 subnets 64(6bits) < 100 < 128(7bits) you will have to reserve 7 bits from left . and for 300 hosts would need 256(8bits) < 300 < 512(9bits) ie 9 bits

    so 137.x.nnnnnnnh.hhhhhhhh

    that would give you,

    IP as entered by you 137.215.215.215
    mask:255.255.254.0
    network IP:137.215.214.0
    first host IP:137.215.214.1
    last host IP:137.215.215.254
    Broadcast IP:137.215.215.255
    number of hosts:510 
    

    I think you can work out from here.