Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use the arp command of linux to manipulate the system arp cache

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the use of linux arp command manipulation system arp cache, the article is very detailed, has a certain reference value, interested friends must read it!

The English word for arp command is spelled "Address Resolution Protocol". This command is used to manipulate the host's arp cache. It can display all entries in the arp cache, delete specified entries, or add static ip addresses to MAC addresses.

Syntax format: arp [parameters] [IP]

Common parameters:

-a displays all entries in the arp cache, the host bit optional parameter-H specifies the type of address used by the arp instruction-d removes the arp entry for the specified host from the arp cache-D uses the hardware address of the specified interface-e displays the entries in the arp cache in the linux display style-I specifies the network interface to manipulate the arp cache-n displays entries in the arp cache digitally-v displays detailed arp cache entries Includes statistics for cache entries-f sets the static mapping of the host's IP address to MAC address

Reference example

Displays all records in the native arp cache:

[root@linuxcool ~] # arp

Address HWtype HWaddress Flags Mask Iface

Gateway ether 00:03:0f:81:6b:f1 C ens160

Digitally display specified host arp cache entries:

[root@linuxcool] # arp-n 192.168.60.1

Address HWtype HWaddress Flags Mask Iface

192.168.60.1 ether 00:03:0f:81:6b:f1 C ens160

Delete the entry in the arp table of 192.168.60.1 on interface eth2:

[root@linuxcool] # arp-I eth2-d 192.168.60.1

Answer the arp request for 192.168.60.2 on eth0 using the MAC address of eth2:

[root@linuxcool] # arp-I eth0-Ds 192.168.60.2 eth2 pub is all the contents of the arp cache using linux's arp command to manipulate the system. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report