008B-tracert,tracertroute,icmp 重定向

ICMP报文:
ICMP重定向:在同一个局域网中,网关和数据的下一跳在同一个网段中,从该接口收到的数据要从该接再发送回下去
008A-ICMP

表1 ICMP消息类型代码对应表
类型Type代码Code描述
00回显应答(ping应答)
30网络不可达
31主机不可达
32协议不可达
33端口不可达
34需要进行分片但设置不分片比特
35源站选路失败
36目的网络不认识
37目的主机不认识
38源主机被隔离(作废不用)
39目的网络被强制禁止
310目的主机被强制禁止
311由于TOS,网络不可达
312由于TOS,主机不可达
313由于过滤,通信被强制禁止
314主机越权
315优先权中止生效
40源端被关闭
50对网络重定向
51对主机重定向
52对服务类型和网络重定向
53对服务类型和主机重定向
80请求回显(ping请求)
90路由器通告
100路由器请求告
110传输期间生存时间为0
111在数据报组装期间生存时间为0
120坏的IP首部
121缺少必须的选项
130时间戳请求(作废不用)
140时间戳应答(作废不用)
150信息请求(作废不用)
160信息应答(作废不用)
170地址掩码请求
180地址掩码应答

tracert和traceroute
traceroute是Linux场景
发送的是UDP报文 端口号33434 回应ICMP超时(11 0) 目的设备收到后,回应3 3 目的端口不可达的ICMP 报文

tracert是windows场景
发送是ICMP request报文 (8 0) 回应ICMP 超时(11 0) 目的设备收到后,回应icmp reply报文 (0 0)回显应答(ping应答)

在这里插入图片描述

#traceroute的Linux场景
<AR4>tracert ?
  STRING<1-255>  IP address or hostname of a remote system
  -a             Set source IP address, the default is the IP address of the    
                 output interface
  -f             First time to live, the default is 1
  -m             Max time to live, the default is 30
  -name          Display the host name of the router on each hop
  -p             Destination UDP port number, the default is 33434
  -q             Number of probe packet, the default is 3
  -s             
  -v             Display the MPLS label information carried in the ICMP Time    
                 Exceed message. By default, it is only to display the path     
                 information carried in the ICMP Time Exceed message and ICMP   
                 Port Unreachable message without MPLS label information
  -vpn-instance  Specify VPN-Instance of MPLS VPN
  -w             Timeout in milliseconds to wait for each reply, the default is 
                 5000ms
  ipv6           IPv6 Protocol
  lsp            LSP traceroute
  vc             PWE3 traceroute


<AR4>tracert -q 1 200.200.200.200

 traceroute to  200.200.200.200(200.200.200.2
00), max hops: 30 ,packet length: 40,press CTRL_C to break 

 1 192.168.10.1 50 ms 

 2 12.1.1.2 50 ms 

 3 23.1.1.3 60 ms 

 4 200.200.200.200 80 ms 

在这里插入图片描述

在这里插入图片描述

#tracert的windows场景
PC1>tracert 200.200.200.200

traceroute to 200.200.200.200, 8 hops max
(ICMP), press Ctrl+C to stop
 1  192.168.10.1   78 ms  47 ms  47 ms
 2  12.1.1.2   62 ms  47 ms  47 ms
 3  23.1.1.3   63 ms  62 ms  47 ms
 4  200.200.200.200   63 ms  62 ms  78 ms

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值