#!/bin/ksh
-# $OpenBSD: l3vpn.sh,v 1.3 2022/11/14 17:23:43 claudio Exp $
+# $OpenBSD: l3vpn.sh,v 1.4 2023/02/15 14:19:08 claudio Exp $
set -e
echo run bgpds
route -T ${RDOMAIN1} exec ${BGPD} \
-v -f ${BGPDCONFIGDIR}/bgpd.l3vpn.rdomain1.conf
-sleep 1
route -T ${RDOMAIN2} exec ${BGPD} \
-v -f ${BGPDCONFIGDIR}/bgpd.l3vpn.rdomain2.conf
-sleep 3
+sleep 1
+route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up
+route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2v6 up
+sleep 1
echo Check initial networks
route -T ${RDOMAIN1} exec bgpctl show
#!/bin/ksh
-# $OpenBSD: maxcomm.sh,v 1.1 2022/05/31 09:50:26 claudio Exp $
+# $OpenBSD: maxcomm.sh,v 1.2 2023/02/15 14:19:08 claudio Exp $
set -e
echo run bgpds
route -T ${RDOMAIN1} exec ${BGPD} \
-v -f ${BGPDCONFIGDIR}/bgpd.maxcomm.rdomain1.conf
-sleep 1
route -T ${RDOMAIN2} exec ${BGPD} \
-v -f ${BGPDCONFIGDIR}/bgpd.maxcomm.rdomain2.conf
+sleep 1
+route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up
+sleep 1
-sleep 2
route -T ${RDOMAIN1} exec bgpctl sh rib | tee maxcomm.out
sleep .2
diff -u ${BGPDCONFIGDIR}/maxcomm.ok maxcomm.out
#!/bin/ksh
-# $OpenBSD: maxprefix.sh,v 1.2 2022/03/08 17:20:52 claudio Exp $
+# $OpenBSD: maxprefix.sh,v 1.3 2023/02/15 14:19:08 claudio Exp $
set -e
echo run bgpds
route -T ${RDOMAIN1} exec ${BGPD} \
-v -f ${BGPDCONFIGDIR}/bgpd.maxprefix.rdomain1.conf
-sleep 1
route -T ${RDOMAIN2} exec ${BGPD} \
-v -f ${BGPDCONFIGDIR}/bgpd.maxprefix.rdomain2.conf
-sleep 2
+sleep 1
+route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up
+sleep 1
echo test1: add two networks
route -T ${RDOMAIN1} exec bgpctl network add 10.12.58.0/24
#!/bin/ksh
-# $OpenBSD: maxprefixout.sh,v 1.1 2020/01/26 00:54:47 claudio Exp $
+# $OpenBSD: maxprefixout.sh,v 1.2 2023/02/15 14:19:08 claudio Exp $
set -e
route -T ${RDOMAIN2} exec ${BGPD} \
-v -f ${BGPDCONFIGDIR}/bgpd.maxprefixout.rdomain2.conf
-sleep 3
+sleep 1
+route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up
+sleep 1
echo test1: add two networks
route -T ${RDOMAIN1} exec bgpctl network add 10.12.58.0/24
#!/bin/ksh
-# $OpenBSD: md5.sh,v 1.5 2022/03/08 17:20:52 claudio Exp $
+# $OpenBSD: md5.sh,v 1.6 2023/02/15 14:19:08 claudio Exp $
set -e
route -T ${RDOMAIN2} exec ${BGPD} \
-v -f ${BGPDCONFIGDIR}/bgpd.md5.rdomain2.conf
-sleep 2
+sleep 1
+route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up
+sleep 1
echo test1
route -T ${RDOMAIN1} exec bgpctl sh sum | \
#!/bin/ksh
-# $OpenBSD: network_statement.sh,v 1.7 2022/03/04 11:01:15 claudio Exp $
+# $OpenBSD: network_statement.sh,v 1.8 2023/02/15 14:19:08 claudio Exp $
set -e
route -T ${RDOMAIN2} exec ${BGPD} \
-v -f ${BGPDCONFIGDIR}/bgpd.network_statement.rdomain2.conf
+sleep 1
+route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up
+sleep 1
+
wait_until <<EOF
route -T ${RDOMAIN1} exec bgpctl sh rib ${PAIR2STATIC} | grep -q ${PAIR2STATIC}
EOF
route -T ${RDOMAIN1} exec bgpctl sh rib ${PAIR2PRIORITY} | \
! grep ${PAIR2PRIORITY}
-sleep 1
-
echo add routes
route -T ${RDOMAIN2} add ${PAIR2STATIC} ${PAIR1IP}
ifconfig ${PAIR2} alias ${PAIR2CONNIP}/${PAIR2CONNPREF}
#!/bin/ksh
-# $OpenBSD: ovs.sh,v 1.4 2022/03/08 07:50:34 claudio Exp $
+# $OpenBSD: ovs.sh,v 1.5 2023/02/15 14:19:08 claudio Exp $
set -e
route -T ${RDOMAIN2} exec ${BGPD} \
-v -f ${BGPDCONFIGDIR}/bgpd.ovs.rdomain2.conf
-sleep 2
+sleep 1
+route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up
+sleep 1
echo test 1
route -T ${RDOMAIN1} exec bgpctl sh rib ovs valid | \
#!/bin/ksh
-# $OpenBSD: policy.sh,v 1.2 2023/01/04 14:34:50 claudio Exp $
+# $OpenBSD: policy.sh,v 1.3 2023/02/15 14:19:08 claudio Exp $
set -e
route -T ${RDOMAIN1} exec ${BGPD} \
-v -f ${BGPDCONFIGDIR}/bgpd.op.master.conf
- sleep 1
-
i=1
for p in $@; do
route -T ${RDOMAIN2} exec ${BGPD} -DNUM=$i -DPOLICY=$p \
-DSOCK=\"/var/run/bgpd.sock.c$i\" \
-v -f ${BGPDCONFIGDIR}/bgpd.op.client.conf
i=$(($i + 1))
-
- sleep 1
done
- sleep 2
+ sleep 1
+ route -T ${RDOMAIN1} exec bgpctl nei group TEST up
+ sleep 1
for i in 1 2 3 4 5; do
route -T ${RDOMAIN1} exec bgpctl show nei PEER$i | \