[Resolved] Problem with double default routing

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
boggiano
Level 1
Level 1
Posts: 33
Joined: Sat Jul 06, 2019 5:55 am

[Resolved] Problem with double default routing

Post by boggiano »

Hello,
I have two routers with twi different ISPs (of course, I am going to switch one off.)

The old router (192.168.188.1) is connected via wifi with the interface wlp4s0
The new router (192.168.178.1) is connected via ethernet with the interface enp0s31f6

I would like to have access to both networks and using the new router as default gateway.


If turn on the ethernet interface I have access to the new network and to internet but when I turn on the wifi interface, I lose the internet access.
I think this is normal since I have a double default route on the routing table.


Only wifi: (internet OK)

Code: Select all

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.188.1   0.0.0.0         UG    600    0        0 wlp4s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp4s0
192.168.188.0   0.0.0.0         255.255.255.0   U     600    0        0 wlp4s0

Only ethernet: (internet OK)

Code: Select all

0.0.0.0         192.168.178.1   0.0.0.0         UG    100    0        0 enp0s31f6
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 enp0s31f6
192.168.178.0   0.0.0.0         255.255.255.0   U     100    0        0 enp0s31f6

Both : (internet NOT OK)

Code: Select all

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.178.1   0.0.0.0         UG    100    0        0 enp0s31f6
0.0.0.0         192.168.188.1   0.0.0.0         UG    600    0        0 wlp4s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 enp0s31f6
192.168.178.0   0.0.0.0         255.255.255.0   U     100    0        0 enp0s31f6
192.168.188.0   0.0.0.0         255.255.255.0   U     600    0        0 wlp4s0

So I deleted the unwanted entry:

Code: Select all

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.178.1   0.0.0.0         UG    100    0        0 enp0s31f6
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 enp0s31f6
192.168.178.0   0.0.0.0         255.255.255.0   U     100    0        0 enp0s31f6
192.168.188.0   0.0.0.0         255.255.255.0   U     600    0        0 wlp4s0

But I have internet access

What is wrong ?
Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
djph
Level 7
Level 7
Posts: 1928
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: Problem with double routing

Post by djph »

Yeah, you shouldn't be able to get two default gateways.

IIRC, there's a setting / checkbox in network manager to the effect of "use this connection only for this network", so that NM doesn't try setting two default gateways.
boggiano
Level 1
Level 1
Posts: 33
Joined: Sat Jul 06, 2019 5:55 am

Re: Problem with double routing

Post by boggiano »

djph wrote: Wed Jun 09, 2021 6:19 am Yeah, you shouldn't be able to get two default gateways.

IIRC, there's a setting / checkbox in network manager to the effect of "use this connection only for this network", so that NM doesn't try setting two default gateways.
it works !
I have to delete any DNS settings in the wifi connection (even if they are the same of the ethernet connection).

Still not understand why the good old command line failed!

Thank you!
shockedquartz
Level 2
Level 2
Posts: 69
Joined: Tue Dec 17, 2019 3:31 pm

Re: [Resolved] Problem with double default routing

Post by shockedquartz »

I have a similar problem. I have two NICs on my Mint PC. One 1g Ethernet and 10g fibre for NAS. I've tried everything to stop some apps from using the 10g port but it doesn't seem to stop them. Firefox especially. Changed the routing table, lowered the metric, did the 'use this connection only for this network, etc. Same effect.
djph
Level 7
Level 7
Posts: 1928
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: Problem with double routing

Post by djph »

boggiano wrote: Wed Jun 09, 2021 6:44 am
djph wrote: Wed Jun 09, 2021 6:19 am Yeah, you shouldn't be able to get two default gateways.

IIRC, there's a setting / checkbox in network manager to the effect of "use this connection only for this network", so that NM doesn't try setting two default gateways.
it works !
I have to delete any DNS settings in the wifi connection (even if they are the same of the ethernet connection).

Still not understand why the good old command line failed!

Thank you!
Because of Network Mangler :)
Locked

Return to “Networking”