Simics can act as a bridge between simulated Ethernet networks and the real Ethernet networks of the host. With this type of connection, the simulated machines will appear as directly connected to the real network, both to the simulated machines and to the hosts on the real network. For that reason, the simulated machines should be configured with IP addresses from the same subnet as the real hosts.
Since the simulated machines appear to be located on the real network, there is no need to configure routes on real hosts that communicate with it. They can find the simulated machines by sending ARP requests, just like they would find other real hosts.
When using a bridged connection, it is recommended to use a dedicated host network interface for the bridge, not the interface that the host uses for general network access. Otherwise, special configuration of the bridge interface is necessary for any kind of network access for the host. The details about this configuration will not be covered in this manual. See section 4.3 for how to set up TAP access.
To create a bridged connection to the real network, use the connect-real-network-bridge command. It takes an interface argument that specifies which host TAP interface that should be used.
This example assumes that the simulation is starting from the checkpoint prepared in section 4.1, and that a TAP bridge has been set up as described in section 4.2.2.2.
To set up an Ethernet bridging connection between the real network and the simulated network, run the connect-real-network-bridge command. This will automatically create an Ethernet link, connect it to the simulated machine and set up bridging to the real network:
simics> connect-real-network-bridge No Ethernet link found, created default_eth_switch0. Connected board.mb.sb.eth_slot to default_eth_switch0 [rn0.rn info] Connecting to existing TAP device 'sim_tap0' 'default_eth_switch0' connected to real network.
When using Ethernet bridging, the simulated machine should be configured with an unused IP address and netmask from the real network. In this case we use 10.0.0.241 and 255.255.255.0. Replace it with an unused IP address and netmask from the real network:
~# ifconfig eth0 10.0.0.241 netmask 255.255.255.0
~# ping 10.0.0.240 -c 3 PING 10.0.0.240 (10.0.0.240): 56 data bytes 64 bytes from 10.0.0.240: seq=0 ttl=64 time=10.285 ms 64 bytes from 10.0.0.240: seq=1 ttl=64 time=0.349 ms 64 bytes from 10.0.0.240: seq=2 ttl=64 time=0.323 ms --- 10.0.0.240 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 0.323/3.652/10.285 ms
Of course, it should also be possible to ping the simulated machine from the real host.
Running traceroute on the simulated machine shows that it is
connected directly to the real network; there are no routers between
it and the real host. Again, replace 10.0.0.240 with a host
on the real network:
~# traceroute 10.0.0.240 traceroute to 10.0.0.240 (10.0.0.240), 30 hops max, 38 byte packets 1 10.0.0.240 (10.0.0.240) 10.106 ms 0.371 ms 0.347 ms
If the IP address of the simulated machine itself is printed and
!H is printed after the response times, it means the
simulated machine can not reach the real host, and the configuration
is incorrect.
To use TAP access with the connect-real-network-bridge command, the operating system must be configured to act as a bridge between the virtual interface and the real interface. Follow the steps below to set it up.
sim_br0 and the
interface used is eth1, but other names and interfaces
can be used.
computer# brctl addbr sim_br0 computer# brctl addif sim_br0 sim_tap0 computer# brctl addif sim_br0 eth1 computer# brctl stp sim_br0 off
computer# ifconfig sim_tap0 promisc up computer# ifconfig sim_br0 promisc up
computer# ifconfig eth1 up
To remove the bridging when finished, do the following:
computer# ifconfig sim_tap0 down computer# ifconfig sim_br0 down
computer# brctl delbr sim_br0
brctl utility is usually not present in
default Linux installations. It is usually included in the
bridge-utils package.
Windows will now set up bridging between the OpenVPN TAP interface and the real interface. If successful both the OpenVPN TAP and real interfaces will seem to disappear as they are now contained in the new bridge interface. To undo the bridging, go to the Network Connections folder, right-click on the bridge and select Delete.
1.
Disabling STA will minimize the time to allow packages over the bridge.
Rebooting Windows is required.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BridgeMP\DisableSTA
while Windows 10 and later has the key atHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MsBridge\DisableSTA.