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 ]
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, inet6, and ns.
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.
For the Xerox Network Systems (XNS) family, ns, addresses are net:a.b.c.d.e.f., where net is the assigned network number (in decimals), and each of the 6 bytes of the host number, a through f, are specified in hexadecimal. The host number may be omitted on 10-Mbps Ethernet interfaces, which use the hardware physical address, and on interfaces other than the first interface.
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.
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, inet6, and ns 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: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In AIX 4.3.3 and later versions, the following network options, commonly known as ISNO (Interface Specific Network Options), can be configured on a per interface basis:
Note: ISNO parameters set by ifconfig are lost at the next reboot. Use the chdev command to change the ODM database for each interface if you wish to make the ISNOs permanent. Use lsdev -E -l [interface] to see the interface attributes and chdev -l -a [attribute=value] to change the desired attribute. For example:lsattr -E -l en0 chdev -l en0 -a tcp_sendspace=65536
The following are examples using the ifconfig command on a TCP/IP network and an XNS network:
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 ns 110:02.60.8c.2c.a4.98 up
In this example, ns is the XNS address family, 110 is the network number and 02.60.8c.2c.a4.98 is the host number, which is the Ethernet address unique to each individual interface. Specify the host number when there are multiple Ethernet hardware interfaces, as the default may not correspond to the proper interface. The Ethernet address can be obtained by the commands:
ifconfig en0 netstat -v
The XNS address can be represented several ways, as shown in the following examples:
The XNS address in the first example is in decimal format. The address in the second example is broken into groups of three digits, with each group separated by a - (minus sign). The 0x and H addresses are in hex format. Finally, the 0 in front of the last address indicates that the number is in octal format.
ifconfig et0 ns 120:02.60.8c.2c.a4.98 up
The en0 and et0 interfaces are considered as separate interfaces even though the same Ethernet adapter is used. Two separate networks can be defined and used at the same time as long as they have separate network numbers. Multiple Ethernet adapters are supported.
Note: The host number should correspond to the Ethernet address on the hardware adapter. A system can have multiple host numbers.
ifconfig en0 inet 11.0.0.1 up ifconfig en0 ns 110:02.60.8c.2c.a4.98 up ifconfig en0 ns 130:02.60.8c.34.56.78 ipdst 11.0.0.10
The first command brings up the Internet with the inet address 11.0.0.1. The second command configures the en0 interface to be network 110 and host number 02.60.8c.2c.a4.98 in the ns address family. This defines the host number for use when the XNS packet is encapsulated within the Internet packet. The last command defines network 130, host number 02.60.8c.34.56.78, and destination Internet address 11.0.0.10. This last entry creates a new network interface, nsip. Use the netstat -i command for information about this interface.
/etc/host | Contains the host-name database. |
/etc/networks | Contains network names. |
The netstat command.
The hosts file format, networks file format.
TCP/IP Network Interfaces, Understanding Protocols, TCP/IP Routing, Subnet Addresses in AIX 5L Version 5.2 System Management Guide: Communications and Networks.
Xerox Network Systems (XNS) Overview for Programming in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.