Mercurial > hg > anonet-resdb
annotate doc/ucis.ano/bgp_graph/bgp_path_list_quagga.sh @ 1245:337b6ee6e597 draft
add passive
author | Passive <passive@21.50.0.1> |
---|---|
date | Tue, 03 Dec 2019 21:57:09 +0000 |
parents | d44b9afb4a25 |
children |
rev | line source |
---|---|
28 | 1 #!/bin/sh |
2 | |
32
d44b9afb4a25
fixed last two of UFO's scripts to take local ASN from env
Nick <nick@somerandomnick.ano>
parents:
28
diff
changeset
|
3 LOCALNODE=${LOCALNODE:-0} |
28 | 4 |
5 (sleep 0.2; | |
6 echo "insecure"; | |
7 echo "show ip bgp neigh"; | |
8 echo "quit"; | |
9 ) | | |
10 nc localhost 2605 | | |
11 grep "^BGP neighbor is" | | |
12 sed "s/^.*remote AS \([0-9]\+\),.*$/$LOCALNODE \1/" | |
13 | |
14 (sleep 0.2; | |
15 echo "insecure"; | |
16 echo "show ip bgp paths"; | |
17 echo "quit"; | |
18 ) | | |
19 nc localhost 2605 | | |
20 grep "[0-9].$" | | |
21 sed "s/^\[0x[a-z0-9]\{8\}:[0-9]\+\] ([0-9]\+) \([0-9 ]\+\)\r$/\1/" |