[SOLVED] Prioritize Wifi over Ethernet in Raspbian
It occurred to me that my laptop is using entirely too much power. So, I'm trying to use my Raspberry Pi as a remote Wake-on-LAN server to send a magic packet to my computer. I want to leave it at home and be able to boot it up at will. Therefore, I need a wired connection to the computer and a wireless connection to the Internet since running a cable up the stairs is inconvenient, to say the least. I've established both connections, but the wireless connection to the Internet only seems to work when I unplug the wired connection. I got this to work on my Kali Linux box simply by checking a few boxes in the Kali Linux network manager, but Raspbian doesn't seem to use the same network manager. How do I get my R-Pi to route through my Wifi connection instead of my ethernet when it comes to the Internet?
Note: Obviously I can't list everything on my network. I don't think it's possible for any of my other devices to be interfering, but I can provide a list if it is a possibility and needed.
I get Internet from Verizon. This goes through the Verizon gateway router, which is necessary for the Internet to work but is utter trash. I disabled the 2.4 GHz, but the 5Ghz network is still running.
Because that router is a piece of shit and doesn't reach upstairs, I've connected another router through a wired connection. This is a WRT1200AC using the factory firmware. This broadcasts both a 2.5 GHz connection and a 5GHz connection. It's internet comes from an ethernet cable connected from the Verizon router to the WRT1200AC. Both of these routers are downstairs.
Connected to the second router is my laptop and Raspberry Pi. The Pi connects via the 2.4GHz and the laptop though the 5Ghz. The Raspberry Pi is a Raspberry Pi 3 that was just updated yesterday so I have the latest OS installed.
Now, there's a second router. This router is for me to be able to locally work on my other computers and my Raspberry Pi. I disabled the wireless connection so it's just a wired router. Both computers are connected to it.
Code: Select all
# interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto lo iface lo inet loopback iface eth0 inet manual allow-hotplug wlan0 iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf allow-hotplug wlan1 iface wlan1 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Code: Select all
# A sample configuration for dhcpcd. # See dhcpcd.conf(5) for details. # Allow users of this group to interact with dhcpcd via the control socket. #controlgroup wheel # Inform the DHCP server of our hostname for DDNS. hostname # Use the hardware address of the interface for the Client ID. clientid # or # Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361. #duid # Persist interface configuration when dhcpcd exits. persistent # Rapid commit support. # Safe to enable by default because it requires the equivalent option set # on the server to actually work. option rapid_commit # A list of options to request from the DHCP server. option domain_name_servers, domain_name, domain_search, host_name option classless_static_routes # Most distributions have NTP support. option ntp_servers # Respect the network MTU. # Some interface drivers reset when changing the MTU so disabled by default. #option interface_mtu # A ServerID is required by RFC2131. require dhcp_server_identifier # Generate Stable Private IPv6 Addresses instead of hardware based ones slaac private # A hook script is provided to lookup the hostname if not set by the DHCP # server, but it should not be run by default. nohook lookup-hostname
Code: Select all
eth0 Link encap:Ethernet HWaddr b8:27:eb:68:6c:20 inet addr:10.0.0.100 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::77c4:e53d:f2c8:6442/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:140 errors:0 dropped:0 overruns:0 frame:0 TX packets:171 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:10670 (10.4 KiB) TX bytes:18357 (17.9 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:988 errors:0 dropped:0 overruns:0 frame:0 TX packets:988 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:236564 (231.0 KiB) TX bytes:236564 (231.0 KiB) wlan0 Link encap:Ethernet HWaddr 00:0f:60:03:cb:b4 inet addr:10.240.28.156 Bcast:10.240.28.255 Mask:255.255.255.0 inet6 addr: fe80::ea6f:722c:a4f0:3f2b/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3346 errors:0 dropped:4 overruns:0 frame:0 TX packets:1331 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:610452 (596.1 KiB) TX bytes:300299 (293.2 KiB)
Code: Select all
default via 10.0.0.1 dev eth0 metric 202 default via 10.240.28.35 dev wlan0 metric 303 10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.100 metric 202 10.240.28.0/24 dev wlan0 proto kernel scope link src 10.240.28.156 metric 303