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

How to use the arping command

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

Function description:

Arping:send ARP REQUEST to a neighbour host (sends arp requests to neighboring hosts)

Usage:

Arping [- AbDfhqUV] [- c count] [- w deadline] [- s source]-I interface destination

Common options:

Required parameters:

-A:ARP reply mode to update neighbor arp

-D: check whether an IP is used, followed by an IP address

-f: quit when arp receives the first reply

-U: active ARP mode, updating neighbor's arp table

Optional parameters:

-c: number of packets sent

-w: set the timeout

-I: specifies the Ethernet device to be used, using eth0 by default

-s: specify the source IP address

Usage 1:

Send an arp request to get the MAC address of the other party

# arping 192.168.0.1 / / send an arp request to the specified IP

Usage 2:

Sends an arp request to the specified host and automatically exits when the first packet is received

# arping-f 192.168.0.1

Usage 3:

Specify the number of times to send arp requests

# arping-c 3 192.168.0.1

Usage 4:

Test whether an IP in the local area network is occupied. A return value of 1 means it is used, and 0 means it is not used.

# arping-D 192.168.50.163-w 5

Usage 5: when an ip switch occurs when you write your own script, you only need to send an arp cleanup request command to the gateway.

Update the arp table of the specified host for this IP, mainly for cases where an ip was previously bound to one host and then switched to another host

# arping-U-s 192.168.50.164 192.168.50.198

-U: update the arp table of the specified host

-s: specify the source address (IP to be switched) and the destination address to update (usually refers to the gateway)

When you need to notify many destination addresses to update the arp table, you can write a script to execute

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

Network Security

Wechat

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

12
Report