Per*_*ulf 4 linux networking ipv6 ipv4 iproute
假设我想使用:
$ ip ntable show dev eth0
inet arp_cache
dev eth0
refcnt 4 reachable 20744 base_reachable 30000 retrans 1000
gc_stale 60000 delay_probe 5000 queue 31
app_probes 0 ucast_probes 3 mcast_probes 3
anycast_delay 1000 proxy_delay 800 proxy_queue 64 locktime 1000
inet6 ndisc_cache
dev eth0
refcnt 1 reachable 40768 base_reachable 30000 retrans 1000
gc_stale 60000 delay_probe 5000 queue 31
app_probes 0 ucast_probes 3 mcast_probes 3
anycast_delay 1000 proxy_delay 800 proxy_queue 64 locktime 0
Run Code Online (Sandbox Code Playgroud)
什么ndisc_cache
?
在 IPv4 网络中,邻居表是使用地址解析协议编写的。这些表通常称为“ARP 表”。它们在 MAC 地址(链路层中的地址)中解析 IP 地址(网络层中的地址),反之亦然。您可以通过命令arp -a
或列出该表的条目ip neigh show
。
另一方面,在 IPv6 Internet 协议套件中,ARP 协议的功能由名为Neighbor Discovery Protocol的更高级协议提供。
该ip ntable show
命令提供有关给定网络设备的邻居表的信息,因此:
arp_cache
代表 IPv4 网络的 ARP 表(ARP 缓存)。ndisc_cache
代表 IPv6 网络的 NDP 表(邻居缓存)。