Skip to content

Basic Network Configurations

Vasco Craveiro Costa edited this page Jul 2, 2015 · 17 revisions

1 - Disable IPv6 (Run sudo -i command first or you won't be able to run the following commands successfully. Run exit command at the end):

echo "blacklist ipv6" >> /etc/modprobe.d/raspi-blacklist.conf
sed -i "/::/s%^%#%g" /etc/hosts

You can test if IPv6 is enabled by runing netstat -tunlp |grep p6 |wc -l command after reboot. If the output is other than 0, then IPv6 is enable.

2 - Configure network interfaces by putting the following content in /etc/network/interfaces file (replacing the existent content):

auto lo

iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
	address 10.40.50.243
	netmask 255.255.255.0
	gateway 10.40.50.1

allow-hotplug wlan0
iface wlan0 inet manual

iface default inet dhcp

3 - Replace the content of /etc/hosts with the following, considering that where is XX you should put the number of the drone:

127.0.0.1       localhost

10.40.50.243    biomachines-**XX**
192.168.3.**XX**     biomachines-**XX**

4 - Add the following server name's IP to /etc/resolv.conf file (the last three entries are ISCTE-IUL DNS servers that we use on eth0 connection, so external user do not need to add them):

domain biomachineswlan
search biomachineswlan
nameserver 192.168.3.254
nameserver 10.10.20.4
nameserver 10.19.90.11
nameserver 193.136.188.249

5 - As wisely suggested by Adafruit in here, run the following command:

sudo mv /usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service ~/