2.1.6 Networking gateways

This section describes how to route packet traffic with user mode networking or the HostBridge component.

User mode networking

Emulate a built-in IP router and DHCP server, route TCP and UDP traffic between the guest and host, and communicate with other hosts through the user mode socket layer of the host.

User mode networking allows the use of IP network services without administrative privileges, or a separate driver on the host of the model.

Setting up user mode networking

Run the model with additional CADI parameters.

Note:

  • Use only TCP and UDP over IP. Fast Models does not support ICMP (ping).
  • Fast Models only supports DHCP within the private network.
  • Only make inward connections by mapping ports on the host to the model. This is common to all implementations that provide host connectivity using NAT.
  • Operations that require privileged source ports, for example NFS in its default configuration, do not work.
  • If set-up fails, or the parameter syntax is incorrect, there is no error reporting.

Procedure

  1. To set up user mode networking, run the model with CADI parameters that activate the components.
    -C motherboard.hostbridge.userNetworking=true
    -C motherboard.smsc_91c111.enabled=true
  2. To map a host port to a model port, run the model with userNetPorts.
    -C motherboard.hostbridge.userNetPorts="8022=22"

    This example maps port 8022 on the host to port 22 on the model.

HostBridge component

This Programmer’s View (PV) model is a networking gateway. It exchanges Ethernet packets with the TAP device on the host, and forwards packets to NIC models.

This TAP/TUN method is an alternative to user mode networking.

The HostBridge component has configuration options:

userNetPorts

Specifies an optional port number mapping between listening ports on the host and listening ports on the model. The syntax is a comma-separated list of items in the form [host-ip:]hostport=[model-ip:]modelport. For example, 5022=22,5080=80 causes sshd and httpd services on the model to listen on ports 5022 and 5080 on the host machine. You can use the optional host-ip or model-ip to select a specific interface for the mapping, for example 127.0.0.1. The default is to accept connections on any interface (INADDR_ANY).

userNetSubnet

Presents a range of subnet network addresses to the model, in the ip-address/significant-bits syntax, for example 192.168.0.0/24 or 10.0.0.0/8. Omitting trailing zero octets is acceptable, for example 192.168/16. The default subnet is 172.20.51.0/24, taken from the RFC1918 private-use area.

userNetworking

If true, the outgoing Ethernet packets of the model go to a proxy router that translates them into host socket calls. If false (default) the model attempts to open a TAP/TUN device.

Non-ConfidentialPDF file icon PDF versionARM DUI0835I
Copyright © 2014-2016 ARM Limited or its affiliates. All rights reserved.