I fail to understand this problem while doing some Cisco exercises and I hope you can help me out on this.

R5# conf t

R5( config )#int bri0

R5( config-if)#ip address

Bad mask /30 for address

R5( config-if )#end


Question:  How does fall within ip subnet zero? Please help.




Great to see you doing some exercises!

There are two problems in the config you gave me

1.      The ip address as entered ( is a network address, not a host address - but perhaps that is a misprint, especially given the error message " Bad mask /30 for address".  From here on, let's assume you meant the ip address to be a legal - but that brings us to ...

2.      The "zero subnet" problem.

Firstly, I hope you can see that the subnet that is indeed - which is exactly the same as the class C network number,, hence it is the zero subnet.  But so what?

Like many things with TCP/IP, the story starts "Once upon a time...".  So, Once upon a time, before RFCs 1812 & 1878, when a major network was dived into subnets, there was a school of thought that went along the lines of "In certain contexts, it is useful to have fixed addresses with functional significance rather than as identifiers of specific hosts.  When such usage is called for, the address zero is to be interpreted as meaning "this", as in "this network".  The address of all ones are to be interpreted as meaning "all", as in "all hosts".  For example, the address could be interpreted as meaning all hosts on the network 128.9.  Or, the address could be interpreted as meaning host 37 on this network." [RFC 943-1985].  RFC 1716 (1994) was more direct "No subnet should be assigned the value zero or -1 (all one bits)."

The real problem was that routers had trouble interpreting a routing update that advertised something like - is the route being advertised to the entire B class network, or just the subnet? - Whatever the subnet is would depend on the mask being used.  It might be or  Routing protocols like RIP (v1) and IGRP do not advertise subnet masks, so the whole issue was avoided with the simple ruling in RFC 1716.  (There is a similar story for the "all-ones" or broadcast subnet, but nothing to do with routing protocols.  See for an example)

Fast forward to more modern times, (like 1995) when RFCs 1812 and 1878 came along, we realised that not using the zero subnet (or the broadcast subnet either for that matter) was pretty stupid, since there were routing protocols around that could handle subnets.  Specifically RFC 1878 says "This practice is obsolete!  Modern software will be able to utilize all definable networks." So the practice was made redundant.

But what about our trusty Cisco (and other brand) routers that had been taught by the old school "thou shalt not use the zero subnet"?  Well, Cisco had always had a command ip subnet-zero to allow the zero and broadcast subnets to be used.  But prior to Cisco IOS Software Release 12.0, the ip subnet-zero global configuration command was required to be able to configure subnet zero on an interface, but in v12.0 this command became part of the default configuration.  So, if you are configuring a router that is still running v11.x or earlier, when you enter the command:

R5( config-if)#ip address

You will get the response:

Bad mask /30 for address

To prevent this, add the ip zero-subnet to your global configuration before you configure the interface.