Previous - Up - Next

10.3   Preparing for the Examples

The examples in section 10.4 use the simulated machine enterprise. It is a simulated x86 machine (PC) with a Red Hat Linux 7.3 installation. Unfortunately enterprise does not have any services running that can be used to test access from the real network to the simulated machine by default. To get around this we can turn on the echo service on TCP port 7.

To be able to try more than one example without repeating the configuration steps, you can prepare a checkpoint that you can then start from when trying the examples. Simply follow these steps:

  1. Start Simics with enterprise-common.simics script in [simics]/targets/x86-440bx directory.
  2. The simulation of the enterprise machine can be very fast, so you may want to run the enable-real-time-mode command at the Simics prompt. This will limit the simulation speed to real-time speed, so that the screen saver will not kick in annoyingly fast.
  3. Start the simulation and let the enterprise machine boot. Log in as root when you get to the login prompt. No password is required.
  4. Start pico, a simple text editor, to edit the file /etc/xinetd.d/echo:

    [root@enterprise root]# pico /etc/xinetd.d/echo

    If you prefer Emacs or vi, those editors are also available.

  5. Change the line that reads

            disable         = yes


            disable         = no

    You can use the arrow keys to navigate in the file.

  6. Press Ctrl and o to save the file. Press return when asked for the file name.
  7. Press Ctrl and x to exit pico.
  8. Restart the server handling the echo port:

    [root@enterprise root]# /etc/init.d/xinetd restart

    You should see a couple of messages about the xinetd service stopping and starting again.

  9. To verify that the echo service started successfully, telnet to the echo port.

    [root@enterprise root]# telnet localhost 7

    Type a line of text and press enter, and it should be echoed on the simulated console.

    To quit the telnet session, first press Ctrl and 5, and then type q and press enter at the telnet> prompt that appears.

  10. Save a checkpoint using the write-configuration command now that the simulated machine has been configured. You can then restart from this point if you want to try several of the examples, or if you run into problems.

In the examples, the simulated machine sometimes needs to be reconfigured. Since it is running Linux, the Linux configuration commands are used. If you are using a simulated machine with a different operating system you should configure the simulated machine similarly, but the commands may of course be different.

In the examples, the simulation host has the IP address and the real host that communicates with the simulated network has the IP address You should generally replace these addresses with the address of your simulation host and another host on the your real network.

The enterprise machine uses its default IP address

The examples assume that you have a host on the real network that you can telnet to. You should check that you can telnet from the simulation host to the other real host. Just run telnet <ip> in a terminal window, where <ip> is the IP address of the other real host. If that does not work, you should not expect to be able to telnet from the simulated machine either.

If you do not have any hosts that accept telnet connections on your network, you can test the connection by entering GET / HTTP/1.0 and a blank line to port 80 of a web server on your network instead. This should return the HTML content of the start page of the server. Here ( is used, replace it with the IP address of your web server:

[root@enterprise root]# telnet 80
Connected to
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.0 302 Found
Set-Cookie: PREF=ID=a5e237e2402bdcac:CR=1:TM=1118841789:LM=1118841789:
S=HQ3jOc8_1peVGj98; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/;
Content-Type: text/html
Server: GWS/2.1
Content-Length: 214
Date: Wed, 15 Jun 2005 13:23:09 GMT
Connection: Keep-Alive

<H1>302 Moved</H1>
The document has moved
Connection closed by foreign host.
[root@enterprise root]#

Make sure that the telnet or web server you use is on the same IP subnet as the simulation host, since you may not be able to access other subnets, depending on what connection type you are using.

Previous - Up - Next