From 857605c40aa7a8eb01ff989073c29f59bcc55b8b Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Thu, 12 Jun 2014 22:18:46 +0200 Subject: Use only active-path for show route on Juniper. --- routers/juniper.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/routers/juniper.php b/routers/juniper.php index 0e27297..ef78899 100644 --- a/routers/juniper.php +++ b/routers/juniper.php @@ -27,7 +27,11 @@ final class Juniper extends Router { switch ($command) { case 'bgp': if (match_ipv4($parameters) || match_ipv6($parameters)) { - $complete_command = 'show route '.$parameters.' | no-more'; + $complete_command = 'show route '.$parameters. + ' table inet.0 protocol bgp active-path | no-more'; + } else if (match_ipv6($parameters)) { + $complete_command = 'show route '.$parameters. + ' table inet6.0 protocol bgp active-path | no-more'; } else { throw new Exception('The parameter is not an IPv4/IPv6 address.'); } -- cgit v1.2.3