How to display all routing instances that include specific interface and ebgp

juniper

I have PE router (MX) with several ge interfaces that aggregate traffic from hundreds of client's circuits. I want to get the names of all routing instances (vrfs) that includes logical units coming from specific physical interface (e.g. ge-0/0/0) and these vrfs have ebgp sessions inside.
How to do this in simple way ?

Best Answer

I am not sure of a way to do it on one command however you can do it in two and correlate the output. To show the VRFs that contain a physical interface you could (all from configuration mode, add configuration after show in operational mode) do:

# show routing-instances | match ge-0/0/0 | display set

which would provide output like:

set routing-instances ROUTER-A interface ge-0/0/0.1
set routing-instances ROUTER-B interface ge-0/0/0.2
set routing-instances ROUTER-C interface ge-0/0/0.3

To find all of the routing-instances you could do:

# show routing-instances | display set | match bgp | match "type external"

Which would produce output like:

set routing-instances ROUTER-A protocols bgp group EXTERNAL type external
set routing-instances ROUTER-B protocols bgp group EXTERNAL type external
set routing-instances ROUTER-C protocols bgp group EXTERNAL type external