Hi Folks,
I spend some time in lab and I could find similar behavior; with RR + LSP on secondary IP back-to-back, manipulating the next-hop with export policy does not work. Let me try to fix it. I assume the config matches to yours.
Even though the topology looks simple by definition; it’s really tricky J
labroot@re0_re0> show configuration logical-systems
pe1 {
interfaces {
ge-0/0/0 {
unit 23 {
vlan-id 23;
family inet {
address 1.1.23.1/30;
}
family mpls;
}
}
lo0 {
unit 102 {
family inet {
address 1.1.1.1/32 {
primary;
preferred;
}
address 3.3.3.3/32;
}
}
unit 2000 {
family inet {
address 10.10.10.10/32;
}
}
}
}
protocols {
rsvp {
interface all;
}
mpls {
label-switched-path pe1tope2 {
from 3.3.3.3;
to 4.4.4.4;
}
interface all;
}
bgp {
group ibgp {
type internal;
local-address 1.1.1.1;
family inet-vpn {
unicast;
}
cluster 67.0.0.1;
neighbor 2.2.2.2;
}
}
ospf {
traffic-engineering;
area 0.0.0.0 {
interface all;
}
}
}
policy-options {
policy-statement plb {
then {
load-balance per-packet;
}
}
policy-statement vpna-export {
term A {
from {
route-filter 192.168.2.0/24 exact;
}
then {
community add vpna-comm;
next-hop 3.3.3.3;
accept;
}
}
term B {
then reject;
}
}
policy-statement vpna-import {
term 1 {
from {
protocol bgp;
community vpna-comm;
}
then accept;
}
term 2 {
then reject;
}
}
community vpna-comm members target:65000:20000;
}
routing-instances {
VPN-A {
instance-type vrf;
interface lo0.2000;
route-distinguisher 65000:2000;
vrf-import vpna-import;
vrf-export vpna-export;
routing-options {
static {
route 192.168.2.0/24 discard;
}
}
}
}
routing-options {
autonomous-system 65000;
forwarding-table {
export plb;
}
}
}
pe2 {
interfaces {
ge-0/0/1 {
unit 23 {
vlan-id 23;
family inet {
address 1.1.23.2/30;
}
family mpls;
}
}
lo0 {
unit 103 {
family inet {
address 2.2.2.2/32 {
primary;
preferred;
}
address 4.4.4.4/32;
}
}
unit 3000 {
family inet {
address 20.20.20.20/32;
}
}
}
}
protocols {
rsvp {
interface all;
}
mpls {
label-switched-path pe2tope1 {
from 4.4.4.4;
to 3.3.3.3;
}
interface all;
}
bgp {
group ibgp {
type internal;
local-address 2.2.2.2;
family inet-vpn {
unicast;
}
neighbor 1.1.1.1;
}
}
ospf {
traffic-engineering;
area 0.0.0.0 {
interface all;
}
}
}
policy-options {
policy-statement plb {
then {
load-balance per-packet;
}
}
policy-statement vpna-export {
term A {
from {
route-filter 192.168.1.0/24 exact;
}
then {
community add vpna-comm;
next-hop 4.4.4.4;
accept;
}
}
term B {
then reject;
}
}
policy-statement vpna-import {
term 1 {
from {
protocol bgp;
community vpna-comm;
}
then accept;
}
term 2 {
then reject;
}
}
community vpna-comm members target:65000:20000;
}
routing-instances {
VPN-A {
instance-type vrf;
interface lo0.3000;
route-distinguisher 65000:2000;
vrf-import vpna-import;
vrf-export vpna-export;
routing-options {
static {
route 192.168.1.0/24 discard;
}
}
}
}
routing-options {
autonomous-system 65000;
forwarding-table {
export plb;
}
}
}
labroot@re0_re0:pe1> show route advertising-protocol bgp 2.2.2.2 extensive
VPN-A.inet.0: 3 destinations, 3 routes (2 active, 0 holddown, 1 hidden)
* 192.168.2.0/24 (1 entry, 1 announced)
BGP group ibgp type Internal
Route Distinguisher: 65000:2000
VPN Label: 299792
Nexthop: Self
Flags: Nexthop Change
Localpref: 100
AS path: [65000] I
Communities: target:65000:20000
bgp.l3vpn.0: 2 destinations, 2 routes (1 active, 0 holddown, 1 hidden)
* 65000:2000:192.168.2.0/24 (1 entry, 1 announced)
BGP group ibgp type Internal
Route Distinguisher: 65000:2000
VPN Label: 299792
Nexthop: Self <<<<<<<<<<<<<<< In RR it does not work
Flags: Nexthop Change
Localpref: 100
AS path: [65000] I
Communities: target:65000:20000
labroot@re0_re0:pe2> show route advertising-protocol bgp 1.1.1.1 extensive
VPN-A.inet.0: 3 destinations, 3 routes (2 active, 0 holddown, 1 hidden)
* 192.168.1.0/24 (1 entry, 1 announced)
BGP group ibgp type Internal
Route Distinguisher: 65000:2000
VPN Label: 299776
Nexthop: 4.4.4.4 <<<<<<<<<<<<<<< RR client it works
Flags: Nexthop Change
Localpref: 100
AS path: [65000] I
Communities: target:65000:20000
labroot@re0_re0:pe2>