cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
438
Views
2
Helpful
4
Replies

Change Router Gateway BY bgp community

Hi i have this diagram

attack-diagram.jpg

If prefix 192.168.10.0/24 have tag 50 gateway set Edge A

if prefix 192.168.10.0/24  have tag 100 gateway set Edge B

How can do this by vrf ????

4 Replies 4

balaji.bandi
Hall of Fame
Hall of Fame

check PBR with BGP example : by the way what device model and code running the router ?

https://www.cisco.com/c/en/us/td/docs/ios/12_2sr/12_2srb/feature/guide/srb2mvrf.html#wp1053956

BB

=====Preenayamo Vasudevam=====

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

M02@rt37
VIP
VIP

Hello admin@atrinnet.net 

What is the protocol between Client Router and Edge Routers A and B ?

By route-map, no ?

route-map XXXX permit 10
match tag x
set vrf y

Apply route-map in ingress between client routeur and its Edge routeur.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Hmm 

Try this way 

Route-map VRF-A permit 10

Match tag xx

Set vrf VRF-A 

Set next-hop <IP> <<<- apologies use set interface not set next-hop' since set interface is not vrf aware (not check IP in vrf rib)

Do same for VRF-B 

Note:- run this in lab before apply in real network' some router not accept set next-hop/interface 

kyla598ellis
Level 1
Level 1

admin@atrinnet.net wrote:

Hi i have this diagram

attack-diagram.jpg

If prefix 192.168.10.0/24 have tag 50 gateway set Edge A

if prefix 192.168.10.0/24  have tag 100 gateway set Edge B

How can do this by vrf ????


Hello admin@atrinnet.net,
Use Policy-Based Routing (PBR) with route-maps to match the tag and direct traffic to the correct gateway within the appropriate VRF.
- Tag 50 → route-map → set VRF → forward via Edge A
- Tag 100 → route-map → set VRF → forward via Edge B
This allows the same prefix to be handled differently based on tag, using VRF separation and route-map logic.

Best regards,
Kyla Ellis