I follow this guide to set static IP for my BBB with Debian 9.3: link. My /etc/network/interfaces file is modified to be as follow:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
# Primary / Ethernet port
auto eth0
iface eth0 inet dhcp
address 192.168.0.20
netmask 255.255.255.0
gateway 192.168.0.1
# Secondary / Wifi RT5370
iface wlxe84e0650ff53 inet static
address 192.168.0.21
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.1After that, my ethernet IP is not set to ...20, but ...18 as before. On the wifi side, I did not put usb0 because it shows up as wlxe84e0650ff53 when I use ifconfig. Anybody know why? The extra settings completely kills it. I got no wifi, unless I comment out these new lines. Can someone tell me what went wrong?
Right now, the username and password for the router are not known so I cannot get into it for more info.
Thank you so much.
1 Answer
First, there's an error on your eth0 config. You should replace iface eth0 inet dhcp to iface eth0 inet static. You also need to add the auto wlxe84e0650ff53 before iface wlxe84e0650ff53 inet static. Finally, you need wpa-ssid and wpa-psk options for your wi-fi config. Your /etc/network/interfaces should look like something like this:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
# Primary / Ethernet port
auto eth0
iface eth0 inet static address 192.168.0.20 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1 dns-nameservers 192.168.0.1, 8.8.8.8
# Secondary / Wifi RT5370
auto wlxe84e0650ff53
iface wlxe84e0650ff53 inet static address 192.168.0.21 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1 dns-nameservers 192.168.0.1, 8.8.8.8 wpa-ssid <Wifi network SSID> wpa-psk <Wifi WPA password>In order to know what is your wireless interface name, type iwconfig command into your terminal.
P.S I don't fully get why you configure two interfaces in the same network.
12