diff options
author | Guillaume Mazoyer <respawneral@gmail.com> | 2014-06-12 22:18:46 +0200 |
---|---|---|
committer | Guillaume Mazoyer <respawneral@gmail.com> | 2014-06-12 22:18:46 +0200 |
commit | 857605c40aa7a8eb01ff989073c29f59bcc55b8b (patch) | |
tree | e3fda756886552914e141eb662594588492575ab | |
parent | 484e5dc79f8bce50dd0f324937e294cd832f2dff (diff) |
Use only active-path for show route on Juniper.
-rw-r--r-- | routers/juniper.php | 6 |
1 files changed, 5 insertions, 1 deletions
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.'); } |