Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7808

Networking and servers • Re: Two Network Connections

$
0
0
Further to what thagrol has said, if you type "ip route" to see the network routing details, you should see a "metric nnn" number of the end of each line.

The metric number for lines associated with the eth0 interface should be lower than those for the wlan0 interface. This means the wired ethernet with the lower number takes precedence, and the wireless will be used if the wired fails.

Code:

rpdom@raspberrypi:~ $ ip routedefault via 192.168.42.1 dev eth0 proto dhcp src 192.168.42.201 metric 100 <-- High priority for internet via routerdefault via 192.168.42.1 dev wlan0 proto dhcp src 192.168.42.42 metric 600 <-- Low priority for internet via router192.168.42.0/24 dev eth0 proto kernel scope link src 192.168.42.201 metric 100 <-- High priority for local network192.168.42.0/24 dev wlan0 proto kernel scope link src 192.168.42.42 metric 600 <-- Low priority for local network

Statistics: Posted by rpdom — Mon Apr 28, 2025 4:17 pm



Viewing all articles
Browse latest Browse all 7808

Trending Articles