11-07-2023 04:27 AM
Hello Together
Need support on a topic - TO Implement ssh over XNET api.
Currently toolkit's are available which uses IP stack over dotnet framework. In my case, IP stack is created over XNET and need to communicate over ssh. Basically the Layers 1 to 4 are implemented over XNet, need support on creating Layers 5 to 7.
Any ideas or best approach for this?
Regards
11-07-2023 07:50 AM
This question is best to be posted at the Automotive and Embedded Networks board
To answer your question, you can use IP Stack Proxy. See shipping example at Help >> Find Examples >> Hardware Input and Output >> Automotive Ethernet >> IP Stack >> NI-XNET IP Stack TCP Proxy.lvproj
11-07-2023 07:59 AM
For this I need parallel windows adaptors? Could you elaborate a little?
11-07-2023 08:23 AM
Have you explored the example?
The example has provided an adequate explanation of the working principle.
11-09-2023 03:24 AM
Yes I have explored it. Its mentioned that for the outbund connection, localhost is the proxy. Incase I need to connect from multiple ssh , coming via multiple VLAN. is it possible to connect? because the TCP port for ssh is the same. Please correct me if I am wrong
11-09-2023 07:25 AM
@NI_Follower wrote:
Yes I have explored it. Its mentioned that for the outbund connection, localhost is the proxy. Incase I need to connect from multiple ssh , coming via multiple VLAN. is it possible to connect? because the TCP port for ssh is the same. Please correct me if I am wrong
I am not sure, but could you run multiple SSH instances on different ports such that the proxy from different VLAN can connect to different SSH port?
I would recommend you reach out to NI Technical Support for confirmation.
11-09-2023 09:19 AM
One more question regarding Proxy. If I assign a proxy in the IP stack configuration, which interface will be used to communicate with the external client or server? If I need to trace the communication, which interface I can monitor the packets?
For egs. I have one NI 8523 card - I can see 4 adapters in windows network configuration. Once I start the IP stack from XNET, corresponding adapter will show it as disconnected.
In the case I use Proxy, then which adapter i can use to trace in Wireshark?
May In know what exactly wil happen in backend after activating proxy?
Thanks
11-09-2023 09:59 AM
I would recommend reading and understanding Using Ethernet
In short, the TCP/IP can go through either XNET IP Stack (via XNET Endpoint) or OS Stack (via Intel i210 adapter). The XNET IP Stack and OS Stack Can Not Be Used Simultaneously on the Same Ethernet Port - NI
When using OS stack, you have plenty of libraries available for OS stack. Whatever libraries that run on regular ethernet adapter will work on OS stack. However, because of the network configuration limitation of operating systems, you cannot have same MAC address or VLAN. On the other hand, XNET Endpoint implements its own OSI layers and bypasses the OS restriction but the caveat is that all libraries designed for OS stack won't work and you have to create your own application layer using XNET API.
This is where the proxy feature comes. It allows the transportation service to be carried out by XNET Endpoint and the application layer libraries running on the OS stack to be forwarded to the XNET endpoint.
NI-XNET provides a plugin which allows Wireshark capturing on the XNET endpoint. See Monitoring NI-XNET Automotive Ethernet Traffic Using Wireshark
11-10-2023 02:40 AM
Thank you very much for your detailed explanation. I have understood most of the things.
One more question in the usage of multiplestaks over the same physical interface. In that case proxy can be assigned I f I use diferent IP ranges and the windows adapter is configured for one IP range, or incase we add all additional IP in the advanced TCP configuration in windows adaptor will it work?
How can I assign the IP that has to be monitored from each of this IP stacks? I saw in the example its mentioned - localhost will be the default incase of outbound configuration
11-10-2023 03:42 AM - edited 11-10-2023 03:47 AM
.