1、文档链接

2、知识点:

1、查看可使用的端口:

sysctl net.ipv4.ip_local_port_rangecat

2、查看mac地址配置文件

cat /etc/sysconfig/network-scripts/ifcfg-eth0

3、ip地址配置文件

/etc/udev/rules.d/70-persistent-net.rules

4、查看网卡的状态

  1. [root@centos ~]# ethtool ens32
  2. Settings for ens32:
  3. Supported ports: [ TP ]
  4. Supported link modes: 10baseT/Half 10baseT/Full
  5. 100baseT/Half 100baseT/Full
  6. 1000baseT/Full
  7. Supported pause frame use: No
  8. Supports auto-negotiation: Yes
  9. Supported FEC modes: Not reported
  10. Advertised link modes: 10baseT/Half 10baseT/Full
  11. 100baseT/Half 100baseT/Full
  12. 1000baseT/Full
  13. Advertised pause frame use: No
  14. Advertised auto-negotiation: Yes
  15. Advertised FEC modes: Not reported
  16. Speed: 1000Mb/s
  17. Duplex: Full
  18. Port: Twisted Pair
  19. PHYAD: 0
  20. Transceiver: internal
  21. Auto-negotiation: on
  22. MDI-X: off (auto)
  23. Supports Wake-on: d
  24. Wake-on: d
  25. Current message level: 0x00000007 (7)
  26. drv probe link
  27. Link detected: yes

Link detected:yes表示有网线插入
如果Link detected:no 的话,尝试用命令ifconfig eth2 up,如果用ethtool查看任然为no的话,才能说明此网卡确实没有网线插入。