[Howto] Enable networking on VICE/Unix
The information in this article applies to the following versions of VICE:
- all Unix versions starting from 1.15
PROBLEMEXPOSITION
Starting with VICE 1.15, there is support for two ethernet cartridges allowing network access: The "The Final Ethernet" (TFE) and the "Retroreplay-Net" (RR-Net) cartridges. If you want to enable support for these, you have to follow the instructions below.
!WARNING!
Installing support for networking with VICE requires you to install 3rd party products on your machine. The VICE team cannot be made responsible for any problems
and/or damage which arises from this! The rejection of any warranty for VICE
applies, too.
You have to install two libraries, libpcap and libnet. libpcap is a capture library,
that is, it captures every packet which is available on the network,
regardless if it was destined for your machine or not. libnet, on the other
hand, is a library which allows injection of arbitrary packets into the network.
From this, it follows that it may pose a security problem using these two libraries in a network. Using libpcap can result in disclosure of any information that is available on your network which is not secured by other means! Furthermore, libnet might allow even further attacks on your infrastructure!
Many other tools use both these libraries. Anyway, all these tools were developed with security in mind, especially since they all need root privileges on your machine. VICE is NOT designed with security aspects in mind, so there may be flaws that could allow exploitation of VICE bugs even over the network! See, for example, VICE security advisory 01/2004.
Installing libpcap and libnet, you acknowledge that you're well aware of these security problems and that the VICE team cannot be made responsible for any problems and/or damage which may arise from the use of these libraries! If you don't acknowledge this, don't install the tools and/or use VICE networking.
PREREQUISITES
You need two libraries installed, libpcap and libnet. You can get them from your OS manufacturer or distributor, or you can use the vanilla sources from http://www.tcpdump.org/ for libpcap, and http://www.packetfactory.net/libnet/ for libnet. If you use the manufacturers' version, don't forget to install the development packages, too. Most times, they are named like the main package, but with a "-dev" or "-devel" suffix. These are needed for compiling VICE.
SOLUTION
For networking support, you need root privileges on your local machine. Without this, there's currently no chance to have networking work! Please, read the WARNING above about this topic!
If you have root privileges, follow these instructions to install networking with VICE:
- First, read the above warning!
- Make sure libnet and libpcap are installed. This step depends upon your system manufacturer or distributor, so we cannot give general advice. If in doubt, use the versions from http://www.tcpdump.org/ for libpcap, and http://www.packetfactory.net/libnet/ for libnet.
- Configure and build VICE. Make sure you add --enable-ethernet to the ./configure-options.
- Now, start VICE from your root account. Go to Settings - I/O extensions - Ethernet Emulation and select "Enable ethernet"&. If you want, enable "RR-Net compatibility mode", too. If this option is net set, the ethernet emulation runs in "The Final Ethernet" mode. Now, select the menu entry "Interface" in the same menu, and enter the name of the ethernet interface the ethernet simulation should run on. On Linux systems, this will be eth0 in most cases.
- The only program using ethernet we know to date is Contiki. To use Contiki, get a version of it from the website. Make sure that it is a version which is enabled for ethernet (TFE or RR-Net)!
- Run this version of Contiki inside x64. Now, enable ethernet with TFE or RR-Net settings, depending on which type you want to use. Since these two are almost identical, only some addresses are changed, it's more of a matter of taste which one to use. Select the ethernet device you want to use with ethernet if you have more than one.
- You need an IP address in order to let Contiki run on your network. The virtual ethernet device of VICE runs as if it were connected to your host computer's device with a hub. No network address translation (NAT) or the like is performed! Get an IP from your network administrator as if you had a new machine to connect to your network. In fact, you have one, although it is only emulated.
- Now, run Contiki, enter your IP configuration using the IP from above, and everything should work.
Enjoy the new surfing experience.
FAQ
Why do I have to log in as root in order to start VICE with network support?
This is because libpcap and libnet require root privileges for anyone using these libraries due to security reasons. Unfortunately, after this, VICE runs with root privilege which might cause some security problems. See the WARNING above.
But I don't want to log in as root
You have the possibility to run VICE after you've did an su, or with the sudo command. Anyway, VICE will still run as root. If you want to use this, check your system for su or sudo and use its documentation.
I cannot select Ethernet emulation in VICE
This happens if VICE does not run as root. Make sure you have the needed privileges, and try again.
The ethernet options are not available at all!
This happens if VICE has not been compiled with ethernet emulation enabled, or the appropriate libraries are not found.
- Make sure you're using VICE 1.15 or newer
- Make sure you have run ./configure in the VICE directory with activated --enable-ethernet option.
- Check your config.log file for any errors regarding libpcap or libnet.
STATUS
This document is for information purpose only. The behaviour reported is intentional in the VICE versions listed at the beginning of this article.
LINKS
- 13-005 [Howto] Enable networking with WinVICE.
- The Final Ethernet Homepage: http://www.dunkels.com/adam/tfe/.
- Contiki Homepage: http://dunkels.com/adam/contiki/index.html.
- libpcap:http://www.tcpdump.org/.
- libnet: http://www.packetfactory.net/libnet/.
REVISION
- August 25, 2004: Original release of this document
