1、
arp    i  指定网卡     a 查看arp表,显示主机名称和ip      n 查看arp表,并且用ip显示而不是主机名称
 
2、

119 ~/M2/image-installer-bak$ 脚本

3、

sdcm@sdcm:~$ cat ping.sh1
#!/bin/bash
IP=(
172.16.0.200
172.16.0.201
172.16.0.202
172.16.0.203
172.16.0.204
172.16.0.205
172.16.0.210
172.16.0.211
172.16.0.212
172.16.0.213
172.16.0.214
172.16.0.215
172.16.0.216
172.16.0.217
)
echo "Start ping at : "`date +%Y-%m-%d-%H:%M:%S`
for PING in ${IP[*]} ;do
CHECK=`ping -c 1 -w 1 $PING |grep "time="|awk '{print $4}'`
if [ "$CHECK" = "" ];then
echo ${PING}"---""OFFLINE..."`date +%Y-%m-%d-%H:%M:%S`
else
echo ${PING}"---""OK---OK..."`date +%Y-%m-%d-%H:%M:%S`
fi
done
echo "Finished ping at : "`date +%Y-%m-%d-%H:%M:%S`
sdcm@sdcm:~$ ./ping.sh1
Start ping at : 2014-10-30-11:53:03
172.16.0.200---OK---OK...2014-10-30-11:53:03
172.16.0.201---OK---OK...2014-10-30-11:53:03
172.16.0.202---OK---OK...2014-10-30-11:53:03
172.16.0.203---OK---OK...2014-10-30-11:53:03
172.16.0.204---OK---OK...2014-10-30-11:53:03
172.16.0.205---OK---OK...2014-10-30-11:53:03
172.16.0.210---OK---OK...2014-10-30-11:53:03
172.16.0.211---OK---OK...2014-10-30-11:53:03
172.16.0.212---OK---OK...2014-10-30-11:53:03
172.16.0.213---OK---OK...2014-10-30-11:53:03
172.16.0.214---OK---OK...2014-10-30-11:53:03
172.16.0.215---OK---OK...2014-10-30-11:53:03
172.16.0.216---OK---OK...2014-10-30-11:53:03
172.16.0.217---OK---OK...2014-10-30-11:53:03
Finished ping at : 2014-10-30-11:53:03
sdcm@sdcm:~$ ping -c 1 -w 1 172.16.0.200
PING 172.16.0.200 (172.16.0.200) 56(84) bytes of data.
64 bytes from 172.16.0.200: icmp_req=1 ttl=64 time=0.835 ms

--- 172.16.0.200 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.835/0.835/0.835/0.000 ms
sdcm@sdcm:~$ ping -c 1 -w 1 172.16.0.200 |grep time\=
64 bytes from 172.16.0.200: icmp_req=1 ttl=64 time=0.839 ms

arp -an -i br0 |grep -v incom |grep -v 172.16.0. |awk -F "(" '{print $2}'|awk -F ")" '{print $1}'|sort

4、

sdcm@sdcm:~$ ./td.sh 
Found AP:
172.16.0.200 172.16.0.201 172.16.0.202 172.16.0.203 172.16.0.204 172.16.0.205 172.16.0.206 172.16.0.207 172.16.0.210 172.16.0.211 172.16.0.212 172.16.0.213 172.16.0.214 172.16.0.215 172.16.0.216 172.16.0.217
Check AP...ping 3 times
16 AP:

172.16.0.200: time=0.943 ms
172.16.0.200: time=0.821 ms
172.16.0.200: time=0.820 ms

172.16.0.201: time=0.907 ms
172.16.0.201: time=0.815 ms
172.16.0.201: time=0.817 ms

172.16.0.202: time=0.437 ms
172.16.0.202: time=0.373 ms
172.16.0.202: time=0.367 ms

172.16.0.203: time=0.439 ms
172.16.0.203: time=0.366 ms
172.16.0.203: time=0.371 ms

172.16.0.204: time=0.449 ms
172.16.0.204: time=0.475 ms
172.16.0.204: time=0.375 ms

172.16.0.205: time=0.410 ms
172.16.0.205: time=0.297 ms
172.16.0.205: time=0.361 ms

172.16.0.206: time=0.915 ms
172.16.0.206: time=0.792 ms
172.16.0.206: time=0.732 ms

172.16.0.207: time=0.907 ms
172.16.0.207: time=0.832 ms
172.16.0.207: time=0.804 ms

172.16.0.210: time=0.928 ms
172.16.0.210: time=0.842 ms
172.16.0.210: time=0.843 ms

172.16.0.211: time=1.07 ms
172.16.0.211: time=0.974 ms
172.16.0.211: time=0.968 ms

172.16.0.212: time=1.09 ms
172.16.0.212: time=0.998 ms
172.16.0.212: time=1.00 ms

172.16.0.213: time=1.13 ms
172.16.0.213: time=1.00 ms
172.16.0.213: time=1.00 ms

172.16.0.214: time=0.971 ms
172.16.0.214: time=0.883 ms
172.16.0.214: time=0.847 ms

172.16.0.215: time=1.11 ms
172.16.0.215: time=0.980 ms
172.16.0.215: time=0.999 ms

172.16.0.216: time=0.977 ms
172.16.0.216: time=0.860 ms
172.16.0.216: time=0.797 ms

172.16.0.217: time=1.07 ms
172.16.0.217: time=1.06 ms
172.16.0.217: time=1.01 ms

Found client ip:
172.16.2.28 172.16.2.192 172.16.2.203 172.16.3.17 172.16.3.69 172.16.3.87

Check client ip...ping 3 times
6 client ip:

172.16.2.28: time=259 ms
172.16.2.28: time=82.7 ms
172.16.2.28: time=107 ms

ping 172.16.2.192 failed...

172.16.2.203: time=35.4 ms
172.16.2.203: time=48.9 ms
172.16.2.203: time=79.5 ms

172.16.3.17: time=56.2 ms
172.16.3.17: time=73.7 ms
172.16.3.17: time=90.9 ms

172.16.3.69: time=310 ms
172.16.3.69: time=205 ms
172.16.3.69: time=159 ms

172.16.3.87: time=93.1 ms
172.16.3.87: time=110 ms
172.16.3.87: time=31.7 ms

sdcm@sdcm:~$

SHIDOU的更多相关文章

  1. Bootstrap FileInput 上传 中文 API 整理

    Bootstrap FileInput 上传  中文 API 整理 上传插件有很多 但是公司用的就是 Bootstrap FileInput 自己就看了看  会用就行 自己都不知道每个值是干嘛用的就问 ...

  2. SFC游戏列表(维基百科)

    SFC游戏列表 日文名 中文译名 英文版名 发行日期 发行商 スーパーマリオワールド 超级马里奥世界 Super Mario World 1990年11月21日 任天堂 エフゼロ F-Zero F-Z ...

随机推荐

  1. Eclipse打包Android项目时用到proguard.cfg后,出现的Warning:can't find referenced class问题的解决方案

    原文地址:http://blog.csdn.net/u_xtian/article/details/7495023 这个看似简单的问题困扰了我好久了,我已经google了很多相关的信息了,但是在我看来 ...

  2. docker安装并设置开机启动(Linux)

    docker 开机启动: systemctl enable docker 使用的linux系统为CentOS7.2 docker分为CE和EE版本,EE版本收费,一般我们使用CE版本就满足要求了 do ...

  3. imagenet下载及训练

    imagenet 种子 迅雷打开验证集http://academictorrents.com/download/5d6d0df7ed81efd49ca99ea4737e0ae5e3a5f2e5.tor ...

  4. Netty 中队列的使用

    任务队列中的Task有3种典型使用场景 用户程序自定义的普通任务 此前代码: 参考https://www.cnblogs.com/ronnieyuan/p/12016712.html NettySer ...

  5. 数据结构第二版之(课后题)BF算法病毒感染检测

    //vs2013下编译通过.换别的编译器自行补充头文件和修改源代码#include<iostream> #include<fstream> #include <strin ...

  6. 抓包工具fiddler的Https证书设置

    一.工具(option)--设置(setting)-- https-- 动作(actions)-- (open windows certificate manger)-- 搜索(fiddler)删除所 ...

  7. duilib之重写BUTTON按钮

    在使用BUTTON过程中,有时候发现一些属性不够用,或要从新绘制BUTTON按钮,那该如何操作?其实很简单,只需要继承CButtonUI类就行. 创建类CMyButtonUI,继承CButtonUI, ...

  8. pixi的图片处理

    pixi的图片处理   var texture = PIXI.Texture.fromImage('sprite.png');var sprite = new PIXI.Sprite(texture) ...

  9. Oracle-SQL 建表

    建立员工分类表: 员工分类表结构.内容分别如下图:   一.使用PL/SQL Dev 这类可视化工具直接创建表 1.建立表结构 新建-table-名称(egrade)    然后 列:创建表结构 2. ...

  10. 六十、SAP中的加减乘除等算数运算符

    一.代码和显示如下,很奇怪的事情是,负数的负号居然在数字后面