06-17-2003 04:03 PM - edited 03-02-2019 08:13 AM
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) !!!!
06-18-2003 09:32 AM
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
06-18-2003 02:47 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide