Intel® Simics® Simulator for Intel® FPGAs: User Guide

ID 784383
Date 7/08/2024
Public
Document Table of Contents

7.2.1.2. Outgoing Port Forwarding

The connect-real-network-port-out command sets up port forwarding from a port on a service node to a specific port on a host on the real network.

The syntax of this command is the following:

connect-real-network-port-out service-node-port ethernet-link
[service-node] "target-ip" target-port [-tcp] [-udp] [source-port]

It takes four required arguments: service-node-port,ethernet-link, target-ip and target-port, that specify the port on the service node that forwards traffic to the host PC (this is now the target), the Ethernet link the service node is connected to, the real target IP address, and the port to which the traffic must be forwarded.

The command can optionally accepts -tcp and -udp flags to specify whether the forwarding must be set up for a TCP or UDP port. If neither is provided, forwarding is set up for both the TCP and UDP port.

The service node acts as a proxy for outgoing traffic, so to initiate a connection to a port on a host on the real network, the simulated machine must connect to the corresponding mapped port on the service node. The service node is not a gateway to the real network.

Any UDP packets sent to a port on the service node are forwarded to the specified port and IP address on the real network. For the real host to be able to return UDP packets to the simulated network, a separate forwarding rule must be set up using the connect-real-network-port-in command.

Any TCP connections to the port on the service node are forwarded to the specified port and IP address on the real network. Since TCP connections are two-ways, once a connection has been established, data can be sent in both directions.

In the following sections, some examples are presented in which the connect-real-network-port-out command is used.

Note: To set up forwarding ports, the simulation must be in stop state.