Skip to content

Commit a0df08a

Browse files
NattyNarwhalpkoning2
authored andcommitted
Initial pass at documenting vmnet usage
1 parent d440d35 commit a0df08a

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

0readme_ethernet.txt

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,79 @@ Note: As mentioned above, NAT networking is specifically capable of providing
213213
packets.
214214

215215

216+
-------------------------------------------------------------------------------
217+
Another alternative to pcap and tun/tap on macOS is using the vmnet framework.
218+
The vmnet framework provides simh a way to provide emulated systems networking,
219+
without requiring any additional software. Because tun/tap support requires
220+
third-party kernel extensions (which is heavily discouraged by Apple), this
221+
provides an equivalent that doesn't require reducing OS security.
222+
223+
vmnet provides Layer 2 networking, so things like DECnet and MOP will work
224+
properly, even across multiple systems. It can be used to either bridge to a
225+
physical network, or provide a virtual network for systems, including NAT.
226+
227+
simh must be running as root. (Running without root is possible if simh is a
228+
notarized application. You're very unlikely to be building simh like this, so
229+
de facto it needs root.) vmnet.framework requires macOS 10.10; macOS 10.15 is
230+
required for bridged networking.
231+
232+
When attaching an ethernet device, you have three options available:
233+
234+
- "vmnet:host": This provides "host-only" networking. It allows the system to
235+
talk to the host Mac, as well as other emulated systems on the host-only VM
236+
network.
237+
- "vmnet:shared": This extends the host-only network to add NAT, using the
238+
host as a gateway.
239+
- "vmnet:<device>": This bridges vmnet to a physical network. You must
240+
specify a valid network device to use.
241+
242+
You can use SHOW ETHERNET in SCP to see what devices are allowed to be
243+
bridged; these are likely your Ethernet and Wi-Fi devices.
244+
245+
sim> show eth
246+
ETH devices:
247+
eth0 vmnet:en0
248+
eth1 vmnet:en7
249+
eth2 udp:sourceport:remotehost:remoteport
250+
sim> attach xq vmnet:en0
251+
252+
You can verify with i.e. "ifconfig" to see if this is the correct interface
253+
to bridge to.
254+
255+
When using the host and shared modes, the host system create an IPv4 and v6
256+
subnet for the emulated systems. macOS will provide DHCP and other discovery
257+
protocols on the virtual network as well. To see what IP and subnet the host
258+
has claimed, you can use "ifconfig" to display it; macOS will bind its IP to
259+
the bridgeN device, with the simh instance having its own vmenetN device joined
260+
to that bridgeN device:
261+
262+
vmenet0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
263+
options=60<TSO4,TSO6>
264+
ether a6:94:63:7e:f3:04
265+
media: autoselect
266+
status: active
267+
bridge100: flags=8a63<UP,BROADCAST,SMART,RUNNING,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
268+
options=3<RXCSUM,TXCSUM>
269+
ether b2:f1:d8:65:66:64
270+
inet 192.168.67.1 netmask 0xffffff00 broadcast 192.168.67.255
271+
inet6 fe80::b0f1:d8ff:fe65:6664%bridge100 prefixlen 64 scopeid 0x23
272+
inet6 fd91:d62b:63cd:ec3d:4ad:c40c:d0b8:5826 prefixlen 64 autoconf secured
273+
Configuration:
274+
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
275+
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
276+
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
277+
ipfilter disabled flags 0x0
278+
member: vmenet0 flags=3<LEARNING,DISCOVER>
279+
ifmaxaddr 0 port 34 priority 0 path cost 0
280+
nd6 options=201<PERFORMNUD,DAD>
281+
media: autoselect
282+
status: active
283+
284+
Currently, settings like the subnet ranges nor port forwarding are controllable
285+
via simh. For finer grained control over how systems are addressed, you can use
286+
a bridged network instead of a host-only or shared network. These settings are
287+
provided by macOS, so a future version of simh may be able to adopt these.
288+
216289
-------------------------------------------------------------------------------
217290

218291
Windows notes:

0 commit comments

Comments
 (0)