第一个是万兆网,没有连线,第二个是千兆网,连线了。
scutech@infokist-arm:~$ ethtool enp130s0f1 Settings for enp130s0f1: Supported ports: [ FIBRE ] Supported link modes: 1000baseT/Full 10000baseT/Full Supported pause frame use: Symmetric Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 1000baseT/Full 10000baseT/Full Advertised pause frame use: Symmetric Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: Unknown! Duplex: Unknown! (255) Port: FIBRE PHYAD: 0 Transceiver: internal Auto-negotiation: on Cannot get wake-on-lan settings: Operation not permitted Current message level: 0x00000007 (7) drv probe link Link detected: no scutech@infokist-arm:~$ ethtool enp125s0f0 Settings for enp125s0f0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Link partner advertised pause frame use: Symmetric Receive-only Link partner advertised auto-negotiation: Yes Link partner advertised FEC modes: Not reported Speed: 1000Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Cannot get wake-on-lan settings: Operation not permitted Link detected: yes scutech@infokist-arm:~$
up以后才能看到网卡link
scutech@infokist-arm:~$ ifconfig enp130s0f0 up SIOCSIFFLAGS: Operation not permitted scutech@infokist-arm:~$ sudo ifconfig enp130s0f0 up [sudo] password for scutech: scutech@infokist-arm:~$ sudo ifconfig enp130s0f1 up scutech@infokist-arm:~$ ethtool enp130s0f0 Settings for enp130s0f0: Supported ports: [ FIBRE ] Supported link modes: 1000baseT/Full 10000baseT/Full Supported pause frame use: Symmetric Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 1000baseT/Full 10000baseT/Full Advertised pause frame use: Symmetric Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: 10000Mb/s Duplex: Full Port: FIBRE PHYAD: 0 Transceiver: internal Auto-negotiation: on Cannot get wake-on-lan settings: Operation not permitted Current message level: 0x00000007 (7) drv probe link Link detected: yes scutech@infokist-arm:~$ ethtool enp130s0f1 Settings for enp130s0f1: Supported ports: [ FIBRE ] Supported link modes: 1000baseT/Full 10000baseT/Full Supported pause frame use: Symmetric Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 1000baseT/Full 10000baseT/Full Advertised pause frame use: Symmetric Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: Unknown! Duplex: Unknown! (255) Port: FIBRE PHYAD: 0 Transceiver: internal Auto-negotiation: on Cannot get wake-on-lan settings: Operation not permitted Current message level: 0x00000007 (7) drv probe link Link detected: no scutech@infokist-arm:~$ sudo ip addr add 10.168.85.145/24 dev enp130s0f0 scutech@infokist-arm:~$ ifconfig enp125s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.87.145 netmask 255.255.255.0 broadcast 192.168.87.255 inet6 fe80::7a17:beff:fec4:39c1 prefixlen 64 scopeid 0x20<link> ether 78:17:be:c4:39:c1 txqueuelen 1000 (Ethernet) RX packets 12017 bytes 769909 (769.9 KB) RX errors 0 dropped 628 overruns 0 frame 0 TX packets 1632 bytes 150951 (150.9 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp130s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.168.85.145 netmask 255.255.255.0 broadcast 0.0.0.0 inet6 fe80::210:caff:feee:126 prefixlen 64 scopeid 0x20<link> ether 00:10:ca:ee:01:26 txqueuelen 1000 (Ethernet) RX packets 1 bytes 243 (243.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 10 bytes 796 (796.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp130s0f1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 00:10:ca:ee:01:27 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 316 bytes 23997 (23.9 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 316 bytes 23997 (23.9 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 scutech@infokist-arm:~$ ping 10.168.85.178 PING 10.168.85.178 (10.168.85.178) 56(84) bytes of data. 64 bytes from 10.168.85.178: icmp_seq=1 ttl=64 time=0.348 ms 64 bytes from 10.168.85.178: icmp_seq=2 ttl=64 time=0.147 ms ^C --- 10.168.85.178 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1003ms rtt min/avg/max/mdev = 0.147/0.247/0.348/0.101 ms scutech@infokist-arm:~$