cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1265
Views
15
Helpful
7
Replies

static route

Hi, I defined 2.2.2.2/8 but when I use the following command --> ip route 2.2.2.0 255.0.0.0 Next hop --> I face "%Inconsistent address and mask". Again when I change my subnet to 255.255.255.0 my command takes effect. Why?

1 Accepted Solution

Accepted Solutions

Luca is on the right track in the explanation. But I would like to approach the explanation in a different way. If you attempt to configure "ip route 2.2.2.0" you are saying that there are significant digits in first octet, second octet, and third octet. But when you configure the mask as 255.0.0.0 it is say that only octet one is significant. This is the inconsistency that the message is describing. If the routing should really consider first, second, and third octets then the mask needs to be 255.255.255.0.

HTH

Rick

View solution in original post

7 Replies 7

marce1000
VIP
VIP

 

 - Because in your case the mask overlaps the address.

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

I think it's not logical because Net 2 is class A (/8). Why it should occur?

 

 - I think 2.2.2.2/8 denotes Class C

  M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

parents95
Level 1
Level 1

Hi,

2.2.2.2/8 is an host address inside the network 2.0.0.0/8.

This means that the range for 2.0.0.0/8 is: 2.0.0.1 - 2.255.255.254 (network and broadcast address excluded).

 

So, if you configure "ip route 2.2.2.0 255.0.0.0 next-hop" what does the router do?

2.2.2.0/8 is an ip address inside the network 2.0.0.0/8.

The router calculates the network address of that ip and it is 2.0.0.0/8.

So the right command should be ip route 2.0.0.0 255.0.0.0 next-hop.

 

The command "ip route 2.2.2.0 255.255.255.0 next-hop" works because 2.2.2.0/24 is the correct subnet ID of a subnet inside the network 2.0.0.0/8.

 

Hope it helps

 

Luca

Luca is on the right track in the explanation. But I would like to approach the explanation in a different way. If you attempt to configure "ip route 2.2.2.0" you are saying that there are significant digits in first octet, second octet, and third octet. But when you configure the mask as 255.0.0.0 it is say that only octet one is significant. This is the inconsistency that the message is describing. If the routing should really consider first, second, and third octets then the mask needs to be 255.255.255.0.

HTH

Rick

Thanks sir Rick for your perfect reply. But when I config the following command it takes effect:
ip route 2.0.0.0 255.255.255.0 NextHop
And I think in wild card 0s are significant.

You are welcome. I am glad that my explanation was helpful. 

 

As far as this route is concerned "ip route 2.0.0.0 255.255.255.0 NextHop" yes it is valid and would be accepted and takes effect. What it is saying is that there are 3 octets that are significant and must match. In your original post you were talking about 2.2.2.2 (or about 2.2.2.0). Note that this ip route would not match the 2.2.2.x address. 

 

You are correct that in a wild card mask that a 0 is significant. But ip route does not use a wildcard mask but uses a subnet mask in which 0 is not significant.

HTH

Rick
Review Cisco Networking for a $25 gift card