1 |
Mick <michaelkintzios <at> gmail.com> writes: |
2 |
|
3 |
> |
4 |
> You can define the priority in your /etc/conf.d/net |
5 |
> |
6 |
> You can set this per wired/wireless interface; e.g. |
7 |
> |
8 |
> metric_eth0="100" |
9 |
> |
10 |
> Look at your /etc/conf.d/net.example for more details. |
11 |
> |
12 |
> HTH. |
13 |
|
14 |
|
15 |
No offense, I had found out about this option (and tried it already): |
16 |
"I found out I can modify the metric for the default route using metric_wlan0." |
17 |
|
18 |
This however only changes the default route. Not the route for the local network |
19 |
route. |
20 |
Also metric_eth0 would give less priority to my wired network, which is not what |
21 |
I want. |
22 |
|
23 |
I was searching around the gentoo forums for ifmetric and found this piece of |
24 |
code that can be added in /etc/conf.d/net: |
25 |
postup() { |
26 |
local metric=0 |
27 |
|
28 |
case "${IFACE}" in |
29 |
eth0) metric=0 ;; |
30 |
eth1) metric=1 ;; |
31 |
esac |
32 |
ifmetric "${IFACE}" "${metric}" |
33 |
|
34 |
return 0 |
35 |
} |
36 |
|
37 |
I'll try as soon as I can and add my experience with this. |