ChorusOS 4.0 Network Administration Guide

Interface Creation

As described in Chapter 1, Introduction, many network administration tasks are performed during system initialization when the commands in sysadm.ini(4CC) are executed by the C_INIT system actor. Interface creation is no exception. In order to create the network interfaces that the system needs to communicate through Ethernet devices, you use the mkdev(1M) utility to create one interface for each Ethernet device on your target, and one loopback device for your target as well. The command to create an Ethernet device thus takes the form:

mkdev ifeth unit [pathname]

where unit is the number that makes the interface unique and pathname is as shown in the output from the dtree(1M) utility. If you do not include pathname in the command, the ChorusOS system simply attaches the interface to the first free device it finds.

Note -

At this point, the network interface is bound to the Ethernet low-level driver, but Ethernet is not configured for use.

Example 3-1 Ethernet Interface Creation

The following example sysadm.ini fragment creates an interface for an Ethernet device and the loopback interface needed for IP communication.

# Set the file creation mask to 0 during system configuration
umask 0

# Create an Ethernet interface for the first available device
# Since no dtree *pathname* is provided, the system uses the first
# device it finds
mkdev ifeth 0

# Create a loopback interface
# Note that the loopback device is not attached to a device in
# the dtree, so no *pathname* argument is provided here, either
mkdev lo 0