HOME > > >

ifconfig

ネットワークインターフェイスの表示、設定。オプション無しの場合、アクティブなインターフェイスの情報を表示する。

書式

  1. ifconfig [-v] [-a] [-s] [interface]
  2. ifconfig [-v] interface [aftype] options | address ...

実行例

  1. $ ifconfig
  2. eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
  3.         inet [IP]  netmask 255.255.254.0  broadcast [IP]
  4.         inet6 [IP]  prefixlen 64  scopeid 0x0<global>
  5.         inet6 [IP]  prefixlen 64  scopeid 0x20<link>
  6.         ether 9c:a3:ba:01:d5:ca  txqueuelen 1000  (Ethernet)
  7.         RX packets 1976379671  bytes 194934785545 (181.5 GiB)
  8.         RX errors 0  dropped 0  overruns 0  frame 0
  9.         TX packets 73610661  bytes 33345322057 (31.0 GiB)
  10.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  11.  
  12. eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
  13.         ether 9c:a3:ba:03:5c:6a  txqueuelen 1000  (Ethernet)
  14.         RX packets 0  bytes 0 (0.0 B)
  15.         RX errors 0  dropped 0  overruns 0  frame 0
  16.         TX packets 0  bytes 0 (0.0 B)
  17.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  18.  
  19. eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
  20.         ether 9c:a3:ba:04:e3:0a  txqueuelen 1000  (Ethernet)
  21.         RX packets 0  bytes 0 (0.0 B)
  22.         RX errors 0  dropped 0  overruns 0  frame 0
  23.         TX packets 0  bytes 0 (0.0 B)
  24.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  25.  
  26. lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
  27.         inet 127.0.0.1  netmask 255.0.0.0
  28.         inet6 ::1  prefixlen 128  scopeid 0x10<host>
  29.         loop  txqueuelen 0  (Local Loopback)
  30.         RX packets 226761  bytes 24572233 (23.4 MiB)
  31.         RX errors 0  dropped 0  overruns 0  frame 0
  32.         TX packets 226761  bytes 24572233 (23.4 MiB)
  33.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  1. $ ifconfig -s
  2. Iface      MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
  3. eth0      1500 1976381202      0      0 0      73610722      0      0      0 BMRU
  4. eth1      1500        0      0      0 0             0      0      0      0 BMRU
  5. eth2      1500        0      0      0 0             0      0      0      0 BMRU
  6. lo       65536   226763      0      0 0        226763      0      0      0 LRU