Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
route network to web
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1333
Location: sweden

PostPosted: Wed Jan 08, 2025 4:17 am    Post subject: route network to web Reply with quote

Hi all

I have two network :

Code:


o: 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 216  bytes 15452 (15.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 216  bytes 15452 (15.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.42.1  netmask 255.255.255.0  broadcast 172.16.42.255
        inet6 fe80::94fe:efff:febc:2847  prefixlen 64  scopeid 0x20<link>
        ether 96:fe:ef:bc:28:47  txqueuelen 1000  (Ethernet)
        RX packets 1540140  bytes 80087482 (76.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3420916  bytes 880467792 (839.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.27  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::9922:f26c:e93e:281b  prefixlen 64  scopeid 0x20<link>
        ether a2:40:42:f0:7f:1f  txqueuelen 1000  (Ethernet)
        RX packets 497270  bytes 126161223 (120.3 MiB)
        RX errors 0  dropped 474  overruns 0  frame 0
        TX packets 504529  bytes 332015815 (316.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


usb0 is for distcc and wlan0 connecting to my router. As soon as a activate usb0 i am loosing connection to the web and i like to sort this .

regards hedmo
Back to top
View user's profile Send private message
zen_desu
Tux's lil' helper
Tux's lil' helper


Joined: 25 Oct 2024
Posts: 96

PostPosted: Wed Jan 08, 2025 4:24 am    Post subject: Reply with quote

What is the output of this command?

Code:
ip route


It may be preferring usb0 and if that doesn't have internet access, that will cause issues.
_________________
µgRD dev
Wiki writer
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1333
Location: sweden

PostPosted: Wed Jan 08, 2025 4:39 am    Post subject: Reply with quote

zen_desu wrote:
What is the output of this command?

Code:
ip route


It may be preferring usb0 and if that doesn't have internet access, that will cause issues.


zen_desu

Here is the output :
Code:

default via 172.16.42.2 dev usb0 metric 4
default via 192.168.1.1 dev wlan0 proto dhcp src 192.168.1.27 metric 600
172.16.42.0/24 dev usb0 proto kernel scope link src 172.16.42.1
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.27 metric 600


usb0 is connected to an other pc . That pc has access to internet on its own network . That pc does work but not this.

regards hedmo
Back to top
View user's profile Send private message
zen_desu
Tux's lil' helper
Tux's lil' helper


Joined: 25 Oct 2024
Posts: 96

PostPosted: Wed Jan 08, 2025 5:05 am    Post subject: Reply with quote

It is trying to use the usb0 connection as a default route. This could work if that system is configured to forward traffic.

It's probably easiest to remove that default route, and tell dhcp to not get a gateway for that interface, unless you'd like to use it for internet access.

You could also adjust the metric, but it doesn't help to have something listed as a default route when it's not functioning as one.

You can remove that route manually with:

Code:

ip r del default via 172.16.42.2 dev usb0


But know that it will likely return next time it gets a lease if dhcp is used.
_________________
µgRD dev
Wiki writer
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum