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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
1 #!/bin/sh
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
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
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
4
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
5 (sleep 0.2;
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
6 echo "insecure";
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
7 echo "show ip bgp neigh";
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
8 echo "quit";
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
9 ) |
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
10 nc localhost 2605 |
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
11 grep "^BGP neighbor is" |
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
12 sed "s/^.*remote AS \([0-9]\+\),.*$/$LOCALNODE \1/"
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
13
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
14 (sleep 0.2;
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
15 echo "insecure";
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
16 echo "show ip bgp paths";
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
17 echo "quit";
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
18 ) |
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
19 nc localhost 2605 |
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
20 grep "[0-9].$" |
4dbe5bf653bb Added bgp graph scripts
ivo <ivo@UFO-Net.nl>
parents:
diff changeset
21 sed "s/^\[0x[a-z0-9]\{8\}:[0-9]\+\] ([0-9]\+) \([0-9 ]\+\)\r$/\1/"