Quantcast
Channel: All Routing posts
Viewing all articles
Browse latest Browse all 8688

Re: How to apply local-preference to all routes without a hard reset of EBGP?

$
0
0

Please let me know where are you trying to manipulate the local preference attribute? Is it with the IBGP or the EBGP session?

 

Since, only IBGP peers exchange the values of the local-preference BGP attribute. EBGP peers never see a local preference set on route information sent between AS networks.

 

I could find the local-preference changes immediately in the bgp.l3vpn.0 table with manipulation of  local-preference with an import policy as below. Check the timestamp for reference.

 

lab> show bgp summary

Groups: 3 Peers: 3 Down peers: 1

Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending

Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...

192.168.1.104           100         42         39       0       2       16:31 Establ

  bgp.l3vpn.0: 6/6/6/0

  bgp.l2vpn.0: 0/0/0/0

  bgp.mvpn.0: 0/0/0/0

  vpna.inet.0: 6/6/6/0

 

lab> show configuration policy-options  

policy-statement local-pref-110 {

    term 1 {

        then {

            local-preference 110;

        }

    }

}

policy-statement local-pref-200 {

    term 1 {

        then {

            local-preference 200;

        }

    }

}

 

lab> show route table bgp.l3vpn.0   <<< local-pref-110 is already applied at this point

Jan 04 10:47:17

 

bgp.l3vpn.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)

+ = Active Route, - = Last Active, * = Both

 

100:11111:1.1.56.0/30               

                   *[BGP/170] 00:02:51, localpref 110, from 192.168.1.104

                      AS path: I, validation-state: unverified

                    > to 1.1.12.2 via ge-0/0/2.12, label-switched-path r1-to-r5

100:11111:172.27.0.0/16               

                   *[BGP/170] 00:02:51, localpref 110, from 192.168.1.104

                      AS path: 64512 I, validation-state: unverified

                    > to 1.1.12.2 via ge-0/0/2.12, label-switched-path r1-to-r5

100:11111:172.27.0.0/24               

                   *[BGP/170] 00:02:51, localpref 110, from 192.168.1.104

                      AS path: 64512 I, validation-state: unverified

                    > to 1.1.12.2 via ge-0/0/2.12, label-switched-path r1-to-r5

100:11111:172.27.0.8/30                

                   *[BGP/170] 00:02:51, localpref 110, from 192.168.1.104

                      AS path: 64512 I, validation-state: unverified

                    > to 1.1.12.2 via ge-0/0/2.12, label-switched-path r1-to-r5

100:11111:172.27.0.104/30                

                   *[BGP/170] 00:02:51, localpref 110, from 192.168.1.104

                      AS path: 64512 I, validation-state: unverified

                    > to 1.1.12.2 via ge-0/0/2.12, label-switched-path r1-to-r5

100:11111:192.168.1.106/32               

                   *[BGP/170] 00:02:51, localpref 110, from 192.168.1.104

                      AS path: 64512 I, validation-state: unverified

                    > to 1.1.12.2 via ge-0/0/2.12, label-switched-path r1-to-r5

 

lab> edit

Jan 04 10:47:24

Entering configuration mode

 

[edit]

lab# edit protocols bgp group ibgp-to-rr                                                    

Jan 04 10:47:30

 

[edit protocols bgp group ibgp-to-rr]

lab# show

Jan 04 10:47:31

type internal;

local-address 192.168.1.101;

import local-pref-110;

family inet-vpn {

    unicast;

}

family l2vpn {

    signaling;

}

family inet-mvpn {

    signaling;

}

neighbor 192.168.1.104;

 

[edit protocols bgp group ibgp-to-rr]

lab# set import local-pref-200                                                               

Jan 04 10:48:06

 

[edit protocols bgp group ibgp-to-rr]

lab# commit and-quit

Jan 04 10:48:11

commit complete

Exiting configuration mode

 

lab> show route table bgp.l3vpn.0        

Jan 04 10:48:34

 

bgp.l3vpn.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)

+ = Active Route, - = Last Active, * = Both

 

100:11111:1.1.56.0/30               

                   *[BGP/170] 00:00:06, localpref 200, from 192.168.1.104

                      AS path: I, validation-state: unverified

                    > to 1.1.12.2 via ge-0/0/2.12, label-switched-path r1-to-r5

100:11111:172.27.0.0/16               

                   *[BGP/170] 00:00:06, localpref 200, from 192.168.1.104

                      AS path: 64512 I, validation-state: unverified

                    > to 1.1.12.2 via ge-0/0/2.12, label-switched-path r1-to-r5

100:11111:172.27.0.0/24               

                   *[BGP/170] 00:00:06, localpref 200, from 192.168.1.104

                      AS path: 64512 I, validation-state: unverified

                    > to 1.1.12.2 via ge-0/0/2.12, label-switched-path r1-to-r5

100:11111:172.27.0.8/30               

                   *[BGP/170] 00:00:06, localpref 200, from 192.168.1.104

                      AS path: 64512 I, validation-state: unverified

                    > to 1.1.12.2 via ge-0/0/2.12, label-switched-path r1-to-r5

100:11111:172.27.0.104/30               

                   *[BGP/170] 00:00:06, localpref 200, from 192.168.1.104

                      AS path: 64512 I, validation-state: unverified

                    > to 1.1.12.2 via ge-0/0/2.12, label-switched-path r1-to-r5

100:11111:192.168.1.106/32               

                   *[BGP/170] 00:00:06, localpref 200, from 192.168.1.104

                      AS path: 64512 I, validation-state: unverified

                    > to 1.1.12.2 via ge-0/0/2.12, label-switched-path r1-to-r5

 

lab>

 

http://www.juniper.net/techpubs/en_US/junos14.1/topics/topic-map/bgp-local-preference.html

 

-Python

#Please mark my solution as accepted if it helped, Kudos are always appreciated as well.

 

 

 


Viewing all articles
Browse latest Browse all 8688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>