[Solved] Two Networks

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
User avatar
JayBird707
Level 3
Level 3
Posts: 126
Joined: Sat Jan 30, 2016 9:56 pm

[Solved] Two Networks

Post by JayBird707 »

I need some help setting up some routing on my Mint 19 XFCE install.

I have a Wireless Adapter and an Ethernet Adapter installed.

I want all traffic for network 192.168.2.0 to use Wifi on Wireless Adapter wlp0s26u1u1 192.168.2.108.

All other traffic including internet requests should use Ethernet Adapter eno1 192.168.1.105.

I think it has to be done using the route command but I'm not sure of how to write the commands.

Here my settings:

Code: Select all

Ethernet Adapter
eno1 192.168.1.105
 
Wireless Adapter
wlp0s26u1u1 192.168.2.108

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0 eno1
0.0.0.0         192.168.2.1     0.0.0.0         UG    600    0        0 wlp0s26u1u1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eno1
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 eno1
192.168.2.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp0s26u1u1
192.168.15.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet1
192.168.29.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet8
Thanks in advance for any advice you can give.
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.
ASRock H470M-ITX/ac Home Build on Linux Mint Cinnamon!
Dell Studio 1737 Laptop, HP6300 SFF Desktop, Intel NUC NUC7CJYH Mini All on Linux Mint XFCE!
Image
User avatar
JayBird707
Level 3
Level 3
Posts: 126
Joined: Sat Jan 30, 2016 9:56 pm

Two Networks

Post by JayBird707 »

I think I got the commands down here is what I did.

Code: Select all

jeffrey@jeffrey-HP-Compaq-Pro-6300-SFF ~ $ sudo route del -net 0.0.0.0 gw 192.168.2.1 netmask 0.0.0.0 dev wlp0s26u1u1
jeffrey@jeffrey-HP-Compaq-Pro-6300-SFF ~ $ sudo route del -net 192.168.2.0 gw 0.0.0.0  netmask 255.255.255.0 dev wlp0s26u1u1
jeffrey@jeffrey-HP-Compaq-Pro-6300-SFF ~ $ sudo route add -net 192.168.2.0 gw 192.168.2.108 netmask 255.255.255.0 dev wlp0s26u1u1
Here is the new routing Table

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0 eno1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eno1
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 eno1
192.168.2.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp0s26u1u1
192.168.15.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet1
192.168.29.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet8
Now all I need is some help to figure out how to make the changes permanent.
ASRock H470M-ITX/ac Home Build on Linux Mint Cinnamon!
Dell Studio 1737 Laptop, HP6300 SFF Desktop, Intel NUC NUC7CJYH Mini All on Linux Mint XFCE!
Image
User avatar
JayBird707
Level 3
Level 3
Posts: 126
Joined: Sat Jan 30, 2016 9:56 pm

Re: Two Networks

Post by JayBird707 »

I found this posting:

viewtopic.php?t=224152#p1181281

And it looks like I'm making headway to getting the settings to be persistent.

The Routing Table now looks like this:

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0 eno1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eno1
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 eno1
192.168.2.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp0s26u1u1
192.168.2.0     192.168.2.108   255.255.255.0   UG    600    0        0 wlp0s26u1u1
192.168.15.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet1
192.168.29.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet8
I just want to eliminate 192.168.2.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp0s26u1u1 but can't seem to figure out how to get rid of it.
ASRock H470M-ITX/ac Home Build on Linux Mint Cinnamon!
Dell Studio 1737 Laptop, HP6300 SFF Desktop, Intel NUC NUC7CJYH Mini All on Linux Mint XFCE!
Image
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Two Networks

Post by Laurent85 »

JayBird707 wrote: Mon Aug 20, 2018 5:12 pm Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eno1
0.0.0.0 192.168.2.1 0.0.0.0 UG 600 0 0 wlp0s26u1u1
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eno1
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 eno1
192.168.2.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp0s26u1u1
192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
192.168.29.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
[/code]
That routing table already routes network traffic as desired, no need to change anything. Network traffic 198.168.2.0/24 routed via wifi adapter. Default route 0.0.0.0 with metric 100 has precedence over metric 600, internet network traffic routed via ethernet adapter eno1.
Image
User avatar
JayBird707
Level 3
Level 3
Posts: 126
Joined: Sat Jan 30, 2016 9:56 pm

Re: Two Networks

Post by JayBird707 »

Thanks for looking I really appreciate your help.
ASRock H470M-ITX/ac Home Build on Linux Mint Cinnamon!
Dell Studio 1737 Laptop, HP6300 SFF Desktop, Intel NUC NUC7CJYH Mini All on Linux Mint XFCE!
Image
User avatar
JayBird707
Level 3
Level 3
Posts: 126
Joined: Sat Jan 30, 2016 9:56 pm

Re: [Solved] Two Networks

Post by JayBird707 »

I am rookie at this and am a little OCD so please bear with me.

If I want all 192.168.2. requests to go through wlp0s26u1u1 then why doesn't that entry in the table look like:

192.168.2.0 0.0.0.0 255.255.255.0 U 100 0 0 wlp0s26u1u1

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0 eno1
0.0.0.0         192.168.2.1     0.0.0.0         UG    600    0        0 wlp0s26u1u1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eno1
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 eno1
192.168.2.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp0s26u1u1
192.168.15.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet1
192.168.29.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet8
ASRock H470M-ITX/ac Home Build on Linux Mint Cinnamon!
Dell Studio 1737 Laptop, HP6300 SFF Desktop, Intel NUC NUC7CJYH Mini All on Linux Mint XFCE!
Image
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: [Solved] Two Networks

Post by Laurent85 »

JayBird707 wrote: Thu Aug 23, 2018 2:06 pm If I want all 192.168.2. requests to go through wlp0s26u1u1 then why doesn't that entry in the table look like:

192.168.2.0 0.0.0.0 255.255.255.0 U 100 0 0 wlp0s26u1u1
It could but that would make no difference since only one route is available for network 192.168.2.0/24.
Image
Locked

Return to “Networking”