Hi all,
My case is similar, but I can't ping between routing-instances.
Goals:
Configure "source-address" on "system ntp" stanza (Junos version don't support RI). My loopback resides on global table (inet.0) and I need reach NTP server on RI: OAM (type virtual-router).
Topology:
BGP: 172.31.20.92/30
R1 <------------------------------------------------------------> R2
lo0.0 = 172.31.11.127/32 lo0.0 = 172.31.20.253/32
RI:global (inet.0) RI: OAM (OAM.inet.0)
Configuration (R1):
set interfaces lo0 unit 0 family inet address 172.31.11.127/32
set routing-options interface-routes rib-group inet IMPORT-NTP
set routing-options rib-groups IMPORT-NTP import-rib inet.0
set routing-options rib-groups IMPORT-NTP import-rib OAM.inet.0
set routing-options rib-groups IMPORT-NTP import-policy NTP-POLICY
set policy-options policy-statement NTP-POLICY term 1 from rib OAM.inet.0
set policy-options policy-statement NTP-POLICY term 1 from route-filter 172.31.11.127/32 exact
set policy-options policy-statement NTP-POLICY term 1 then accept
set policy-options policy-statement NTP-POLICY term LAST then reject
set routing-instances OAM protocols bgp group OAM type external
set routing-instances OAM protocols bgp group OAM export OAM-bgp_export
set routing-instances OAM protocols bgp group OAM neighbor 172.31.20.94 peer-as 65002
set routing-instances OAM protocols bgp group OAM neighbor 172.31.20.94 local-as 65001
The lo0.0 (directly on inet.0) is been imported to rib OAM.inet.0 and advertised to neighbor BGP configured on RIAM
R1> show route table inet.0 172.31.11.127/32 exact
inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
172.31.11.127/32 *[Direct/0] 5d 05:32:55
> via lo0.0
---------------------------------------------
R1> show route table OAM.inet.0 172.31.11.127/32 exact
OAM.inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
172.31.11.127/32 *[Direct/0] 06:06:12
> via lo0.0
--------------------------------------------
R1> show route advertising-protocol bgp 172.31.20.94
OAM.inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 172.31.11.127/32 Self I
But from BGP neighbor I can't reach this IP. (source is a loopback on RIAM from neighbor). BGP peer is established by point-to-point interfaces (172.31.20.92/30):
R2> ping 172.31.11.127 routing-instance OAM
PING 172.31.11.127 (172.31.11.127): 56 data bytes
36 bytes from 172.31.20.93: Destination Net Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 0054 0556 0 0000 40 01 fd37 172.31.20.94 172.31.11.127
36 bytes from 172.31.20.93: Destination Net Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 0054 0565 0 0000 40 01 fd28 172.31.20.94 172.31.11.127
----------------------------------------------------------------
R2> ping 172.31.11.127 routing-instance OAM source 172.31.20.253
PING 172.31.11.127 (172.31.11.127): 56 data bytes
36 bytes from 172.31.20.93: Destination Net Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 0054 070f 0 0000 40 01 fadf 172.31.20.253 172.31.11.127
36 bytes from 172.31.20.93: Destination Net Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 0054 071e 0 0000 40 01 fad0 172.31.20.253 172.31.11.127