Sign Up|Login Courses & Workshops
Overview
Pricing
CISCO CLI ERRORS HOME

Cisco CLI Error: % Inconsistent address and mask

When does this error appear?

This error message may appear while attempting to configure a Static Route on a Layer 3 device running Cisco IOS.

What does this error mean?

This error indicates that the network address specified in the command is not a valid network address for the subnet mask specified.

The basic format of the ip route command as follows:

ip route <network address> <subnet mask> <next-hop address>

For example:

iproute192.168.1.0255.255.255.010.0.0.1
network addresssubnet masknext hop

The network address parameter must be a valid network address when combined with the subnet mask parameter. When entering the ip route command on a Cisco router, if we see the error message "% Inconsistent address and mask" it indicates to us that the combination of the network address parameter and the subnet mask parameter is incorrect.

Example 1 (Mistake or typo when entering the network address):

Router1 Router2
Segment 2
172.20.100.96/30
172.20.100.97172.20.100.98
10.8.0.1 10.8.1.1
Segment 1
10.8.0.0/24
Segment 3
10.8.1.0/24
Router1 Console
Router1(config)#ip route 10.8.1.1 255.255.255.0 172.20.100.98
% Inconsistent address and mask
Router1(config)#
The example above shows 2 routers and 3 network segments. In order to route traffic to Segment 3, Router1 requires a route to the network 10.8.1.0/24.
To add the required static route on Router1 above we entered it as follows:
iproute10.8.1.1255.255.255.0172.20.100.98
network addresssubnet masknext hop
However, 10.8.1.1 is not a network address when combined with the Subnet Mask 255.255.255.0 (/24). 10.8.1.1 is the first host address from the network 10.8.1.0 255.255.255.0. The correct value for the network address paramter would be 10.8.1.0.
The correct ip route command would be:
iproute10.8.1.0255.255.255.0172.20.100.98
network addresssubnet masknext hop

With the correct network address paramer, the router accepts the command:

Router1 Console
Router1(config)#ip route 10.8.1.1 255.255.255.0 172.20.100.98
% Inconsistent address and mask
Router1(config)#ip route 10.8.1.0 255.255.255.0 172.20.100.98
Router1(config)#

Example 2 (Mistake or typo when entering the subnet mask):

Router1 Router2
Segment 2
172.20.100.96/30
172.20.100.97172.20.100.98
10.8.0.1 10.8.1.1
Segment 1
10.8.0.0/24
Segment 3
10.8.1.0/24
Router1 Console
Router1(config)#ip route 10.8.1.0 255.255.254.0 172.20.100.98
% Inconsistent address and mask
Router1(config)#
 
Considering the same scenario as previously, this time we try to enter the static route as follows:
iproute10.8.1.0255.255.254.0172.20.100.98
network addresssubnet masknext hop

The IP address 10.8.1.0 is not a network address when combined with the subnet mask 255.255.254.0. 10.8.1.0 is the 256th host address in the network 10.8.0.0 255.255.254.0 (/23)

10.8.0.0 255.255.254.0 defines the range of IP address 10.8.0.0 - 10.8.1.255. The network address is 10.8.0.0 and the broadcast address is 10.8.1.255. (10.8.1.0 is a host address within this range.)

The correct subnet mask for this scenario is 255.255.255.0. The correct command would be:

iproute10.8.1.0255.255.255.0172.20.100.98
network addresssubnet masknext hop

With the correct subnet mask paramer, the router accepts the command:

Router1 Console
Router1(config)#ip route 10.8.1.0 255.255.254.0 172.20.100.98
% Inconsistent address and mask
Router1(config)#ip route 10.8.1.0 255.255.255.0 172.20.100.98
Router1(config)#

Conclusion

The error message "% Inconsistent address and mask" may appear while attempting to add a static route on a Cisco router. This error message indicates that the combination of the network address and subnet mask parameters does not define a valid network address. If you receive this error message while configuring a static route on a Cisco router, check the network address and subnet mask parameters in the command that you have entered. There is a mistake or typo in either the network address or subnet mask parameter such that the network address as entered is actually a host address.


To gain a comprehensive understanding of Static Routes on Cisco routers, check out the course Course 4 - Static Routes on this website.

Want to test your networking skills with hands-on configuration and troubleshooting questions? Try out the Workshops section of this website here: Workshops (Login required).

Read how to use the device simulators on this website here: Workshops - General Instructions

Have a comment, question or feedback? Leave a note below.