LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How select one Ehernet port on multiport network card ?

Hi

 

I have a network card with 4 Ethernet ports with IP1, IP2, IP3 and IP4. On each port I connect products which have a fixed and unchanged IP, this IP is the same for each product. So I have 4 different networks (IP1 <-> IP, IP2 <-> IP, IP3 <-> IP, IP4 <-> IP) and I must open a TCP communication with each product and the PC. I have used the VI TCP Open Connection but I can put anly the client IP and I don't put the host IP (IP, IP2, IP3 or IP4), so I don't know which product is. Which is code I can use to put the IP client and the IP host to create a TCP connection ?

Sorry for my poor english, thank for you answer,

0 Kudos
Message 1 of 5
(4,188 Views)

I'm not sure it is possible to do what you propose without additional hardware or software.  Generally, IP addresses are supposed to be unique within a network (and addresses outside the 'private' IP address ranges are supposed to be globally unique).

 

One simple solution may be to install a router between the computer and each device under test.  Depending on the level of reliability you require, a home broadband router may be sufficient.  You would then configure each router to have a unique IP address on the WAN side (connected to the computer) and forward all connections to the IP address of your device under test (on the LAN side).

 

You may also be able to use a software firewall to accomplish the same thing, although I've never tried it on a Windows machine.

 

Mark Moss

Electrical Validation Engineer

GHSP

0 Kudos
Message 2 of 5
(4,174 Views)

Specifying the NIC to use for TCP communication is only necessary when listening for new connections. If you have four separate networks with different subnets then the network stack will be able to figure out which NIC to go through to get to a particular address. That you described your four networks with all the same IP address, I would consider a misconfigured network.

 

Nathan

 

 

Message Edited by NathanK on 02-04-2009 11:46 AM
0 Kudos
Message 3 of 5
(4,173 Views)

Yes I have four separate networks so I can have the four same adresses for my devices, what it is the NIC, I have used the TCP Open connection and after Modbus Read/Write and TCP Close Connection, I haven't use TCP Listen and I haven't found NIC in VI TCP/IP.

 

Thank for your answer,

 

JB

0 Kudos
Message 4 of 5
(4,161 Views)

Hi,

Unfortunately it's not possible at this moment to send TCP/IP over multiple ethernet devices. Windows have a stack ip limitation, when you send data, it's select the first device available.

 

I advise you to use a hub or switch to communicate with your device.

 

Regards,

0 Kudos
Message 5 of 5
(4,117 Views)