This article provides information on how to export the EBGP routes that were learnt from remote peer via one VRF and advertise back to same peer on another VRF .
Topology :
SRX / SRX CLUSTER [ Virtual router RT1 ] [AS 12345 ] reth3.28 ————EBGP PEERING ———- MX [VRF-A ] [AS 11111 ] ae11.28
< ----------- PREFIX A ----------
SRX / SRX CLUSTER [ Virtual router RT1 ] [AS 12345 ] reth3.143 ————EBGP PEERING ———- MX [VRF-B ] [AS 11111 ] ae11.143
----------- PREFIX A ---------- >
{primary:node0}[edit routing-instances RT1 protocols bgp group GROUP1]
root@SRX# show
type external;
local-address 10.26.55.44;
Import GROUP1-V4-in;
export GROUP1-V4-out;
peer-as 11111;
local-as 12345;
multipath;
as-override;
neighbor 10.26.55.42 {
bfd-liveness-detection {
minimum-interval 300;
multiplier 3;
}
{primary:node0}[edit routing-instances RT1 protocols bgp group GROUP2 ]
local-address 10.24.94.64;
Import GROUP2-V4-in;
export GROUP2-V4-out;
as-override; <<<<<<<<<<<< This is required when exporting prefix back to MX
neighbor 10.24.94.62 {
minimum-interval 1000;
multiplier 6;
policy-statement GROUP2-V4-out {
term V4-ALLOW-SUBNETS {
from {
protocol bgp;
prefix-list V4-SUBNETS;
then accept;
term REJECT {
then reject;
prefix-list V4-SUBNETS {
10.24.99.0/24;
root@SRX> show route protocol bgp table RT1.inet 10.24.99.0
RT1.inet.0: 202 destinations, 387 routes (202 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.24.99.0/24 *[BGP/170] 46w6d 15:14:26, localpref 100, from 10.26.255.42
AS path: 11111 I, validation-state: unverified
> to 10.26.55.42 via reth3.28
root@SRX> show route advertising-protocol bgp 10.24.94.62RT1.inet.0: 20 destinations, 38 routes (20 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path* 10.24.99.0/24 Self 12345 I
root@MX> show configuration routing-instances VRF-A protocols bgp
group groupB {
local-address 10.26.55.42;
import V4-VRFA-BGP-IN;
export V4-VRFA-BGP-OUT;
peer-as 12345;
neighbor 10.26.55.44;
root@MX> show configuration routing-instances VRF-B protocols bgp
local-address 10.24.94.62;
import V4-VRFB-BGP-IN;
export V4-VRFB-BGP-OUT;
neighbor 10.24.94.64;
root@MX> show route 10.24.99.0/24 table VRF-B.inet
VRF-B.inet.0: 25 destinations, 50 routes (25 active, 0 holddown, 5 hidden)
10.24.99.0/24 *[BGP/170] 00:01:27, localpref 170
AS path: 12345 12345 I, validation-state: unverified
> to 10.24.94.64 via ae11.143
root@MX> show route advertising-protocol bgp 10.26.55.44 table VRF-A.inet
VRF-A.inet.0: 50 destinations, 70 routes (52 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
@ 10.24.96.0/24 Self I
@ 10.24.97.0/24 Self I
@ 10.24.99.0/24 Self I
root@MX> show route receive-protocol bgp 10.24.94.64 table VRF-B.inet
VRF-B.inet.0: 25 destinations, 30 routes (25 active, 0 holddown, 5 hidden)
* 10.24.99.0/24 10.24.94.64 12345 12345 I