电脑技术学习

UNIX 网络分析

dn001

  不同的操作系统使用不同的方式输出信息(和细节)。清单 3 展示了一个 Linux® 系统的输出。

  清单 3. Linux 系统的输出

eth0   Link encap:Ethernet HWaddr 00:1d:60:1b:9a:2d 
     inet addr:192.168.0.2 Bcast:192.168.3.255 Mask:255.255.252.0
     inet6 addr: fe80::21d:60ff:fe1b:9a2d/64 Scope:Link
     UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
     RX packets:2371085881 errors:36 dropped:0 overruns:0 frame:36
     TX packets:2861233776 errors:0 dropped:0 overruns:0 carrIEr:0
     collisions:0 txqueuelen:1000 
     RX bytes:913269364222 (850.5 GiB) TX bytes:3093820025338 (2.8 TiB)
     Interrupt:23 Base address:0x4000 

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:279755697 errors:0 dropped:0 overruns:0 frame:0
     TX packets:279755697 errors:0 dropped:0 overruns:0 carrier:0
     collisions:0 txqueuelen:0 
     RX bytes:388038389807 (361.3 GiB) TX bytes:388038389807 (361.3 GiB)

  清单 4 展示了 Mac OS X™ 系统的输出。

  清单 4. Mac OS X 系统的输出

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
  inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
  inet 127.0.0.1 netmask 0xff000000 
  inet6 ::1 prefixlen 128 
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
  inet 192.168.0.101 netmask 0xfffffc00 broadcast 192.168.3.255
  ether 00:16:cb:a0:3b:cb 
  media: autoselect (1000baseT <full-duplex,flow-control>) status: active
  supported media: autoselect 10baseT/UTP <half-duplex> 10baseT/UTP 
<full-duplex> 10baseT/UTP <full-duplex,hw-loopback> 10baseT/UTP 
<full-duplex,flow-control> 100baseTX <half-duplex> 100baseTX 
<full-duplex> 100baseTX <full-duplex,hw-loopback> 100baseTX 
<full-duplex,flow-control> 1000baseT <full-duplex> 1000baseT 
<full-duplex,hw-loopback> 1000baseT <full-duplex,flow-control> none
fw0: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 2030
  lladdr 00:17:f2:ff:fe:7b:84:d6 
  media: autoselect <full-duplex> status: inactive
  supported media: autoselect <full-duplex>
en1: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
  ether 00:17:f2:9b:3d:38 
  media: autoselect (<unknown type>)
  supported media: autoselect
en5: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
  inet6 fe80::21c:42ff:fe00:8%en5 prefixlen 64 scopeid 0x7 
  inet 10.211.55.2 netmask 0xffffff00 broadcast 10.211.55.255
  ether 00:1c:42:00:00:08 
  media: autoselect status: active
  supported media: autoselect
en6: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
  inet6 fe80::21c:42ff:fe00:9%en6 prefixlen 64 scopeid 0x8 
  inet 10.37.129.2 netmask 0xffffff00 broadcast 10.37.129.255
  ether 00:1c:42:00:00:09 
  media: autoselect status: active
  supported media: autoselect

标签: