linux基本命令示例_使用Linux示例来配置命令教程

linux基本命令示例

linux基本命令示例

There are a lot of tools for network troubleshooting and debugging. Arping is one of them which only pings same network hosts. So what makes arping special is it uses network layer arp packets. This works on mac protocol. It is useful especially to find hosts those do not respond layer 3 and layer 4 ping requests.

有许多用于网络故障排除和调试的工具。 Arping是仅对相同网络主机执行ping操作的其中之一。 因此,使arping与众不同的是它使用网络层arp包。 这适用于mac协议。 查找不响应第3层和第4层ping请求的主机尤其有用。

为Debian,Ubuntu,Mint,Kali安装 (Install For Debian, Ubuntu, Mint, Kali)

We can install arping command for Ubuntu, Debian, Mint, Kali with the arping package name like below.

我们可以使用如下所示的arping软件包名称为Ubuntu,Debian,Mint,Kali安装arping命令。

$ sudo apt install arping -y
Install
Install
安装

为CentOS,Fedora,Red Hat安装(Install For CentOS, Fedora, Red Hat)

We can install arping command for CentOS, Fedora, Red Hat with the arping package name like below.

我们可以使用如下的arping软件包名称为CentOS,Fedora,Red Hat安装arping命令。

$ sudo yum install arping -y

帮忙 (Arping Help)

We can list help information and popular options with the -h option like below.

我们可以使用-h选项列出帮助信息和常用选项,如下所示。

$ arping -h
Help
Help
帮帮我

For complete usage information please use --help option.

有关完整的用法信息,请使用--help选项。

$ apirng --help
Arping Detailed Help and Usage Information
Arping Detailed Help and Usage Information
整理详细的帮助和使用信息

平阿普(Ping Arp)

We will use arping command without providing any option. We will just provide the destination host IP address. In this example, we will ping the IP address 192.168.122.1 with the ARP packages.

我们将使用arping命令而不提供任何选项。 我们将只提供目标主机IP地址。 在此示例中,我们将使用ARP软件包ping IP地址192.168.122.1

$ sudo arping  192.168.122.1
Ping Arp
Ping Arp
平阿普

From the responses to the ARP ping packets we can find the following information.

从对ARP ping数据包的响应中,我们可以找到以下信息。

  • `index` is the index number of the current ping series which starts from 0 .

    “ index”是当前ping系列的索引号,从0开始。
  • `time` is the time duration between sending ARP packet and getting a response which is generally around 10 milliseconds.

    “时间”是发送ARP数据包到获得响应之间的持续时间,通常为10毫秒左右。

设定计数 (Set Count)

We can set ping request count with -c option. In the example, we will set the ping packet count to 2 .

我们可以使用-c选项设置ping请求计数。 在示例中,我们将ping数据包计数设置为2

$ sudo arping -c 2 192.168.122.1

Set Count
Set Count
设定计数

设置源地址(Set Source Address)

Source mac address can be set with -s option. In the example, we will set aa:bb:cc:dd:ee:ff as source mac address

可以使用-s选项设置源mac地址。 在示例中,我们将aa:bb:cc:dd:ee:ff为源mac地址

$ sudo arping -s aa:bb:cc:dd:ee:ff  192.168.122.1
Set Source Address
Set Source Address
设置源地址
LEARN MORE  What is DHCP and How It Works?
了解更多什么是DHCP及其工作原理?

翻译自: https://www.poftut.com/arping-command-tutorial-examples-linux/

linux基本命令示例

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值