ifconfig(1M) allows you 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 129.157.197.88 netmask 0xffffff00 broadcast 129.157.197.253 $ 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.253 ether 00:e0:29:3c:6c:7f lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet 127.0.0.1 netmask 0xff000000 |
The example above uses ifconfig command that is built into the C_INIT(1M) system actor. You can also embed the ifconfig command in the sysadm.ini(4CC) system initialization script. ifconfig is also a standalone program.