❶ 怎樣查看 linux 的網卡信息
查看 linux 的網卡信息步驟如下:
工具原料:linux操作系統
①啟動 linux 操作系統,進入到桌面;
④linux 的網卡信息解讀:
1.查看網卡生產廠商和信號:
查看基本信息:lspci
查看詳細信息:lspci -vvv # 3個小寫的v
查看網卡信息:lspci | grep Ethernet;
2.查看網卡驅動:
查看網卡驅動信息:lspci -vvv # 找到網卡設備的詳細信息,包括網卡驅動
# lsmod 列出載入的所有驅動,包括網卡驅動;
3.查看網卡驅動版本
查看模塊信息:modifo<mole name> # 其中包含version信息或 # ethtool-i <device name>;
4.查看網路介面隊列數
查看網卡介面的中斷信息:#cat /proc/interrupts | grep eth0或 # ethtool-S eth0;
5.查看網卡驅動源碼的版本號
解壓Intel網卡驅動源碼,打開解壓縮目錄下的*.spec文件查看驅動的版本;
❷ 怎樣查看 linux 的網卡信息
Linux查看網卡信息,可以通過nmcli命令來進行獲取:
1、查看網卡信息
❸ linux多網卡機上如何通過工具查看各網卡是否接入網路
一、通過mii-tool指令
[root@linuxzgf ~]# mii-tool
//mii-tool主要是用於配置網卡工作模式的指令,同時也可以進行查詢、監控等工作!
二、ethtool
[root@linuxzgf ~]# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: yes
從上面 Link detected 可以看出eth0 處於連接狀態
三.[root@linuxzgf ~]# /etc/init.d/network status
配置設備:
lo eth0 eth0.10 eth0.2 eth0.3 eth0.4 eth0.5 eth0.7 eth0.8 eth1
當前的活躍設備:
lo eth0 eth0.10
[四、ifconfig -a
[root@linuxzgf ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:E0:81:80:D8:96
inet6 addr: fe80::2e0:81ff:fe80:d896/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:626032 errors:0 dropped:0 overruns:0 frame:0
TX packets:415035 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:123631002 (117.9 MiB) TX bytes:297575498 (283.7 MiB)
Base address:0x2000 Memory:df300000-df320000
eth1 Link encap:Ethernet HWaddr 00:E0:81:80:D8:97
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Base address:0x2020 Memory:df320000-df340000
五、lspci也可以看到網卡的信息
❹ linux 網卡狀態命令mii-tool 和 ethtool
linux下用mii-tool和ethtool 查看網線是否正確連接到網卡
輸入mii-tool可以查看網線是否連接到網卡
有時驅動可能不支持會出錯下列錯誤
可以使用ethtool查看
Link detected: yes為正常no為失敗
mii-tool 的用法:
mii-tool 在更改網路設備通信協商方式的方法比較簡單,用 -v 參數來查看網路介面的狀態;看下面的例子;
mii-tool 更改網路介面協商的方法;
[root@localhost ~]# mii-tool --help
usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...]
-V, --version display version information
-v, --verbose more verbose output 註:顯示網路介面的信息;
-R, --reset reset MII to poweron state 註:重設MII到開啟狀態;
-r, --restart restart autonegotiation 註:重啟自動協商模式;
-w, --watch monitor for link status changes 註:查看網路介面連接的狀態變化;
-l, --log with -w, write events to syslog 註:寫入事件到系統日誌;
-A, --advertise=media,... advertise only specified media 註:指令特定的網路介面;
-F, --force=media force specified media technology 註:更改網路介面協商方式;
media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,
(to advertise both HD and FD) 100baseTx, 10baseT
example:
[at_Neal:root:~:]# mii-tool
eth0: negotiated 100baseTx-FD flow-control, link ok
eth1: no link
eth2: negotiated 100baseTx-FD flow-control, link ok
❺ 怎樣查看 linux 的網卡信息
進入到網卡配置文件所在的目錄,然後編輯網卡配置文件填入下面的信息:
[root@linuxprobe ~]# cd /etc/sysconfig/network-scripts/
[root@linuxprobe network-scripts]# vim ifcfg-eno16777736
TYPE=Ethernet
BOOTPROTO=static
NAME=eno16777736
ONBOOT=yes
IPADDR=192.168.10.10
NETMASK=255.255.255.0
GATEWAY=192.168.10.1
DNS1=192.168.10.1
執行重啟網卡設備的命令,正常情況不會有提示信息,然後通過ping命令測試網路能否聯通。
[root@linuxprobe network-scripts]# systemctl restart network
[root@linuxprobe network-scripts]# ping 192.168.10.10
PING 192.168.10.10 (192.168.10.10) 56(84) bytes of data.
64 bytes from 192.168.10.10: icmp_seq=1 ttl=64 time=0.081 ms
64 bytes from 192.168.10.10: icmp_seq=2 ttl=64 time=0.083 ms
64 bytes from 192.168.10.10: icmp_seq=3 ttl=64 time=0.059 ms
64 bytes from 192.168.10.10: icmp_seq=4 ttl=64 time=0.097 ms
^C
--- 192.168.10.10 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.059/0.080/0.097/0.013 ms
更多Linux相關信息查看:http://www.linuxprobe.com/chapter-04.html#414_Yum