Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1817675
  • 博文数量: 276
  • 博客积分: 1574
  • 博客等级: 上尉
  • 技术积分: 2894
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-26 23:23
个人简介

生活的美妙在于,不知道一下秒是惊艳还是伤神,时光流转,珍惜现在的拥有的时光

文章分类

全部博文(276)

文章存档

2017年(17)

2016年(131)

2015年(63)

2013年(2)

2012年(32)

2011年(31)

分类: 网络与安全

2016-04-13 16:39:55

ICMP p i n g程序为我们提供了查看 I P记录路由( R R)选项的机会
ping 使用ICMP协议,并只运行在IP网络层.

[16:33 t ~]$ ping -R home.test.com
PING home.test.com (172.16.2.200) 56(124) bytes of data.
64 bytes from itappdoc.inside.test.com (172.16.2.200): icmp_seq=1 ttl=127 time=1.32 ms
NOP
RR:     localhost.localdomain (172.16.12.100)
    172.16.2.2
    home.inside.test.com (172.16.2.200)
    172.16.12.3
    localhost.localdomain (172.16.12.100)

64 bytes from itappdoc.inside.test.com (172.16.2.200): icmp_seq=2 ttl=127 time=1.34 ms
NOP    (same route)

下面是tcpdump抓取的选项,RR选项是ping路由信息,IP是出口地址.
[16:43 t ~]$ sudo tcpdump -ev icmp
[sudo] password for t:
tcpdump: listening on enp19s0, link-type EN10MB (Ethernet), capture size 262144 bytes
16:45:09.110818 18:03:73:67:c5:75 (oui Unknown) > 00:00:5e:00:01:0c (oui Unknown), ethertype IPv4 (0x0800), length 138: (tos 0x0, ttl 64, id 54241, offset 0, flags [DF], proto ICMP (1), length 124, options (NOP,RR localhost.localdomain, 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0))
    localhost.localdomain > home.inside.sky-mobi.com: ICMP echo request, id 7140, seq 1, length 64
16:45:09.112104 68:ef:bd:08:3f:bf (oui Unknown) > 18:03:73:67:c5:75 (oui Unknown), ethertype IPv4 (0x0800), length 138: (tos 0x0, ttl 127, id 577, offset 0, flags [DF], proto ICMP (1), length 124, options (NOP,RR localhost.localdomain, 172.16.2.2, home.inside.sky-mobi.com, 172.16.12.3, 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0))
    home.inside.sky-mobi.com > localhost.localdomain: ICMP echo reply, id 7140, seq 1, length 64
16:45:10.112267 18:03:73:67:c5:75 (oui Unknown) > 00:00:5e:00:01:0c (oui Unknown), ethertype IPv4 (0x0800), length 138: (tos 0x0, ttl 64, id 55000, offset 0, flags [DF], proto ICMP (1), length 124, options (NOP,RR localhost.localdomain, 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0))
    localhost.localdomain > home.inside.sky-mobi.com: ICMP echo request, id 7140, seq 2, length 64
16:45:10.114050 68:ef:bd:08:3f:bf (oui Unknown) > 18:03:73:67:c5:75 (oui Unknown), ethertype IPv4 (0x0800), length 138: (tos 0x0, ttl 127, id 622, offset 0, flags [DF], proto ICMP (1), length 124, options (NOP,RR localhost.localdomain, 172.16.2.2, home.inside.sky-mobi.com, 172.16.12.3, 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0))
    home.inside.sky-mobi.com > localhost.localdomain: ICMP echo reply, id 7140, seq 2, length 64
16:45:11.113256 18:03:73:67:c5:75 (oui Unknown) > 00:00:5e:00:01:0c (oui Unknown), ethertype IPv4 (0x0800), length 138: (tos 0x0, ttl 64, id 55378, offset 0, flags [DF], proto ICMP (1), length 124, options (NOP,RR localhost.localdomain, 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0))



阅读(1365) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~