|NG_IFACE(4)||Device Drivers Manual||NG_IFACE(4)|
interface netgraph node type
iface node is both a netgraph node and
a system networking interface. When an
iface node is
created, a new interface appears which is accessible via
Iface node interfaces
When a node is shutdown, the corresponding interface is removed and the
interface name becomes available for reuse by future
iface nodes; new nodes always take the first unused
interface. The node itself is assigned the same name as its interface,
unless the name already exists, in which case the node remains unnamed.
iface node has a single hook
corresponding to each supported protocol. Packets transmitted via the
interface flow out the corresponding protocol-specific hook. Similarly,
packets received on a hook appear on the interface as packets received into
the corresponding protocol stack. The currently supported protocols are IP
iface node can be configured as a
point-to-point interface or a broadcast interface. The configuration can
only be changed when the interface is down. The default mode is
Iface nodes support the Berkeley Packet
This node type supports the following hooks:
- Transmission and reception of IP packets.
- Transmission and reception of IPv6 packets.
This node type supports the generic control messages, plus the following:
- Returns the name of the associated interface as a
NUL-terminated ASCII string. Normally this is the same as the name of the node.
- Returns the global index of the associated interface as a 32 bit integer.
- Set the interface to point-to-point mode. The interface must not currently be up.
- Set the interface to broadcast mode. The interface must not currently be up.
This node shuts down upon receipt of a
NGM_SHUTDOWN control message. The associated
interface is removed and becomes available for use by future
Unlike most other node types, an
iface node does
not go away when all
hooks have been disconnected; rather, and explicit
NGM_SHUTDOWN control message is required.
ng_iface interface supports ALTQ
bandwidth management feature. However,
ng_iface is a
special case, since it is not a physical interface with limited bandwidth.
One should not turn ALTQ on
ng_iface if the latter
corresponds to some tunneled connection, e.g. PPPoE or PPTP. In this case,
ALTQ should be configured on the interface that is used to transmit the
encapsulated packets. In case when your graph ends up with some kind of
serial line, either synchronous or modem, the
ng_iface is the right place to turn ALTQ on.
ng_iface supports nesting, a configuration
when traffic of one
ng_iface interface flows through
the other. The default maximum allowed nesting level is 2. It can be changed
at runtime setting sysctl(8) variable
net.graph.iface.max_nesting to the desired level of
iface node type was implemented in
Archie Cobbs <archie@FreeBSD.org>
|July 31, 2020||Debian|