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.
The following interactive example configures the primary Ethernet and loopback interfaces for target, then displays the result.
$ rsh target ifconfig ifeth0 22.214.171.124 netmask 0xffffff00 broadcast 126.96.36.199 $ rsh target ifconfig lo0 127.0.0.1 up $ rsh target ifconfig -a ifeth0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 188.8.131.52 netmask 0xffffff00 broadcast 184.108.40.206 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
system initialization script.
ifconfig is also available as a stand-alone actor, /bin/ifconfig.r.