Re: bgp local preference

From: Brian Dennis <bdennis_at_ine.com>
Date: Mon, 12 Mar 2012 23:07:38 -0700

RFC 4271 (A Border Gateway Protocol 4 (BGP-4)) states in regards to
local preference that eBGP peers "MUST NOT include this attribute in
UPDATE messages" but since the logic and terminology used in RFCs is
confusing to a few people here on the list, let me put this another way
;-) What the RFC is saying is that if you if you try to set the local
preference to an eBGP peer that it MUST NOT be sent and MUST be ignored
by the other side of the eBGP peering session if received. But if you
read the next sentence in the RFC, you will note that this isn't the
case with eBGP peers within a confederation. In your situation below,
possibly the router in AS 200 is already setup with the confederation
commands and if so you can just need to complete the confederation
configuration in AS 100 and finally set the local preference outbound
from AS 100 to AS 200.

Here is a simple setup with two routers. R1 is in AS 100 and R2 is in
AS 200. They are eBGP confederation peers. R1 is advertising
1.1.1.1/32 with a local preference of 250 set using a route-map outbound
to R2.

**************** R1 ****************

Rack1R1#show run | section bgp|route-map
router bgp 100
  bgp confederation identifier 1000
  bgp confederation peers 200
  network 1.1.1.1 mask 255.255.255.255
  neighbor 10.1.1.2 remote-as 200
  neighbor 10.1.1.2 route-map SET_LOCAL_PREF out
route-map SET_LOCAL_PREF permit 10
  set local-preference 250
Rack1R1#
Rack1R1#show bgp ipv4 unicast 1.1.1.1/32
BGP routing table entry for 1.1.1.1/32, version 3
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
   Advertised to update-groups:
         1
   Local
     0.0.0.0 from 0.0.0.0 (1.1.1.1)
       Origin IGP, metric 0, localpref 100, weight 32768, valid,
sourced, local, best
Rack1R1#

**************** R2 ****************

Rack1R2#show run | section bgp
router bgp 200
  bgp log-neighbor-changes
  bgp confederation identifier 1000
  bgp confederation peers 100
  neighbor 10.1.1.1 remote-as 100
Rack1R2#
Rack1R2#show bgp ipv4 unicast 1.1.1.1/32
BGP routing table entry for 1.1.1.1/32, version 2
Paths: (1 available, best #1, table default)
   Not advertised to any peer
   (100)
     10.1.1.1 from 10.1.1.1 (1.1.1.1)
       Origin IGP, metric 0, localpref 250, valid, confed-external, best
Rack1R2#

Brian Dennis, CCIEx5 #2210 (R&S/ISP-Dial/Security/SP/Voice)
bdennis_at_ine.com

Internetwork Expert, Inc.
http://www.INE.com

On 03/12/2012 09:21 PM, nitin shettigar wrote:
> BGP AS 100(local-preference 100) has network 1.1.1.1 advertised with 32 bit
> mask. I want the local preference of the network 1.1.1.1 to be 250 in AS
> 200(local-preference 100) with out making any changes in AS 200.
> All's working fine between AS 100 and AS 200.
>
> Please provide me a solution...
>
> Nitin
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html

Blogs and organic groups at http://www.ccie.net
Received on Mon Mar 12 2012 - 23:07:38 ART

This archive was generated by hypermail 2.2.0 : Sun Apr 01 2012 - 07:56:52 ART