This tip is excerpted from TCP/IP Network Administration, Help for Unix System Administrators, by Craig Hunt, published...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
by O'Reilly and Associates.
You can use the ifconfig command when configuring a device's network interface. But the command also can be used to check the status of that configuration. Once you have checked the configuration of an unknown interface, you can then use the ifconfig command to change the configuration as necessary.
For example, to check an interface identified as 1e0, type the command
% ifconfig 1e0and, on a Solaris 2.5.1 system, get
The first line shows the interface name, the flags that define the interfaces characteristics, and the Maximum Transmission Unit (MTU) of this interface. In the example, the interface name is 1e0, and the MTU is 1500 bytes. The flags are displayed as both a numeric value and a set of keywords. The interfaces flags have the numeric value 863, which corresponds to:
The interface is enabled.
The interface supports broadcasts, which means it is connected to a network that supports broadcasts, such as an Ethernet.
This interface does not support trailer encapsulation. This is an Ethernet-specific characteristic.
This interface is operational.
This interface supports multicasting.
The second line of ifconfig output displays information that directly relates to TCP/IP. The keyword inet is followed by the Internet address assigned to this interface. Next comes the keyword netmask, followed by the address mask written in hexadecimal. Finally, the keyword broadcast and the broadcast address are displayed.