ChorusOS 4.0 Network Administration Guide

ifconfig

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 129.157.197.88 netmask 0xffffff00 broadcast 129.157.197.255
$ rsh target ifconfig lo0 127.0.0.1 up
$ rsh target ifconfig -a
ifeth0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 129.157.197.88 netmask 0xffffff00 broadcast 129.157.197.255
	ether 00:e0:29:3c:6c:7f 
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	inet 127.0.0.1 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.