Linux下traceroute的安装和使用

2024-09-04 17:38
文章标签 linux 安装 使用 traceroute

本文主要是介绍Linux下traceroute的安装和使用,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

traceroute是跟踪数据包到达网络主机所经过的路由工具。其原理为试图以最小的TTL发出探测包来跟踪数据包到达目标主机所经过的网关,然后监听一个来自网关ICMP的应答。发送数据包的大小默认为40个字节。 

yum install -y traceroute

 

SYNOPSIStraceroute [-46dFITUnreAV] [-f first_ttl] [-g gate,...][-i device] [-m max_ttl] [-p port] [-s src_addr][-q nqueries] [-N squeries] [-t tos][-l flow_label] [-w waittime] [-z sendwait] [-UL] [-D][-P proto] [--sport=port] [-M method] [-O mod_options][--mtu] [--back]host [packet_len]traceroute6  [options]
Options:-4                          Use IPv4-6                          Use IPv6-d  --debug                 Enable socket level debugging-F  --dont-fragment         Do not fragment packets-f first_ttl  --first=first_ttlStart from the first_ttl hop (instead from 1)-g gate,...  --gateway=gate,...Route packets through the specified gateway(maximum 8 for IPv4 and 127 for IPv6)-I  --icmp                  Use ICMP ECHO for tracerouting-T  --tcp                   Use TCP SYN for tracerouting (default port is 80)-i device  --interface=deviceSpecify a network interface to operate with-m max_ttl  --max-hops=max_ttlSet the max number of hops (max TTL to bereached). Default is 30-N squeries  --sim-queries=squeriesSet the number of probes to be triedsimultaneously (default is 16)-n                          Do not resolve IP addresses to their domain names-p port  --port=port        Set the destination port to use. It is eitherinitial udp port value for "default" method(incremented by each probe, default is 33434), orinitial seq for "icmp" (incremented as well,default from 1), or some constant destinationport for other methods (with default of 80 for"tcp", 53 for "udp", etc.)-t tos  --tos=tos           Set the TOS (IPv4 type of service) or TC (IPv6traffic class) value for outgoing packets-l flow_label  --flowlabel=flow_labelUse specified flow_label for IPv6 packets-w waittime  --wait=waittimeSet the number of seconds to wait for response toa probe (default is 5.0). Non-integer (floatpoint) values allowed too-q nqueries  --queries=nqueriesSet the number of probes per each hop. Default is3-r                          Bypass the normal routing and send directly to ahost on an attached network-s src_addr  --source=src_addrUse source src_addr for outgoing packets-z sendwait  --sendwait=sendwaitMinimal time interval between probes (default 0).If the value is more than 10, then it specifies anumber in milliseconds, else it is a number ofseconds (float point values allowed too)-e  --extensions            Show ICMP extensions (if present), including MPLS-A  --as-path-lookups       Perform AS path lookups in routing registries andprint results directly after the correspondingaddresses-M name  --module=name      Use specified module (either builtin or external)for traceroute operations. Most methods havetheir shortcuts (`-I' means `-M icmp' etc.)-O OPTS,...  --options=OPTS,...Use module-specific option OPTS for thetraceroute module. Several OPTS allowed,separated by comma. If OPTS is "help", print infoabout available options--sport=num                 Use source port num for outgoing packets. Implies`-N 1'--fwmark=num                Set firewall mark for outgoing packets-U  --udp                   Use UDP to particular port for tracerouting(instead of increasing the port per each probe),default port is 53-UL                         Use UDPLITE for tracerouting (default dest portis 53)-D  --dccp                  Use DCCP Request for tracerouting (default portis 33434)-P prot  --protocol=prot    Use raw packet of protocol prot for tracerouting--mtu                       Discover MTU along the path being traced. Implies`-F -N 1'--back                      Guess the number of hops in the backward path andprint if it differs-V  --version               Print version info and exit--help                      Read this help and exit
Arguments:
+     host          The host to traceroute topacketlen     The full packet length (default is the length of an IPheader plus 40). Can be ignored or increased to a minimalallowed value

实例参考:参考

这篇关于Linux下traceroute的安装和使用的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1136592

相关文章

Java String字符串的常用使用方法

《JavaString字符串的常用使用方法》String是JDK提供的一个类,是引用类型,并不是基本的数据类型,String用于字符串操作,在之前学习c语言的时候,对于一些字符串,会初始化字符数组表... 目录一、什么是String二、如何定义一个String1. 用双引号定义2. 通过构造函数定义三、St

如何解决mmcv无法安装或安装之后报错问题

《如何解决mmcv无法安装或安装之后报错问题》:本文主要介绍如何解决mmcv无法安装或安装之后报错问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录mmcv无法安装或安装之后报错问题1.当我们运行YOwww.chinasem.cnLO时遇到2.找到下图所示这里3.

Pydantic中Optional 和Union类型的使用

《Pydantic中Optional和Union类型的使用》本文主要介绍了Pydantic中Optional和Union类型的使用,这两者在处理可选字段和多类型字段时尤为重要,文中通过示例代码介绍的... 目录简介Optional 类型Union 类型Optional 和 Union 的组合总结简介Pyd

Vue3使用router,params传参为空问题

《Vue3使用router,params传参为空问题》:本文主要介绍Vue3使用router,params传参为空问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录vue3使用China编程router,params传参为空1.使用query方式传参2.使用 Histo

Python 安装和配置flask, flask_cors的图文教程

《Python安装和配置flask,flask_cors的图文教程》:本文主要介绍Python安装和配置flask,flask_cors的图文教程,本文通过图文并茂的形式给大家介绍的非常详细,... 目录一.python安装:二,配置环境变量,三:检查Python安装和环境变量,四:安装flask和flas

使用Python自建轻量级的HTTP调试工具

《使用Python自建轻量级的HTTP调试工具》这篇文章主要为大家详细介绍了如何使用Python自建一个轻量级的HTTP调试工具,文中的示例代码讲解详细,感兴趣的小伙伴可以参考一下... 目录一、为什么需要自建工具二、核心功能设计三、技术选型四、分步实现五、进阶优化技巧六、使用示例七、性能对比八、扩展方向建

使用Python实现一键隐藏屏幕并锁定输入

《使用Python实现一键隐藏屏幕并锁定输入》本文主要介绍了使用Python编写一个一键隐藏屏幕并锁定输入的黑科技程序,能够在指定热键触发后立即遮挡屏幕,并禁止一切键盘鼠标输入,这样就再也不用担心自己... 目录1. 概述2. 功能亮点3.代码实现4.使用方法5. 展示效果6. 代码优化与拓展7. 总结1.

使用Python开发一个简单的本地图片服务器

《使用Python开发一个简单的本地图片服务器》本文介绍了如何结合wxPython构建的图形用户界面GUI和Python内建的Web服务器功能,在本地网络中搭建一个私人的,即开即用的网页相册,文中的示... 目录项目目标核心技术栈代码深度解析完整代码工作流程主要功能与优势潜在改进与思考运行结果总结你是否曾经

Linux中的计划任务(crontab)使用方式

《Linux中的计划任务(crontab)使用方式》:本文主要介绍Linux中的计划任务(crontab)使用方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、前言1、linux的起源与发展2、什么是计划任务(crontab)二、crontab基础1、cro

kotlin中const 和val的区别及使用场景分析

《kotlin中const和val的区别及使用场景分析》在Kotlin中,const和val都是用来声明常量的,但它们的使用场景和功能有所不同,下面给大家介绍kotlin中const和val的区别,... 目录kotlin中const 和val的区别1. val:2. const:二 代码示例1 Java