The
ifconfig
utility is used to assign an address
to a network interface and/or configure
network interface parameters.
Generally speaking,
hostname.if(5)
files are used at boot-time to define the network address
of each interface present on a machine;
ifconfig
is used at
a later time to redefine an interface's address
or other operating parameters.
To configure a bridge interface, use the
brconfig(8)
program instead.
ifconfig
displays the current configuration for a network interface
when no optional parameters are supplied.
If a protocol family is specified,
ifconfig
will report only the details specific to that protocol family.
If no parameters are provided, a summary of all interfaces is provided.
Only the superuser may modify the configuration of a network interface.
The options are as follows:
-A
Causes full interface alias information for each interface to
be displayed.
-a
Causes
ifconfig
to print information on all interfaces.
The protocol family may be specified as well.
This is the default, if no parameters are given to
ifconfig.
-C
Print the names of all network pseudo-devices that
can be created dynamically at runtime using
-ifconfigcreate.
-m
Print media information for a given interface.
When combined with the
-Aa
options,
additionally prints media information for all interfaces.
interface
The
interface
parameter is a string of the form
name unit,
for example,
en0.
If no optional parameters are supplied, this string can instead be just
name.
In this case, all interfaces of that type will be displayed.
For example,
carp
will display the current configuration of all
carp(4)
interfaces.
address_family
Specifies the address family
which affects interpretation of the remaining parameters.
Since an interface can receive transmissions in differing protocols
with different naming schemes, specifying the address family is recommended.
The address or protocol families currently
supported are
inet,
inet6,
and
atalk.
address
Internet version 4 and 6 addresses
take the form of
a host name present in the host name database,
hosts(5);
dot
notation (IPv4);
colon separated (IPv6);
or CIDR notation.
AppleTalk (LLAP) addresses are specified as
nn.na
(Network Number.Node Address).
Node addresses are divided into two classes: User Node IDs and Server Node IDs.
1\(en127($01\(en$7F) are for User Node IDs while 128\(en254($80\(en$FE)
are used for Server Node IDs.
Node 0($00) is not allowed (unknown)
while Node 255($FF) is reserved for the AppleTalk broadcast hardware
address (broadcast ID).
dest_address
Specify the address of the correspondent on the other end
of a point-to-point link.
The following
parameters
may be set with
ifconfig:
-alias
Establish an additional network address for this interface.
This is sometimes useful when changing network numbers, and
one wishes to accept packets addressed to the old interface.
-alias
A synonym for
-delete.
Use of this option is discouraged in favour of
-delete.
-arp
Enable the use of the Address Resolution Protocol (ARP)
in mapping
between network level addresses and link level addresses (default).
This is currently implemented for mapping between
DARPA Internet addresses and Ethernet addresses.
-arp
Disable the use of ARP.
-broadcastaddr
(inet only)
Specify the address to use to represent broadcasts to the
network.
The default broadcast address is the address with a host part of all 1's.
Enable driver-dependent debugging code; usually, this turns on
extra console error logging.
-debug
Disable driver-dependent debugging code.
-delete
Remove the specified network address,
including any netmask or destination address configured with this address.
-descriptionvalue
Specify a description of the interface.
This can be used to label interfaces in situations where they may
otherwise be difficult to distinguish.
--description
Clear the interface description.
-destroy
Destroy the specified network pseudo-device.
-down
Mark an interface
down.
When an interface is marked
down,
the system will not attempt to
transmit messages through that interface.
If possible, the interface will be reset to disable reception as well.
This action automatically disables routes using the interface.
-groupgroup-name
Assign the interface to a
group.
Any interface can be in multiple groups.
For instance, such a group could be used to create a hardware
independent
pf(4)
ruleset (i.e. not one based on the names of NICs) using
existing (egress, carp, etc.) or user-defined groups.
Some interfaces belong to specific groups by default:
All interfaces are members of the
all
interface group.
Cloned interfaces are members of their interface family group.
For example, a PPP interface such as
ppp0
is a member of the
ppp
interface family group.
The interface(s) the default route(s) point to are members of the
egress
interface group.
IEEE 802.11 wireless interfaces are members of the
wlan
interface group.
Any interfaces used for network booting are members of the
netboot
interface group.
--groupgroup-name
Remove the interface from the given
group.
-instanceminst
Set the media instance to
minst.
This is useful for devices which have multiple physical layer interfaces
(PHYs).
Setting the instance on such devices may not be strictly required
by the network interface driver as the driver may take care of this
automatically; see the driver's manual page for more information.
-ipdstaddr
This is used to specify an Internet host which is willing to receive
IP packets encapsulating AppleTalk packets bound for a remote network.
An apparent point-to-point link is constructed, and
the address specified will be taken as the address and network
of the destination.
IP encapsulation of Connectionless Network Protocol
(``CLNP'')
packets is done differently.
-link[0-2]
Enable special processing of the link level of the interface.
These three options are interface specific in actual effect; however,
they are in general used to select special modes of operation.
An example
of this is to enable SLIP compression, or to select the connector type
for some Ethernet cards.
Refer to the man page for the specific driver for more information.
-link[0-2]
Disable special processing at the link level with the specified interface.
-lladdretheraddr
Change the link layer address (MAC address) of the interface.
This should be specified as six colon-separated hex values.
-mediatype
Set the media type of the interface to
type.
Some interfaces support the mutually exclusive use of one of several
different physical media connectors.
For example, a 10Mb/s Ethernet interface might support the use of either
AUI or twisted pair connectors.
Setting the media type to
10base5
or
AUI
would change the currently active connector to the AUI port.
Setting it to
10baseT
or
UTP
would activate twisted pair.
Refer to the interface's driver-specific man page for a complete
list of the available types,
or use the following command
for a listing of choices:
$ ifconfig -m interface
-mediaoptopts
Set the specified media options on the interface.
opts
is a comma delimited list of options to apply to the interface.
Refer to the interface's driver-specific man page for a complete
list of available options,
or use the following command
for a listing of choices:
$ ifconfig -m interface
-mediaopt opts
Disable the specified media options on the interface.
-metricnhops
Set the routing metric of the interface to
nhops,
default 0.
The routing metric can be used by routing protocols.
Higher metrics have the effect of making a route less favorable.
-modemode
If the driver for the interface supports the media selection system,
set the specified operating mode on the interface to the given
mode.
For IEEE 802.11 wireless interfaces that support multiple operating modes,
this directive is used to select between 802.11a
(11a),
802.11b
(11b),
and 802.11g
(11g)
operating modes.
-mtuvalue
Set the MTU for this device to the given
value.
Cloned routes will inherit this value as a default.
Currently, not all devices support setting the MTU.
-netmaskmask
(inet and inet6)
Specify how much of the address to reserve 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.
The mask can be specified as a single hexadecimal number
with a leading 0x, with a dot-notation Internet address,
or with a pseudo-network name listed in the network table
networks(5).
The mask contains 1's for the bit positions in the 32-bit address
which are to be used for the network and subnet parts,
and 0's for the host part.
The mask should contain at least the standard network portion,
and the subnet field should be contiguous with the network
portion.
-phasen
The argument
n
specifies the version (phase) of the
AppleTalk network attached to the interface.
Values of 1 or 2 are permitted.
-prefixlenn
(inet and inet6 only)
Effect is similar to
-netmask,
but you can specify prefix length by digits.
-rangenetrange
Under AppleTalk, set the interface to respond to a
netrange
of the form
startnet-endnet.
AppleTalk uses this scheme instead of
netmasks though
OpenBSD
implements it internally as a set of netmasks.
-rtlabelroute-label
(inet)
Attach
route-label
to new network routes of the specified interface.
Route labels can be used to implement policy routing;
see
route(4),
route(8),
and
pf.conf(5).
--rtlabel
Clear the route label.
-timeslottimeslot_range
Set the timeslot range map, which is used to control which channels
an interface device uses.
-up
Mark an interface
up.
This may be used to enable an interface after an
-ifconfigdown.
It happens automatically when setting the first address on an interface.
If the interface was reset when previously marked down,
the hardware will be re-initialized.
ifconfig
supports a multitude of sub-types,
described in the following sections:
ifconfig
.Bk -words
carp-interface
[-advbasen]
[-advskewn]
[-balancingmode]
[-carpnodesvhid:advskew,vhid:advskew,...]
[-carpdeviface]
[Oo -Oc -carppeerpeer_address]
[-passpassphrase]
[-statestate]
[-vhidhost-id]
.Ek
The options are as follows:
-advbasen
If the driver is a
carp(4)
pseudo-device, set the base advertisement interval to
n
seconds.
This is an 8-bit number; the default value is 1 second.
-advskewn
If the driver is a
carp(4)
pseudo-device, skew the advertisement interval by
n.
This is an 8-bit number; the default value is 0.
-balancingmode
If the driver is a
carp(4)
pseudo-device, set the load balancing mode to
mode.
Valid modes are
arp,
ip,
ip-stealth,
and
ip-unicast.
-carpnodesvhid:advskew,vhid:advskew,...
If the driver is a
carp(4)
pseudo-device, create a load balancing group consisting of up to 32 nodes.
Each node is specified as a
vhid:advskew
tuple in a comma separated list.
-carpdeviface
If the driver is a
carp(4)
pseudo-device, attach it to
iface.
If not specified, the kernel will attempt to select an interface with
a subnet matching that of the carp interface.
-carppeerpeer_address
If the driver is a
carp(4)
pseudo-device, send the carp advertisements to a specified
point-to-point peer or multicast group instead of sending the messages
to the default carp multicast group.
The
peer_address
is the IP address of the other host taking part in the carp cluster.
With this option,
carp(4)
traffic can be protected using
ipsec(4)
and it may be desired in networks that do not allow or have problems
with IPv4 multicast traffic.
-carppeer
If the driver is a
carp(4)
pseudo-device, send the advertisements to the default carp multicast
group.
-passpassphrase
If the driver is a
carp(4)
pseudo-device, set the authentication key to
passphrase.
There is no passphrase by default.
-statestate
Explicitly force the
carp(4)
pseudo-device to enter this state.
Valid states are
init,
backup,
and
master.
-vhidn
If the driver is a
carp(4)
pseudo-device, set the virtual host ID to
n.
Acceptable values are 1 to 255.
Taken together, the
-advbase
and
-advskew
indicate how frequently, in seconds, the host will advertise the fact that it
considers itself master of the virtual host.
The formula is
-advbase
+
.Pf ( Cm advskew
/ 256).
If the master does not advertise within three times this interval, this host
will begin advertising as master.
Show the results of an access point scan.
In Host AP mode, this will dump the list of known nodes without scanning.
-bssidbssid
Set the desired BSSID for IEEE 802.11-based wireless network interfaces.
-bssid
Unset the desired BSSID for IEEE 802.11-based wireless network interfaces.
The interface will automatically select a BSSID in this mode, which is
the default.
-chann
Set the channel (radio frequency) to be used for IEEE 802.11-based
wireless network interfaces from the given channel ID
n.
-chan
Unset the desired channel to be used for IEEE 802.11-based wireless
network interfaces.
It doesn't affect the channel to be created for IBSS or Host AP mode.
-nwflagflag
Set a specified flag for the wireless network interface.
The flag name can be either
"hidenwid"
or
"nobridge".
The
"hidenwid"
flag will hide the network ID (ESSID) in beacon frames when operating
in Host AP mode.
It will also prevent responses to probe requests with an unspecified
network ID.
The
"nobridge"
flag will disable the direct bridging of frames between associated
nodes when operating in Host AP mode.
Setting this flag will block and filter direct inter-station
communications.
Note that the
"hidenwid"
and
"nobridge"
options do not provide any security.
The hidden network ID will be sent in clear text by associating
stations and can be easily discovered with tools like
tcpdump(8)
and
hostapd(8).
-nwflag flag
Remove a specified flag for the wireless network interface.
-nwidid
Configure network ID for IEEE 802.11-based wireless network interfaces.
The
id
can either be any text string up to 32 characters in length,
or a series of hexadecimal digits up to 64 digits.
The empty string allows the interface to connect to any available
access points.
Note that network ID is synonymous with Extended Service Set ID (ESSID).
-nwid
Set the network ID to the empty string to allow the interface to connect
to any available access point.
-nwkeykey
Enable WEP encryption for IEEE 802.11-based wireless network interfaces
using the specified
key.
The
key
can either be a string, a series of hexadecimal digits (preceded by
֪x ),
or a set of keys
of the form
n:k1,k2,k3,k4
where
n
specifies which of the keys will be used for transmitted packets,
and the four keys,
k1
through
k4,
are configured as WEP keys.
If a set of keys is specified, a comma
(\&,)
within the key must be escaped with a backslash.
Note that if multiple keys are used, their order must be the same within
the network.
The length of each key must be either 40 bits, i.e. a 5-character string or
10 hexadecimal digits or 104 bits (13-character).
-nwkey
Disable WEP encryption for IEEE 802.11-based wireless network interfaces.
-nwkey-persist
Enable WEP encryption for IEEE 802.11-based wireless network interfaces
with the persistent key stored in the network card.
-nwkey-persist:
Write
key
to the persistent memory of the network card, and
enable WEP encryption for IEEE 802.11-based wireless network interfaces
using that
key.
-powersave
Enable 802.11 power saving mode.
-powersave
Disable 802.11 power saving mode.
-powersavesleepduration
Set the receiver sleep duration (in milliseconds) for 802.11 power saving mode.
-txpowerdBm
Set the transmit power for IEEE 802.11-based wireless network interfaces.
The driver will disable any auto level and transmit power controls in this
mode.
-txpower
Disable manual transmit power mode and enable any auto level and transmit
power controls.
-wmm
Enable Wi-Fi Multimedia (WMM).
WMM is a Wi-Fi Alliance protocol based on the IEEE 802.11e standard and
provides basic Quality of Service (QoS) features to Wi-Fi networks.
For a station, this option enables the use of QoS if the access point
supports it but it does not prevent the association to an access point
not supporting QoS.
In Host AP mode, this option allows QoS stations to negotiate QoS during
association.
Notice that not all drivers support QoS.
Check the driver's manual page to know if this option is supported.
QoS priorities can be defined using VLANs (see the
-vlanprio
option).
Otherwise, the IEEE 802.11 layer will automatically assign priorities to
frames based on the Differentiated Services Codepoint field of IP packets.
-wmm
Disable Wi-Fi Multimedia.
-wpa
Enable Wi-Fi Protected Access.
WPA is a Wi-Fi Alliance protocol based on the IEEE 802.11i standard.
It was designed to enhance the security of wireless networks.
Notice that not all drivers support WPA.
Check the driver's manual page to know if this option is supported.
-wpa
Disable Wi-Fi Protected Access.
-wpaakmsakm,akm,...
Set the comma-separated list of allowed authentication and key management
protocols.
The supported values are
psk
and
802.1x.
psk
authentication (also known as personal mode) uses a 256-bit pre-shared key.
802.1x
authentication (also known as enterprise mode) is meant to be used with
an external IEEE 802.1X authentication server.
The default value is
psk,802.1x.
psk
can only be used if a pre-shared key is configured using the
-wpapsk
option.
-wpacipherscipher,cipher,...
Set the comma-separated list of allowed pairwise ciphers.
The supported values are
tkip,
ccmp,
and
usegroup.
usegroup
specifies that no pairwise ciphers are supported and that only group keys
should be used.
The default value is
tkip,ccmp.
If multiple pairwise ciphers are specified, the pairwise cipher will
be negotiated between the station and the access point at association
time.
A station will always try to use
ccmp
over
tkip
if both ciphers are allowed and supported by the access point.
If the selected cipher is not supported by the hardware, software
encryption will be used.
Check the driver's manual page to know which ciphers are supported in
hardware.
-wpagroupciphercipher
Set the group cipher to be used to encrypt broadcast and multicast traffic.
The supported values are
wep40,
wep104,
tkip,
and
ccmp.
The default value is
tkip.
The use of
wep40
or
wep104
as the group cipher is discouraged due to weaknesses in WEP.
The
-wpagroupcipher
option is available in Host AP mode only.
A station will always use the group cipher of the BSS.
-wpaprotosproto,proto,...
Set the comma-separated list of allowed WPA protocol versions.
The supported values are
wpa1
and
wpa2.
wpa1
is based on draft 3 of the IEEE 802.11i standard whereas
wpa2
is based on the ratified standard.
The default value is
wpa1,wpa2.
If
wpa1,wpa2
is specified, a station will always use the
wpa2
protocol when supported by the access point.
-wpapskpsk
Set the 256-bit pre-shared key.
The pre-shared key must be specified using a series of 64 hexadecimal digits
(preceded by
֪x ).
The pre-shared key will be used only if
psk
authentication is allowed using the
-wpaakms
option.
Pre-shared keys can be generated from passphrases using
wpa-psk(8).
-wpapsk
Delete the pre-shared key.
This will prevent
psk
authentication.
INET6
ifconfig
.Bk -words
inet6-interface
[Oo -Oc -anycast]
[-eui64]
[-pltimen]
[Oo -Oc -tentative]
[-vltimen]
.Ek
The options are as follows:
-anycast
Set the IPv6 anycast address bit.
-anycast
Clear the IPv6 anycast address bit.
-eui64
Fill the interface index
(the lowermost 64th bit of an IPv6 address)
automatically.
-pltimen
Set preferred lifetime for the address.
-tentative
Set the IPv6 tentative address bit.
-tentative
Clear the IPv6 tentative address bit.
-vltimen
Set valid lifetime for the address.
INTERFACE GROUPS
ifconfig
-ggroup-name
.Oo
.Oo Fl Oc Ns Cm carpdemote
[number]
.Oc
The options are as follows:
-g group-name
Specify the group.
-carpdemote[number]
Increase
carp(4)
demote count for given interface group by
number.
If
number
is omitted, it is increased by 1.
-carpdemote [number]
Decrease
carp(4)
demote count for given interface group by
number.
If
number
is omitted, it is decreased by 1.
MPE
ifconfigmpe-interface
[-mplslabelmpls-label]
The options are as follows:
-mplslabelmpls-label
If the interface is a
mpe(4)
pseudo-interface, set the MPLS label to
mpls-label.
This value is a 20-bit number which will be used as the MPLS header for
packets entering the MPLS domain.
PFSYNC
ifconfig
.Bk -words
pfsync-interface
[-maxupdn]
[Oo -Oc -syncdeviface]
[Oo -Oc -syncpeerpeer_address]
.Ek
The options are as follows:
-maxupdn
If the driver is a
pfsync(4)
pseudo-device, indicate the maximum number
of updates for a single state which can be collapsed into one.
This is an 8-bit number; the default value is 128.
-syncdeviface
If the driver is a
pfsync(4)
pseudo-device, use the specified interface
to send and receive pfsync state synchronisation messages.
-syncdev
If the driver is a
pfsync(4)
pseudo-device, stop sending pfsync state
synchronisation messages over the network.
-syncpeerpeer_address
If the driver is a
pfsync(4)
pseudo-device, make the pfsync link point-to-point rather than using
multicast to broadcast the state synchronisation messages.
The peer_address is the IP address of the other host taking part in
the pfsync cluster.
With this option,
pfsync(4)
traffic can be protected using
ipsec(4).
-syncpeer
If the driver is a
pfsync(4)
pseudo-device, broadcast the packets using multicast.
PPPOE
ifconfig
.Bk -words
pppoe-interface
[-authkeykey]
[-authnamename]
[-authprotoproto]
[Oo -Oc ]
[-peerkeykey]
[-peernamename]
[-peerprotoproto]
[Oo -Oc -pppoeacaccess-concentrator]
[-pppoedevparent-interface]
[Oo -Oc -pppoesvcservice]
.Ek
pppoe(4)
uses the
sppp(4)
"generic" SPPP framework.
Any options not described in the section immediately following
are described in the
section, below.
The options are as follows:
-pppoeacaccess-concentrator
Set the name of the access-concentrator for the
pppoe(4)
interface.
-pppoeac
Clear a previously set access-concentrator name.
-pppoedevparent-interface
Set the name of the interface through which
pppoe(4)
packets will be transmitted and received.
ifconfigsppp-interface
[-authkeykey]
[-authnamename]
[-authprotoproto]
[Oo -Oc ]
[-peerkeykey]
[-peernamename]
[-peerprotoproto]
The options are as follows:
-authkeykey
Set the client key or password for the PPP authentication protocol.
-authnamename
Set the client name for the PPP authentication protocol.
-authprotoproto
Set the PPP authentication protocol on the specified
interface acting as a client.
The protocol name can be either
"chap",
"pap",
or
"none".
In the latter case, authentication will be turned off.
-peerflagflag
Set a specified PPP flag for the remote authenticator.
The flag name can be either
"callin"
or
"norechallenge".
The
"callin"
flag will require the remote peer to authenticate only when he's
calling in, but not when the peer is called by the local client.
This is required for some peers that do not implement the
authentication protocols symmetrically.
The
"norechallenge"
flag is only meaningful with the CHAP protocol to not re-challenge
once the initial CHAP handshake has been successful.
This is used to work around broken peer implementations that can't
grok being re-challenged once the connection is up.
-peerflag flag
Remove a specified PPP flag for the remote authenticator.
-peerkeykey
Set the authenticator key or password for the PPP authentication protocol.
-peernamename
Set the authenticator name for the PPP authentication protocol.
-peerprotoproto
Set the PPP authentication protocol on the specified
interface acting as an authenticator.
The protocol name can be either
"chap",
"pap",
or
"none".
In the latter case, authentication will be turned off.
TRUNK
ifconfigtrunk-interface
[Oo -Oc ]
[-trunkprotoproto]
The options are as follows:
-trunkportchild-iface
If the driver is a
trunk(4)
pseudo-device, add the
child-iface
as a trunk port.
-trunkport child-iface
If the driver is a
trunk(4)
pseudo-device, remove the trunk port
child-iface.
-trunkprotoproto
If the driver is a
trunk(4)
pseudo-device, set the trunk protocol.
Refer to the interface's driver-specific man page for a complete
list of the available protocols,
or use the following for a listing of choices:
$ ifconfig -m interface
TUNNEL
ifconfig
.Bk -words
tunnel-interface
[-deletetunnelsrc_addressdest_address]
[-tunnelsrc_addressdest_address]
.Ek
The options are as follows:
-deletetunnelsrc_addressdest_address
Remove the source and destination tunnel addresses.
-tunnelsrc_addressdest_address
Set the source and destination tunnel addresses on a tunnel interface,
including
gif(4).
Packets routed to this interface will be encapsulated in
IPv4 or IPv6, depending on the source and destination address families.
Both addresses must be of the same family.
VLAN
ifconfig
.Bk -words
vlan-interface
[-vlanvlan-tag]
[Oo -Oc -vlandevparent-interface]
[-vlanpriovlan-priority]
.Ek
The options are as follows:
-vlanvlan-tag
If the interface is a
vlan(4)
pseudo-interface, set the vlan tag value
to
vlan-tag.
This value is a 12-bit number which is used to create an 802.1Q
vlan header for packets sent from the vlan interface.
This value cannot be changed once it is set for an interface.
-vlandevparent-interface
If the interface is a
vlan(4)
pseudo-device, associate physical interface
iface
with it.
Packets transmitted through the vlan interface will be
diverted to the specified physical interface
iface
with 802.1Q vlan encapsulation.
Packets with 802.1Q encapsulation received
by the parent interface with the correct vlan tag will be diverted to
the associated vlan pseudo-interface.
The vlan interface is assigned a
copy of the parent interface's flags and the parent's Ethernet address.
If
-vlandev
and
-vlan
are not set at the same time, the vlan tag will be inferred from
the interface name, for instance
-vlan5
will be assigned 802.1Q tag 5.
If the vlan interface already has
a physical interface associated with it, this command will fail.
To change the association to another physical interface, the existing
association must be cleared first.
Note: if the
link0
flag is set on the vlan interface, the vlan pseudo-interface's
behavior changes;
link0
tells the vlan interface that the
parent interface supports insertion and extraction of vlan tags on its
own (usually in firmware) and that it should pass packets to and from
the parent unaltered.
-vlandev
If the driver is a
vlan(4)
pseudo-device, disassociate the physical interface
from it.
This breaks the link between the vlan interface and its parent,
clears its vlan tag, flags, and link address, and shuts the interface down.
-vlanpriovlan-priority
If the interface is a
vlan(4)
pseudo-interface, set the vlan priority value
to
vlan-priority.
This value is a 3-bit number which is used to create an 802.1Q
vlan header for packets sent from the vlan interface.
EXAMPLES
Assign the
address of 192.168.1.10 with a network mask of
255.255.255.0 to interface fxp0:
# ifconfig fxp0 inet 192.168.1.10 netmask 255.255.255.0
Configure the xl0 interface to use 100baseTX, full duplex:
# ifconfig xl0 media 100baseTX mediaopt full-duplex
Label the em0 interface as an uplink:
# ifconfig em0 description \&"Uplink to Gigabit Switch 2\&"
Create the gif1 network interface:
# ifconfig gif1 create
Destroy the gif1 network interface:
# ifconfig gif1 destroy
DIAGNOSTICS
Messages indicating the specified interface does not exist, the
requested address is unknown, or the user is not privileged and
tried to alter an interface's configuration.