Configures or displays network interface parameters for a network using TCP/IP.
ifconfig interface [ addressfamily [ address [ destinationaddress ] ] [ parameters... ] ]
ifconfig interface [ protocolfamily ] interface protocolfamily
ifconfig -a [ -l ] [ -d ] [ -u ] [ protocolfamily ]
ifconfig interface [ tcp_low_rto rto | -tcp_low_rto ]
You can use the ifconfig command to assign an address to a network interface and to configure or display the current network interface configuration information. The ifconfig command must be used at system startup to define the network address of each interface present on a machine. After system startup, it can also be used to redefine an interfaces address and its other operating parameters. The network interface configuration is held on the running system and must be reset at each system restart. The ifconfig command interprets the IFF_MULTICAST flag and prints its value if it is set.
An interface can receive transmissions in differing protocols, each of which may require separate naming schemes. It is necessary to specify the addressfamily parameter, which may change the interpretation of the remaining parameters. The address families currently supported are inet and inet6.
For the DARPA-Internet family, inet, the address is either a host name present in the host name database, that is, the /etc/hosts file, or a DARPA-Internet address expressed in the Internet standard dotted decimal notation.
While any user can query the status of a network interface, only a user who has administrative authority can modify the configuration of those interfaces.
The ifconfig function 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.
Only a super user may modify the configuration of a network interface.
Gratuitous ARP is supported for Ethernet, token-ring, and FDDI interfaces. This means when an IP address is assigned, the host sends an ARP request for its own address (the new address) to inform other machines of its address so that they can update their ARP entry immediately. It also lets hosts detect duplicate IP address. If you get a response to the ARP request, an error is logged in /var/adm/ras/errlog which can be viewed using errpt command (or using SMIT interface) for the error ID AIXIF_ARP_DUP_ADDR.
ib0:flags=e3a0063<UP,BROADCAST,NOTRAILERS,RUNNING,ALLCAST,MULTICAST,GROUPRT>
pmtu 2048 qkey
0x1e qpn 0x48 lid 0x5c hca iba0 port 1 inet 1.2.3.120 netmask 0xffffff00 broadcast
1.2.3.255 inet6
fe80::2:c903:1:1e8d/64 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
The
interface now displays the path mtu (pmtu), Queue Key (qkey), Queue
Pair Number (qpn), Local ID (lid), Host Channel Adapter (hca), and
the port number (port). This information is useful during debugging
or performing diagnostics.Item | Description |
---|---|
-a | Optionally, the -a flag may be used instead of an interface name. This flag instructs ifconfig to display information about all interfaces in the system. |
-d | The -d flag displays interfaces that are down. You can use the flag only with the -a or -l flag. |
-l | This flag may be used to list all available interfaces on the system, with no other additional information. Use of this flag is mutually exclusive with all other flags and commands, except for -d and -u. |
-u | The -u flag displays interfaces that are up. You can use the flag only with the -a or -l flag. |
protocolfamily | This flag specifies protocols such as tcp, udp, tcp6, udp6, icmp, and icmp6. |
Item | Description |
---|---|
address | Specifies the network address for the network interface. For the inet family, the address parameter is either a host name or an Internet address in the standard dotted decimal notation. |
addressfamily | Specifies which network address family to change. The inet and inet6 address families are currently supported. This parameter defaults to the inet address family. |
destinationaddress | Specifies the address of the correspondent on the remote end of a point-to-point link. |
interface | Specifies the network interface configuration values to show
or change. You must specify an interface with the interface parameter
when you use the ifconfig command. Abbreviations for the interfaces
include:
Include a numeral after the abbreviation to identify the specific interface (for example, tr0). If interface is not yet loaded, ifconfig interface loads that interface and netstat -in lists it. In processing a status query for interface, that interface is loaded (if not already loaded) to complete the query processing. |
parameter | Allows the following parameter values:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rto | Specifies the retransmission timeout in milliseconds. The range
for this value is 0 - 3000. Requirement: You must set the timer_wheel_tick value of the no command before setting the rto value using the ifconfig command. The rto value that you specify must be equal to or a multiple of 10 times the timer_wheel_tick value that is set. |
In AIX 4.3.3 and later versions, the following network options, commonly known as Interface Specific Network Options (ISNO), can be configured on a per interface basis:
Tip: Parameters that you set by using the ifconfig command are lost the next time you restart your system. Use the chdev command to change the Object Data Manager (ODM) database for each interface to make parameter changes permanent. Use the lsattr -E -l [interface] command to view the interface attributes and use the chdev -l [interface] -a [attribute=value] command to change the attribute. For example:lsattr -E -l en0 chdev -l en0 -a tcp_sendspace=65536
ifconfig sl1
In
this example, the interface to be queried is sl1. The result
of the command looks similar to the following: sl1: flags=51<UP,POINTOPOINT,RUNNING>
inet 192.9.201.3 --> 192.9.354.7 netmask ffffff00
ifconfig lo0 inet 127.0.0.1 up
ifconfig tr0 inet down
In
this example, the interface to be marked is token0.Note: Only a user with root user authority can modify the configuration of a network interface.
ifconfig en0 rfc1323 0
ifconfig vi0 vipa_iflist en0,en1,tr0
ifconfig vi0 -vipa_iflist en1,tr0
ifconfig vi0
ifconfig en0 monitor
If
the link status on adapter ent0 changes to down,
the adapter notifies the interface layer, which causes the interface
to also be marked as down.ifconfig gre0 tunnel 9.3.149.70 9.3.149.121
This
creates a GRE tunnel between the local interface 9.3.149.70 and
the remote interface 9.3.149.121. The local end of
the tunnel is identified by gre0. ifconfig gre0 10.10.10.1
ifconfig gre0 nat toaddr 127.0.0.1 fromport 80 toport 8080
In
this example, the original destination port of the GRE packet is 80 and
the command changes the destination port to 8080 and
the destination address to 127.0.0.1.ifconfig gif0 10.10.10.1 netmask 255.255.255.0 tunnel 2000::4612:6995:6c4a:fa6e
10.10.10.10,2000::4612:6995:6c4a:fa6a 10.10.10.11,2000::4612:6995:6c4a:
fa6b 15.15.15.1,2000::4612:6995:6c4a:f777
The command creates
a one-to-many tunnel between the source (2000::4612:6995:6c4a:fa6e)
and the following three targets: ifconfig gif0 10.10.10.1 netmask 255.255.255.0 tunnel 2000::4612:6995:6c4a:fa6e
10.10.10.10,2000::4612:6995:6c4a:fa66
The command creates
a GIF tunnel between the source (2000::4612:6995:6c4a:fa6e)
and the target (2000::4612:6995:6c4a:fa66). Item | Description |
---|---|
/etc/host | Contains the host-name database. |
/etc/networks | Contains network names. |