Author Topic: Configure Administrative Distance on Juniper Router  (Read 7149 times)

tuancao

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Configure Administrative Distance on Juniper Router
« on: June 16, 2008, 04:54:22 pm »
Hi,

I am wondering if we can configure the Administrative Distance on Juniper router. I am using a pretty old Juniper router (M20).
In Cisco IOS, we can easily change the Administrative Distance of prefixes learned from a BGP connection by using the "distance admin-distance ..." command?

Do you guys know if JUNOS has a similar command like that?

Thanks a lot.


aweck

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +0/-0
    • View Profile
    • HIC Networks
Re: Configure Administrative Distance on Juniper Router
« Reply #1 on: June 17, 2008, 08:00:24 am »
you should be able to set it under each protocol (AD in IOS = preference in JUNOS)

set protocols bgp preference 130

The thing I haven't discovered how to do yet is view what the default preference for each protocol is from the command line.
JNCIE-ER #63, JNCIE-M #705, JNCIE-SEC, JNCIS-FWV, JNCIS-SSL
http://www.hicnetworks.com/

tuancao

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Configure Administrative Distance on Juniper Router
« Reply #2 on: June 17, 2008, 12:19:54 pm »
Thanks for your reply about AD in IOS = preference in JUNOS.

From this document
http://www.juniper.net/techpubs/software/junos/junos60/swconfig60-routing/html/protocols-overview4.html

I see that:
+ "The preference is an arbitrary value in the range 0 through 255 that the software uses to rank routes received from different protocols, interfaces, or remote systems."

++"Routes that are not eligible to be used for forwarding (for example, because they were rejected by routing policy or because a next hop is inaccessible) have a preference of -1 and are never chosen."

But from this page (for BGP):
http://www.juniper.net/techpubs/software/junos/junos60/swconfig60-routing/html/bgp-summary37.html#1015065

It mentions the range of preference is:
preference—Preference to assign to routes learned from BGP or from the group or peer.
Range: 0 through 4,294,967,295 (2^32 -1)

I tried to configure preference with value -1, but I got the following error:
abc@r-jm20-35-a# set bgp preference -1
                                                           ^
invalid numeric value: '-1' at '-1'

I would like to configure the Juniper router so that I will not install some prefixes learned from its neighbor into its routing table.
(using CISCO IOS, it can be done easily by
distance 255 ip-address-of-a-neighbor)

Do you have any suggestion?


frogmanclay

  • Full Member
  • ***
  • Posts: 157
  • Karma: +0/-0
    • View Profile
Re: Configure Administrative Distance on Juniper Router
« Reply #3 on: July 11, 2008, 12:52:16 pm »
In case you still need help with this...

Apply an import policy to the neighbor that you want to block routes from.