> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/hypersim/configure-ios/communication-protocol-ios/tcp-and-udp/connect-the-hardware.md).

# Connect the Hardware

## Connect devices using standard Ethernet cables

TCP and UDP communication operates over **Ethernet (TCP/IP)** and uses the simulator’s **built‑in LAN ports**. To establish communication between the simulator and external devices or applications, simply connect the systems using **standard Ethernet cables**.

## Set IP addresses and subnets

For reliable TCP and UDP communication, all participating devices must follow standard IP networking practices:

* The simulator and all remote endpoints must be located on the same IP subnet unless routing has been explicitly configured.
* Each physical device must have a unique IP address to avoid address conflicts.
* A single device may host multiple TCP or UDP streams, each differentiated by its port number.
* The simulator uses the IP address of the selected LAN interface as the local endpoint for TCP/UDP communication.

On Linux systems, IP aliasing may be used to assign multiple IP addresses to the same network interface, allowing different streams to use distinct local IP addresses.

**Example of valid subnet configuration**

* Simulator: `192.168.10.10 / 255.255.255.0`
* Remote device 1: `192.168.10.20 / 255.255.255.0`
* Remote device 2: `192.168.10.30 / 255.255.255.0`

## Set the TCP or UDP communication ports

TCP and UDP communication relies on port numbers to identify individual streams and services.

### TCP port configuration

* TCP communication uses a configured TCP port on the server side.
* The server listens on the selected port, and the client connects to that port.
* The default TCP port for streams is typically **23000**, but any valid, unused port may be selected.

When using custom TCP ports:

* Ensure that no firewall or network security rule blocks the selected port.
* The client must connect to the exact port on which the server is listening.
* Multiple TCP servers may use the same port number as long as they are hosted on different IP addresses.

### UDP port configuration

* UDP communication uses a **local port** for receiving data and a **remote port** for sending data.
* The default local and remote UDP ports are typically **23001** and **23002**, respectively, but these values may be customized.

When configuring UDP ports:

* The sender’s remote port must match the receiver’s local port.
* Multiple UDP streams may reuse the same port numbers if they are associated with different IP addresses.
* Care must be taken to avoid port conflicts on the same device.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/hypersim/configure-ios/communication-protocol-ios/tcp-and-udp/connect-the-hardware.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
