10.2.3.2. The ifconfig command
While ip is the most novel way to
configure a Linux system, ifconfig is still
very popular. Use it without option for displaying network
interface information:
els@asus:~$ /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:70:31:2C:14
inet addr:60.138.67.31 Bcast:66.255.255.255 Mask:255.255.255.192
inet6 addr: fe80::250:70ff:fe31:2c14/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31977764 errors:0 dropped:0 overruns:0 frame:0
TX packets:51896866 errors:0 dropped:0 overruns:0 carrier:0
collisions:802207 txqueuelen:1000
RX bytes:2806974916 (2.6 GiB) TX bytes:2874632613 (2.6 GiB)
Interrupt:11 Base address:0xec00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:765762 errors:0 dropped:0 overruns:0 frame:0
TX packets:765762 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:624214573 (595.2 MiB) TX bytes:624214573 (595.2 MiB)
|
Here, too, we note the most important aspects of the interface
configuration:
Both ifconfig and ip display more detailed configuration information
and a number of statistics about each interface and, maybe most
important, whether it is "UP" and
"RUNNING".