DistributedNetworks DistributedNetworks

Special File Types  «Prev  Next»
Lesson 3 Device files and other special files
Objective Describe the Special Properties of Device Files.

Describe the Special Properties of Device Files

Access to hardware devices on a UNIX system is managed through special files. These files have
  1. permissions,
  2. owners, and
  3. groups,
just as regular files and directories do, and this permission data determines access to the associated device. Most device files are, by convention, located in a directory called /dev (or in subdirectories of /dev). Device files are marked in directory listings by b or c in the initial position:

crw-------  1 root system 10, 0 Oct 01 1997  __vg10
brw-rw----  1 root system 10, 1 Aug 14 1996  hd6

Here the b and c denote, respectively, block devices and character devices. This distinction is not particularly significant for the administrator. Every device file also has a major number and a minor number. The major number associates the device with a particular major device[1], and the minor number identifies the particular instance of that device. In the above example, the major and minor numbers appear as 10, 0 and 10, 1 respectively.

How IP Addresses Apply to Network Interfaces

To connect to the network, a system must have at least one physical network interface. Each network interface must have its own unique IP address. During Oracle Solaris installation, you must supply the IP address for the first interface that the installation program finds. Usually that interface has the name device-name0, for example eri0 or hme0. This interface is considered the primary network interface.
If you add a second network interface to a host, that interface also must have its own unique IP address. When you add the second network interface, the host then becomes multihomed. By contrast, when you add a second network interface to a host and enable IP forwarding, that host becomes a router.
Each network interface has a device name, a device driver, and an associated device file in the /devices directory. The network interface might have a device name such as eri or smc0, which are device names for two commonly used Ethernet interfaces.

[1]device: A device is a piece of hardware used by the system, such as hard drives, CD-ROMs, and so on. Devices are treated as a special type of file.