-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap-gen.sh
34 lines (30 loc) · 898 Bytes
/
bootstrap-gen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Install packages
apt-get update
apt-get install -y quagga quagga-doc
# Create IS-IS config
routerid=$(ifconfig | sed -Ee '/192\.168\.1[0-9]\./!d;s,.*inet (addr:)?192\.168\.1[0-9]\.([0-9]*)[ /].*,\2,' | head -1)
# Enable zebra and isis
test -e /etc/quagga/daemons && sed -ie 's/zebra=no/zebra=yes/;s/isisd=no/isisd=yes/' /etc/quagga/daemons
# root@vagrant:~# more /etc/quagga/zebra.conf
cat <<EOF > /etc/quagga/zebra.conf
hostname r${routerid}
password lab
enable password lab
log syslog
EOF
cat > /etc/quagga/isisd.conf <<EOIF
hostname r${routerid}
interface eth1
ip router isis ring
interface lo
router isis ring
net 00.0000.0000.00${routerid}.00
metric-style wide
is-type level-1
lsp-gen-interval 10
lsp-refresh-interval 60
max-lsp-lifetime 360
line vty
log syslog
EOIF
systemctl start isisd || service quagga restart