浏览代码

Add traceroute for mesh testing

Bob Mottram 7 年前
父节点
当前提交
6dbcf2ab2f
共有 3 个文件被更改,包括 24 次插入4 次删除
  1. 12
    0
      src/freedombone-image-customise
  2. 6
    2
      src/freedombone-mesh-bmx6
  3. 6
    2
      src/freedombone-mesh-bmx7

+ 12
- 0
src/freedombone-image-customise 查看文件

844
     # dhcp daemon for hotspot on secondary wifi adapter
844
     # dhcp daemon for hotspot on secondary wifi adapter
845
     chroot "$rootdir" apt-get -yq install dnsmasq
845
     chroot "$rootdir" apt-get -yq install dnsmasq
846
 
846
 
847
+    # for debugging
848
+    chroot "$rootdir" apt-get -yq install traceroute
849
+
847
     # set the default protocol to be used
850
     # set the default protocol to be used
848
     echo 'batman-adv' > $rootdir$MESH_DEFAULT_PROTOCOL
851
     echo 'batman-adv' > $rootdir$MESH_DEFAULT_PROTOCOL
849
 
852
 
853
+    sed -i 's|#net.ipv6.conf.all.forwarding.*|net.ipv6.conf.all.forwarding=1|g' $rootdir/etc/sysctl.conf
854
+    sed -i 's|net.ipv6.conf.all.forwarding.*|net.ipv6.conf.all.forwarding=1|g' $rootdir/etc/sysctl.conf
855
+
856
+    sed -i 's|#net.ipv6.conf.all.accept_redirects.*|net.ipv6.conf.all.accept_redirects=1|g' $rootdir/etc/sysctl.conf
857
+    sed -i 's|net.ipv6.conf.all.accept_redirects.*|net.ipv6.conf.all.accept_redirects=1|g' $rootdir/etc/sysctl.conf
858
+
859
+    sed -i 's|#net.ipv6.conf.all.accept_source_route.*|net.ipv6.conf.all.accept_source_route=1|g' $rootdir/etc/sysctl.conf
860
+    sed -i 's|net.ipv6.conf.all.accept_source_route.*|net.ipv6.conf.all.accept_source_route=1|g' $rootdir/etc/sysctl.conf
861
+
850
     configure_firewall
862
     configure_firewall
851
     install_avahi
863
     install_avahi
852
     install_batman
864
     install_batman

+ 6
- 2
src/freedombone-mesh-bmx6 查看文件

180
     # avahi on ipv6
180
     # avahi on ipv6
181
     sed -i 's|use-ipv4=.*|use-ipv4=no|g' /etc/avahi/avahi-daemon.conf
181
     sed -i 's|use-ipv4=.*|use-ipv4=no|g' /etc/avahi/avahi-daemon.conf
182
     sed -i 's|use-ipv6=.*|use-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
182
     sed -i 's|use-ipv6=.*|use-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
183
+    sed -i 's|#disallow-other-stacks=.*|disallow-other-stacks=no|g' /etc/avahi/avahi-daemon.conf
184
+    sed -i 's|disallow-other-stacks=.*|disallow-other-stacks=no|g' /etc/avahi/avahi-daemon.conf
185
+    sed -i 's|#publish-a-on-ipv6=.*|publish-a-on-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
186
+    sed -i 's|publish-a-on-ipv6=.*|publish-a-on-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
183
     systemctl restart avahi-daemon
187
     systemctl restart avahi-daemon
184
 
188
 
185
     systemctl daemon-reload
189
     systemctl daemon-reload
186
     systemctl enable bmx6
190
     systemctl enable bmx6
187
-    systemctl start bmx6
188
 
191
 
189
     # NOTE: Don't connect the secondary wifi device. hostapd will handle that by itself
192
     # NOTE: Don't connect the secondary wifi device. hostapd will handle that by itself
190
 
193
 
213
     sed -i "s|server_name .*|server_name ${HOSTNAME}.local;|g" /etc/nginx/sites-available/git_ssb
216
     sed -i "s|server_name .*|server_name ${HOSTNAME}.local;|g" /etc/nginx/sites-available/git_ssb
214
 
217
 
215
     systemctl restart nginx
218
     systemctl restart nginx
219
+    systemctl restart bmx6
216
 
220
 
217
     verify
221
     verify
218
 
222
 
296
         start
300
         start
297
         ;;
301
         ;;
298
     ping)
302
     ping)
299
-        ping -v -6 $2
303
+        ping6 -v $2
300
         ;;
304
         ;;
301
     data)
305
     data)
302
         bmx6 -lc traffic=$IFACE
306
         bmx6 -lc traffic=$IFACE

+ 6
- 2
src/freedombone-mesh-bmx7 查看文件

178
     # avahi on ipv6
178
     # avahi on ipv6
179
     sed -i 's|use-ipv4=.*|use-ipv4=no|g' /etc/avahi/avahi-daemon.conf
179
     sed -i 's|use-ipv4=.*|use-ipv4=no|g' /etc/avahi/avahi-daemon.conf
180
     sed -i 's|use-ipv6=.*|use-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
180
     sed -i 's|use-ipv6=.*|use-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
181
+    sed -i 's|#disallow-other-stacks=.*|disallow-other-stacks=no|g' /etc/avahi/avahi-daemon.conf
182
+    sed -i 's|disallow-other-stacks=.*|disallow-other-stacks=no|g' /etc/avahi/avahi-daemon.conf
183
+    sed -i 's|#publish-a-on-ipv6=.*|publish-a-on-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
184
+    sed -i 's|publish-a-on-ipv6=.*|publish-a-on-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
181
     systemctl restart avahi-daemon
185
     systemctl restart avahi-daemon
182
 
186
 
183
     systemctl daemon-reload
187
     systemctl daemon-reload
184
     systemctl enable bmx7
188
     systemctl enable bmx7
185
-    systemctl start bmx7
186
 
189
 
187
     # NOTE: Don't connect the secondary wifi device. hostapd will handle that by itself
190
     # NOTE: Don't connect the secondary wifi device. hostapd will handle that by itself
188
 
191
 
211
     sed -i "s|server_name .*|server_name ${HOSTNAME}.local;|g" /etc/nginx/sites-available/git_ssb
214
     sed -i "s|server_name .*|server_name ${HOSTNAME}.local;|g" /etc/nginx/sites-available/git_ssb
212
 
215
 
213
     systemctl restart nginx
216
     systemctl restart nginx
217
+    systemctl restart bmx7
214
 
218
 
215
     verify
219
     verify
216
 
220
 
294
         start
298
         start
295
         ;;
299
         ;;
296
     ping)
300
     ping)
297
-        ping -v -6 $2
301
+        ping6 -v $2
298
         ;;
302
         ;;
299
     data)
303
     data)
300
         bmx7 -lc traffic=$IFACE
304
         bmx7 -lc traffic=$IFACE