Multiple Routers used at Once

HI guys,

I`m trying to use Node Red to submit the same data from a sensor to two different routers at the same time, is there a specific node that allows me to do this?

Thank you all in advance

Please explain what you mean by submitting data to a router.

So two people can access the data using different Ip addresses to different routers. Imagine having two routers connected to your laptop where only one company can use each router to take any data from them from your laptop over the internet

Please explain a bit more about the network organisation. Do you mean, for example, that the laptop has two ethernet or wifi interfaces with a router on each interface? Then the two routers are separately connected to the internet with different external ip addresses?
If so then what is the purpose of doing this? Do you want to run separate node-red instances on each interface or what?

Hey Colin,

Then the two routers are separately connected to the internet with different external ip addresses? - this is correct. So I want two companies to access the data, one via a VPN router and the other by a standard router, the data needs to be shared simulataneously over both but each company must only access the data via their router. I would like the one node red flow to read the data but to submit it both to two different routers at the same time. Imagine connecting your laptop to two routers to submit data but on the other end , the companies can only access their specific router

Routers are passive pieces of network equipment.

What do you mean by "submit data to the router"?

Where is the data actually stored?

If you mean that you want node red to be accessible via two different ports on the same laptop then you won't need to do anything special. It will just work. What you describe is no different to a laptop that can be connected to a single router via wifi or via ethernet cable. If you connect both wire and wifi then node red can be accessed via either port.


Okay so heres a more clear view -

Basically I have a sensor taking in data thats processed in Node Red. I want to make node red be connected to TWO routers at the same time. This is because two companies want to access the data submitted to the itnernet but can only do so via the IP addresses of their separate corresponding routers. One of the routers is a VPN driven one that having two people use at once kicks the data usage into the sky and becoming very high priced. So I need a way to have my laptop or Pi connected to two network routers at the same time and submitting data the same to each.

Any ideas?

Node-red typically doesnt connect to routers - or anything for that matter. What you program in the flow can connect to other devices (often via a router - but typically not to a router!). What are you trying to do exactly?

Laptops and PI can have 2 seperate Ethernet connections (at the same time) this is not an issue. Just add as many Ethernet ports as you need (note on a PI you'll likely need a USB-->Ethernet device to add a 2nd port unless you use WiFi for one and Ethernet port for the 2nd)

How does it send data? To 2 end points/Rest APIs? to two different MQTT brokers? These (and more) are both possible (just specify the destination address in your flow)

Why is what you are describing not answered by that reply?
As others have said, node-red does not connect to a router, clients connect to node red through a router. What you have described will just work, provided that what you are asking for is access to the node-red dashboard or similar.

Ah okay so basically I need to make my device that is running node red able to work via two routers with two differen Sim cards simultaneously. How is this possible and how could I make the things I`m connecting to the routers specific to which router is sending the data?

As I keep saying, you don't need to do anything in the laptop or in node-red to allow it to be connected to by two routers.

That question does not make sense. By 'the things I'm connecting to the routers' do you mean the customers computers? Also routers don't send data, they just pass it through. The customers computers ask node-red to provide data and those communications go through the routers.

Yes so I`m confused as to how I can connect to two routers on my laptop at the same time and submit data to both these router at the exact same time. So is it as simple as connecting my laptop to two ethernet cables to each router, but then how can I make it so that my laptop is submitting data to both , as currently my wifi only works via one connection not two?

If node red is asked for data on two interfaces then it will reply on those two interfaces. You keep saying you want node red to submit data, but haven't replied to numerous requests to explain exactly what you mean by 'submit data'.

1 Like

Hi Colin,

Calm please I`m trying to help explain and appreciate your support and that it can be frustrating trying to explain.

So basically I`m submitting data, a file full of data modbus registers put in the form of a buffer to an MQTT server, doing this is fine where I collect the readings from the sensor, find the correct registers and format them submit such to mqtt all through my router connect to my pi.

What I am now needing to do , is to set up another router to the Pi which is connected to my Pi and Node red so that both routers are working at the same time and each providing their own wifi connection. Yet the problem I am facing is that I can`t get two routers connected at the same time, only one. Its like having two wifi connections on a laptop, it doesnt need two so it only connects too one. In this instance I need two to be connected at the same time, or if theres a way , have it so its connected to one router, submits my data via mqtt then disconnects and connects to the other , submits, disconnects and repeats.

The real plus of this, is that the pi needs to be remotely accessed, where doing so through the company router wifi costs a lot of money, hence the need for another router to be connected which I would use separately.

Does that make sense? Can I clarify anything else sorry?


I guess in simple terms, imagine connecting to your home wifi , and your neighbors wifi at the same time, via ethernet and whatever you search for or upload to the internet, goes through each router.

OK, that is much clearer.
Firstly normally laptops only have one wifi interface so you can only connect to one at a time. However they usually have at least one ethernet port so you could potentially connect to one with wifi and the other with an ethernet cable.
Are there two mqtt brokers? Where is/are it/they?

1 Like

Okay yeah that makes sense. So in this context I will be using the raspberry pi instead of my laptop which has multiple ethernet ports so I can connect the Pi up to two routers - also can connect one to wifi and ethernet if need be . The problem I think is getting it so that they are both working in one instance as I can`t find a way for both them to be connected.

Theres two brokers, just AWS servers , one for the company and one for me. The problem is more me being able to remotely access the pi using a virtual window software, which I would need to do so via my router and IP to that router rather than the other company one.

My first impression in reading all this is that - You don't need to have separate IP addresses to connect a pi to two different routers. Both routers can point to one IP address on the PI. If one is a VPN and one is a router point both to the same IP on the PI. What I don't see here is why or how you would have two different pieces of equipment pointing to the same internal IP of a Pi. If it is a VPN then it is probably connected to a router or part of a router anyway. Most VPN's are a subset or sub function of a router. What may help here is some type of drawing that shows where the two routers are in relation to the Pi. You say you want to connect to the Pi remotely via your router and there is a company router. What interface does the Pi physically and electronically sit behind? If you are trying to get out of your private network to hit the company router your Pi is not sitting behind two routers, only one.