ChorusOS 4.0 Network Administration Guide

Chapter 6 Network Administration Commands

This chapter describes the utilities you can use to perform network administration tasks on a ChorusOS system. The commands described below apply whether you are using an Ethernet, PPP or SLIP network interface.


The arp(1M) utility lets you display and manipulate the tables used to translate IP addresses to Ethernet addresses according to the Address Resolution Protocol (ARP).

Example 6-1 Displaying the ARP Table

The following example displays the IP address/Ethernet address pairs known to a ChorusOS system that has no name service daemons operating:

$ rsh target arun /bin/arp -a
started aid = 22
? ( at 8:0:20:a7:d6:f3

Note that the only system known to the ChorusOS system is the boot server, and that its hostname is not known.

You may also use the ChorusOS rarp(1M) utility that makes it possible to configure the IP address of the ChorusOS system during system initialization from a RARP server on the local network.


ifconfig(1M) allows you both to assign an IP address to a network interface, and to configure network interface parameters. It also allows you to check the interfaces you have configured.

Example 6-2 Configuring and Checking Interfaces with ifconfig

The following interactive example configures the primary Ethernet and loopback interfaces for target, then displays the result.

$ rsh target ifconfig ifeth0 netmask 0xffffff00 broadcast
$ rsh target ifconfig lo0 up
$ rsh target ifconfig -a
	inet netmask 0xffffff00 broadcast
	ether 00:e0:29:3c:6c:7f 
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	inet netmask 0xff000000 

Note that the example above uses the ifconfig command that is built into the C_INIT(1M) system actor. Thus, if you set the ADMIN_IFCONFIG feature to true for the ChorusOS system, you could easily adapt the above example to include the commands in the sysadm.ini(4CC) system initialization script.

ifconfig is also available as a stand-alone actor, /bin/ifconfig.r.


netstat(1CC) displays information about network-related data structures, such as network interfaces (use the -i option) and routing tables (use the -r) option. The utility is available both as a C_INIT(1M) built-in command, and as a standalone actor that supports a wider range of options.

Example 6-3 Displaying Network Statistics with netstat

The following example uses the built-in version of netstat to view information about network interfaces and routing tables.

$ rsh target netstat -i
Name  Mtu   Network       Address            Ipkts Ierrs    Opkts Oerrs  Coll
ifeth 1500  <Link>      00.e0.29.3c.6c.7f       17     0       10     0     0
ifeth 1500  129.157        17     0       10     0     0
lo0   16384 <Link>                               0     0        0     0     0
lo0   16384 127               0     0        0     0     0
$ rsh target netstat -r
Routing tables

Destination        Gateway            Flags     Refs     Use     Netif Expire          UH          0        0       lo0
129.157            link#1             UC          0        0    8:0:20:a7:d6:f3    UHLW        3       17    ifeth0   1178

Note that in order for the built-in version to function, you must set the ADMIN_NETSTAT feature to true and rebuild the ChorusOS system image.

netstat is also available as a stand-alone actor, /bin/netstat.r.


The nfsstat(1CC) command displays statistics about NFS activity between the server and the client. The ChorusOS implementation of this utility supports only the -w option.

Example 6-4 Displaying NFS Activity

The following example displays statistics about NFS activity every second:

$ rsh target arun /bin/nfsstat -w 1
started aid = 22
         Getattr   Lookup Readlink     Read    Write   Rename   Access  Readdir
Client:      155       51        0      153        0        0      161        2
Server:        0        0        0        0        0        0        0        0

Note that you can use the akill(1M) utility to stop nfsstat, which according to the statement, "started aid = 22" in the above output has actor ID 22:

$ rsh target akill 22


The ChorusOS implementation of ping(1M), a basic tool for checking whether a network connection is working or not, requests an ICMP ECHO_RESPONSE from the specified host and simply displays "host is alive" if the host responds within 20 seconds.

Example 6-5 Checking a Connection with ping

The following example uses the ping utility to check the connection with the system having IP address

$ rsh target ping is alive

The example below shows what happens when the host does not respond:

$ rsh target ping
no answer from

Note that ping does not support any options.


When a system using IP receives a network data packet, it uses the routing table, managed using route(1M), to determine where to send the packet. A properly configured routing table helps the system:

IP forwarding allows the system to forward packets to other systems, such as the gateway. IP forwarding is enabled using the sysctl(1M) command as shown below.

Example 6-6 Routing with IP Forwarding

The following example sysadm.ini fragment uses route to configure the routing table to deliver packets addressed to the local system (, and to forward other packets to the Ethernet:

# Enable IP forwarding (requires the sysctl.r actor)
arun /bin/sysctl -w IPCTL_FORWARDING=1
# arun /image/sys_bank/sysctl -w IPCTL_FORWARDING=1 # if built into system image

# Deliver packets addressed to the local system
route add -host lo0

# Send other packets back out to the Ethernet
route add default -interface ifeth0

Note that the first route command is unnecessary if the ChorusOS system IP address is assigned dynamically.

route is also available as a stand-alone actor, /bin/route.r.


If the ChorusOS system is bound to an NIS domain, you can use ypcat(1CC), ypmatch(1CC) and ypwhich(1CC) to obtain information from the NIS database.

Example 6-7 Reading NIS Information

The following example uses ypcat to find "demo" networks mentioned in the NIS database:

$ rsh target arun /bin/ypcat networks | grep demo
started aid = 22
demo                    129.157.171
demo2                   129.157.176

Note that ypcat, ypmatch and ypwhich require access to the NIS database in order to look up information. See "Name Services and ypbind" for suggestions about binding to the NIS server for the domain.