Juniper and JUNOS related stuff

op scripts

Copy this scripts to /var/db/scripts/op directory (both REs if you have two!) and add this to your router configuration:

system {
    scripts {
        op {
            file show-lsp-interface.slax {
                command show-lsp-interface;
                description "Show LSPs with interface information";
            }
        }
    }
}

show-lsp-interface

show-lsp-interface

This script prints extended view of all MPLS LSPs one per line. Line format depends on LSP type:

ingress:

i <LSP name> <LSP dst IP» <next-hop> <next-hop interface> <next-hop interface description>

egress:

e <LSP name> <LSP src IP» <prev-hop> <prev-hop interface> <prev-hop interface description>

transit:

t <LSP name> <LSP src IP» <LSP dst IP» <prev-hop> <next-hop> <prev-hop interface> <next-hop interface> <prev-hop interface description> <next-hop interface description>

Here is an example output:

cougar@router1> op show-lsp-interface interface ae4.1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
t name                                                                                                                              dst             next-hop        dst-if        dst-ifdescr
I router1->router2                                                                                                                  203.0.113.1     203.0.113.192   ae4.1         -> router2 ae4.1
I router1->router5                                                                                                                  203.0.113.2     203.0.113.192   ae4.1         -> router2 ae4.1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
t name                             src             prev-hop        src-if        src-ifdescr
E router5->router1                 203.0.113.2     203.0.113.192   ae4.1         -> router2 ae4.1
E router2->router1                 203.0.113.1     203.0.113.192   ae4.1         -> router2 ae4.1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
t name                             src             prev-hop        src-if        src-ifdescr                                        dst             next-hop        dst-if        dst-ifdescr
T router5->router3                 203.0.113.2     203.0.113.192   ae4.1         -> router2 ae4.1                                   203.0.113.10    203.0.113.121   ae5.1         -> router3 ae5.1
T router3->router2                 203.0.113.10    203.0.113.121   ae5.1         -> router3 ae5.1                                   203.0.113.1     203.0.113.192   ae4.1         -> router2 ae4.1
T router3->router5                 203.0.113.10    203.0.113.121   ae5.1         -> router3 ae5.1                                   203.0.113.2     203.0.113.192   ae4.1         -> router2 ae4.1

In case of some link congestion or other issues when you'd like to see what LSPs are going via particular link, it is very handy to take this list and match against interface name.

More information regarding this script is available at http://juniper.cluepon.net/index.php/OS_show-lsp-interface

 
juniper.txt · Last modified: 2010/05/04 21:41 by cougar
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki