You are not logged in.

#1 2017-05-26 07:09:50

Rumcajs
Member
Registered: 2009-09-25
Posts: 37

[Solved] USB-Tethering and interfaces order

Hi,

if i connect my smartphone to my arch-box and turn the usb-tethering:on "/>ip route" gives me this :

default via 192.168.1.1 dev enp10s0 src 192.168.1.2 metric 202 mtu 576
default via 192.168.42.129 dev enp11s0u1 src 192.168.42.65 metric 204
192.168.1.0/24 dev enp10s0 proto kernel scope link src 192.168.1.2 metric 202 mtu 576
192.168.42.0/24 dev enp11s0u1 proto kernel scope link src 192.168.42.65 metric 204

the smartphone is placed on 2nd position because of the lower priority (metric 204) so the traffic still goes over my router and not over my smartphone, sure i can do manually
"/> ip route add default via 192.168.42.129"
and then the traffic goes over the smartphone.

However on my Raspberry-Pi3 if i turn the usb-tethering:on the smartphone is on first position and the user don't need do anything. How can i achieve this on arch? And it should be permanently (works after a reboot).

Cheers

Last edited by Rumcajs (2017-05-26 09:42:55)

Offline

#2 2017-05-26 07:49:43

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: [Solved] USB-Tethering and interfaces order

If you're using dhcpcd then you get set each interface metric to your liking.

interface enp10s0
     metric 1000

the smartphone is placed on 2nd position because of the lower priority (metric 204) so the traffic still goes over my router and not over my smartphone

This is wrong - traffic will flow over the lowest metric interface, not the highest.

Offline

#3 2017-05-26 09:22:57

Rumcajs
Member
Registered: 2009-09-25
Posts: 37

Re: [Solved] USB-Tethering and interfaces order

rsmarples wrote:

If you're using dhcpcd then you get set each interface metric to your liking.

interface enp10s0
     metric 1000

the smartphone is placed on 2nd position because of the lower priority (metric 204) so the traffic still goes over my router and not over my smartphone

This is wrong - traffic will flow over the lowest metric interface, not the highest.

This is right - the smartphone got lower priority (higher metric value thats why it is on 2nd), if the smartphone will get lets say metric 100 this will means it has higher priority and it will be first.

i quest i have put that :
interface enp10s0
   metric 1000

somewhere in the dhcpcd config, right ?

Cheers

Offline

#4 2017-05-26 09:41:57

Rumcajs
Member
Registered: 2009-09-25
Posts: 37

Re: [Solved] USB-Tethering and interfaces order

Thx rsmarples,

i put that 2 lines in /etc/dhcpcd.conf, now if i connect the phone it is on first place.

Cheers

Offline

Board footer

Powered by FluxBB