View previous topic :: View next topic |
Author |
Message |
hedmo Veteran
Joined: 29 Aug 2009 Posts: 1333 Location: sweden
|
Posted: Wed Jan 08, 2025 4:17 am Post subject: route network to web |
|
|
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 |
|
|
zen_desu Tux's lil' helper
Joined: 25 Oct 2024 Posts: 96
|
Posted: Wed Jan 08, 2025 4:24 am Post subject: |
|
|
What is the output of this command?
It may be preferring usb0 and if that doesn't have internet access, that will cause issues. _________________ µgRD dev
Wiki writer |
|
Back to top |
|
|
hedmo Veteran
Joined: 29 Aug 2009 Posts: 1333 Location: sweden
|
Posted: Wed Jan 08, 2025 4:39 am Post subject: |
|
|
zen_desu wrote: | What is the output of this command?
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 |
|
|
zen_desu Tux's lil' helper
Joined: 25 Oct 2024 Posts: 96
|
Posted: Wed Jan 08, 2025 5:05 am Post subject: |
|
|
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 |
|
|
|