Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

router(config-router)#distance 150 0.0.0.0 255.255.255.255 10

Hi

I have a query on the logic of functioning of this command.

router(config-router)#distance 150 0.0.0.0 255.255.255.255 10

(I am firing this command under the IGRP routing process)

If the above router has both IGRP and RIP running and if RIP is being redistributed in to the IGRP domain, would the IGRP learnt routes alone be assigned an AD of 150 or RIP routes redistributed in to the IGRP domain will also have 150 as the AD ?

Or is the Distance command only for modifying ADs of RIP routes being redistributed in to IGRP domain and is not meant to modify the ADs of normally learnt IGRP routes (that is, the IGRP routes learnt from with in the IGRP domain) !!!!

2 REPLIES
Gold

Re: router(config-router)#distance 150 0.0.0.0 255.255.255.255 1

First, the distance command is of the form:

distance x.x.x.x w.w.w.w

Where the x's are the prefix, and the w's are the wildcard bits, just like in an access list. This particular distance command would match everything, I think since all of the bits are marked as "don't care." If you only want to affect the route 15.0.0.0/8, then you should use:

distance 150.0.0.0 0.0.0.0 10

instead. Note this is a supernet of a class B network, and IGRP isn't real good a carrying supernets, so.... I'd presume you mean some other network than the one you're showing here.

Second, the distance command sets the admin distance of routes learned from peers matching the address specified. Suppose you did this:

distance 10.1.1.0 0.0.0.255 10

Then the 10.1.1.0/24 route would, on being learned from any IGRP peer, have its distance set to 10. This would mean that if you learned a route 10.1.1.0/24 from RIP, with an admin distance of 120, the IGRP route will be preferred. Of course, that's no so different than normal.

Now, if you put both RIP and IGRP at the same distance, up until very recently, there was no way to tell which would win. It would depend on which route was installed in the routing table last. Recenttly, this has changed, and the routing protocols actually check the default admin distance of the two protocols if the actual admin distance has been set to the same value, and the protocol with the lower default admin distance wins.

Hope this helps.

Russ

New Member

Re: router(config-router)#distance 150 0.0.0.0 255.255.255.255 1

Hi

Kindly note that in the above command the "150" is the distance value (not the first octet of Calss B address) and the last value 10 is the access-list number.

Thanks and regards

S. Vijayendran

870
Views
0
Helpful
2
Replies
CreatePlease login to create content