cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2997
Views
10
Helpful
4
Replies

Inconsistent address and Mask

CiscoUser10
Level 1
Level 1

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:148.148.148.48
Mask: 255.255.255.0 (fitted to suit 300 host )
Hop address: 106.106.106.1

4 Replies 4

omz
VIP Alumni
VIP Alumni

Hi

as you have learned .. you can't do 

ip route 148.148.148.48 255.255.255.0 106.106.106.1

because 148.148.148.48 is not correct network id for subnet mask of 255.255.255.0

 

i think what you need is - 

ip route 148.148.148.0 255.255.254.0 106.106.106.1

and 255.255.255.0 does not cover 300 hosts it gives you 254 hosts

255.255.254.0 covers 510 hosts - 148.148.148.1 - 148.148.149.254

Martin L
VIP
VIP

to check your subnetting skills please use subnetting calc, this one is free online http://www.subnet-calculator.com/subnet.php?net_class=A

Hello

ip route 148.148.148.48 255,255,255,255 106.106.106.1 <-- static host route

ip route 148.148.148.0 255,255,255,0 106.106.106.1 <-- static  route


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

@omz and @paul driver have shown how to correctly configure the static route. I would like to approach the question from a slightly different perspective and talk about why it is inconsistent. If you want to specify 148.148.148.48 in the static route you are saying that all 4 octets have significance and should be considered in the route. But when you use the mask of 255.255.255.0 you are saying that only the first 3 octets are significant and that the fourth octet does not need to match. So the inconsistency is between the address indicating 4 significant octets and the mask indicating only 3 significant octets. You can solve the inconsistency by either using 4 significant digits in the address and changing the mask to match or you can keep the mask of 255.255.255.0 and changing the address to 148.148.148.0.

HTH

Rick