Sign Up|Login Courses F.a.q Resources

Cisco CLI Error: % Bad mask /xx for address X.X.X.X

When does this error message appear?

This error message appears while attempting to configure an IP Address on a Layer 3 interface on a router or switch running Cisco IOS.

What does this error mean?

The IP Address specified is not a valid host address for the Subnet Mask being used.

What is the most common occurence of this error?

This error occurs most commonly if we attempt to assign a Network Address (or Broadcast Address) to a Layer 3 interface on a router or Layer 3 switch.


The following example illustrates a common occurence of this error:
Router1 Router2
Router1 Console
Router1(config)#interface gi0/1
Router1(config-if)#ip address
% Bad mask /30 for address
The diagram above shows 2 routers connected directly together via a cable. The network segment shared between the 2 routers is /30.
Given a network diagram as shown above, sometimes a student may try to configure Router1's (or Router2's) interface with the IP Address When used with the Subnet Mask (/30), the address is a network address.
A Cisco router will only allow a host address to be configured on a Layer 3 interface. (The only exception is a /31 Subnet Mask as covered in this course.)
What would the correct IP Addresses be for Router1 and Router2's interfaces?Show Answer