cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1048
Views
0
Helpful
1
Replies

How to Match a certain BGP Community from the Far PE and change the Local Prefrence

sherif_mohamed5
Level 1
Level 1

Hello,

 

I have a Design that I need to implement, one of our customers is injecting the same route from 3 different gateways and need every site to exist from the nearest gateways ( I cant rely on the IGP). so I have to mark this route from the Different Gateways  by different communities in the BGP. What I need exactly is how I can prefer this route from the branches site, I tried to match Community on the Branches PE and increases its Local preferences but it does not work 

 

Below is the LAB Trials" 50.50.50.50 Network is the Network Injected from the 3 Gateways and Each gateway will mark it by different community"

 

 

!
ip vrf Customer_A
 rd 100:100
 route-target export 100:2000
 route-target import 100:2000
!
!
!
!
interface FastEthernet0/0
 ip vrf forwarding Customer_A
 ip address 172.16.0.1 255.255.255.252
 duplex full
!
interface FastEthernet1/0
 ip address 10.0.10.1 255.255.255.252
 duplex full
 speed auto
 mpls ip
!
router ospf 10
 log-adjacency-changes
 network 10.0.0.0 0.0.255.255 area 0
 network 111.0.0.0 0.255.255.255 area 0
!
router bgp 64500
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor PE-S update-source Loopback1111
 neighbor 111.111.111.2 remote-as 64500
 neighbor 111.111.111.2 update-source Loopback1111
 neighbor 111.111.111.3 remote-as 64500
 neighbor 111.111.111.3 update-source Loopback1111
 neighbor 172.16.0.2 remote-as 64510
 !
 address-family vpnv4
 neighbor PE-S send-community extended
 neighbor 111.111.111.2 activate
 neighbor 111.111.111.2 send-community extended
 neighbor 111.111.111.3 activate
 neighbor 111.111.111.3 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf Customer_A
 neighbor 172.16.0.2 remote-as 64510
 neighbor 172.16.0.2 activate
 network 50.50.50.0 route-map MS-Gateway 
 no synchronization
 exit-address-family
!
ip route vrf Customer_A 111.111.0.1 255.255.255.255 172.16.0.2
!
!
ip bgp-community new-format
ip community-list 1 permit 100:300
!
!
route-map MS-Gateway permit 10
 match community 1
 set local-preference 150
!
route-map MS-Gateway permit 20
!
!
mpls ldp router-id Loopback1111 force
!
!
control-plane
!
!
!
!
!

 

1 Accepted Solution

Accepted Solutions

sherif_mohamed5
Level 1
Level 1

I solved this problem by

 

- Changing the RD in both PEs

- Creating Import map under the VRF

View solution in original post

1 Reply 1

sherif_mohamed5
Level 1
Level 1

I solved this problem by

 

- Changing the RD in both PEs

- Creating Import map under the VRF