LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-16-2015, 03:32 PM   #1
doox00
LQ Newbie
 
Registered: Jul 2004
Posts: 18

Rep: Reputation: 0
two networks/subnets, same router


Is it possible to have two separate networks off one router so devices in one network will not see the devices/pcs on the other network (subnet?) but they all will share the same internet connection through the router. Is this doable? If so what should I be looking into on how?

Would that be separate subnets? 192.168.1.x 255.255.255.0 and then something like 192.168.0.x 255.255.0.0 (the 192.168.0.x could see the 192.168.1.x but the .1.x could not see the other correct?) Or am I doing this completely wrong?
 
Old 10-16-2015, 04:37 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,840

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Yes, in general a router is designed to do exactly that - route! Is there a specific need for the 192.168.0.x network to have visibility of the other, but not the other way around? This could be achieved with a simple routing rule. If you need specific advice on this, you will need to tell us the router vendor/model. I'm assuming the common gateway router will connect to the two networks via switches. Alternatively, the use of VLANs could be used to separate your networks at layer 2.

FWIW, here's a similar question, where various options are discussed
http://arstechnica.com/civis/viewtopic.php?t=1221009

Last edited by ferrari; 10-16-2015 at 04:39 PM.
 
Old 10-16-2015, 05:01 PM   #3
doox00
LQ Newbie
 
Registered: Jul 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ferrari View Post
Yes, in general a router is designed to do exactly that - route! Is there a specific need for the 192.168.0.x network to have visibility of the other, but not the other way around? This could be achieved with a simple routing rule. If you need specific advice on this, you will need to tell us the router vendor/model. I'm assuming the common gateway router will connect to the two networks via switches. Alternatively, the use of VLANs could be used to separate your networks at layer 2.

FWIW, here's a similar question, where various options are discussed
http://arstechnica.com/civis/viewtopic.php?t=1221009

The router I am using is an ASUS RT-AC66U. I have an app running on one of the pcs (its only going to be 2 pcs on this network only, both pcs will be in the same subnet). I don't want the two pcs to see the one network device on the network, (remove ip kvm switch). The two pcs will be plugged into the kvm switch, I just don't want the kvm on the same network where its detectable from the two pcs. Both the kvm switch and pc's will have the same gateway for internet access.

thanks again!
 
Old 10-16-2015, 05:23 PM   #4
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Rep: Reputation: 30
I think what you want to look at are VLANs: https://en.wikipedia.org/wiki/Virtual_LAN

In layman's terms, VLANs allow you to add a tag to network packets that indicate what network subnet they belong to. This would be done on your router and can be used to split one physical network in to multiple virtual ones. You can also have multiple VLANs that span multiple physical network devices.

This functionality isn't usually included on ISP provided home routers/gateways, so if that's where you were looking to do this you'd need a device that supports it or something you can flash a custom firmware, such as DD-WRT, to.
 
Old 10-16-2015, 05:28 PM   #5
doox00
LQ Newbie
 
Registered: Jul 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mickyg View Post
I think what you want to look at are VLANs: https://en.wikipedia.org/wiki/Virtual_LAN

In layman's terms, VLANs allow you to add a tag to network packets that indicate what network subnet they belong to. This would be done on your router and can be used to split one physical network in to multiple virtual ones. You can also have multiple VLANs that span multiple physical network devices.

This functionality isn't usually included on ISP provided home routers/gateways, so if that's where you were looking to do this you'd need a device that supports it or something you can flash a custom firmware, such as DD-WRT, to.
Okay, I will look into that but if my current router does not support vlans will my initial idea work of the 2 pcs on 192.168.1.x 255.255.255.0 with a gw of 192.168.1.1 and the kvm being 192.168.0.x 255.255.0.0 gw 192.168.1.1 work, so the pcs will not see the kvm at all on the network this way, or could they still see it just not connect to it? Would this work out okay without any network issues?

thanks again all, I appreciate it.
 
Old 10-16-2015, 05:48 PM   #6
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Rep: Reputation: 30
Just to clarify, when you say
Quote:
pcs will not see the kvm at all on the network
Do you mean virtual machine (VM) using the KVM hypervisor?

If so, it sounds like you using bridged networking for the VMs. Bridged Networking is what will make the VM appear on the network like any other machine, NAT'ing won't.

If your only requirement is that you don't want physical devices on your network to be able to discovery/see VMs then you could use NAT networking (I think this briefly describes it: http://wiki.libvirt.org/page/Network...networks.22.29).

If you're using bridged networking because you have something on the VM you want physical devices on your network to use, you could use port forwarding.

I'm not entirely sure if your network subnetting idea would work or not to be honest.

Last edited by mickyg; 10-16-2015 at 05:57 PM.
 
Old 10-16-2015, 06:10 PM   #7
doox00
LQ Newbie
 
Registered: Jul 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mickyg View Post
Just to clarify, when you say

Do you mean virtual machine (VM) using the KVM hypervisor?

If so, it sounds like you using bridged networking for the VMs. Bridged Networking is what will make the VM appear on the network like any other machine, NAT'ing won't.

If your only requirement is that you don't want physical devices on your network to be able to discovery/see VMs then you could use NAT networking (I think this briefly describes it: http://wiki.libvirt.org/page/Network...networks.22.29).

If you're using bridged networking because you have something on the VM you want physical devices on your network to use, you could use port forwarding.

I'm not entirely sure if your network subnetting idea would work or not to be honest.
No, not running any virtual machines. By a remote ip based kvm switch.. this.. I am using one of these. (linked below) its an actual kvm switch with the ability for users to remote in over ip to take over a pc (the pcs will be directly connected to the kvm switch, usb mouse/kb, dvi cable to video card etc.. so its like you are sitting in front of the pc. I just don't want the pcs to see the kvm switch on the network.

This is the actual kvm switch I will be using.

https://raritansolutions.com/store-t...-ip-switc.aspx

Last edited by doox00; 10-16-2015 at 06:16 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu router/fw - RDP across subnets raeif Linux - Networking 1 08-04-2015 11:23 AM
Ubuntu 12.04 LTS as router, two subnets and no communucation between them Chris9760 Linux - Networking 4 03-05-2014 07:39 AM
setting up subnets for home network with adsl router linuxmandrake Linux - Security 1 05-06-2009 02:04 PM
Two identical subnets and no physical router samylightfoot Linux - Networking 1 04-28-2009 07:38 AM
I need to setup a Linux router for my 2 public subnets drcoco Linux - Networking 4 05-17-2006 09:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration