Característica #47
tancat
DNS system for internal MESH
Afegit per Pau Escrich fa més de 13 anys.
Actualitzat fa aproximadament 6 anys.
Categoria:
IPv6 routing protocols
Descripció
We need a DNS system to access mesh nodes using hostname instead ipv6. Like qmp45
- Assignat a s'ha establert a Agustí Moll Garcia
An easy way to do it (works for me):
root@qmpc2:~# cat /etc/crontabs/root
*/5 * * * * qmpinfo nodes | awk '{print $2,$1}' > /tmp/qmp.hosts
root@qmpc2:~# cat /etc/config/dhcp| grep addnhosts
list 'addnhosts' '/tmp/qmp.hosts'
root@qmpc2:~# cat /etc/init.d/qmp_autoconf | grep "startup()" -A5
startup() {
$QMP_DIR/qmp_control.sh apply_netserver
logread | md5sum | awk '{print $1}' > $QMP_KEY
qmpinfo nodes | awk '{print $2,$1}' > /tmp/qmp.hosts
/etc/init.d/dnsmasq restart
}
A quick and dirty script to generate the qmp.hosts file based on bmx6 json information.
/www/cgi-bin/bmx6-info -s '$neighbours' | sed -e 's/{/\n/g' -e 's/}//g' | \
egrep 'globalId|address' | awk '{print $4}' | \
while read l; do
[ $(echo "$l" | grep -c ",") -eq 1 ] && {
nodename=$(echo $l | tr -d \" | tr -d \, | cut -d . -f1)
} || {
ip=$(echo $l | tr -d \")
echo "$ip $nodename"
}
done
- Estat ha canviat de Nou a Tancat
També disponible a: Atom
PDF