Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (97 KB)
Running the ChorusOS 4.0.1 SimulatorThis chapter describes how to configure and run the ChorusOS 4.0.1 simulator. It begins by describing what IP addresses must be chosen to access the simulator from your host, then presents a series of steps to get you quickly up and running, before going into further detail about each step. If you have not created a simulator system image, please refer to the "Building the ChorusOS Simulator" section in the ChorusOS 4.0.1 Simulator for the Solaris Operating Environment (SPARC Platform Edition) Target Family Guide for details. Planning Your ConfigurationThe following IP addresses must be selected to allow hosts to access one or more ChorusOS simulators:
An example configuration of a Solaris host with a IP address of 1.11.7.1 follows. Each simulator, in addition to the Solaris Ethernet pseudo-driver, is on a class A network, with a netmask of 0xff000000.
These settings will be used in the next section. Note - If you run your simulator on the same machine as your host and do not communicate with other machines on your network then the same ChorusOS sub-network IP address can be used again by other hosts and simulators. It does not need to be declared to the rest of the network, a non-trivial task involving your system administrator. See "Accessing the Simulator from Remote Hosts" for more information. Getting Started QuicklyFollow the procedure below to get quickly up and running with one or more simulators on a single host. References to later sections provide links to further information about each step.
Enabling Dynamic ConfigurationThe ChorusOS 4.0.1 Simulator for the Solaris Operating Environment (SPARC Platform Edition) architecture makes it possible to run multiple instances of the same system image. This requires a dynamic configuration at load time, which makes use of the UDP port for remote IPC communication and IP addresses for Ethernet communication. To enable dynamic configuration, a site configuration file is required to identify each simulator. By default, this file must be named site_number.conf and placed in the /usr/local/chorus/simu_admin directory. You can override the default pathname by setting the CHORUS_SITE_NUMBER_FILE environment variable before launching the ChorusOS Simulator. Each simulator must be assigned an instance number at boot time, which acts as an index to entries in the site configuration file, each of which defines:
Here is the format of each entry: instance_number hostname UDP_port IP_address Where:
Here is an example site configuration file: # # Site configuration file # 1 server1 2052 2.1.1.2 2 server2 2053 2.1.1.3 A valid IP address is mandatory. This address is used to access the simulator from the supporting Solaris host and remote Solaris hosts. Configuring the Solaris Ethernet Pseudo-driverCreate the file simudrv.conf in the /usr/local/chorus/simu_admin directory. This file must contain the IP address that will be attributed to the Ethernet pseudo-driver, and the name of the host on which your simulator is running. For example: 2.1.1.1 jericho Running the Solaris Ethernet Pseudo-driverChange to the Solaris Ethernet pseudo-driver sub-directory:
Launch the Solaris pseudo-driver with super-user privileges:
Use the ifconfig command to ensure the driver is running correctly:
The output should include: ...
simu0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
inet 2.1.1.1 netmask 0xff000000 broadcast 2.255.255.255
ether 20:20:0:0:1:0
...
This output will not be exactly as listed. It will vary depending on the configuration. Configuring the Simulator IP AddressThe simulator IP address is set with the ifconfig command which assigns an address to a network interface. Add the following line to your sysadm.ini file in the build_dir/conf directory: ifconfig ifeth0 TAG.TGT.IPA.TAG netmask netmask broadcast broadcast netmask is the netmask corresponding to the ChorusOS sub-network, and broadcast is the broadcast address corresponding to the ChorusOS sub-network. Comment out or remove the rarp command as the ifconfig command replaces it. Here is an example of the ifconfig command: ifconfig ifeth0 TAG.TGT.IPA.TAG netmask 0xff000000 broadcast 2.255.255.255 When you boot your system image with the loader command, the TAG.TGT.IPA.TAG IP tag is replaced by the IP address you registered in the site configuration file. Every reference to the IP tag in the sysadm.ini file is replaced. This allows you to build one ChorusOS system image for every simulator running on the same host instead of having a different system image for each IP address. You can also specify the IP address directly instead of using the IP tag, but this option offers less flexibility. Note - Remember to rebuild your system image after modifying sysadm.ini. Configuring the Gateway for the SimulatorA gateway is a device that enables data to flow between different networks. The gateway is configured using the following command on your simulator:
simu_address is the IP address of your simulator instance. host_address is the IP address of your Solaris host in the ChorusOS simulator sub-network, which is also the IP address of the Ethernet pseudo-driver. Here is an example:
The route command can also be included in your sysadm.ini file, as well as executed on the local console. Note - Simulators can only access their supporting host through the IP address of the Ethernet pseudo-driver. They cannot access their supporting host through its standard IP address. The mount command must be run as follows:
Here is an example:
See the ChorusOS 4.0 File System Administration Guide for more information about mounting file systems through NFS. Configuring IP Forwarding for Your HostA host supporting one or more ChorusOS simulators must be configured to allow IP packets to be forwarded to simulators on the ChorusOS pseudo-network. The forwarding option allows your host to forward any IP packet coming from its Ethernet controller to the Ethernet pseudo-driver. This is required if you want remote machines to access ChorusOS simulators, as well as allowing ChorusOS simulators to access remote machines. To activate the forwarding option at boot time, create an empty file called /etc/gateway. After you reboot, forwarding will be activated automatically. If you do not wish to either activate the forwarding option at boot time, or reboot your host, enter the following command with super-user privileges:
Booting the Simulator System ImageWhen the configuration file has been created, boot the simulator with the loader command.
Note - If you have more than one simulator running under the same instance number, the following error occurs: /sigio/pseudoEther: error -- /dev/simu1 ioctl(ETHER_SET) failed (22) The solution is to stop every instance of the simulator and run it again. Accessing the Simulator From Your Host
Accessing the Simulator from Remote HostsIf forwarding is configured, any ChorusOS simulator located on your host can be reached remotely from any another machine supporting an IP stack. As ChorusOS simulators are only accessible through their supporting host, the IP routing protocol of the remote host must be configured to use the supporting host as a gateway for access. Figure 2-1 shows the IP addresses of a configuration with two hosts, A and B, each running three simulators. Figure 2-1 IP Configuration With Two Hosts
On each host, routing is configured using the following command with super-user privileges:
sub-network is the ChorusOS IP address of the sub-network, and hostname is the name or IP address of your host running the ChorusOS simulator. For example, to access simulators on Host A from any other host, type the following command on the other host with super-user privileges:
Note - Since the netmask has the value 0xff000000, the last three numbers of the IP sub-network address are ignored and the sub-network parameter can be shortened to 2. Similarly, to access simulators on Host B from any other host, type the following command on the other host with super-user privileges:
Please consult your Solaris System Administration Collection for your specific configuration. |
|||||||||||||||||||||||||||