Products
GG网络技术分享 2025-10-24 21:49 9
网络管理员在面临网络性能问题时traceroute探测功能变得尤为关键。它能够帮识别数据包在网络中经过的路径,进而定位问题所在。那么怎么实现这一功能呢呃?
当路由器尝试访问一个无法到达的地址时会发送ICMP信息。关闭这一设置能别让路由器发出错误消息,关系到traceroute后来啊。在Linux下 能用以下命令关闭“不可达ICMP”设置:

set security zones security-zone untrust interfaces ge-// host-inbound-traffic system-services all
set security zones security-zone untrust interfaces ge-// host-inbound-traffic protocols ospf
set security zones security-zone untrust interfaces ge-// host-inbound-traffic protocols pim
set security zones security-zone untrust interfaces ge-// host-inbound-traffic protocols ldp
set security zones security-zone untrust interfaces ge-// host-inbound-traffic protocols igmp
set security zones security-zone untrust interfaces ge-// host-inbound-traffic protocols tcp
防火墙级别过高大兴许会阻止traceroute对数据包的响应。能断开路由器上的防火墙或者少许些其防火墙级别,以保证能够正常进行traceroute。以下为Windows防火墙的代码示例:
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:,any dir=in action=allow
mtr是My traceroute的缩写,它能够持续看得出来故障节点列表,便于排错。
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:,any dir=in action=allow
通过设置路由器、少许些防火墙级别、关闭“不可达ICMP”设置以及用mtr等方法,实现traceroute探测是比比看轻巧松的。但在网络周围较为麻烦的情况下兴许需要进一步优化配置,才能达到理想的后来啊。
要允许traceroute探测,需要在路由器上开启ICMP和UDP端口。这两种协议都是traceroute命令非...不可依赖的。在路由器上开启端口后就能够成功进行traceroute。
欢迎用实际体验验证观点。
Demand feedback