2 .\" Copyright (C) 2012, Darren Reed. All rights reserved
3 .\" Copyright (C) 2009, Sun Microsystems, Inc. All Rights Reserved
4 .\" Copyright 1989 AT&T
5 .\" Copyright (c) 1983 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
6 .TH IFCONFIG 1M "July 23, 2012"
8 ifconfig \- configure network interface parameters
12 \fBifconfig\fR \fIinterface\fR [\fIaddress_family\fR] [\fIaddress\fR [\fI/prefix_length\fR]
13 [\fIdest_address\fR]] [\fBaddif\fR \fIaddress\fR [\fI/prefix_length\fR]]
14 [\fBremoveif\fR \fIaddress\fR [\fI/prefix_length\fR]] [\fBarp\fR | \fB-arp\fR]
15 [\fBauth_algs\fR \fIauthentication algorithm\fR] [\fBencr_algs\fR \fIencryption algorithm\fR]
16 [\fBencr_auth_algs\fR \fIauthentication algorithm\fR] [\fBauto-revarp\fR]
17 [\fBbroadcast\fR \fIaddress\fR] [\fBdeprecated\fR | \fB-deprecated\fR]
18 [\fBpreferred\fR | \fB-preferred\fR] [\fBdestination\fR \fIdest_address\fR]
19 [ether [\fIaddress\fR]] [\fBfailover\fR | \fB-failover\fR] [\fBgroup\fR
20 [\fIname\fR | ""\fB\fR]] [\fBindex\fR \fIif_index\fR] [ipmp] [\fBmetric\fR \fIn\fR] [modlist]
21 [modinsert \fImod_name@pos\fR] [modremove \fImod_name@pos\fR]
22 [\fBmtu\fR \fIn\fR] [\fBnetmask\fR \fImask\fR] [\fBplumb\fR] [\fBunplumb\fR] [\fBprivate\fR
23 | \fB-private\fR] [\fBnud\fR | \fB-nud\fR] [\fBset\fR [\fIaddress\fR] [\fI/netmask\fR]]
24 [\fBstandby\fR | \fB-standby\fR] [\fBsubnet\fR \fIsubnet_address\fR] [\fBtdst\fR
25 \fItunnel_dest_address\fR] [\fBtoken\fR \fIaddress\fR/\fIprefix_length\fR]
26 [\fBtsrc\fR \fItunnel_src_address\fR] [\fBtrailers\fR | \fB-trailers\fR]
27 [\fBup\fR] [\fBdown\fR] [\fBusesrc\fR [\fIname\fR | none]] [\fBxmit\fR | \fB-xmit\fR]
28 [\fBencaplimit\fR \fIn\fR | \fB-encaplimit\fR] [\fBthoplimit\fR \fIn\fR] [\fBrouter\fR
29 | \fB-router\fR] [zone \fIzonename\fR | \fB-zone\fR | \fB-all-zones\fR]
34 \fBifconfig\fR [\fIaddress_family\fR] \fIinterface\fR {\fBauto-dhcp\fR | \fBdhcp\fR} [\fBprimary\fR]
35 [\fBwait\fR \fIseconds\fR] \fBdrop\fR | \fBextend\fR | \fBinform\fR | \fBping\fR
36 | \fBrelease\fR | \fBstart\fR | \fBstatus\fR
42 The command \fBifconfig\fR is used to assign an address to a network interface
43 and to configure network interface parameters. The \fBifconfig\fR command must
44 be used at boot time to define the network address of each interface present on
45 a machine; it may also be used at a later time to redefine an interface's
46 address or other operating parameters. If no option is specified,
47 \fBifconfig\fR displays the current configuration for a network interface. If
48 an address family is specified, \fBifconfig\fR reports only the details
49 specific to that address family. Only privileged users may modify the
50 configuration of a network interface. Options appearing within braces
51 (\fB{\|}\fR) indicate that one of the options must be specified.
52 .SS Network Interface Observability
55 Network interface observability with \fBifconfig\fR is limited to those
56 network interfaces that have been prepared for use with the IP
57 protocol suite. The preferred method for configuring a network
58 interface for use with TCP/IP is with \fBipadm\fR and alternatively
59 with the use of the \fBplumb\fR option as documented below. Network
60 interfaces that have not been configured for use with the IP
61 protocol suite can only be observed by using the \fBdladm\fR command.
62 .SS DHCP Configuration
65 The forms of \fBifconfig\fR that use the \fBauto-dhcp\fR or \fBdhcp\fR
66 arguments are used to control the Dynamic Host Configuration Protocol
67 ("\fBDHCP\fR") configuration of the interface. In this mode, \fBifconfig\fR is
68 used to control operation of \fBdhcpagent\fR(1M), the \fBDHCP\fR client daemon.
69 Once an interface is placed under \fBDHCP\fR control by using the \fBstart\fR
70 operand, \fBifconfig\fR should not, in normal operation, be used to modify the
71 address or characteristics of the interface. If the address of an interface
72 under \fBDHCP\fR is changed, \fBdhcpagent\fR will remove the interface from its
77 When the \fBifconfig\fR command is executed without any options
78 its behavior is the same as when the \fB\-a\fR option is supplied
79 with no other options or arguments.
81 The following options are supported:
85 \fB\fBaddif\fR \fIaddress\fR\fR
89 Create the next unused logical interface on the specified physical interface.
99 Make the interface available to every shared-IP zone on the system. The
100 appropriate zone to which to deliver data is determined using the
101 \fBtnzonecfg\fR database. This option is available only if the system is
102 configured with the Solaris Trusted Extensions feature.
104 The \fBtnzonecfg\fR database is described in the \fBtnzonecfg(4)\fR man page,
105 which is part of the \fISolaris Trusted Extensions Reference Manual\fR.
115 Marks the logical interface as an anycast address by setting the \fBANYCAST\fR
116 flag. See "INTERFACE FLAGS," below, for more information on anycast.
126 Marks the logical interface as not an anycast address by clearing the
137 Enable the use of the Address Resolution Protocol ("\fBARP\fR") in mapping
138 between network level addresses and link level addresses (default). This is
139 currently implemented for mapping between IPv4 addresses and MAC addresses.
149 Disable the use of the \fBARP\fR on a physical interface. ARP cannot be
150 disabled on an IPMP IP interface.
156 \fB\fBauth_algs\fR \fIauthentication algorithm\fR\fR
160 For a tunnel, enable IPsec \fBAH\fR with the authentication algorithm
161 specified. The algorithm can be either a number or an algorithm name, including
162 \fIany\fR to express no preference in algorithm. All IPsec tunnel properties
163 must be specified on the same command line. To disable tunnel security, specify
164 an \fBauth_alg\fR of \fBnone\fR.
166 It is now preferable to use the \fBipsecconf\fR(1M) command when configuring a
167 tunnel's security properties. If \fBipsecconf\fR was used to set a tunnel's
168 security properties, this keyword will not affect the tunnel.
174 \fB\fBauto-dhcp\fR\fR
178 Use DHCP to automatically acquire an address for this interface. This option
179 has a completely equivalent alias called \fBdhcp\fR.
181 For IPv6, the interface specified must be the zeroth logical interface (the
182 physical interface name), which has the link-local address.
190 Defines the interface as the \fBprimary\fR. The interface is defined as the
191 preferred one for the delivery of client-wide configuration data. Only one
192 interface can be the primary at any given time. If another interface is
193 subsequently selected as the primary, it replaces the previous one. Nominating
194 an interface as the primary one will not have much significance once the client
195 work station has booted, as many applications will already have started and
196 been configured with data read from the previous primary interface.
202 \fBwait \fIseconds\fR\fR
206 The \fBifconfig\fR command will wait until the operation either completes or
207 for the interval specified, whichever is the sooner. If no wait interval is
208 given, and the operation is one that cannot complete immediately,
209 \fBifconfig\fR will wait 30 seconds for the requested operation to complete.
210 The symbolic value \fBforever\fR may be used as well, with obvious meaning.
220 Remove the specified interface from \fBDHCP\fR control without notifying the
221 DHCP server, and record the current lease for later use. Additionally, for
222 IPv4, set the IP address to zero. For IPv6, unplumb all logical interfaces
223 plumbed by \fBdhcpagent\fR.
233 Attempt to extend the lease on the interface's IP address. This is not
234 required, as the agent will automatically extend the lease well before it
245 Obtain network configuration parameters from \fBDHCP\fR without obtaining a
246 lease on \fBIP\fR addresses. This is useful in situations where an \fBIP\fR
247 address is obtained through mechanisms other than \fBDHCP\fR.
257 Check whether the interface given is under \fBDHCP\fR control, which means that
258 the interface is managed by the \fBDHCP\fR agent and is working properly. An
259 exit status of \fB0\fR means success.
269 Relinquish the IP addresses on the interface by notifying the server and
270 discard the current lease. For IPv4, set the IP address to zero. For IPv6, all
271 logical interfaces plumbed by \fBdhcpagent\fR are unplumbed.
281 Start \fBDHCP\fR on the interface.
291 Display the \fBDHCP\fR configuration status of the interface.
299 \fB\fBauto-revarp\fR\fR
303 Use the Reverse Address Resolution Protocol (RARP) to automatically acquire an
304 address for this interface. This will fail if the interface does not support
305 RARP; for example, IPoIB (IP over InfiniBand), and on IPv6 interfaces.
311 \fB\fBbroadcast\fR \fIaddress\fR\fR
315 For IPv4 only. Specify the address to use to represent broadcasts to the
316 network. The default broadcast address is the address with a host part of all
317 \fB1\fR's. A "\fB+\fR" (plus sign) given for the broadcast value causes the
318 broadcast address to be reset to a default appropriate for the (possibly new)
319 address and netmask. The arguments of \fBifconfig\fR are interpreted left to
324 example% ifconfig -a netmask + broadcast +
333 example% ifconfig -a broadcast + netmask +
338 may result in different values being assigned for the broadcast addresses of
345 \fB\fBdeprecated\fR\fR
349 Marks the logical interface as deprecated. An address associated with a
350 deprecated interface will not be used as source address for outbound packets
351 unless either there are no other addresses available on the interface or the
352 application has bound to this address explicitly. The status display shows
353 \fBDEPRECATED\fR as part of flags. See for information on the flags supported
360 \fB\fB-deprecated\fR\fR
364 Marks a logical interface as not deprecated. An address associated with such an
365 interface could be used as a source address for outbound packets.
371 \fB\fBpreferred\fR\fR
375 Marks the logical interface as preferred. This option is only valid for IPv6
376 addresses. Addresses assigned to preferred logical interfaces are preferred as
377 source addresses over all other addresses configured on the system, unless the
378 address is of an inappropriate scope relative to the destination address.
379 Preferred addresses are used as source addresses regardless of which physical
380 interface they are assigned to. For example, you can configure a preferred
381 source address on the loopback interface and advertise reachability of this
382 address by using a routing protocol.
388 \fB\fB-preferred\fR\fR
392 Marks the logical interface as not preferred.
398 \fB\fBdestination\fR \fIdest_address\fR\fR
402 Set the destination address for a point-to point interface.
412 This option is an alias for option \fBauto-dhcp\fR
422 Mark a logical interface as "down". (That is, turn off the \fBIFF_UP\fR bit.)
423 When a logical interface is marked "down," the system does not attempt to use
424 the address assigned to that interface as a source address for outbound packets
425 and will not recognize inbound packets destined to that address as being
426 addressed to this host. Additionally, when all logical interfaces on a given
427 physical interface are "down," the physical interface itself is disabled.
429 When a logical interface is down, all routes that specify that interface as the
430 output (using the \fB-ifp\fR option in the \fBroute\fR(1M) command or
431 \fBRTA_IFP\fR in a \fBroute\fR(7P) socket) are removed from the forwarding
432 table. Routes marked with \fBRTF_STATIC\fR are returned to the table if the
433 interface is brought back up, while routes not marked with \fBRTF_STATIC\fR are
436 When all logical interfaces that could possibly be used to reach a particular
437 gateway address are brought down (specified without the interface option as in
438 the previous paragraph), the affected gateway routes are treated as though they
439 had the \fBRTF_BLACKHOLE\fR flag set. All matching packets are discarded
440 because the gateway is unreachable.
446 \fB\fBencaplimit\fR \fIn\fR\fR
450 Set the tunnel encapsulation limit for the interface to n. This option applies
451 to IPv4-in-IPv6 and IPv6-in-IPv6 tunnels only, and it simply modifies the
452 \fBencaplimit\fR link property of the underlying IPv6 tunnel link (see
453 \fBdladm\fR(1M)). The tunnel encapsulation limit controls how many more tunnels
454 a packet can enter before it leaves any tunnel, that is, the tunnel nesting
457 This option is obsolete, superseded by the \fBdladm\fR(1M) \fBencaplimit\fR
464 \fB\fB-encaplimit\fR\fR
468 Disable generation of the tunnel encapsulation limit. This option applies only
469 to IPv4-in-IPv6 and IPv6-in-IPv6 tunnels. This simply sets the \fBencaplimit\fR
470 link property of the underlying IPv6 tunnel link to 0 (see \fBdladm\fR(1M)
473 This option is obsolete, superseded by the \fBdladm\fR(1M) \fBencaplimit\fR
480 \fB\fBencr_auth_algs\fR \fIauthentication algorithm\fR\fR
484 For a tunnel, enable IPsec \fBESP\fR with the authentication algorithm
485 specified. It can be either a number or an algorithm name, including \fBany\fR
486 or \fBnone\fR, to indicate no algorithm preference. If an \fBESP\fR encryption
487 algorithm is specified but the authentication algorithm is not, the default
488 value for the \fBESP\fR authentication algorithm will be \fBany\fR.
490 It is now preferable to use the \fBipsecconf\fR(1M) command when configuring a
491 tunnel's security properties. If \fBipsecconf\fR was used to set a tunnel's
492 security properties, this keyword will not affect the tunnel.
498 \fB\fBencr_algs\fR \fIencryption algorithm\fR\fR
502 For a tunnel, enable IPsec \fBESP\fR with the encryption algorithm specified.
503 It can be either a number or an algorithm name. Note that all IPsec tunnel
504 properties must be specified on the same command line. To disable tunnel
505 security, specify the value of \fBencr_alg\fR as \fBnone\fR. If an \fBESP\fR
506 authentication algorithm is specified, but the encryption algorithm is not, the
507 default value for the \fBESP\fR encryption will be \fBnull\fR.
509 It is now preferable to use the \fBipsecconf\fR(1M) command when configuring a
510 tunnel's security properties. If \fBipsecconf\fR was used to set a tunnel's
511 security properties, this keyword will not affect the tunnel.
517 \fB\fBether\fR [ \fIaddress\fR ]\fR
521 If no address is given and the user is root or has sufficient privileges to
522 open the underlying datalink, then display the current Ethernet address
525 Otherwise, if the user is root or has sufficient privileges, set the Ethernet
526 address of the interfaces to \fIaddress\fR. The address is an Ethernet address
527 represented as \fIx:x:x:x:x:x\fR where \fIx\fR is a hexadecimal number between
528 0 and FF. Similarly, for the IPoIB (IP over InfiniBand) interfaces, the address
529 will be 20 bytes of colon-separated hex numbers between \fB0\fR and \fBFF\fR.
531 Some, though not all, Ethernet interface cards have their own addresses. To use
532 cards that do not have their own addresses, refer to section 3.2.3(4) of the
533 IEEE 802.3 specification for a definition of the locally administered address
534 space. Note that all IP interfaces in an IPMP group must have unique hardware
535 addresses; see \fBin.mpathd\fR(1M).
541 \fB\fB-failover\fR\fR
545 Set \fBNOFAILOVER\fR on the logical interface. This makes the associated
546 address available for use by \fBin.mpathd\fR to perform probe-based failure
547 detection for the associated physical IP interface. As a side effect,
548 \fBDEPRECATED\fR will also be set on the logical interface. This operation is
549 not permitted on an IPMP IP interface.
559 Clear \fBNOFAILOVER\fR on the logical interface. This is the default. These
560 logical interfaces are subject to migration when brought up (see \fBIP
561 MULTIPATHING GROUPS\fR).
567 \fB\fBgroup\fR [ \fIname\fR |\fB""\fR]\fR
571 When applied to a physical interface, it places the interface into the named
572 group. If the group does not exist, it will be created, along with one or more
573 IPMP IP interfaces (for IPv4, IPv6, or both). Any \fBUP\fR addresses that are
574 not also marked \fBNOFAILOVER\fR are subject to migration to the IPMP IP
575 interface (see \fBIP MULTIPATHING GROUPS\fR). Specifying a group name of
576 \fB""\fR removes the physical IP interface from the group.
578 When applied to a physical IPMP IP interface, it renames the IPMP group to have
579 the new name. If the name already exists, or a name of \fB""\fR is specified,
580 it fails. Renaming IPMP groups is discouraged. Instead, the IPMP IP interface
581 should be given a meaningful name when it is created by means of the \fBipmp\fR
582 subcommand, which the system will also use as the IPMP group name.
588 \fB\fBindex\fR \fIn\fR\fR
592 Change the interface index for the interface. The value of \fIn\fR must be an
593 interface index (\fIif_index\fR) that is not used on another interface.
594 \fIif_index\fR will be a non-zero positive number that uniquely identifies the
595 network interface on the system.
605 Create an IPMP IP interface with the specified name. An interface must be
606 separately created for use by IPv4 and IPv6. The \fIaddress_family\fR parameter
607 controls whether the command applies to IPv4 or IPv6 (IPv4 if unspecified). All
608 IPMP IP interfaces have the \fBIPMP\fR flag set.
614 \fB\fBmetric\fR \fIn\fR\fR
618 Set the routing metric of the interface to \fIn\fR; if no value is specified,
619 the default is \fB0\fR. The routing metric is used by the routing protocol.
620 Higher metrics have the effect of making a route less favorable. Metrics are
621 counted as addition hops to the destination network or host.
627 \fB\fBmodinsert\fR \fImod_name@pos\fR\fR
631 Insert a module with name \fImod_name\fR to the stream of the device at
632 position \fIpos\fR. The position is relative to the stream head. Position
633 \fB0\fR means directly under stream head.
635 Based upon the example in the \fBmodlist\fR option, use the following command
636 to insert a module with name \fBipqos\fR under the \fBip\fR module and above
641 example% ifconfig eri0 modinsert ipqos@2
646 A subsequent listing of all the modules in the stream of the device follows:
650 example% ifconfig eri0 modlist
669 List all the modules in the stream of the device.
671 The following example lists all the modules in the stream of the device:
675 example% ifconfig eri0 modlist
689 \fB\fBmodremove\fR \fImod_name@pos\fR\fR
693 Remove a module with name \fImod_name\fR from the stream of the device at
694 position \fIpos\fR. The position is relative to the stream head.
696 Based upon the example in the \fBmodinsert\fR option, use the following command
697 to remove the firewall module from the stream after inserting the \fBipqos\fR
702 example% ifconfig eri0 modremove firewall@3
707 A subsequent listing of all the modules in the stream of the device follows:
711 example% ifconfig eri0 modlist
720 Note that the core IP stack modules, for example, \fBip\fR and \fBtun\fR
721 modules, cannot be removed.
727 \fB\fBmtu\fR \fIn\fR\fR
731 Set the maximum transmission unit of the interface to \fIn\fR. For many types
732 of networks, the \fBmtu\fR has an upper limit, for example, \fB1500\fR for
733 Ethernet. This option sets the \fBFIXEDMTU\fR flag on the affected interface.
739 \fB\fBnetmask\fR \fImask\fR\fR
743 For IPv4 only. Specify how much of the address to reserve for subdividing
744 networks into subnetworks. The mask includes the network part of the local
745 address and the subnet part, which is taken from the host field of the address.
746 The mask contains 1's for the bit positions in the 32-bit address which are to
747 be used for the network and subnet parts, and 0's for the host part. The mask
748 should contain at least the standard network portion, and the subnet field
749 should be contiguous with the network portion. The mask can be specified in one
754 with a single hexadecimal number with a leading 0x,
759 with a dot-notation address,
764 with a "\fB+\fR" (plus sign) address, or
769 with a pseudo host name/pseudo network name found in the network database
772 If a "\fB+\fR" (plus sign) is given for the netmask value, the mask is looked
773 up in the \fBnetmasks\fR(4) database. This lookup finds the longest matching
774 netmask in the database by starting with the interface's IPv4 address as the
775 key and iteratively masking off more and more low order bits of the address.
776 This iterative lookup ensures that the \fBnetmasks\fR(4) database can be used
777 to specify the netmasks when variable length subnetmasks are used within a
780 If a pseudo host name/pseudo network name is supplied as the netmask value,
781 netmask data may be located in the \fBhosts\fR or \fBnetworks\fR database.
782 Names are looked up by first using \fBgethostbyname\fR(3NSL). If not found
783 there, the names are looked up in \fBgetnetbyname\fR(3SOCKET). These interfaces
784 may in turn use \fBnsswitch.conf\fR(4) to determine what data store(s) to use
785 to fetch the actual value.
787 For both \fBinet\fR and \fBinet6\fR, the same information conveyed by
788 \fImask\fR can be specified as a \fIprefix_length\fR attached to the
789 \fIaddress\fR parameter.
799 Enables the neighbor unreachability detection mechanism on a point-to-point
810 Disables the neighbor unreachability detection mechanism on a point-to-point
821 For a physical IP interface, open the datalink associated with the physical
822 interface name and set up the plumbing needed for IP to use the datalink. When
823 used with a logical interface name, this command is used to create a specific
824 named logical interface on an existing physical IP interface.
826 An interface must be separately plumbed for IPv4 and IPv6 according to the
827 \fIaddress_family\fR parameter (IPv4 if unspecified). Before an interface has
828 been plumbed, it will not be shown by \fBifconfig\fR \fB-a\fR.
830 Note that IPMP IP interfaces are not tied to a specific datalink and are
831 instead created with the \fBipmp\fR subcommand.
841 Tells the \fBin.routed\fR routing daemon that a specified logical interface
842 should not be advertised.
852 Specify unadvertised interfaces.
858 \fB\fBremoveif\fR \fIaddress\fR\fR
862 Remove the logical interface on the physical interface specified that matches
863 the \fIaddress\fR specified.
873 Enable IP forwarding on the interface. When enabled, the interface is marked
874 \fBROUTER\fR, and IP packets can be forwarded to and from the interface.
875 Enabling \fBROUTER\fR on any IP interface in an IPMP group enables it on all IP
876 interfaces in that IPMP group.
886 Disable IP forwarding on the interface. IP packets are not forwarded to and
887 from the interface. Disabling \fBROUTER\fR on any IP interface in an IPMP group
888 disables it on all IP interfaces in that IPMP group.
898 Set the \fIaddress\fR, \fIprefix_length\fR or both, for a logical interface.
908 Mark the physical IP interface as a \fBSTANDBY\fR interface. If an interface is
909 marked \fBSTANDBY\fR and is part of an IPMP group, the interface will not be
910 used for data traffic unless another interface in the IPMP group becomes
911 unusable. When a \fBSTANDBY\fR interface is functional but not being used for
912 data traffic, it will also be marked \fBINACTIVE\fR. This operation is not
913 permitted on an IPMP IP interface.
923 Clear \fBSTANDBY\fR on the interface. This is the default.
933 Set the subnet \fIaddress\fR for an interface.
939 \fB\fBtdst\fR \fItunnel_dest_address\fR\fR
943 Set the destination address of a tunnel. The address should not be the same as
944 the \fBdest_address\fR of the tunnel, because no packets leave the system over
947 This option is obsolete, superseded by the \fBdladm\fR(1M) \fBcreate-iptun\fR
948 and \fBmodify-iptun\fR subcommands.
954 \fB\fBthoplimit\fR \fIn\fR\fR
958 Set the hop limit for a tunnel interface. The hop limit value is used as the
959 \fBTTL\fR in the IPv4 header for the IPv6-in-IPv4 and IPv4-in-IPv4 tunnels. For
960 IPv6-in-IPv6 and IPv4-in-IPv6 tunnels, the hop limit value is used as the hop
961 limit in the IPv6 header. This option simply modifies the \fBhoplimit\fR link
962 property of the underlying IP tunnel link (see \fBdladm\fR(1M)).
964 This option is obsolete, superseded by the \fBdladm\fR(1M) \fBhoplimit\fR link
971 \fB\fBtoken\fR \fIaddress\fR/\fIprefix_length\fR\fR
975 Set the IPv6 token of an interface to be used for address autoconfiguration.
979 example% \fBifconfig eri0 inet6 token ::1/64\fR
993 This flag previously caused a nonstandard encapsulation of IPv4 packets on
994 certain link levels. Drivers supplied with this release no longer use this
995 flag. It is provided for compatibility, but is ignored.
1001 \fB\fB-trailers\fR\fR
1005 Disable the use of a "trailer" link level encapsulation.
1011 \fB\fBtsrc\fR \fItunnel_src_address\fR\fR
1015 Set the source address of a tunnel. This is the source address on an outer
1016 encapsulating \fBIP\fR header. It must be an address of another interface
1017 already configured using \fBifconfig\fR.
1019 This option is obsolete, superseded by the \fBdladm\fR(1M) \fBcreate-iptun\fR
1020 and \fBmodify-iptun\fR subcommands.
1030 For a physical or IPMP interface, remove all associated logical IP interfaces
1031 and tear down any plumbing needed for IP to use the interface. For an IPMP IP
1032 interface, this command will fail if the group is not empty. For a logical
1033 interface, the logical interface is removed.
1035 An interface must be separately unplumbed for IPv4 and IPv6 according to the
1036 \fIaddress_family\fR parameter (IPv4 if unspecified). Upon success, the
1037 interface name will no longer appear in the output of \fBifconfig\fR \fB-a\fR.
1047 Mark a logical interface \fBUP\fR. As a result, the IP module will accept
1048 packets destined to the associated address (unless the address is zero), along
1049 with any associated multicast and broadcast IP addresses. Similarly, the IP
1050 module will allow packets to be sent with the associated address as a source
1051 address. At least one logical interface must be \fBUP\fR for the associated
1052 physical interface to send or receive packets
1058 \fB\fBusesrc\fR [ \fIname\fR | \fBnone\fR ]\fR
1062 Specify a physical interface to be used for source address selection. If the
1063 keyword \fBnone\fR is used, then any previous selection is cleared.
1065 When an application does not choose a non-zero source address using
1066 \fBbind\fR(3SOCKET), the system will select an appropriate source address based
1067 on the outbound interface and the address selection rules (see
1068 \fBipaddrsel\fR(1M)).
1070 When \fBusesrc\fR is specified and the specified interface is selected in the
1071 forwarding table for output, the system looks first to the specified physical
1072 interface and its associated logical interfaces when selecting a source
1073 address. If no usable address is listed in the forwarding table, the ordinary
1074 selection rules apply. For example, if you enter:
1078 # \fBifconfig eri0 usesrc vni0\fR
1083 \&...and \fBvni0\fR has address 10.0.0.1 assigned to it, the system will prefer
1084 10.0.0.1 as the source address for any packets originated by local connections
1085 that are sent through \fBeri0\fR. Further examples are provided in the
1086 \fBEXAMPLES\fR section.
1088 While you can specify any physical interface (or even loopback), be aware that
1089 you can also specify the virtual IP interface (see \fBvni\fR(7D)). The virtual
1090 IP interface is not associated with any physical hardware and is thus immune to
1091 hardware failures. You can specify any number of physical interfaces to use the
1092 source address hosted on a single virtual interface. This simplifies the
1093 configuration of routing-based multipathing. If one of the physical interfaces
1094 were to fail, communication would continue through one of the remaining,
1095 functioning physical interfaces. This scenario assumes that the reachability of
1096 the address hosted on the virtual interface is advertised in some manner, for
1097 example, through a routing protocol.
1099 Because the \fBifconfig\fR \fBpreferred\fR option is applied to all interfaces,
1100 it is coarser-grained than the \fBusesrc\fR option. It will be overridden by
1101 \fBusesrc\fR and \fBsetsrc\fR (route subcommand), in that order.
1103 IPMP and the \fBusesrc\fR option are mutually exclusive. That is, if an
1104 interface is part of an IPMP group or marked \fBSTANDBY\fR, then it cannot be
1105 specified by means of \fBusesrc\fR, and vice-versa.
1115 Enable a logical interface to transmit packets. This is the default behavior
1116 when the logical interface is up.
1126 Disable transmission of packets on an interface. The interface will continue to
1133 \fB\fBzone\fR \fIzonename\fR\fR
1137 Place the logical interface in zone \fIzonename\fR. The named zone must be
1138 active in the kernel in the ready or running state. The interface is unplumbed
1139 when the zone is halted or rebooted. The zone must be configure to be an
1140 shared-IP zone. \fBzonecfg\fR(1M) is used to assign network interface names to
1151 Place IP interface in the global zone. This is the default.
1157 The \fIinterface\fR operand, as well as address parameters that affect it, are
1162 \fB\fIinterface\fR\fR
1166 A string of one of the following forms:
1171 \fIname physical-unit\fR, for example, \fBeri0\fR or \fBce1\fR
1177 \fIname physical-unit\fR\fB:\fR\fIlogical-unit\fR, for example, \fBeri0:1\fR
1183 \fBip.tun\fR\fIN\fR, \fBip6.tun\fR\fIN\fR, or \fBip6to4.tun\fR\fIN\fR for
1184 implicit IP tunnel links
1186 If the interface name starts with a dash (-), it is interpreted as a set of
1187 options which specify a set of interfaces. In such a case, \fB-a\fR must be
1188 part of the options and any of the additional options below can be added in any
1189 order. If one of these interface names is given, the commands following it are
1190 applied to all of the interfaces that match.
1198 Apply the command to all interfaces of the specified address family. If no
1199 address family is supplied, either on the command line or by means of
1200 \fB/etc/default/inet_type\fR, then all address families will be selected.
1210 Apply the commands to all "down" interfaces in the system.
1220 Apply the commands to all interfaces not under \fBDHCP\fR (Dynamic Host
1221 Configuration Protocol) control.
1231 Apply the commands to all "up" interfaces in the system.
1241 Apply the commands to all interfaces in the user's zone.
1251 Apply the commands to all IPv4 interfaces.
1261 Apply the commands to all IPv6 interfaces.
1269 \fB\fIaddress_family\fR\fR
1273 The address family is specified by the \fIaddress_family\fR parameter. The
1274 \fBifconfig\fR command currently supports the following families: \fBinet\fR
1275 and \fBinet6\fR. If no address family is specified, the default is \fBinet\fR.
1277 \fBifconfig\fR honors the \fBDEFAULT_IP\fR setting in the
1278 \fB/etc/default/inet_type\fR file when it displays interface information . If
1279 \fBDEFAULT_IP\fR is set to \fBIP_VERSION4\fR, then \fBifconfig\fR will omit
1280 information that relates to IPv6 interfaces. However, when you explicitly
1281 specify an address family (\fBinet\fR or \fBinet6\fR) on the \fBifconfig\fR
1282 command line, the command line overrides the \fBDEFAULT_IP\fR settings.
1292 For the IPv4 family (\fBinet\fR), the \fIaddress\fR is either a host name
1293 present in the host name data base (see \fBhosts\fR(4)) or in the Network
1294 Information Service (NIS) map \fBhosts\fR, or an IPv4 address expressed in the
1295 Internet standard "dot notation".
1297 For the IPv6 family (\fBinet6\fR), the \fIaddress\fR is either a host name
1298 present in the host name data base (see \fBhosts\fR(4)) or in the Network
1299 Information Service (\fBNIS\fR) map \fBipnode\fR, or an IPv6 address expressed
1300 in the Internet standard colon-separated hexadecimal format represented as
1301 \fIx:x:x:x:x:x:x:x\fR where \fIx\fR is a hexadecimal number between \fB0\fR and
1308 \fB\fIprefix_length\fR\fR
1312 For the IPv4 and IPv6 families (\fBinet\fR and \fBinet6\fR), the
1313 \fIprefix_length\fR is a number between 0 and the number of bits in the
1314 address. For \fBinet\fR, the number of bits in the address is 32; for
1315 \fBinet6\fR, the number of bits in the address is 128. The \fIprefix_length\fR
1316 denotes the number of leading set bits in the netmask.
1322 \fB\fIdest_address\fR\fR
1326 If the \fIdest_address\fR parameter is supplied in addition to the
1327 \fIaddress\fR parameter, it specifies the address of the correspondent on the
1328 other end of a point-to-point link.
1334 \fB\fItunnel_dest_address\fR\fR
1338 An address that is or will be reachable through an interface other than the
1339 tunnel being configured. This tells the tunnel where to send the tunneled
1340 packets. This address must not be the same as the interface destination address
1347 \fB\fItunnel_src_address\fR\fR
1351 An address that is attached to an already configured interface that has been
1352 configured "up" with \fBifconfig\fR.
1358 The \fBifconfig\fR command supports the following interface flags. The term
1359 "address" in this context refers to a logical interface, for example,
1360 \fBeri0:0\fR, while "interface" refers to the physical interface, for example,
1365 \fB\fBADDRCONF\fR\fR
1369 The address is from stateless \fBaddrconf\fR. The stateless mechanism allows a
1370 host to generate its own address using a combination of information advertised
1371 by routers and locally available information. Routers advertise prefixes that
1372 identify the subnet associated with the link, while the host generates an
1373 "interface identifier" that uniquely identifies an interface in a subnet. In
1374 the absence of information from routers, a host can generate link-local
1375 addresses. This flag is specific to IPv6.
1385 Indicates an \fBanycast\fR address. An \fBanycast\fR address identifies the
1386 nearest member of a group of systems that provides a particular type of
1387 service. An \fBanycast\fR address is assigned to a group of systems. Packets
1388 are delivered to the nearest group member identified by the \fBanycast\fR
1389 address instead of being delivered to all members of the group.
1395 \fB\fBBROADCAST\fR\fR
1399 This \fBbroadcast\fR address is valid. This flag and \fBPOINTTOPOINT\fR are
1410 This interface supports some form of Class of Service (CoS) marking. An example
1411 is the 802.1D user priority marking supported on \fBVLAN\fR interfaces. For
1412 IPMP IP interfaces, this will only be set if all interfaces in the group have
1415 Note that this flag is only set on interfaces over VLAN links and over Ethernet
1416 links that have their \fBdladm\fR(1M) \fBtagmode\fR link property set to
1423 \fB\fBDEPRECATED\fR\fR
1427 This address is deprecated. This address will not be used as a source address
1428 for outbound packets unless there are no other addresses on this interface or
1429 an application has explicitly bound to this address. An IPv6 deprecated address
1430 is part of the standard mechanism for renumbering in IPv6 and will eventually
1431 be deleted when not used. For both IPv4 and IPv6, \fBDEPRECATED\fR is also set
1432 on all \fBNOFAILOVER\fR addresses, though this may change in a future release.
1438 \fB\fBDHCPRUNNING\fR\fR
1442 The logical interface is managed by \fBdhcpagent\fR(1M).
1448 \fB\fBDUPLICATE\fR\fR
1452 The logical interface has been disabled because the IP address configured on
1453 the interface is a duplicate. Some other node on the network is using this
1454 address. If the address was configured by DHCP or is temporary, the system will
1455 choose another automatically, if possible. Otherwise, the system will attempt
1456 to recover this address periodically and the interface will recover when the
1457 conflict has been removed from the network. Changing the address or netmask, or
1458 setting the logical interface to \fBup\fR will restart duplicate detection.
1459 Setting the interface to \fBdown\fR terminates recovery and removes the
1460 \fBDUPLICATE\fR flag.
1470 The \fBin.mpathd\fR daemon has determined that the interface has failed.
1471 \fBFAILED\fR interfaces will not be used to send or receive IP data traffic. If
1472 this is set on a physical IP interface in an IPMP group, IP data traffic will
1473 continue to flow over other usable IP interfaces in the IPMP group. If this is
1474 set on an IPMP IP interface, the entire group has failed and no data traffic
1475 can be sent or received over any interfaces in that group.
1481 \fB\fBFIXEDMTU\fR\fR
1485 The MTU has been set using the \fB-mtu\fR option. This flag is read-only.
1486 Interfaces that have this flag set have a fixed MTU value that is unaffected by
1487 dynamic MTU changes that can occur when drivers notify IP of link MTU changes.
1493 \fB\fBINACTIVE\fR\fR
1497 The physical interface is functioning but is not used to send or receive data
1498 traffic according to administrative policy. This flag is initially set by the
1499 \fBstandby\fR subcommand and is subsequently controlled by \fBin.mpathd\fR. It
1500 also set when \fBFAILBACK=no\fR mode is enabled (see \fBin.mpathd\fR(1M)) to
1501 indicate that the IP interface has repaired but is not being used.
1511 Indicates that this is an IPMP IP interface.
1517 \fB\fBLOOPBACK\fR\fR
1521 Indicates that this is the loopback interface.
1527 \fB\fBMULTI_BCAST\fR\fR
1531 Indicates that the broadcast address is used for multicast on this interface.
1537 \fB\fBMULTICAST\fR\fR
1541 The interface supports multicast. \fBIP\fR assumes that any interface that
1542 supports hardware broadcast, or that is a point-to-point link, will support
1553 There is no address resolution protocol (\fBARP\fR) for this interface that
1554 corresponds to all interfaces for a device without a broadcast address. This
1555 flag is specific to IPv4.
1561 \fB\fBNOFAILOVER\fR\fR
1565 The address associated with this logical interface is available to
1566 \fBin.mpathd\fR for probe-based failure detection of the associated physical IP
1577 The interface has no address , just an on-link subnet.
1587 \fBNUD\fR is disabled on this interface. \fBNUD\fR (neighbor unreachability
1588 detection) is used by a node to track the reachability state of its neighbors,
1589 to which the node actively sends packets, and to perform any recovery if a
1590 neighbor is detected to be unreachable. This flag is specific to IPv6.
1596 \fB\fBNORTEXCH\fR\fR
1600 The interface does not exchange routing information. For RIP-2, routing packets
1601 are not sent over this interface. Additionally, messages that appear to come
1602 over this interface receive no response. The subnet or address of this
1603 interface is not included in advertisements over other interfaces to other
1614 Indicates that the address does not transmit packets. RIP-2 also does not
1615 advertise this address.
1625 The interface is offline and thus cannot send or receive IP data traffic. This
1626 is only set on IP interfaces in an IPMP group. See \fBif_mpadm\fR(1M) and
1633 \fB\fBPOINTOPOINT\fR\fR
1637 Indicates that the address is a point-to-point link. This flag and
1638 \fBBROADCAST\fR are mutually exclusive
1644 \fB\fBPREFERRED\fR\fR
1648 This address is a preferred IPv6 source address. This address will be used as a
1649 source address for IPv6 communication with all IPv6 destinations, unless
1650 another address on the system is of more appropriate scope. The
1651 \fBDEPRECATED\fR flag takes precedence over the \fBPREFERRED\fR flag.
1661 Indicates that this address is not advertised. For RIP-2, this interface is
1662 used to send advertisements. However, neither the subnet nor this address are
1663 included in advertisements to other routers.
1673 A read-only flag indicating that an interface is in promiscuous mode. All
1674 addresses associated with an interface in promiscuous mode will display (in
1675 response to \fBifconfig\fR \fB-a\fR, for example) the \fBPROMISC\fR flag.
1685 Indicates that IP packets can be forwarded to and from the interface.
1695 Indicates that the required resources for an interface are allocated. For some
1696 interfaces this also indicates that the link is up. For IPMP IP interfaces,
1697 \fBRUNNING\fR is set as long as one IP interface in the group is active.
1707 Indicates that this physical interface will not be used for data traffic unless
1708 another interface in the IPMP group becomes unusable. The \fBINACTIVE\fR and
1709 \fBFAILED\fR flags indicate whether it is actively being used.
1715 \fB\fBTEMPORARY\fR\fR
1719 Indicates that this is a temporary IPv6 address as defined in RFC 3041.
1725 \fB\fBUNNUMBERED\fR\fR
1729 This flag is set when the local IP address on the link matches the local
1730 address of some other link in the system
1740 Indicates that the logical interface (and the associated physical interface) is
1741 up. The IP module will accept packets destined to \fBUP\fR addresses (unless
1742 the address is zero), along with any associated multicast and broadcast IP
1743 addresses. Similarly, the IP module will allow packets to be sent with an
1744 \fBUP\fR address as a source address.
1754 Indicates that the physical interface has no underlying hardware. It is not
1755 possible to transmit or receive packets through a virtual interface. These
1756 interfaces are useful for configuring local addresses that can be used on
1757 multiple interfaces. (See also the \fBusesrc\fR option.)
1767 Indicates that the interface uses an IPv6 external resolver.
1770 .SH LOGICAL INTERFACES
1773 Solaris \fBTCP/IP\fR allows multiple logical interfaces to be associated with a
1774 physical network interface. This allows a single machine to be assigned
1775 multiple \fBIP\fR addresses, even though it may have only one network
1776 interface. Physical network interfaces have names of the form \fIdriver-name
1777 physical-unit-number\fR, while logical interfaces have names of the form
1778 \fIdriver-name physical-unit-number\fR\fB:\fR\fIlogical-unit-number\fR. A
1779 physical interface is configured into the system using the \fBplumb\fR command.
1784 example% \fBifconfig eri0 plumb\fR
1791 Once a physical interface has been "plumbed", logical interfaces associated
1792 with the physical interface can be configured by separate \fB-plumb\fR or
1793 \fB-addif\fR options to the \fBifconfig\fR command.
1797 example% \fBifconfig eri0:1 plumb\fR
1804 allocates a specific logical interface associated with the physical interface
1805 \fBeri0\fR. The command
1809 example% \fBifconfig eri0 addif 192.168.200.1/24 up\fR
1816 allocates the next available logical unit number on the \fBeri0\fR physical
1817 interface and assigns an \fIaddress\fR and \fIprefix_length\fR.
1820 A logical interface can be configured with parameters (
1821 \fIaddress\fR,\fIprefix_length\fR, and so on) different from the physical
1822 interface with which it is associated. Logical interfaces that are associated
1823 with the same physical interface can be given different parameters as well.
1824 Each logical interface must be associated with an existing and "up" physical
1825 interface. So, for example, the logical interface \fBeri0:1\fR can only be
1826 configured after the physical interface \fBeri0\fR has been plumbed.
1829 To delete a logical interface, use the \fBunplumb\fR or \fBremoveif\fR options.
1834 example% \fBifconfig eri0:1 down unplumb\fR
1841 will delete the logical interface \fBeri0:1\fR.
1842 .SH IP MULTIPATHING GROUPS
1845 Physical interfaces that share the same link-layer broadcast domain \fBmust\fR
1846 be collected into a single IP Multipathing (IPMP) group using the \fBgroup\fR
1847 subcommand. Each IPMP group has an associated IPMP IP interface, which can
1848 either be explicitly created (the preferred method) by using the \fBipmp\fR
1849 subcommand or implicitly created by \fBifconfig\fR in response to placing an IP
1850 interface into a new IPMP group. Implicitly-created IPMP interfaces will be
1851 named \fBipmp\fR\fIN\fR where \fIN\fR is the lowest integer that does not
1852 conflict with an existing IP interface name or IPMP group name.
1855 Each IPMP IP interface is created with a matching IPMP group name, though it
1856 can be changed using the \fBgroup\fR subcommand. Each IPMP IP interface hosts a
1857 set of highly-available IP addresses. These addresses will remain reachable so
1858 long as at least one interface in the group is active, where "active" is
1859 defined as having at least one \fBUP\fR address and having \fBINACTIVE\fR,
1860 \fBFAILED\fR, and \fBOFFLINE\fR clear. IP addresses hosted on the IPMP IP
1861 interface may either be configured statically or configured through DHCP by
1862 means of the \fBdhcp\fR subcommand.
1865 Interfaces assigned to the same IPMP group are treated as equivalent and
1866 monitored for failure by \fBin.mpathd\fR. Provided that active interfaces in
1867 the group remain, IP interface failures (and any subsequent repairs) are
1868 handled transparently to sockets-based applications. IPMP is also integrated
1869 with the Dynamic Reconfiguration framework (see \fBcfgadm\fR(1M)), which
1870 enables network adapters to be replaced in a way that is invisible to
1871 sockets-based applications.
1874 The IP module automatically load-spreads all outbound traffic across all active
1875 interfaces in an IPMP group. Similarly, all \fBUP\fR addresses hosted on the
1876 IPMP IP interface will be distributed across the active interfaces to promote
1877 inbound load-spreading. The \fBipmpstat\fR(1M) utility allows many aspects of
1878 the IPMP subsystem to be observed, including the current binding of IP data
1879 addresses to IP interfaces.
1882 When an interface is placed into an IPMP group, any \fBUP\fR logical interfaces
1883 are "migrated" to the IPMP IP interface for use by the group, unless:
1888 the logical interface is marked \fBNOFAILOVER\fR;
1894 the logical interface hosts an IPv6 link-local address;
1900 the logical interface hosts an IPv4 0.0.0.0 address.
1904 Likewise, once an interface is in a group, if changes are made to a logical
1905 interface such that it is \fBUP\fR and not exempted by one of the conditions
1906 above, it will also migrate to the associated IPMP IP interface. Logical
1907 interfaces never migrate back, even if the physical interface that contributed
1908 the address is removed from the group.
1911 Each interface placed into an IPMP group may be optionally configured with a
1912 "test" address that \fBin.mpathd\fR will use for probe-based failure detection;
1913 see \fBin.mpathd\fR(1M). These addresses must be marked \fBNOFAILOVER\fR (using
1914 the \fB-failover\fR subcommand) prior to being marked \fBUP\fR. Test addresses
1915 may also be acquired through DHCP by means of the \fBdhcp\fR subcommand.
1918 For more background on IPMP, please see the IPMP-related chapters of the
1919 \fISystem Administration Guide: Network Interfaces and Network
1921 .SH CONFIGURING IPV6 INTERFACES
1924 When an IPv6 physical interface is plumbed and configured "up" with
1925 \fBifconfig\fR, it is automatically assigned an IPv6 link-local address for
1926 which the last 64 bits are calculated from the \fBMAC\fR address of the
1931 example% \fBifconfig eri0 inet6 plumb up\fR
1938 The following example shows that the link-local address has a prefix of
1943 example% \fBifconfig eri0 inet6\fR
1944 ce0: flags=2000841<UP,RUNNING,MULTICAST,IPv6>
1946 inet6 fe80::a00:20ff:fe8e:f3ad/10
1953 Link-local addresses are only used for communication on the local subnet and
1954 are not visible to other subnets.
1957 If an advertising IPv6 router exists on the link advertising prefixes, then the
1958 newly plumbed IPv6 interface will autoconfigure logical interface(s) depending
1959 on the prefix advertisements. For example, for the prefix advertisement
1960 \fB2001:0db8:3c4d:0:55::/64\fR, the autoconfigured interface will look like:
1964 eri0:2: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6>
1966 inet6 2001:0db8:3c4d:55:a00:20ff:fe8e:f3ad/64
1973 Even if there are no prefix advertisements on the link, you can still assign
1974 global addresses manually, for example:
1978 example% \fBifconfig eri0 inet6 addif \e
1979 2001:0db8:3c4d:55:a00:20ff:fe8e:f3ad/64 up\fR
1986 To configure boot-time defaults for the interface \fBeri0\fR, place the
1987 following entry in the \fB/etc/hostname6.eri0\fR file:
1991 addif 2001:0db8:3c4d:55:a00:20ff:fe8e:f3ad/64 up
1995 .SS "Configuring IP-over-IP Tunnel Interfaces"
1998 An IP tunnel is conceptually comprised of two parts: a virtual link between two
1999 or more IP nodes, and an IP interface above this link which allows the system
2000 to transmit and receive IP packets encapsulated by the underlying link.
2003 The \fBdladm\fR(1M) command is used to configure tunnel links, and
2004 \fBifconfig\fR is used to configure IP interfaces over those tunnel links. An
2005 IPv4-over-IPv4 tunnel is created by plumbing an IPv4 interface over an IPv4
2006 tunnel link. An IPv6-over-IPv4 tunnel is created by plumbing an IPv6 interface
2007 over an IPv6 tunnel link, and so forth.
2010 When IPv6 interfaces are plumbed over IP tunnel links, their IPv6 addresses are
2011 automatically set. For IPv4 and IPv6 tunnels, source and destination link-local
2012 addresses of the form \fBfe80::\fR\fIinterface-id\fR are configured. For IPv4
2013 tunnels, the \fIinterface-id\fR is the IPv4 tunnel source or destination
2014 address. For IPv6 tunnels, the \fIinterface-id\fR is the last 64 bits of the
2015 IPv6 tunnel source or destination address. For example, for an IPv4 tunnel
2016 between 10.1.2.3 and 10.4.5.6, the IPv6 link-local source and destination
2017 addresses of the IPv6 interface would be \fBfe80::a01:203\fR and
2018 \fBfe80::a04:506\fR. For an IPv6 tunnel between \fB2000::1234:abcd\fR and
2019 \fB3000::5678:abcd\fR, the IPv6 link-local source and destination addresses of
2020 the interface would be \fBfe80::1234:abcd\fR and \fBfe80::5678:abcd\fR. These
2021 default link-local addresses can be overridden by specifying the addresses
2022 explicitly, as with any other point-to-point interface.
2025 For 6to4 tunnels, a 6to4 global address of the form \fB2002:\fItsrc\fR::1/16\fR
2026 is configured. The \fItsrc\fR portion is the tunnel source IPv4 address. The
2027 prefix length of the 6to4 interface is automatically set to 16, as all 6to4
2028 packets (destinations in the \fB2002::/16\fR range) are forwarded to the 6to4
2029 tunnel interface. For example, for a 6to4 link with a tunnel source of
2030 75.1.2.3, the IPv6 interface would have an address of
2031 \fB2002:4b01:203::1/16\fR.
2034 Additional IPv6 addresses can be added using the \fBaddif\fR option or by
2035 plumbing additional logical interfaces.
2038 For backward compatibility, the plumbing of tunnel IP interfaces with special
2039 names will implicitly result in the creation of tunnel links without invoking
2040 \fBdladm create-iptun\fR. These tunnel names are:
2044 \fB\fBip.tun\fR\fIN\fR\fR
2053 \fB\fBip6.tun\fR\fIN\fR\fR
2062 \fB\fBip.6to4tun\fR\fIN\fR\fR
2070 These tunnels are "implicit tunnels", denoted with the \fBi\fR flag in \fBdladm
2071 show-iptun\fR output. The tunnel links over which these special IP interfaces
2072 are plumbed are automatically created, and they are automatically deleted when
2073 the last reference is released (that is, when the last IP interface is
2077 The \fBtsrc\fR, \fBtdst\fR, \fBencaplim\fR, and \fBhoplimit\fR options to
2078 \fBifconfig\fR are obsolete and maintained only for backward compatibility.
2079 They are equivalent to their \fBdladm\fR(1M) counterparts.
2080 .SS "Display of Tunnel Security Settings"
2083 The \fBifconfig\fR output for IP tunnel interfaces indicates whether IPsec
2084 policy is configured for the underlying IP tunnel link. For example, a line of
2085 the following form will be displayed if IPsec policy is present:
2089 tunnel security settings --> use 'ipsecconf -ln -i ip.tun1'
2096 If you do net set security policy, using either \fBifconfig\fR or
2097 \fBipsecconf\fR(1M), there is no tunnel security setting displayed.
2100 \fBExample 1 \fRUsing the \fBifconfig\fR Command
2103 If your workstation is not attached to an Ethernet, the network interface, for
2104 example, \fBeri0\fR, should be marked "down" as follows:
2109 example% \fBifconfig eri0 down\fR
2115 \fBExample 2 \fRPrinting Addressing Information
2118 To print out the addressing information for each interface, use the following
2124 example% \fBifconfig -a\fR
2130 \fBExample 3 \fRResetting the Broadcast Address
2133 To reset each interface's broadcast address after the netmasks have been
2134 correctly set, use the next command:
2139 example% \fBifconfig -a broadcast +\fR
2145 \fBExample 4 \fRChanging the Ethernet Address
2148 To change the Ethernet address for interface \fBce0\fR, use the following
2154 example% \fBifconfig ce0 ether aa:1:2:3:4:5\fR
2160 \fBExample 5 \fRConfiguring an IP-in-IP Tunnel
2163 To configure an IP-in-IP tunnel, first create an IP tunnel link (\fBtunsrc\fR
2164 and \fBtundst\fR are hostnames with corresponding IPv4 entries in
2170 example% \fBdladm create-iptun -T ipv4 -s tunsrc -d tundst tun0\fR
2177 Then plumb a point-to-point interface, supplying the source and destination
2178 addresses (\fBmysrc\fR and \fBthedst\fR are hostnames with corresponding IPv4
2179 entries in \fB/etc/hosts\fR):
2184 example% \fBifconfig tun0 plumb mysrc thedst up\fR
2191 Use \fBipsecconf\fR(1M), as described above, to configure tunnel security
2196 Configuring IPv6 tunnels is done by using a tunnel type of \fBipv6\fR with
2197 \fBcreate-iptun\fR. IPv6 interfaces can also be plumbed over either type of
2201 \fBExample 6 \fRConfiguring 6to4 Tunnels
2204 To configure 6to4 tunnels, first create a 6to4 tunnel link (\fBmyv4addr\fR is a
2205 hostname with a corresponding IPv4 entry in \fB/etc/hosts\fR):
2210 example% \fBdladm create-iptun -T 6to4 -s myv4addr my6to4tun0\fR
2217 Then an IPv6 interface is plumbed over this link:
2222 example% \fBifconfig my6to4tun0 inet6 plumb up\fR
2229 The IPv6 address of the interface is automatically set as described above.
2232 \fBExample 7 \fRConfiguring IP Forwarding on an Interface
2235 To enable IP forwarding on a single interface, use the following command:
2240 example% \fBifconfig eri0 router\fR
2247 To disable IP forwarding on a single interface, use the following command:
2252 example% \fBifconfig eri0 -router\fR
2258 \fBExample 8 \fRConfiguring Source Address Selection Using a Virtual Interface
2261 The following command configures source address selection such that every
2262 packet that is locally generated with no bound source address and going out on
2263 \fBqfe2\fR prefers a source address hosted on \fBvni0\fR.
2268 example% \fBifconfig qfe2 usesrc vni0\fR
2275 The \fBifconfig\fR \fB-a\fR output for the \fBqfe2\fR and \fBvni0\fR interfaces
2276 displays as follows:
2281 qfe2: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu
2284 inet 1.2.3.4 netmask ffffff00 broadcast 1.2.3.255
2285 ether 0:3:ba:17:4b:e1
2286 vni0: flags=20011100c1<UP,RUNNING,NOARP,NOXMIT,ROUTER,IPv4,VIRTUAL>
2289 inet 3.4.5.6 netmask ffffffff
2295 Observe, above, the \fBusesrc\fR and \fBsrcof\fR keywords in the \fBifconfig\fR
2296 output. These keywords also appear on the logical instances of the physical
2297 interface, even though this is a per-physical interface parameter. There is no
2298 \fBsrcof\fR keyword in \fBifconfig\fR for configuring interfaces. This
2299 information is determined automatically from the set of interfaces that have
2300 \fBusesrc\fR set on them.
2304 The following command, using the \fBnone\fR keyword, undoes the effect of the
2305 preceding \fBifconfig\fR \fBusesrc\fR command.
2310 example% \fBifconfig qfe2 usesrc none\fR
2317 Following this command, \fBifconfig\fR \fB-a\fR output displays as follows:
2322 qfe2: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu
2324 inet 1.2.3.4 netmask ffffff00 broadcast 1.2.3.255
2325 ether 0:3:ba:17:4b:e1
2326 vni0: flags=20011100c1<UP,RUNNING,NOARP,NOXMIT,ROUTER,IPv4,VIRTUAL>
2328 inet 3.4.5.6 netmask ffffffff
2334 Note the absence of the \fBusesrc\fR and \fBsrcof\fR keywords in the output
2338 \fBExample 9 \fRConfiguring Source Address Selection for an IPv6 Address
2341 The following command configures source address selection for an IPv6 address,
2342 selecting a source address hosted on \fBvni0\fR.
2347 example% \fBifconfig qfe1 inet6 usesrc vni0\fR
2354 Following this command, \fBifconfig\fR \fB-a\fR output displays as follows:
2359 qfe1: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 3
2361 inet6 fe80::203:baff:fe17:4be0/10
2362 ether 0:3:ba:17:4b:e0
2363 vni0: flags=2002210041<UP,RUNNING,NOXMIT,NONUD,IPv6,VIRTUAL> mtu 0
2366 inet6 fe80::203:baff:fe17:4444/128
2367 vni0:1: flags=2002210040<RUNNING,NOXMIT,NONUD,IPv6,VIRTUAL> mtu 0
2370 inet6 fec0::203:baff:fe17:4444/128
2371 vni0:2: flags=2002210040<RUNNING,NOXMIT,NONUD,IPv6,VIRTUAL> mtu 0
2374 inet6 2000::203:baff:fe17:4444/128
2380 Depending on the scope of the destination of the packet going out on
2381 \fBqfe1\fR, the appropriately scoped source address is selected from \fBvni0\fR
2385 \fBExample 10 \fRUsing Source Address Selection with Shared-IP Zones
2388 The following is an example of how the \fBusesrc\fR feature can be used with
2389 the \fBzones\fR(5) facility in Solaris. The following commands are invoked in
2395 example% \fBifconfig hme0 usesrc vni0\fR
2396 example% \fBifconfig eri0 usesrc vni0\fR
2397 example% i\fBfconfig qfe0 usesrc vni0\fR
2404 Following the preceding commands, the \fBifconfig\fR \fB-a\fR output for the
2405 virtual interfaces would display as:
2410 vni0: flags=20011100c1<UP,RUNNING,NOARP,NOXMIT,ROUTER,IPv4,VIRTUAL>
2412 srcof hme0 eri0 qfe0
2413 inet 10.0.0.1 netmask ffffffff
2415 flags=20011100c1<UP,RUNNING,NOARP,NOXMIT,ROUTER,IPv4,VIRTUAL> mtu 0
2418 srcof hme0 eri0 qfe0
2419 inet 10.0.0.2 netmask ffffffff
2421 flags=20011100c1<UP,RUNNING,NOARP,NOXMIT,ROUTER,IPv4,VIRTUAL> mtu 0
2424 srcof hme0 eri0 qfe0
2425 inet 10.0.0.3 netmask ffffffff
2427 flags=20011100c1<UP,RUNNING,NOARP,NOXMIT,ROUTER,IPv4,VIRTUAL> mtu 0
2430 srcof hme0 eri0 qfe0
2431 inet 10.0.0.4 netmask ffffffff
2437 There is one virtual interface alias per zone (\fBtest1\fR, \fBtest2\fR, and
2438 \fBtest3\fR). A source address from the virtual interface alias in the same
2439 zone is selected. The virtual interface aliases were created using
2440 \fBzonecfg\fR(1M) as follows:
2445 example% \fBzonecfg -z test1\fR
2446 zonecfg:test1> \fBadd net\fR
2447 zonecfg:test1:net> \fBset physical=vni0\fR
2448 zonecfg:test1:net> \fBset address=10.0.0.2\fR
2455 The \fBtest2\fR and \fBtest3\fR zone interfaces and addresses are created in
2459 \fBExample 11 \fRTurning Off DHCPv6
2462 The following example shows how to disable automatic use of DHCPv6 on all
2463 interfaces, and immediately shut down DHCPv6 on the interface named \fBhme0\fR.
2464 See \fBin.ndpd\fR(1M) and \fBndpd.conf\fR(4) for more information on the
2465 automatic DHCPv6 configuration mechanism.
2470 example% \fBecho ifdefault StatefulAddrConf false >> /etc/inet/ndpd.conf\fR
2471 example% \fBpkill -HUP -x in.ndpd\fR
2472 example% \fBifconfig hme0 dhcp release\fR
2481 \fB\fB/etc/netmasks\fR\fR
2491 \fB\fB/etc/default/inet_type\fR\fR
2495 Default Internet protocol type.
2501 See \fBattributes\fR(5) for descriptions of the following attributes:
2509 ATTRIBUTE TYPE ATTRIBUTE VALUE
2512 Interface Stability for command-line options
2515 Interface Stability for command output Uncommitted
2521 \fBdhcpinfo\fR(1), \fBcfgadm\fR(1M), \fBdhcpagent\fR(1M), \fBdladm\fR(1M),
2522 \fBif_mpadm\fR(1M), \fBin.mpathd\fR(1M), \fBin.ndpd\fR(1M),
2523 \fBin.routed\fR(1M), \fBipmpstat\fR(1M), \fBipsecconf\fR(1M), \fBndd\fR(1M),
2524 \fBnetstat\fR(1M), \fBzoneadm\fR(1M), \fBzonecfg\fR(1M), \fBethers\fR(3SOCKET),
2525 \fBgethostbyname\fR(3NSL), \fBgetnetbyname\fR(3SOCKET), \fBhosts\fR(4),
2526 \fBinet_type\fR(4), \fBndpd.conf\fR(4), \fBnetmasks\fR(4), \fBnetworks\fR(4),
2527 \fBnsswitch.conf\fR(4), \fBattributes\fR(5), \fBprivileges\fR(5),
2528 \fBzones\fR(5), \fBarp\fR(7P), \fBipsecah\fR(7P), \fBipsecesp\fR(7P)
2531 \fISystem Administration Guide: IP Services\fR
2535 \fBifconfig\fR sends messages that indicate if:
2540 the specified interface does not exist
2546 the requested address is unknown
2552 the user is not privileged and tried to alter an interface's configuration
2557 Do not select the names \fBbroadcast\fR, \fBdown\fR, \fBprivate\fR,
2558 \fBtrailers\fR, \fBup\fR or other possible option names when you choose host
2559 names. If you choose any one of these names as host names, it can cause unusual
2560 problems that are extremely difficult to diagnose.