-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update content src/site/notes/OperatingSystem/Linux/network/network c…
…ard.md
- Loading branch information
1 parent
065d5b2
commit 08e138b
Showing
1 changed file
with
34 additions
and
33 deletions.
There are no files selected for viewing
67 changes: 34 additions & 33 deletions
67
src/site/notes/OperatingSystem/Linux/network/network card.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
--- | ||
dg-publish: true | ||
--- | ||
查看网卡的pci地址(新版的linux的网卡一般可以通过网卡名识别) | ||
`ethtool -i ens7` | ||
![Pasted image 20230717213002.png](/img/user/OperatingSystem/Linux/network/pics/Pasted%20image%2020230717213002.png) | ||
查看对应的内核模块 | ||
`lspci -s 0000:04:00.0 -vv` | ||
![Pasted image 20230717213217.png](/img/user/OperatingSystem/Linux/network/pics/Pasted%20image%2020230717213217.png) | ||
查看内核模块对应的ko文件 | ||
`modinfo r8169` | ||
![Pasted image 20230717213341.png](/img/user/OperatingSystem/Linux/network/pics/Pasted%20image%2020230717213341.png) | ||
查看文件对应的deb包或者rpm包 | ||
`dpkg -S filepath` or `rpm -qf filepath` | ||
![Pasted image 20230717213446.png](/img/user/OperatingSystem/Linux/network/pics/Pasted%20image%2020230717213446.png) | ||
|
||
#network/bond | ||
查看当前所有的bond | ||
`cat /proc/net/bonding/*` | ||
删除bond | ||
`ip link delete bond0 type bond` | ||
将bond的slave网卡删除 | ||
`ip link set eth0 nomaster` | ||
查看bond的所有slave interfaces | ||
`cat /proc/net/bonding/bond0|grep -i slave` | ||
|
||
查看网络包 | ||
```bash | ||
tcpdump -i <interface> host <host_ip> | ||
arping <hostip> | ||
``` | ||
查看当前主机的arp cache | ||
如下可以看见openwrt的ip为192.168.66.100,对应的mac地址是56:35:9d:10:0c:c8 | ||
--- | ||
{"dg-publish":true,"permalink":"/OperatingSystem/Linux/network/network card/","noteIcon":"3"} | ||
--- | ||
|
||
查看网卡的pci地址(新版的linux的网卡一般可以通过网卡名识别) | ||
`ethtool -i ens7` | ||
![Pasted image 20230717213002.png](/img/user/OperatingSystem/Linux/network/pics/Pasted%20image%2020230717213002.png) | ||
查看对应的内核模块 | ||
`lspci -s 0000:04:00.0 -vv` | ||
![Pasted image 20230717213217.png](/img/user/OperatingSystem/Linux/network/pics/Pasted%20image%2020230717213217.png) | ||
查看内核模块对应的ko文件 | ||
`modinfo r8169` | ||
![Pasted image 20230717213341.png](/img/user/OperatingSystem/Linux/network/pics/Pasted%20image%2020230717213341.png) | ||
查看文件对应的deb包或者rpm包 | ||
`dpkg -S filepath` or `rpm -qf filepath` | ||
![Pasted image 20230717213446.png](/img/user/OperatingSystem/Linux/network/pics/Pasted%20image%2020230717213446.png) | ||
|
||
#network/bond | ||
查看当前所有的bond | ||
`cat /proc/net/bonding/*` | ||
删除bond | ||
`ip link delete bond0 type bond` | ||
将bond的slave网卡删除 | ||
`ip link set eth0 nomaster` | ||
查看bond的所有slave interfaces | ||
`cat /proc/net/bonding/bond0|grep -i slave` | ||
|
||
查看网络包 | ||
```bash | ||
tcpdump -i <interface> host <host_ip> | ||
arping <hostip> | ||
``` | ||
查看当前主机的arp cache | ||
如下可以看见openwrt的ip为192.168.66.100,对应的mac地址是56:35:9d:10:0c:c8 | ||
![Pasted image 20230825001905.png](/img/user/pics/Pasted%20image%2020230825001905.png) |