Network

With -net, the emulator adds a PCI NE2000 Ethernet card (Realtek RTL8029) in the third PCI slot. BeOS R4.5.2 recognizes it with its etherpci driver ("Novell NE2000 compatible adapter (PCI)" in the Network preferences). The card is linked to a TAP interface of the host, a virtual network card: the emulated BeBox has its own IP address, and the PC connects to it as to another machine, for example with FileZilla (FTP) or PuTTY (telnet).

On Windows

1. Install the TAP card (once)

Install OpenVPN's TAP-Windows driver: it comes with OpenVPN, or alone as "tap-windows" (version 9.x, NDIS 6). A new network connection appears, named for example "Ethernet 2", of type "TAP-Windows Adapter V9". Renaming it "BeBox" in the network connections makes things clearer.

Give it a fixed address: properties of the connection → Internet Protocol Version 4 → IP address 10.0.0.1, mask 255.255.255.0, no gateway.

If the TAP card already has a fixed address (another application uses it, for example 169.254.123.97), it can stay: the BeBox then takes a neighboring address on the same network (169.254.123.98, mask 255.255.0.0), to use everywhere instead of 10.0.0.2. Both sides must be on the same network, or nothing goes through.

2. Start the emulator

bebox -romdump flash.bin -hd0 beos.img -net

takes the first TAP card found; -tap BeBox chooses the TAP card whose connection has that name. The log (-log) gives the card used (net: TAP adapter "BeBox").

3. Configure BeOS (once)

In BeOS's Network preferences:

  1. Identity tab, Network Interfaces → Add… → in the Network Interface list, "Novell NE2000 compatible adapter (PCI)";
  2. Specify settings: IP address 10.0.0.2, Subnet mask 255.255.255.0, Gateway 10.0.0.1, then Add;
  3. Services tab: turn on the FTP and Telnet servers; the user name and password set there are those of FTP and telnet;
  4. Restart Networking.

ping 10.0.0.2 from a Windows command prompt must answer. The other way, ping 10.0.0.1 from BeOS often fails: the Windows firewall does not answer pings on a new ("Public") network. It does not matter, FileZilla and PuTTY connect from Windows.

4. Connect from the PC

  • FileZilla: host 10.0.0.2, FTP protocol, the user and password of the Network preferences, port 21.
  • PuTTY: host 10.0.0.2, connection type Telnet, port 23. BeOS has no SSH server.

Internet access for the BeBox (optional)

In the properties of the PC's Internet connection, Sharing tab, allow sharing the connection with the TAP card. Windows then gives the address 192.168.137.1 to the TAP card: in BeOS, take for example 192.168.137.2, mask 255.255.255.0, gateway and DNS 192.168.137.1, and in FileZilla and PuTTY the address 192.168.137.2.

On Linux

The emulator creates the TAP interface itself, which needs root rights (or CAP_NET_ADMIN):

sudo bebox -romdump flash.bin -hd0 beos.img -net        # interface "bebox"
sudo ip addr add 10.0.0.1/24 dev bebox
sudo ip link set bebox up

-tap <name> chooses another name. The BeOS configuration is the same as above.

What is emulated

The NE2000's DP8390 chip: registers of pages 0 to 2, card memory (MAC address in PROM, 16 KB packet buffer), remote DMA through the data port, receive ring, filters (address, broadcast, multicast, promiscuous mode), interrupts on the line of the third PCI slot. The MAC address is 00:e0:4c:42:65:42.

Without a TAP card available, the card is still there in BeOS, but the frames go nowhere (the log says so at start).