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 ?
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
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
Going forward I'd really, really recommend using BGP neighbor descriptions as part of your customer provisioning process, maybe tag it with the customer or VRF name, and the interface. Obviously it's prone to human error, so some automation would be best. But if you're absolutely contingent upon one command pulling your information, here's an idea:
set routing-instance CUSTOMER-A protocols bgp group CUST-A-EBGP neighbor 192.168.100.0 description CUSTOMER_A/fe-1/2/0.0
Then you could use the following command to pull all of the information you require.
show bgp neighbor | match "Local:|Descr|Interface" Peer: 192.168.100.0+49829 AS 100 Local: 192.168.100.1+179 AS 6996 Description: CUSTOMER_A/fe-1/2/0.0 Local Interface: fe-1/2/0.0
Otherwise, I'm afraid as ryanklein said, there just isn't a way to do it in a single show command.