Ubuntu 22.04系统中arp命令输出疑问及USB以太网适配器相关问题咨询
Ubuntu 22.04系统中arp命令输出疑问及USB以太网适配器相关问题咨询
我之前查过资料,了解到arp命令是用来显示IP地址和MAC地址之间的映射关系的,但在Ubuntu 22.04系统上看到的输出让我有点困惑。
我的arp命令输出如下:
_gateway (192.168.107.172) at 3a:65:d4:6d:20:cf [ether] on wlp0s20f3
我原本以为这个输出表示:有一个MAC地址为3a:65:d4:6d:20:cf的以太网适配器,对应的IP地址是192.168.107.172。但当我运行ifconfig查看本地网络配置时,却找不到这个IP地址:
enp84s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 7c:57:58:80:1c:61 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 device memory 0x54000000-540fffff enx00e04c680202: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.200.100 netmask 255.255.255.0 broadcast 192.168.200.255 ether 00:e0:4c:68:02:02 txqueuelen 1000 (Ethernet) RX packets 124 bytes 11140 (11.1 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 28 bytes 2981 (2.9 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enxa0cec8c97ebc: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether a0:ce:c8:c9:7e:bc 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 13849 bytes 1664000 (1.6 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 13849 bytes 1664000 (1.6 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.107.238 netmask 255.255.255.0 broadcast 192.168.107.255 inet6 fe80::6a85:ef4a:7e3c:be96 prefixlen 64 scopeid 0x20<link> inet6 2a01:cb16:2068:7c6c:8e00:94e:c979:548e prefixlen 64 scopeid 0x0<global> inet6 2a01:cb16:2068:7c6c:d2f4:5a68:7bd8:e5d7 prefixlen 64 scopeid 0x0<global> ether 3c:e9:f7:a7:1c:0f txqueuelen 1000 (Ethernet) RX packets 209228 bytes 203369040 (203.3 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 113025 bytes 26069725 (26.0 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
我注意到arp输出里提到的网卡wlp0s20f3,它的IP地址是192.168.107.238,而不是192.168.107.172,这和我之前的理解完全不符,实在想不通是怎么回事。
另外,我还使用了一个USB以太网适配器(enx00e04c680202),但它并没有出现在arp的输出列表里。我想问的是:USB以太网适配器难道没有MAC地址吗?
我已经查了不少相关资料,但始终没找到能解答这些疑问的答案,希望有人能帮我理清这些问题。
备注:内容来源于stack exchange,提问作者Alex
相关产品推荐
相关产品推荐

