netd(1M) —
NAME
netd − network setup and control daemon
SYNOPSIS
/etc/netd [ configfile ]
DESCRIPTION
The netd daemon is used to set up and control a STREAMS-based network. netd reads its default configuration file if one is not specified on the command line and then constructs the network from the configuration. After the network is set up, netd waits until it is killed, keeping open the STREAMS file descriptor(s) necessary to hold the network together.
The configuration file follows a simple grammar to specify how the network is constructed. The grammar follows the basic STREAMS terminology for dealing with modules and drivers. The statements supported in the current version are:
<variable> = <string> [ lsap <number> | nsap <number> | snap <number> <number> ]
link <variable> under <variable> [ name <string> ]
[ type <number> ]
ifconfig <string> [<address>] [ netmask <address>]
[ broadcast <address>] [ up | down]
where:
<variable>
is an identifier consisting of an alphabetic character followed by zero or more alphanumeric characters and including the underscore character.
<string> is an arbitrary string of characters bounded by double quote marks.
<number>
is any decimal or hexadecimal number where hex numbers are prefixed with 0x or 0X.
<address>
is either an internet address in dotted decimal format or a hostname found in the file /etc/hosts.
While netd is intended for TCP/IP networks, it is relatively general and could be used to set up other types of networks as well.
The keywords have the following meanings:
lsap is the Link Service Access Point. An lsap is either the IEEE 802.2 specified value if the network link layer is utilizing the Logical Link Control protocol or the XEROX Ethernet type value if using the Ethernet link level protocol.
nsap is the Network Service Access Point. In the case of an IP-based network, the NSAP is the value of the IP protocol identifier.
snap is the Sub-Network Access Point format for LSAPs. The first number is the SAP value to use, and the second number is the organization specific value. For an IEEE 802.3/802.2 network, IP would be represented by snap 0xAA 0x800.
link is an operator specifying how to link two STREAMS together in order to construct the network.
name introduces a string which is used to define the network interface to the IP protocol and may be any unique string.
type introduces a numeric value to be used to inform the upper stream of the type of the lower stream. This value is module specific and is currently only used with the ARP module where 0x0001 specifies an IP stream on Ethernet hardware and 0x0101 represents ARP on Ethernet hardware.
ifconfig is an operator which follows the same conventions that the ifconfig(1M) command uses. The interface parameter must be quoted, however.
netmask introduces the network subnet mask if one is desired.
broadcast introduces the value to use as a broadcast address if the default is not desired.
up|down are keywords used to specify the state to initialize the interface to.
Sample configuration file:
#
# TCP/IP configuration for 3COM ethernet interface
#
# open control streams for transport protocols
tcp = "/dev/tcp"
udp = "/dev/udp"
# open an IP stream for each transport protocol
ip_tcp = "/dev/ip" nsap 6 # bind stream to TCP protocol id
ip_udp = "/dev/ip" nsap 17 # bind stream to UDP protocol id
# open ARP for ethernet use
arp = "/dev/arp" lsap 0x800
# open link level devices
loop = "/dev/lo" lsap 0x800
ec_arp = "/dev/ec" lsap 0x806 # stream for ARP messages
ec_ip = "/dev/ec" lsap 0x800 # stream for IP messages
# put it together
link ip_tcp under tcp
link ip_udp under udp
link loop under ip_tcp name "lo0"
link arp under ip_tcp name "ec0"
link ec_arp under arp type 0x101 # ARP protocol stream
link ec_ip under arp type 0x001 # IP protocol stream
# initial configuration of interfaces
ifconfig "ec0" queso netmask 255.255.255.0 up
ifconfig "lo0" localhost up
SEE ALSO
arp(7), inet(7), ip(7), llc(7), tcp(7). STREAMS Programmers Guide.
BUGS
Setup is reverse order of declaration, so care must be taken to get ordering correct if there are dependencies.
This is a preliminary implementation and may have a number of changes in later releases.
\*U — Version 1.0