{"id":379,"date":"2023-10-30T13:28:54","date_gmt":"2023-10-30T11:28:54","guid":{"rendered":"https:\/\/www.microfusion.org\/blog\/?p=379"},"modified":"2023-10-30T13:45:26","modified_gmt":"2023-10-30T11:45:26","slug":"how-to-use-two-or-more-networks-at-the-same-time-in-linux-mint","status":"publish","type":"post","link":"https:\/\/www.microfusion.org\/blog\/how-to-use-two-or-more-networks-at-the-same-time-in-linux-mint\/","title":{"rendered":"How to use two or more networks at the same time in Linux Mint"},"content":{"rendered":"\n<p>Sometimes you might have a situation where you would want to have access to two or more networks simultaneously using the same computer. Linux needs to be configured to allow this via something called routes&#8230;<\/p>\n\n\n\n<p>In this short tutorial I&#8217;ll explain how to setup custom routes to allow you to be able to access multiple networks from two or more different LAN or Wifi connections at the same time.<\/p>\n\n\n\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-7505880210632883\" crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\" style=\"display:block; text-align:center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-7505880210632883\" data-ad-slot=\"6291301981\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">The Networking Problem<\/h2>\n\n\n\n<p>In Windows you can have multiple networks without bridging them together and still have access to both networks from the same computer, Linux on the other hand will allow you to have multiple networks but will not allow you to use both of them at the same time by default. Thus, to resolve this issue we need to setup routes. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using routes to allow access to two or more networks <\/h2>\n\n\n\n<p>For this tutorial i would use the network 192.168.10.0 as my primary network and 192.168.2.0 as my secondary network. By default without any configuration Linux Mint will use only my primary network and I will not be able to access any PC or resource on the secondary network. <\/p>\n\n\n\n<p>For more information go look at our <a href=\"https:\/\/www.microfusion.org\/blog\/how-to-setup-a-home-network\/\" target=\"_blank\" rel=\"noopener\" title=\"How to Setup a home network\">Setting up a Network<\/a> guide<\/p>\n\n\n\n<p>For this setup we will use the <strong>Linux Mint Cinnamon Network Manager<\/strong>, From the desktop in the bottom right hand corner near the time left click on the network icon and select the Network settings option. The Linux Network Manager window will open listing your available networks. <\/p>\n\n\n\n<p>In the picture below you can see I have two LAN (Local Area Network) Adapters that are both on different networks. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img fetchpriority=\"high\" decoding=\"async\" width=\"800\" height=\"634\" src=\"https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-30-12-39-37.png\" alt=\"Linux Mint Network Manager\" class=\"wp-image-380\" srcset=\"https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-30-12-39-37.png 800w, https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-30-12-39-37-300x238.png 300w, https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-30-12-39-37-768x609.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Lets configure custom networking routes for each networking adapter<\/h2>\n\n\n\n<p>Select your Ethernet or Wifi connection from the list on the left in the Linux Network Manager, in my case its the second one in the list called <strong><em>enp7s0<\/em><\/strong>.<\/p>\n\n\n\n<p>Next select the Gear Icon to configure this network adapters settings then select the IPv4 section in the list. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" width=\"800\" height=\"634\" src=\"https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-30-13-00-14.png\" alt=\"Networking interfaces\" class=\"wp-image-381\" srcset=\"https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-30-13-00-14.png 800w, https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-30-13-00-14-300x238.png 300w, https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-30-13-00-14-768x609.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>In my case I configured to use a static IP address but you can leave it to DHCP if you want your router to manage the IP addresses. The DNS is set to auto or you can specify your DNS server IP as well. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" width=\"655\" height=\"488\" src=\"https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/ipv4Settings.png\" alt=\"IPv4 Settings for two or more networks\" class=\"wp-image-382\" srcset=\"https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/ipv4Settings.png 655w, https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/ipv4Settings-300x224.png 300w\" sizes=\"(max-width: 655px) 100vw, 655px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Lets configure custom routes for the Primary LAN Network Adapter<\/h3>\n\n\n\n<p>Scroll down a little and look for the Routes section. By default, your routes will or should be empty. Since we are going to priorities this Network Interface we will need to setup its route as I did below. we use 192.168.10.0 as the address to specify the network we wish to route to. the netmask most commonly used for home and small business networks are 255.255.255.0 or 24. the Gateway is your Network&#8217;s router address and the Metric is the priority the network will be used. In my case its the primary one so i set the metric to the value of 1 as seen below. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"655\" height=\"488\" src=\"https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/IP4v2.png\" alt=\"Linux Routes\" class=\"wp-image-383\" srcset=\"https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/IP4v2.png 655w, https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/IP4v2-300x224.png 300w\" sizes=\"(max-width: 655px) 100vw, 655px\" \/><\/figure>\n\n\n\n<p>Apply and Close this configuration. Next we will edit the secondary Network interface.<\/p>\n\n\n\n<p>Back on the main Network Manager Screen select your secondary network and like before, once selected click on the gear icon to edit the second LAN adapter&#8217;s settings. In my case its the LAN Interface adapter called <strong><em>enp6s0<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"634\" src=\"https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/s1.png\" alt=\"Linux Networking Manager\" class=\"wp-image-384\" srcset=\"https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/s1.png 800w, https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/s1-300x238.png 300w, https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/s1-768x609.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Lets configure custom routes for the Secondary LAN Network Adapter<\/h3>\n\n\n\n<p>Again, select the IP4 section in the left hand side list, make sure the Automatic Routes setting is set to Disabled.<\/p>\n\n\n\n<p>Now, we need to specify that this adapter will route to the primary adapter. set the address again to 192.168.10.0, with the netmask of either 255.255.255.0 or 24<\/p>\n\n\n\n<p>The Gateway should be the primary routers IP address and the metric is set to the value if 2. Remember we configures the primary LAN interface to have a metric of 1.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"655\" height=\"488\" src=\"https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/s2.png\" alt=\"Linux Routes setup\" class=\"wp-image-385\" srcset=\"https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/s2.png 655w, https:\/\/www.microfusion.org\/blog\/wp-content\/uploads\/2023\/10\/s2-300x224.png 300w\" sizes=\"(max-width: 655px) 100vw, 655px\" \/><\/figure>\n\n\n\n<p>Once this is done you can apply and close this window. <\/p>\n\n\n\n<p>To make sure the settings apply you need to either restart the PC or disable and enable all network interfaces. <\/p>\n\n\n\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-7505880210632883\" crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\" style=\"display:block; text-align:center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-7505880210632883\" data-ad-slot=\"6291301981\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>In a situation where you have multiple networks and wish to use them all at the same time you will need to setup and configure routes in Linux.<\/p>\n\n\n\n<p>Metric score is used to tell Linux which interface order it would follow and can be used to specify which interface is the primary LAN interface you wish to use. <\/p>\n\n\n\n<p>Thus enabling you to use two or more networks and access both of them and their resources at the same time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you might have a situation where you would want to have access to two or more networks from the same computer at the same time, Linux needs to be configured to allow this via routes<\/p>\n","protected":false},"author":1,"featured_media":387,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[3,24],"tags":[17,10,26],"class_list":["post-379","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general","category-linux","tag-howto","tag-linux","tag-netwoking"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.microfusion.org\/blog\/wp-json\/wp\/v2\/posts\/379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microfusion.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microfusion.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microfusion.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microfusion.org\/blog\/wp-json\/wp\/v2\/comments?post=379"}],"version-history":[{"count":4,"href":"https:\/\/www.microfusion.org\/blog\/wp-json\/wp\/v2\/posts\/379\/revisions"}],"predecessor-version":[{"id":393,"href":"https:\/\/www.microfusion.org\/blog\/wp-json\/wp\/v2\/posts\/379\/revisions\/393"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.microfusion.org\/blog\/wp-json\/wp\/v2\/media\/387"}],"wp:attachment":[{"href":"https:\/\/www.microfusion.org\/blog\/wp-json\/wp\/v2\/media?parent=379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.microfusion.org\/blog\/wp-json\/wp\/v2\/categories?post=379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.microfusion.org\/blog\/wp-json\/wp\/v2\/tags?post=379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}