Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1326153
  • 博文数量: 268
  • 博客积分: 10698
  • 博客等级: 上将
  • 技术积分: 2867
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-14 22:21
文章分类

全部博文(268)

文章存档

2012年(19)

2011年(13)

2010年(29)

2009年(26)

2008年(99)

2007年(82)

我的朋友

分类: LINUX

2007-12-04 03:41:05

ip与ethtool的功能与传统的ifconfig类似,而且功能更强。

ip下载:apt-get install iproute
ethtool
下载:apt-get install ethtool

三个命令对比一下:

# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:E0:22:02:25:46 
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:22ff:fe02:2546/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:356164 errors:0 dropped:0 overruns:0 frame:0
          TX packets:386966 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:282006398 (268.9 MiB)  TX bytes:266167552 (253.8 MiB)
          Interrupt:18 Base address:0xcc00

# ip addr
1: lo: mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:e0:22:02:25:46 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.2/24 brd 192.168.1.255 scope global eth0
    inet6 fe80::2e0:22ff:fe02:2546/64 scope link
       valid_lft forever preferred_lft forever

# ip link
1: lo: mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:e0:22:02:25:46 brd ff:ff:ff:ff:ff:ff

#  ip -s link ls dev eth0
2: eth0: mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:e0:22:02:25:46 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped overrun mcast  
    287018517  364010   0       0       0       0     
    TX: bytes  packets  errors  dropped carrier collsns
    272957602  395576   0       0       0       0

# ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 32
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: d
        Current message level: 0x00000007 (7)
        Link detected: yes
阅读(5144) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~