Network Interface eth or wlan but want both

This forum is for discussion about general software issues.

Network Interface eth or wlan but want both

Postby Defiant1 » Sat Sep 08, 2018 8:53 am

So I decided to look into Arch ARM for my PI. I installed it and worked at getting the wireless up and running. Success, so far.

I am connecting my wlan to the same network as my eth and they both are getting an IP, if I unplug the eth the wlan will communicate out and if I disable wlan the eth still communicates. All seems to be going good.

The issue is noticed when I try to ping or try to ssh the wlan from another computer, it won't connect; however, if I disconnect the eth, I can communicate to the wlan. I looked all over and could not find an answer. It acts like the description of the failover configuration, but that is not setup.

So why can I only communicate to wlan, if eth is down? What am I missing?

Here is what I have done so far after the install to get the wlan up...
$this->bbcode_second_pass_code('', '
pacman -S netcrl
cp /etc/netctl/example/wireless-wpa /etc/netctl/
chmod 640 /etc/netctl/wireless-wpa
systemctl enable netctl-auto@wlan0
netctl start wireless-wpa
')

My wireless-wpa profile
$this->bbcode_second_pass_code('', 'Description='A simple WPA encrypted wireless connection'
Interface=wlan0
Connection=wireless

Security=wpa
IP=dhcp
IP6=no
ESSID='ssid''
# Prepend hexadecimal keys with \"
# If your key starts with ", write it as '""<key>"'
# See also: the section on special quoting rules in netctl.profile(5)
Key='password'
# Uncomment this if your ssid is hidden
#Hidden=yes
# Set a priority for automatic profile selection
#Priority=10
')
Defiant1
 
Posts: 5
Joined: Sat Sep 08, 2018 8:32 am

Re: Network Interface eth or wlan but want both

Postby TheSaint » Sat Sep 08, 2018 9:50 am

Have you check this ?$this->bbcode_second_pass_code('', '$ ip route
# netctl status wireless-wpa
').
TheSaint
 
Posts: 346
Joined: Mon Jul 23, 2018 7:57 am

Re: Network Interface eth or wlan but want both

Postby graysky » Sat Sep 08, 2018 10:02 am

I don't use netctl. Systemd can do it once you configure and enable wpa_aupplicant to work with wlan0. Just make these units and enable systemd-networkd and systemd-resolved.
$this->bbcode_second_pass_code('', '
% cat 10-wireless.network
[Match]
Name=wlan0

[Network]
DHCP=ipv4

[DHCP]
RouteMetric=10
')

$this->bbcode_second_pass_code('', '
% cat 20-wired.network
[Match]
Name=eth0

[Network]
DHCP=ipv4

[DHCP]
RouteMetric=20
')
Because this system runs kodi and needs nfs:
$this->bbcode_second_pass_code('', '
% cat /etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --ignore eth0
')

$this->bbcode_second_pass_code('', '
% cat /etc/systemd/system/kodi.service.d/override.conf
[Unit]
After=remote-fs.target network-online.target
Wants=network-online.target
')
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Network Interface eth or wlan but want both

Postby Defiant1 » Sat Sep 08, 2018 5:19 pm

$this->bbcode_second_pass_quote('TheSaint', 'H')ave you check this ?$this->bbcode_second_pass_code('', '$ ip route
# netctl status wireless-wpa
').


Keep in mind, my experience is more with an OOB linux environment, that automatically sets this stuff up. I am trying to expand my knowledge with more hands on experience.

I'm not sure what I should be looking for, exactly. Could you provide details if something looks amiss, and what what the issue may be?

When cable is plugged in

ip route$this->bbcode_second_pass_code('', '
default via 192.168.1.1 dev wlan0 proto dhcp src 192.168.1.73 metric 303
default via 192.168.1.1 dev eth0 proto dhcp src 192.168.1.67 metric 1024
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.67
192.168.1.0/24 dev wlan0 proto dhcp scope link src 192.168.1.73 metric 303
192.168.1.1 dev eth0 proto dhcp scope link src 192.168.1.67 metric 1024')

netctl status wireless-wpa$this->bbcode_second_pass_code('', '
* netctl@wireless\x2dwpa.service - Networking for netctl profile wireless-wpa
Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static; vendor preset: disabled)
Active: active (exited) since Sat 2018-09-08 07:24:37 UTC; 9h ago
Docs: man:netctl.profile(5)
Main PID: 317 (code=exited, status=0/SUCCESS)
Status: "online"
Tasks: 2 (limit: 2212)
CGroup: /system.slice/system-netctl.slice/netctl@wireless\x2dwpa.service
|-336 wpa_supplicant -q -B -P /run/wpa_supplicant-wlan0.pid -i wlan0 -D nl80211,wext -c/run/netctl/wpa_supplicant-wlan0.conf
`-416 dhcpcd -4 -q -t 30 -L wlan0

Sep 08 07:24:43 alarmpi dhcpcd[364]: wlan0: leased 192.168.1.73 for 86400 seconds
Sep 08 07:24:43 alarmpi dhcpcd[364]: wlan0: adding route to 192.168.1.0/24
Sep 08 07:24:43 alarmpi dhcpcd[364]: wlan0: adding default route via 192.168.1.1
Sep 08 07:24:43 alarmpi dhcpcd[364]: forked to background, child pid 416
Sep 08 07:24:43 alarmpi network[317]: Started network profile 'wireless-wpa'
Sep 08 07:37:34 alarmpi dhcpcd[416]: wlan0: hardware address 00:00:00:00:00:00 claims 192.168.1.73
Sep 08 07:56:56 alarmpi dhcpcd[416]: wlan0: hardware address 00:00:00:00:00:00 claims 192.168.1.73
Sep 08 08:02:54 alarmpi dhcpcd[416]: wlan0: hardware address 00:00:00:00:00:00 claims 192.168.1.73
Sep 08 08:17:00 alarmpi dhcpcd[416]: wlan0: hardware address 00:00:00:00:00:00 claims 192.168.1.73
Sep 08 09:48:52 alarmpi dhcpcd[416]: wlan0: hardware address 00:00:00:00:00:00 claims 192.168.1.73')


When cable unplugged

ip route$this->bbcode_second_pass_code('', '
default via 192.168.1.1 dev wlan0 proto dhcp src 192.168.1.73 metric 303
192.168.1.0/24 dev wlan0 proto dhcp scope link src 192.168.1.73 metric 303')

netctl status wireless-wpa$this->bbcode_second_pass_code('', '
* netctl@wireless\x2dwpa.service - Networking for netctl profile wireless-wpa
Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static; vendor preset: disabled)
Active: active (exited) since Sat 2018-09-08 17:06:30 UTC; 3min 7s ago
Docs: man:netctl.profile(5)
Process: 324 ExecStart=/usr/lib/netctl/network start wireless-wpa (code=exited, status=0/SUCCESS)
Main PID: 324 (code=exited, status=0/SUCCESS)
Status: "online"
Tasks: 2 (limit: 2212)
CGroup: /system.slice/system-netctl.slice/netctl@wireless\x2dwpa.service
|-343 wpa_supplicant -q -B -P /run/wpa_supplicant-wlan0.pid -i wlan0 -D nl80211,wext -c/run/netctl/wpa_supplicant-wlan0.conf
`-446 dhcpcd -4 -q -t 30 -L wlan0

Sep 08 17:06:30 alarmpi systemd[1]: Started Networking for netctl profile wireless-wpa.
Sep 08 17:06:30 alarmpi dhcpcd[394]: DUID 00:01:00:01:23:26:2e:03:b8:27:eb:17:e5:5d
Sep 08 17:06:30 alarmpi dhcpcd[394]: wlan0: IAID eb:17:e5:5d
Sep 08 17:06:31 alarmpi dhcpcd[394]: wlan0: rebinding lease of 192.168.1.73
Sep 08 17:06:31 alarmpi dhcpcd[394]: wlan0: probing address 192.168.1.73/24
Sep 08 17:06:35 alarmpi dhcpcd[394]: wlan0: leased 192.168.1.73 for 86400 seconds
Sep 08 17:06:35 alarmpi dhcpcd[394]: wlan0: adding route to 192.168.1.0/24
Sep 08 17:06:35 alarmpi dhcpcd[394]: wlan0: adding default route via 192.168.1.1
Sep 08 17:06:52 alarmpi dhcpcd[394]: forked to background, child pid 446
Sep 08 17:06:52 alarmpi network[324]: Started network profile 'wireless-wpa'
')
Defiant1
 
Posts: 5
Joined: Sat Sep 08, 2018 8:32 am

Re: Network Interface eth or wlan but want both

Postby TheSaint » Sat Sep 08, 2018 6:13 pm

I saw two default route assignment. That might be incorrect.
What happen if you put down the wlan0 ? Will you have a route for both directions ?
TheSaint
 
Posts: 346
Joined: Mon Jul 23, 2018 7:57 am

Re: Network Interface eth or wlan but want both

Postby Defiant1 » Sat Sep 08, 2018 7:30 pm

This is now what I have

ifconfig wlan0 down
ifconfig
$this->bbcode_second_pass_code('', 'eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.67 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::ba27:ebff:fe42:b008 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:42:b0:08 txqueuelen 1000 (Ethernet)
RX packets 350 bytes 25464 (24.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 146 bytes 25527 (24.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0')

ip route
$this->bbcode_second_pass_code('', 'default via 192.168.1.1 dev eth0 proto dhcp src 192.168.1.67 metric 1024
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.67
192.168.1.1 dev eth0 proto dhcp scope link src 192.168.1.67 metric 1024')


netctl status wireless-wpa
$this->bbcode_second_pass_code('', '* netctl@wireless\x2dwpa.service - Networking for netctl profile wireless-wpa
Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static; vendor preset: disabled)
Active: active (exited) since Sat 2018-09-08 17:06:30 UTC; 2h 19min ago
Docs: man:netctl.profile(5)
Process: 324 ExecStart=/usr/lib/netctl/network start wireless-wpa (code=exited, status=0/SUCCESS)
Main PID: 324 (code=exited, status=0/SUCCESS)
Status: "online"
Tasks: 2 (limit: 2212)
CGroup: /system.slice/system-netctl.slice/netctl@wireless\x2dwpa.service
|-343 wpa_supplicant -q -B -P /run/wpa_supplicant-wlan0.pid -i wlan0 -D nl80211,wext -c/run/netctl/wpa_supplicant-wlan0.conf
`-446 dhcpcd -4 -q -t 30 -L wlan0

Sep 08 17:06:35 alarmpi dhcpcd[394]: wlan0: adding route to 192.168.1.0/24
Sep 08 17:06:35 alarmpi dhcpcd[394]: wlan0: adding default route via 192.168.1.1
Sep 08 17:06:52 alarmpi dhcpcd[394]: forked to background, child pid 446
Sep 08 17:06:52 alarmpi network[324]: Started network profile 'wireless-wpa'
Sep 08 17:19:58 alarmpi dhcpcd[446]: wlan0: hardware address 00:00:00:00:00:00 claims 192.168.1.73
Sep 08 18:13:23 alarmpi dhcpcd[446]: wlan0: hardware address 00:00:00:00:00:00 claims 192.168.1.73
Sep 08 19:13:23 alarmpi dhcpcd[446]: wlan0: hardware address 00:00:00:00:00:00 claims 192.168.1.73
Sep 08 19:25:26 alarmpi dhcpcd[446]: wlan0: carrier lost
Sep 08 19:25:26 alarmpi dhcpcd[446]: wlan0: deleting route to 192.168.1.0/24
Sep 08 19:25:26 alarmpi dhcpcd[446]: wlan0: deleting default route via 192.168.1.1')
Defiant1
 
Posts: 5
Joined: Sat Sep 08, 2018 8:32 am

Re: Network Interface eth or wlan but want both

Postby Defiant1 » Sat Sep 08, 2018 7:40 pm

@graysky
$this->bbcode_second_pass_quote('', 'I') don't use netctl. Systemd can do it once you configure and enable wpa_aupplicant

I may do end up going to Systemd. I didn't at first, due to finding the instructions for netctl straight forward, and reading "how to" docs at three in the morning can be difficult. I may end up reading all the documentation on how to set it up. Either way, it would be nice to know more than one way to do this. Knowledge is power.

---UPDATE
Okay so looks like I got caught up with the whole driver check and install portion of systemd.network documentation. This is actually quite simple. I am gong to see if this will work for my needs.

--UPDATE 2
I configured it to us systemd and have the same exact issue.

If I ping form my Windows box and disconnect the physical cable and reconnect it, I can see it pick up and then drop it again, once it is reconnected. I don't understand why it is not listening to both interfaces.
$this->bbcode_second_pass_code('', 'ping 192.168.1.73 -t

Pinging 192.168.1.73 with 32 bytes of data:
Request timed out.
Request timed out.
Reply from 192.168.1.73: bytes=32 time=4ms TTL=64
Reply from 192.168.1.73: bytes=32 time=4ms TTL=64
Reply from 192.168.1.73: bytes=32 time=4ms TTL=64
Reply from 192.168.1.73: bytes=32 time=4ms TTL=64
Reply from 192.168.1.73: bytes=32 time=12ms TTL=64
Request timed out.
Request timed out.')
Defiant1
 
Posts: 5
Joined: Sat Sep 08, 2018 8:32 am

Re: Network Interface eth or wlan but want both

Postby Defiant1 » Sun Sep 09, 2018 2:43 am

FOUND the issue. :D The wlan interface needs to be set to a promiscuous mode. Now it will accept data from both interfaces. Now I just need to find, how to do this automatically.
Defiant1
 
Posts: 5
Joined: Sat Sep 08, 2018 8:32 am

Re: Network Interface eth or wlan but want both

Postby TheSaint » Sun Sep 09, 2018 6:18 am

Wouldn't it be bonding ?
Anyway I read about a package that will detect when the ethernet is plugged in. At that point it may trigger to start your script.
TheSaint
 
Posts: 346
Joined: Mon Jul 23, 2018 7:57 am


Return to General

Who is online

Users browsing this forum: No registered users and 16 guests