You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
645 B

#!/usr/bin/env bash
set -eu
DESC="Test ping6 IPv6 (à travers un routeur IPv6)"
SYSTEMS="bigboss societe web"
# Fonction utilitaire : Récupère l'adresse IPv6 autoconfigurée
# $1 : host
# $2 : interface
# Exemple : getIPv6 bigboss eth0
getIPv6() {
echo $(vdn-ssh root@$1 'ip -6 addr show dev '$2' | grep inet6 | head -n 1 | tr -s " " | cut -d " " -f 3 | cut -d "/" -f 1') | sed -re 's/[^[:print:]]//g'
}
testIPv6() {
ipWeb=$(getIPv6 web eth0)
vdn-ssh root@bigboss "ping6 -c 1 -I eth0 $ipWeb"
}
run() {
setErrorHandler
echoStart
#requireSshGuests $SYSTEMS
#waitSsh $SYSTEMS
testIPv6
unsetErrorHandler
echoDone
}