16

I'm not too clear on subnetting rules and experienced an error when I tried to assign 148.26.1.176/28 to an interface on my Cisco router. Can someone please explain why it was not allowing me to assign this address to the interface? I receive an error saying:

Bad mask /28 for address 148.26.1.176

Is it outside the permissible range?

  • I'm not too clear on subnetting rules Where sub-netting is all over the Internet, so read about it first, then you wouldn't need to ask this question – jwbensley Jul 2 '13 at 15:29
28

If you are using /28 network mask then 148.26.1.176 is the network address and therefore is not an assignable IP address for this subnet.

For subnet 148.26.1.176/28 the range of assignable IP address is 148.26.1.177 to 148.26.1.190, as 148.26.1.176 is the network address and 148.26.1.191 is the broadcast address

2

Just to expand Daniel's answer above:

The network address in IPv4 is the address where the host bits are all 0. The broadcast is the address where all host bits are 1.

To create the address 148.26.1.176, the last octet in binary is 1011 0000. The network mask of /28 would take up the first 4 bits of that number, leaving only zeroes after the mask: [1011] 0000

That's why it's not a valid address. It's a network address.

2

IPCALC is a handy tool on most linux boxes, or on the web here ipcalc You type in the IP and the mask and it will output the range, detailing the network, broadcast and the usable range.

Address:   148.26.1.176          10010100.00011010.00000001.1011 0000
Netmask:   255.255.255.240 = 28  11111111.11111111.11111111.1111 0000
Wildcard:  0.0.0.15              00000000.00000000.00000000.0000 1111
=>
Network:   148.26.1.176/28       10010100.00011010.00000001.1011 0000     (Class B)
Broadcast: 148.26.1.191          10010100.00011010.00000001.1011 1111
HostMin:   148.26.1.177          10010100.00011010.00000001.1011 0001
HostMax:   148.26.1.190          10010100.00011010.00000001.1011 1110
Hosts/Net: 14  
  • fun fact - the ipcalc distribution includes a CGI that you can run on your own host if it's running a webserver that supports CGI. – John Jensen Jul 2 '13 at 16:18
  • Good tool to know but you did not relate it to the OPs question. It is important to explain what the OP was doing wrong and what he can do to remedy the problem. – kojow7 Dec 11 '18 at 16:25
1

You are trying to assigning router a IP 148.26.1.176 which is a subnet id

  • This answer is not quite correct. 148.26.1.176/28 is a network address, not a subnet id. – kojow7 Dec 11 '18 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.