




已阅读5页,还剩2页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
linux下测试本机与目标主机连通性的命令是ping,这里主要讲解两个参数 c 与 i其中 c count 次数,也就是ping的次数-i interval 间隔 ,每次ping之间的时间空格BlinuxBlinux gftp-2.0.19$ ping -c 10 -i 0.5 PING (9) 56(84) bytes of data.64 bytes from (9): icmp_seq=1 ttl=128 time=43.3 ms64 bytes from (9): icmp_seq=2 ttl=128 time=43.6 ms64 bytes from (9): icmp_seq=3 ttl=128 time=42.8 ms64 bytes from (9): icmp_seq=4 ttl=128 time=42.4 ms64 bytes from (9): icmp_seq=5 ttl=128 time=42.9 ms64 bytes from (9): icmp_seq=6 ttl=128 time=42.2 ms64 bytes from (9): icmp_seq=7 ttl=128 time=42.8 ms64 bytes from (9): icmp_seq=8 ttl=128 time=41.8 ms64 bytes from (9): icmp_seq=9 ttl=128 time=42.2 ms64 bytes from (9): icmp_seq=10 ttl=128 time=42.4 ms- ping statistics -10 packets transmitted, 10 received, 0% packet loss, time 4498msrtt min/avg/max/mdev = 41.820/42.678/43.627/0.543 ms当然如果上面 i 的时间小于ping的time,系统将会提示BlinuxBlinux gftp-2.0.19$ ping -c 10 -i 0.01 PING (60) 56(84) bytes of data.ping: cannot flood; minimal interval, allowed for user, is 200mslinux ping 的演示示例:ping - Would ping the host to see if it is alive.ping -c 1 - Would ping the host once and return to the command line as shown below.PING () 56(84) bytes of data.64 bytes from (): icmp_seq=1 ttl=63 time=0.267 ms- ping statistics -1 packets transmitted, 1 received, 0% packet loss, time 0msrtt min/avg/max/mdev = 0.267/0.267/0.267/0.000 ms Information about why pinging a website such as may not return a response can be found on document CH001054. See document CH001055 for additional information about determining the IP address of a web page. Ping a website or check if its online through our free is it up utility. 我装了Linux系统,在宿舍通过路由上网,ping远程IP,发现ping不通,系统返回的信息如下:rootlocalhost # ping PING () 56(84) bytes of data.From 29 icmp_seq=2 Destination Host UnreachableFrom 29 icmp_seq=3 Destination Host UnreachableFrom 29 icmp_seq=4 Destination Host UnreachableFrom 29 icmp_seq=6 Destination Host Unreachable29 是我自己的主机IP,终止ping命令后显示:- ping statistics -13 packets transmitted, 0 received, +9 errors, 100% packet loss, time 12000ms, pipe 3谁看得懂上面的返回信息,是什么原因ping不通呢? rootlocalhost # traceroute traceroute to (), 30 hops max, 40 byte packets 1 * * * 2 * * * 3 * * * 4 * * * 5 * * * 6 localhost.localdomain (29)(H!) 2916.090 ms (H!) 2912.060 ms (H!) 2908.123 ms尝试traceroute路由器IP:rootlocalhost # traceroute 14traceroute to 14 (14), 30 hops max, 40 byte packets 1 * * * 2 * * * 3 * * * 4 * * * 5 * * * 6 localhost.localdomain (29)(H!) 2924.008 ms (H!) 2920.165 ms (H!) 2916.179 msnetstat -nr的输出:rootlocalhost # netstat -nrKernel IP routing tableDestination Gateway Genmask Flags MSS Window irtt Iface U 0 0 0 eth0 U 0 0 0 eth0 14 UG 0 0 0 eth0roothnlinux # traceroute traceroute: Warning: has multiple addresses; using 9traceroute to (9), 30 hops max, 38 byte packets1 () 0.653 ms 0.846 ms 0.200 ms2 () 36.610 ms 58.438 ms 55.146 ms3 77 (77) 54.809 ms 39.879 ms 19.186 ms4 53 (53) 18.033 ms 49.699 ms 72.147 ms5 77 (77) 32.912 ms 72.947 ms 41.809 ms6 () 60.436 ms 25.527 ms 40.023 ms7 9 (9) 40.049 ms 66.091 ms 44.358 ms8 10 (10) 42.140 ms 70.913 ms 41.144 ms9 4 (4) 116.929 ms 57.081 ms 60.336 ms10 4 (4) 54.871 ms 69.302 ms 64.353 ms11 * * *12 0 (0) 95.954 ms 79.844 ms 76.052 ms MPLS Label=385825 CoS=5 TTL=1 S=013 95 (95) 118.687 ms 120.905 ms 113.936 ms14 26 (26) 115.843 ms 137.109 ms 186.491 ms15 (9) 168.024 ms 140.551 ms 161.127 msroothnlinux # Linux命令在线查询(),traceroute 命令 详解:/page.php?ID=308我apt-get了traceroute命令,但是试了一下,这个样子的:traceroute to (1), 30 hops max, 60 byte packets1 47 (47) 9.914 ms 11.345 ms *2 * * *3 * * *4 * * *5 * * *6 * 49 (49) 33.702 ms 35.770 ms7 * * *8 * * *9 * * *10 * * *11 * * 1 (1) 32.895 ms还有,在终端里面选中字符后按什么键才能复制啊?如何在linux下实现tracert的功能在windows下使用tracert,会有如下效果tracert www. .com1:1 1 ms 1 ms ip对应表文件:ip-mac,将要绑定的IP和MAC 地下写入此文件,格式为 ip mac。rootftpsvr # echo 00:02:B3:38:08:62 /etc/ip-macrootftpsvr # more /etc/ip-mac 00:02:B3:38:08:623、设置开机自动绑定rootftpsvr # echo arp -f /etc/ip-mac /etc/rc.d/rc.local4、手动执行一下绑定rootftpsvr # arp -f /etc/ip-mac5、确认绑定是否成功rootftpsvr # arpAddress HWtype HWaddress Flags Mask Iface05 ether 00:02:B3:A7:85:48 C eth034 ether 00:04:61:AE:11:2B C eth0 ether 00:02:B3:38:08:62 CM eth0rootftpsvr # arp -a? (05) at 00:02:B3:A7:85:48 ether on eth0? (34) at 00:04:61:AE:11:2B ether on eth0? () at 00:02:B3:38:08:62 ether PERM on eth0从绑定前后的ARP缓存列表中,可以看到网关()的记录标志已经改变,说明绑定成功。 rootmachine1 /sbin#ifconfig eth0 Link encap:Ethernet Hwaddr 52:54:AB:DD:6F:61 inet addr:9 Bcast:27 Mask:28 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:46299 errors:0 dropped:0 overruns:0 frame:189 TX packets:3057 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 Interrupt:5 Base address:0xece0 lo Link encap:Local Loopback inet addr: Mask: UP LOOPBACK RUNNING MTU:3924 Metric:1 RX packets:44 er
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 安防监控系统失效应急预案
- 小学生爱牙日口腔健康知识竞赛考试题库100题(含答案)
- 2025年家风家训知识竞赛备赛试题库150题(含答案)
- 2025年质量员(设备安装质量基础知识)题库带答案(模拟题)
- 2025年青海省玉树藏族自治州事业单位工勤技能考试题库(含答案)
- 临沂生产安全培训中心课件
- 城市地下管网监测预警系统2025年技术创新与智能监测设备研发报告
- 施工增加合同(标准版)
- 团队培训流程课件
- 特保证在合同(标准版)
- PEP小学英语单词表(3-6年级)
- 忠县介绍课件
- 当代西方翻译理论(一)
- DB4401-T 43-2020 反恐怖防范管理+防冲撞设施-(高清现行)
- 保障和改善民生课件
- 北京京剧院劳动合同制职工招考聘用(必考题)模拟卷
- 银行信贷实务与管理课件
- 实习任务书(标准模版)
- (完整版)交管12123学法减分题库及答案
- 古文字学(全套课件)
- 大连石化“3.14”亡人事故
评论
0/150
提交评论