I am currently experiencing a network configuration problem.
This concerns a project based on an ODROID C2 board with a Linux Debian 9 stretch 5.73 / Kernel 3.16.57
the board is equipped with a USB 3.0 hub + RJ45 powered.
The ultimate goal is to have the WAN on eth0 in DHCP (odroid LAN)
an eth1 LAN in static (HUB LAN)
A wifi key RALINK RT5572 in access point with a static ip, hosting the bridge of the eth0 if necessary.
What works so far:
Everything is "ok" on boot, however it was necessary to disable some services at startup, and some behavior is strange:
Services disabled:
Wpasupplicant (disabled and hidden) otherwise impossible to pass the wifi key in MASTER
NetworkManager-wait-online (otherwise go round on boot and fail)
Installed services:
hostapd (for the access point)
dnsmaq
openvpn (not used yet)
My configuration is :
/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
iface wlan0 inet static
address 10.3.141.1
network 10.3.141.0
netmask 255.255.255.0
#gateway 10.3.141.1
auto eth1
iface eth1 inet static
address 10.240.77.10
network 10.240.77.0
netmask 255.255.0.0
#gateway 10.240.77.1
hostapd.conf:
# Wi-Fi wlan interface
interface = wlan0
# nl80211 with all Linux drivers mac80211
driver = nl80211
# Name of the Wi-Fi spot
ssid = MonSSID
# Wi-Fi mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g)
hw_mode = g
# frequency channel Wi-Fi (1-14)
channel = 6
# WPA
macaddr_acl = 0
auth_algs = 1
wpa = 2
wpa_passphrase = MonMDPSECRET
wpa_key_mgmt = WPA-PSK
wpa_pairwise = TKIP
rsn_pairwise = CCMP
has been uncommented: the hostapd default for the daemon's auto launch (the link to the hostapd.conf is good)
DNSMAQ (at the end of the file):
#CONFIG
interface = wlan0
domain-needed
bogus-priv
filterwin2k
locates-queries
Local = / lan /
domain = local.local
expand-hosts
no-negcache
resolv-file = / tmp / resolv.conf.auto
dhcp-authoritative
DHCP-leasefile = / tmp / dhcp.leases
# use / etc / ethers for static hosts; same format as --dhcp-host
# read-ethers
# DHCP range
dhcp-range = 10.3.141.10,10.3.141.100,12h
# Netmask
dhcp-option = 1,255.255.255.0
# Road
dhcp-option = 3,10.3.141.1
Network Manager is configured to handle interfaces in /etc/network/interfaces file (ifupdown = true)
reboot, interfaces eth0 and 1 jump up well, dhcp for 0 and static for 1. However, several things are strange:
- "Failed to start Raise network interfaces" (at the boot).
A systemctl status networking sends me a total fail of the service. That does not prevent networks from functioning.
- Random behavior of the Wlan0 interface. once on 4 or 5 reboot it is up but no IP address assigned. However, It always passes MASTER, sometimes it passes Manage first and then MASTER after a few seconds.
If necessary I bridge the net on the access point wlan0
DEBIAN 9 - ARMBIAN 5.73 - kernel 3.16.57 / ODROID C2 Network
in Beginners
Posted · Edited by odroidodroid
Hello everyone,
I am currently experiencing a network configuration problem.
This concerns a project based on an ODROID C2 board with a Linux Debian 9 stretch 5.73 / Kernel 3.16.57
the board is equipped with a USB 3.0 hub + RJ45 powered.
The ultimate goal is to have the WAN on eth0 in DHCP (odroid LAN)
an eth1 LAN in static (HUB LAN)
A wifi key RALINK RT5572 in access point with a static ip, hosting the bridge of the eth0 if necessary.
What works so far:
Everything is "ok" on boot, however it was necessary to disable some services at startup, and some behavior is strange:
Services disabled:
Wpasupplicant (disabled and hidden) otherwise impossible to pass the wifi key in MASTER
NetworkManager-wait-online (otherwise go round on boot and fail)
Installed services:
hostapd (for the access point)
dnsmaq
openvpn (not used yet)
My configuration is :
/etc/network/interfaces
auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto wlan0 iface wlan0 inet static address 10.3.141.1 network 10.3.141.0 netmask 255.255.255.0 #gateway 10.3.141.1 auto eth1 iface eth1 inet static address 10.240.77.10 network 10.240.77.0 netmask 255.255.0.0 #gateway 10.240.77.1
hostapd.conf:
# Wi-Fi wlan interface interface = wlan0 # nl80211 with all Linux drivers mac80211 driver = nl80211 # Name of the Wi-Fi spot ssid = MonSSID # Wi-Fi mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g) hw_mode = g # frequency channel Wi-Fi (1-14) channel = 6 # WPA macaddr_acl = 0 auth_algs = 1 wpa = 2 wpa_passphrase = MonMDPSECRET wpa_key_mgmt = WPA-PSK wpa_pairwise = TKIP rsn_pairwise = CCMP
has been uncommented: the hostapd default for the daemon's auto launch (the link to the hostapd.conf is good)
DNSMAQ (at the end of the file):
#CONFIG interface = wlan0 domain-needed bogus-priv filterwin2k locates-queries Local = / lan / domain = local.local expand-hosts no-negcache resolv-file = / tmp / resolv.conf.auto dhcp-authoritative DHCP-leasefile = / tmp / dhcp.leases # use / etc / ethers for static hosts; same format as --dhcp-host # read-ethers # DHCP range dhcp-range = 10.3.141.10,10.3.141.100,12h # Netmask dhcp-option = 1,255.255.255.0 # Road dhcp-option = 3,10.3.141.1
Network Manager is configured to handle interfaces in /etc/network/interfaces file (ifupdown = true)
reboot, interfaces eth0 and 1 jump up well, dhcp for 0 and static for 1. However, several things are strange:
- "Failed to start Raise network interfaces" (at the boot).
A systemctl status networking sends me a total fail of the service. That does not prevent networks from functioning.
- Random behavior of the Wlan0 interface. once on 4 or 5 reboot it is up but no IP address assigned. However, It always passes MASTER, sometimes it passes Manage first and then MASTER after a few seconds.
If necessary I bridge the net on the access point wlan0
I use for this the time to test this commands:
sysctl -w net.ipv4.ip_forward = 1 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
ip a returns me :
systemctl status networking
● networking.service - Raise network interfaces Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2019-02-28 17:41:41 CET; 15h ago Docs: man:interfaces(5) Process: 324 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE) Process: 301 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS) Main PID: 324 (code=exited, status=1/FAILURE) Feb 28 17:41:40 odroidc2 ifup[324]: RTNETLINK answers: File exists Feb 28 17:41:40 odroidc2 ifup[324]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /etc/resolvconf/run/resolv.conf Feb 28 17:41:40 odroidc2 dhclient[624]: bound to 192.168.1.56 -- renewal in 40936 seconds. Feb 28 17:41:40 odroidc2 ifup[324]: bound to 192.168.1.56 -- renewal in 40936 seconds. Feb 28 17:41:41 odroidc2 ifup[324]: RTNETLINK answers: File exists Feb 28 17:41:41 odroidc2 ifup[324]: ifup: failed to bring up eth1 Feb 28 17:41:41 odroidc2 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE Feb 28 17:41:41 odroidc2 systemd[1]: Failed to start Raise network interfaces. Feb 28 17:41:41 odroidc2 systemd[1]: networking.service: Unit entered failed state. Feb 28 17:41:41 odroidc2 systemd[1]: networking.service: Failed with result 'exit-code'.
Since the project node goes through this access point, how to make it reliable? and why these facts?
Thank for our feedback!