加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

linux查看网卡数量及信息

(2015-03-27 13:36:37)
分类: 技术
[root@db-192-168-173-102 ~]# lspci | grep Ethernet                                                                                 
0a:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)                                            
0a:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)                                            
[root@db-192-168-173-102 ~]# dmesg |grep eth0                                                                                      
igb 0000:0a:00.0: added PHC on eth0                                                                                                
igb 0000:0a:00.0: eth0: (PCIe:5.0Gb/s:Width x2) f8:0f:41:f9:76:a6                                                                  
igb 0000:0a:00.0: eth0: PBA No: 104900-000                                                                                         
ADDRCONF(NETDEV_UP): eth0: link is not ready                                                                                       
igb 0000:0a:00.0: eth0: igb: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX                                           
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready                                                                                  
eth0: no IPv6 routers present                                                                                                      
[root@db-192-168-173-102 ~]# dmesg |grep eth1
igb 0000:0a:00.1: added PHC on eth1                                                                                                
igb 0000:0a:00.1: eth1: (PCIe:5.0Gb/s:Width x2) f8:0f:41:f9:76:a7                                                                  
igb 0000:0a:00.1: eth1: PBA No: 104900-000                                                                                         
[root@db-192-168-173-102 ~]# mii-tool -v eth0                                                                                      
eth0: negotiated 100baseTx-FD, link ok                                                                                             
  product info: vendor 00:55:00, model 59 rev 1                                                                                    
  basic mode:   autonegotiation enabled                                                                                            
  basic status: autonegotiation complete, link ok                                                                                  
  capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD                                                                    
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control                                                       
  link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
[root@db-192-168-173-102 ~]# mii-tool -v eth1
eth1: no link
  product info: vendor 00:55:00, model 59 rev 1
  basic mode:   autonegotiation enabled
  basic status: no link
  capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
[root@db-192-168-173-102 ~]# ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: on (auto)
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes
[root@db-192-168-173-102 ~]# ethtool eth1
Settings for eth1:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Speed: Unknown!
        Duplex: Unknown! (255)
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: off (auto)
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: no
[root@db-192-168-173-102 ~]# ethtool eth2
Settings for eth2:
Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
No data available

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有