configure network interface parameters
ifconfig interface [address [dest_address]] [parameters]
- interface
- A string of the form name unit (e.g. en1)
- address
- This is either a hostname present in the
hosts database or a DARPA-Internet address
expressed in the standard Internet ``dot
notation.''
- dest_address
- The address of the correspondent on the other end of a
point-to-point link (for slx and
pppx interfaces only).
- parameters
- See below.
The ifconfig utility must be run to define the
network address of each interface present on a machine; it
may also be run later on to redefine an interface's address
or to configure other interface parameters.
When no optional parameters are supplied,
ifconfig displays the current configuration for a
network interface. Only the superuser may modify the
configuration of a network interface.
Here are the interface types supported at the time of
printing:
- enx
- Ethernet
- fddix
- FDDI
- lo0
- loopback
- pppx
- PPP
- slx
- SLIP
- trx
- Token Ring
where x is the number of logical QNX LANs running
the selected hardware protocol.
With ifconfig, you may set the following parameters:
- alias address
- Establish an additional network address for this
interface. You'll often find this useful when you're
changing network numbers and wish to accept packets
addressed to the old interface.
- -alias address
- Remove the additional network address for this
interface.
- arp
- Enable the use of the Address Resolution Protocol in
mapping between network-level addresses and link-level
addresses (default).
- -arp
- Disable the use of the Address Resolution Protocol.
- broadcast address
- Use this address to represent broadcasts to
the network. The default broadcast address is the address
with a host part of all 1's.
- delete address
- Remove this network address. You would use this if you
incorrectly specified an alias, or if the alias were no
longer needed.
- down
- Mark an interface ``down.'' When an interface
is marked down, the system won't attempt to transmit
messages through that interface. If possible, the interface
will be reset to disable reception as well. This action
doesn't automatically disable routes using the interface.
- metric n
- Set the routing metric of the interface to n>
(default is 0). The routing metric is used by the routing
protocol, routed. Higher metrics have the effect
of making a route less favorable; metrics are counted as
additional hops to the destination network or host.
- netmask mask
- Reserve this much of the address for subdividing
networks into subnetworks. The mask:
- includes the network part of the local address and the
subnet part, which is taken from the host field of the
address
- can be specified as a single hex number with a leading
0x, with a dot-notation Internet address, or with
a pseudo-network name listed in the network table,
networks
- contains 1's for the bit positions in the 32-bit address
that are to be used for the network and subnet parts, and
0's for the host part
- should contain at least the standard network portion;
the subnet field should be contiguous with the network
portion
- trailers
- Use a ``trailer'' link-level encapsulation when
sending (default). If a network interface supports trailers,
the system will encapsulate outgoing messages in a way that
minimizes the number of memory-to-memory copy operations
performed by the receiver. On networks that support the
Address Resolution Protocol (see arp protocol;
currently, only 10 Mb/s Ethernet), this flag indicates that
the system should request that other systems use trailers
when sending to this host. Similarly, trailer encapsulations
will be sent to other hosts that have made such requests.
Currently used by Internet protocols only.
- -trailers
- Disable trailer link-level encapsulation.
- up
- Mark an interface ``up.'' You can use this
command to enable an interface after an
ifconfig down. By default, an interface is
marked as ``up'' the first time ifconfig
is run to assign the interface an address.
Depending on the error, the utility may display messages
indicating that:
- the specified interface doesn't exist
- the requested address is unknown
- the user isn't privileged and tried to alter an
interface's configuration
netstat,
routed