The ifconfig command displays information about the configuration of an interface that you specify. (Refer to the ifconfig(1M) man page for details.) The syntax of ifconfig is:
ifconfig interface-name [protocol_family]
Task |
Description |
For Instructions, Go To ... |
---|---|---|
Get information about a specific interface. |
Involves using the ifconfig command. | |
Get information about all interfaces on a network. |
Involves using the -a option of the ifconfig command. |
"nsswitch.conf File -- Specifying Which Name Service to Use" |
For an le0 interface, your output resembles the following:
le0: flags=863<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 129.144.44.140 netmask ffffff00 broadcast 129.144.44.255 ether 8:0:20:8:el:fd |
The flags section just given shows that the interface is configured "up," capable of broadcasting, and not using "trailer" link level encapsulation. The mtu field tells you that this interface has a maximum transfer size of 1500 octets. Information on the second line includes the IP address of the host you are using, the netmask being currently used, and the IP broadcast address of the interface. The third line gives the machine address (Ethernet, in this case) of the host.
A useful ifconfig option is -a, which provides information on all interfaces on your network.
le0: flags=49<UP,LOOPBACK,RUNNING> mtu 8232 inet 127.144.44.140 netmask ff000000 le0:flags=863<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 129.144.44.140 netmask ffffff00 broadcast 129.144.44.255 ether 8:0:20:8:el:fd |
Output that indicates an interface is not running might mean a problem with that interface. In this case, see the ifconfig(1M) man page.