Inconsistent address and mask в чем ошибка

от admin

Inconsistent Address and mask

When statically routing a route in the format [destination network address] [mask] [next hop address or interface name], I get the Inconsistent Address and mask error. Any assistance would be appreciated.

Network address: 10.10.233.0
Mask: 255.255.254.0 (fitted to suit 300 host )
Hop address: 10.10.235.162

Ron Maupin's user avatar

IT ken's user avatar

1 Answer 1

That would be correct. If you mask the address you think is the network’s address with the network mask, you get a different, real network address.

The network is from 10.10.232.0 to 10.10.233.255.255 .

You must do IP math in binary, then it makes sense, and otherwise you make mistakes. See this excellent answer for how to do that.

With that mask ( 255.255.254.0 ), that address ( 10.10.233.0 ) is not a network address, it is a host address on a different network ( 10.10.232.0 ).

Inconsistent address and mask в чем ошибка

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>

ip route 192.168.1.0 255.255.255.0 10.0.0.1
network address subnet mask next 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):

ip route 10.8.1. 1 255.255.255.0 172.20.100.98
network address subnet mask next hop
ip route 10.8.1. 0 255.255.255.0 172.20.100.98
network address subnet mask next hop

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

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

ip route 10.8.1.0 255.255.25 4 .0 172.20.100.98
network address subnet mask next hop

The IP address 10.8.1.0 is not a network address when combined with the subnet mask 255.255.25 4 .0. 10.8.1.0 is the 256th host address in the network 10.8. 0 .0 255.255.25 4 .0 (/2 3 )

10.8.0.0 255.255.25 4 .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.25 5 .0. The correct command would be:

ip route 10.8.1.0 255.255.25 5 .0 172.20.100.98
network address subnet mask next hop

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

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.

Cisco CLI Error: % Inconsistent address and mask

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>

ip route 192.168.1.0 255.255.255.0 10.0.0.1
network address subnet mask next 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):

ip route 10.8.1. 1 255.255.255.0 172.20.100.98
network address subnet mask next hop
ip route 10.8.1. 0 255.255.255.0 172.20.100.98
network address subnet mask next hop

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

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

ip route 10.8.1.0 255.255.25 4 .0 172.20.100.98
network address subnet mask next hop

The IP address 10.8.1.0 is not a network address when combined with the subnet mask 255.255.25 4 .0. 10.8.1.0 is the 256th host address in the network 10.8. 0 .0 255.255.25 4 .0 (/2 3 )

10.8.0.0 255.255.25 4 .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.25 5 .0. The correct command would be:

ip route 10.8.1.0 255.255.25 5 .0 172.20.100.98
network address subnet mask next hop

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

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

%Inconsistent address and mask

Typically you don’t want the router connections end to end to be the same interface, just asking for trouble. If I were you the S0/0/0 interface your using at the end of the route use the iP address of that interface instead and then press enter. See if it gives you and error then.

Additionally routing 192.168.1.1 would be an address not a routable subnet like 192.168.1.0, which would be.

As for you’re routes so you know, you want your next hop to be were you last part of the ip route to be.

For instance say on R2 on S0/0/0 is 192.168.5.1 and one R1 on S0/0/0 is 192.168.5.2. So say you want to get to 172.16.3.0 subnet from router 2 your ip route would be : «ip route 172.16.3.0 255.255.255.0 192.168.5.2». Placing that route on R2 would get you to subnet 172.16.3.0 via R1 serial interface at S0/0/0. Lastly any routes returning routes from R1 to R2 would be needed to make the back-n-fourth of data between routers.

Hope this helps. There is way more to it. But this should help you grasp it, I hope. :=)

Related Posts