Connection from 2 ethernet card

I have 2 ethernet card
1: eno1 IP1: 192.168.0.30 IP2: 10.0.1.30/local network
2: eno2 IP1: 192.168.1.2 and IP2: 192.168.0.252 gateway 192.168.1.1 (internet)

I read devices from eno1.
How to read devices from eno2 192.168.0.3
I try eno1 without gateway
routing table

That appears to be a linux networking question rather than node-red. If you have the networking setup correctly then node-red does not need to know about the ethernet cards, if it asks for data on an IP address then it will automatically be routed through the correct card.

I don't understand what you mean when you say the eno1 has IP1 and IP2. Normally a card would have just one IP address.

[Edit] Also you appear to have routes to the 192.168 ranges through both cards so it won't know which one to use.

As Colin says, you have a network routing issue not a node-red issue.

To make use of multiple subnets, you either have to use a netmask that incorporates all subnets. Or you have to use the default gateway (usually a router) to route between them.

Is not having two network cards, one on each subnet, another valid solution for two subnets, provided the routing is setup correctly? Each subnet should be on a separate card. In the case here, however, @ketpa currently has four subnets, so the two 10.0 subnets should presumably be on one card and the other two on the other card. Then, as you say, either the netmask on each card should include bpth subnets (so they are effectively one) or there must be a router to route between them.

Well yes indeed - I should have included that.

That is correct and the cards would both need to use a subnet mask of 255.255.0.0.

I'd say that even that is sub-optimal for most use though and connecting two large subnets without a router/firewall is generally a bad idea anyway. Anyone gaining access to this device will have direct access to a very large network. Potentially with many devices on it at differing levels of security.

I want connection only from node-red to eno1 and eno2 , not between ethernet cards.
Something like that I ping : ping -I eno2 192.168.0.250

You don't connect to an ethernet card, all you do in node-red is to give the destination IP address to the OS, the OS will work out which card to use based on the IP address. It is the network routing that you need to get right, which is nothing to do with node-red.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.