Jump to content

2 different subnet and default gateway how to setup for data exchange

Samuel92

Hi, I need to do a test setup and I am noob at networking, can someone help me?

 

I have 8 devices  with 2 subnet and  2 different Default gateway:

 

Subnet 1:

Device1 : 10.1.2.20 / 255.255.255.0 / 10.1.2.1

Device2 : 10.1.2.21 / 255.255.255.0 / 10.1.2.1

Device3 : 10.1.2.22 / 255.255.255.0 / 10.1.2.1

Device4 : 10.1.2.23 / 255.255.255.0 / 10.1.2.1

 

Subnet 2:

Device5 : 10.1.3.20 / 255.255.255.0 / 10.1.3.1

Device6 : 10.1.3.21 / 255.255.255.0 / 10.1.3.1

Device7 : 10.1.3.22 / 255.255.255.0 / 10.1.3.1

Device7 : 10.1.3.23 / 255.255.255.0 / 10.1.3.1

 

This will be in a complexe network all configured by experts but for now I want to do a test bench for cheap at home. 

 

Should I buy 1 or 2 Router? ( TP-Link AX50 would be good enough?)

 

Device 1 needs to get data from device 2 although they are on 2 different subnet. 

 

If I need 2 router (because there is 2 different default gateway) DO I just interconnect the WAN?

 

All of this should be on a local network No internet


Do I need to configure port forwarding at all?

 

Link to comment
Share on other sites

Link to post
Share on other sites

18 minutes ago, Samuel92 said:

Hi, I need to do a test setup and I am noob at networking, can someone help me?

 

I have 8 devices  with 2 subnet and  2 different Default gateway

If you need to communicate between multiple subnets, why are you even putting them on different subnets to begin with?

 

That said, you can configure multiple subnets/VLANs in pro-sumer and professional network routers, along with configuring firewall rules to allow communication between them.

Main System (Byarlant): Ryzen 7 5800X | Asus B550-Creator ProArt | EK 240mm Basic AIO | 16GB G.Skill DDR4 3200MT/s CAS-14 | XFX Speedster SWFT 210 RX 6600 | Samsung 990 PRO 2TB / Samsung 960 PRO 512GB / 4× Crucial MX500 2TB (RAID-0) | Corsair RM750X | Mellanox ConnectX-3 10G NIC | Inateck USB 3.0 Card | Hyte Y60 Case | Dell U3415W Monitor | Keychron K4 Brown (white backlight)

 

Laptop (Narrative): Lenovo Flex 5 81X20005US | Ryzen 5 4500U | 16GB RAM (soldered) | Vega 6 Graphics | SKHynix P31 1TB NVMe SSD | Intel AX200 Wifi (all-around awesome machine)

 

Proxmox Server (Veda): Ryzen 7 3800XT | AsRock Rack X470D4U | Corsair H80i v2 | 64GB Micron DDR4 ECC 3200MT/s | 4x 10TB WD Whites / 4x 14TB Seagate Exos / 2× Samsung PM963a 960GB SSD | Seasonic Prime Fanless 500W | Intel X540-T2 10G NIC | LSI 9207-8i HBA | Fractal Design Node 804 Case (side panels swapped to show off drives) | VMs: TrueNAS Scale; Ubuntu Server (PiHole/PiVPN/NGINX?); Windows 10 Pro; Ubuntu Server (Apache/MySQL)


Media Center/Video Capture (Jesta Cannon): Ryzen 5 1600X | ASRock B450M Pro4 R2.0 | Noctua NH-L12S | 16GB Crucial DDR4 3200MT/s CAS-22 | EVGA GTX750Ti SC | UMIS NVMe SSD 256GB /

TEAMGROUP MS30 1TB | Corsair CX450M | Viewcast Osprey 260e Video Capture | Mellanox ConnectX-2 10G NIC | LG UH12NS30 BD-ROM | Silverstone Sugo SG-11 Case | Sony XR65A80K

 

Camera: Sony ɑ7II w/ Meike Grip | Sony SEL24240 | Samyang 35mm ƒ/2.8 | Sony SEL50F18F | Sony SEL2870 (kit lens) | PNY Elite Perfomance 512GB SDXC card

 

Network:

Spoiler
                           ┌─────────────── Office/Rack ────────────────────────────────────────────────────────────────────────────┐
Google Fiber Webpass ────── UniFi Security Gateway ─── UniFi Switch 8-60W ─┬─ UniFi Switch Flex XG ═╦═ Veda (Proxmox Virtual Switch)
(500Mbps↑/500Mbps↓)                             UniFi CloudKey Gen2 (PoE) ─┴─ Veda (IPMI)           ╠═ Veda-NAS (HW Passthrough NIC)
╔═══════════════════════════════════════════════════════════════════════════════════════════════════╩═ Narrative (Asus USB 2.5G NIC)
║ ┌────── Closet ──────┐   ┌─────────────── Bedroom ──────────────────────────────────────────────────────┐
╚═ UniFi Switch Flex XG ═╤═ UniFi Switch Flex XG ═╦═ Byarlant
   (PoE)                 │                        ╠═ Narrative (Cable Matters USB-PD 2.5G Ethernet Dongle)
                         │                        ╚═ Jesta Cannon*
                         │ ┌─────────────── Media Center ──────────────────────────────────┐
Notes:                   └─ UniFi Switch 8 ─────────┬─ UniFi Access Point nanoHD (PoE)
═══ is Multi-Gigabit                                ├─ Sony Playstation 4 
─── is Gigabit                                      ├─ Pioneer VSX-S520
* = cable passed to Bedroom from Media Center       ├─ Sony XR65A80K (Google TV)
** = cable passed from Media Center to Bedroom      └─ Work Laptop** (Startech USB-PD Dock)

Retired/Other:

Spoiler

Laptop (Rozen-Zulu): Sony VAIO VPCF13WFX | Core i7-740QM | 8GB Patriot DDR3 | GT 425M | Samsung 850EVO 250GB SSD | Blu-ray Drive | Intel 7260 Wifi (lived a good life, retired with honor)

Testbed/Old Desktop (Kshatriya): Xeon X5470 @ 4.0GHz | ZALMAN CNPS9500 | Gigabyte EP45-UD3L | 8GB Nanya DDR2 400MHz | XFX HD6870 DD | OCZ Vertex 3 Max-IOPS 120GB | Corsair CX430M | HooToo USB 3.0 PCIe Card | Osprey 230 Video Capture | NZXT H230 Case

TrueNAS Server (La Vie en Rose): Xeon E3-1241v3 | Supermicro X10SLL-F | Corsair H60 | 32GB Micron DDR3L ECC 1600MHz | 1x Kingston 16GB SSD / Crucial MX500 500GB

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, AbydosOne said:

If you need to communicate between multiple subnets, why are you even putting them on different subnets to begin with?

 

That said, you can configure multiple subnets/VLANs in pro-sumer and professional network routers, along with configuring firewall rules to allow communication between them.

 

I didn't choose the adresses and subnets, they were imposed by client in my project.

 

Any prosumer router (brand or model)  to suggest?

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Samuel92 said:

they were imposed by client in my project

What is the client trying to achieve?

 

2 minutes ago, Samuel92 said:

Any prosumer router (brand or model)  to suggest?

Ubiquiti is the only equipment I have first-hand knowledge with, and it supports it.

Main System (Byarlant): Ryzen 7 5800X | Asus B550-Creator ProArt | EK 240mm Basic AIO | 16GB G.Skill DDR4 3200MT/s CAS-14 | XFX Speedster SWFT 210 RX 6600 | Samsung 990 PRO 2TB / Samsung 960 PRO 512GB / 4× Crucial MX500 2TB (RAID-0) | Corsair RM750X | Mellanox ConnectX-3 10G NIC | Inateck USB 3.0 Card | Hyte Y60 Case | Dell U3415W Monitor | Keychron K4 Brown (white backlight)

 

Laptop (Narrative): Lenovo Flex 5 81X20005US | Ryzen 5 4500U | 16GB RAM (soldered) | Vega 6 Graphics | SKHynix P31 1TB NVMe SSD | Intel AX200 Wifi (all-around awesome machine)

 

Proxmox Server (Veda): Ryzen 7 3800XT | AsRock Rack X470D4U | Corsair H80i v2 | 64GB Micron DDR4 ECC 3200MT/s | 4x 10TB WD Whites / 4x 14TB Seagate Exos / 2× Samsung PM963a 960GB SSD | Seasonic Prime Fanless 500W | Intel X540-T2 10G NIC | LSI 9207-8i HBA | Fractal Design Node 804 Case (side panels swapped to show off drives) | VMs: TrueNAS Scale; Ubuntu Server (PiHole/PiVPN/NGINX?); Windows 10 Pro; Ubuntu Server (Apache/MySQL)


Media Center/Video Capture (Jesta Cannon): Ryzen 5 1600X | ASRock B450M Pro4 R2.0 | Noctua NH-L12S | 16GB Crucial DDR4 3200MT/s CAS-22 | EVGA GTX750Ti SC | UMIS NVMe SSD 256GB /

TEAMGROUP MS30 1TB | Corsair CX450M | Viewcast Osprey 260e Video Capture | Mellanox ConnectX-2 10G NIC | LG UH12NS30 BD-ROM | Silverstone Sugo SG-11 Case | Sony XR65A80K

 

Camera: Sony ɑ7II w/ Meike Grip | Sony SEL24240 | Samyang 35mm ƒ/2.8 | Sony SEL50F18F | Sony SEL2870 (kit lens) | PNY Elite Perfomance 512GB SDXC card

 

Network:

Spoiler
                           ┌─────────────── Office/Rack ────────────────────────────────────────────────────────────────────────────┐
Google Fiber Webpass ────── UniFi Security Gateway ─── UniFi Switch 8-60W ─┬─ UniFi Switch Flex XG ═╦═ Veda (Proxmox Virtual Switch)
(500Mbps↑/500Mbps↓)                             UniFi CloudKey Gen2 (PoE) ─┴─ Veda (IPMI)           ╠═ Veda-NAS (HW Passthrough NIC)
╔═══════════════════════════════════════════════════════════════════════════════════════════════════╩═ Narrative (Asus USB 2.5G NIC)
║ ┌────── Closet ──────┐   ┌─────────────── Bedroom ──────────────────────────────────────────────────────┐
╚═ UniFi Switch Flex XG ═╤═ UniFi Switch Flex XG ═╦═ Byarlant
   (PoE)                 │                        ╠═ Narrative (Cable Matters USB-PD 2.5G Ethernet Dongle)
                         │                        ╚═ Jesta Cannon*
                         │ ┌─────────────── Media Center ──────────────────────────────────┐
Notes:                   └─ UniFi Switch 8 ─────────┬─ UniFi Access Point nanoHD (PoE)
═══ is Multi-Gigabit                                ├─ Sony Playstation 4 
─── is Gigabit                                      ├─ Pioneer VSX-S520
* = cable passed to Bedroom from Media Center       ├─ Sony XR65A80K (Google TV)
** = cable passed from Media Center to Bedroom      └─ Work Laptop** (Startech USB-PD Dock)

Retired/Other:

Spoiler

Laptop (Rozen-Zulu): Sony VAIO VPCF13WFX | Core i7-740QM | 8GB Patriot DDR3 | GT 425M | Samsung 850EVO 250GB SSD | Blu-ray Drive | Intel 7260 Wifi (lived a good life, retired with honor)

Testbed/Old Desktop (Kshatriya): Xeon X5470 @ 4.0GHz | ZALMAN CNPS9500 | Gigabyte EP45-UD3L | 8GB Nanya DDR2 400MHz | XFX HD6870 DD | OCZ Vertex 3 Max-IOPS 120GB | Corsair CX430M | HooToo USB 3.0 PCIe Card | Osprey 230 Video Capture | NZXT H230 Case

TrueNAS Server (La Vie en Rose): Xeon E3-1241v3 | Supermicro X10SLL-F | Corsair H60 | 32GB Micron DDR3L ECC 1600MHz | 1x Kingston 16GB SSD / Crucial MX500 500GB

Link to comment
Share on other sites

Link to post
Share on other sites

32 minutes ago, Samuel92 said:

This will be in a complexe network all configured by experts but for now I want to do a test bench for cheap at home. 

i'm gonna sound like a complete asshole here, but maybe you should just let the experts do their job.

 

subnets are designed as a means of separation, you always need a device that is present on both subnets to be the "gateway" for conversation between the two sides (see where this word is coming from?) in enterprise gear this gateway is usually a firewall, for home stuff that's usually the router (your LAN and WAN are also two subnets)

 

as for what sort of device to buy to handle this.. the cheapest cisco small business router is probably your cheapest bet for a device that'll support all the stuff you need to do this. but i'm not gonna sit here and guide you trough the process, because it's not exactly a plug and play experience.

 

all this leads me to the question of "why?". why do you want to reproduce this at home, for something which i assume is a highly specific setup for some industrial application.

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, manikyath said:

i'm gonna sound like a complete asshole here, but maybe you should just let the experts do their job.

This is 100% what I intend to do. I want to do the test bench but it has nothing to do with the full network at final setup.

 

8 minutes ago, manikyath said:

all this leads me to the question of "why?". why do you want to reproduce this at home, for something which i assume is a highly specific setup for some industrial application.

It is for a FAT testing at my Small business where they need to see the devices in their final configuration working with each other ...  The PLC's 100% work  when on all the same network, but I need to test and ship with specified IPs

 

I was just chekcing if I could hack something together by pluging 1 or 2 router and maybe a port forward. But I guess I'll go and  find a local guy that will configure a ubiquity or cisco switch for me.  for this 10 minute test.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Samuel92 said:

The PLC's 100% work  when on all the same network, but I need to test and ship with specified IPs

well.. by design everything that is on subnet 1 will be unable to talk to everything on subnet 2 and vice versa.

 

except if the IT guys have configured the gateway with the necessary stuff.. which sort of beats the purpose of a test outside the final configuration.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Samuel92 said:

Should I buy 1 or 2 Router? ( TP-Link AX50 would be good enough?)

Depends on what the design will be like and why. I doubt a single TP-Link AX50 would work though since that most likely has switched ports, not routed ports (except the WAN port and the interconnect to the switching fabric).

If you are going to go with two routers then you will also need a third network, used only to connect the two routers, and then also add some way for the routers to know which networks are behind the other ones (such as static routes or a dynamic routing protocol). All of this would end up being a different topology unless you know what the final network will look like.

 

 

1 hour ago, Samuel92 said:

If I need 2 router (because there is 2 different default gateway) DO I just interconnect the WAN?

Most likely yes, but it depends on the goal and design of the network.

 

 

1 hour ago, Samuel92 said:

Do I need to configure port forwarding at all?

Depends on if you will use NAT or not.

 

 

28 minutes ago, manikyath said:

as for what sort of device to buy to handle this.. the cheapest cisco small business router is probably your cheapest bet for a device that'll support all the stuff you need to do this. but i'm not gonna sit here and guide you trough the process, because it's not exactly a plug and play experience.

 

all this leads me to the question of "why?". why do you want to reproduce this at home, for something which i assume is a highly specific setup for some industrial application.

I strongly agree with all of this.

This feels like it's one of those situations where someone who lacks the necessary knowledge to do something thinks that the only roadblock is some trivial thing. It will be roadblock after roadblock after roadblock, and every single time OP will have to ask for help. It will end up being a 10-hour project with 200 different questions asked, when someone more experienced could do it in 20 minutes.

 

OP, I advice that you forget about this unless you have a really good reason for it. At this point we don't even know the network design, and without those details you might end up with something that works completely differently than what the production network will be like.

 

 

If you want an analogy, you are basically saying:

"Hey, I am going to get a new PC in a couple of months but I want to try it out before I get it. I've heard of this thing called a CPU, do I need to order that to build a PC?".

Even if we do guide you through every single component, what to order, how to assemble it, how to install software and so on, we don't even know if you will end up with a PC comparable to the one you will "get in a couple of months" because we don't know what parts that PC will have. 

 

And just like in the PC example, even if we guide you through the entire process we don't know if the network you end up with will match the future production network. Just because we can get it working on two TP-link AX50 routers doesn't mean it will work with the other equipment, because it depends on the physical design and configuration.

But I am wondering if you even need to test this to begin with. Is it just because you want to do your part of the job before the network is in place? 

Link to comment
Share on other sites

Link to post
Share on other sites

15 minutes ago, manikyath said:

well.. by design everything that is on subnet 1 will be unable to talk to everything on subnet 2 and vice versa.

 

except if the IT guys have configured the gateway with the necessary stuff.. which sort of beats the purpose of a test outside the final configuration.

I agree, I would rather not have to do that but I guess they want to make sure that if it dosen't work once installed on site it will be configuration error not device error.

 

13 minutes ago, LAwLz said:

But I am wondering if you even need to test this to begin with. Is it just because you want to do your part of the job before the network is in place? 

I would rather not have to do that but I guess they don't trust their internal guy? They want me to prove things work in one city so I dont need to go to the other city to prove my things works and it's not the IT guy that forgot something in the firewall. 

 

I will push to fake the subnet mask and see if it works, I understand it's harder than I thought.  

 

My first idea was put 2 diffrent subnets on 2 sides of a router and the router will route between the 2 networks but it sure dosen't sound that simple Haha. 

Link to comment
Share on other sites

Link to post
Share on other sites

On 7/10/2023 at 9:55 PM, Samuel92 said:

My first idea was put 2 diffrent subnets on 2 sides of a router and the router will route between the 2 networks but it sure dosen't sound that simple Haha. 

In some way it is that simple, but the problem is if you aren't testing the device in a like for like scenario to how it will eventually be used, you could still end up with a misconfiguration, or thinking something is wrong when its your subnet routing at fault.

Router:  Intel N100 (pfSense) WiFi6: Zyxel NWA210AX (1.7Gbit peak at 160Mhz)
WiFi5: Ubiquiti NanoHD OpenWRT (~500Mbit at 80Mhz) Switches: Netgear MS510TXUP, MS510TXPP, GS110EMX
ISPs: Zen Full Fibre 900 (~930Mbit down, 115Mbit up) + Three 5G (~800Mbit down, 115Mbit up)
Upgrading Laptop/Desktop CNVIo WiFi 5 cards to PCIe WiFi6e/7

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×