通过特定路径 Ping 计算机
我有一个以图表形式连接的计算机网络。
我想从一台计算机 (A) ping 到另一台计算机 (B)。 A 和 B 通过多种不同方式相互连接,但我只想仅通过特定边缘进行 PING。我在 A 和 B 处都有 ping 时要遵循的边缘信息。
我应该如何执行此操作?
I have a network of computers connected in form of a graph.
I want to ping from one computer(A) to another computer(B). A and B are connected to each other through many different ways, but I want to PING via only a particular edges only. I have the information of the edges to be followed during pinging available at both A and B.
How should I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以源路由 ping,但返回将选择自己的路径。
此外,出于安全考虑,源路由数据包通常会被过滤。 (并非总是如此,它们很有用,有时甚至在边缘路由器上是必需的。)
如果计算机处于本地管理控制之下,那么您可以确保允许源路由数据包。只要您能够在机器 B 上启动守护进程,您也可以轻松地设计自己的 ping 协议来生成源路由回显返回。
You could source route the ping but the return would choose its own path.
Furthermore, source-routed packets are often filtered due to security concerns. (Not always, they are useful and sometimes even required at edge routers.)
If the machines are under your local administrative control, then you could ensure that source-routed packets are permitted. As long as you are able to start a daemon on machine B, you could also easily enough design your own ping protocol that generates source-routed echo returns.
嗯,这实际上是通过在计算机(我期望的路由器)之间的媒体上配置的路由协议来完成的。我认为没有办法可以说“使用该特定路线”。路由器具有不同的协议(OSPF、EIGRP、RIPv2),并且它们执行负载平衡。确保某个特定路由的唯一方法是使用静态路由,但这并不是由计算机决定路由的动态完成。
这是正常的,因为:
如果您能够选择一条路由,DoS 很容易杀死一条路由。
Well, this is actually done by routing protocols that are configured on the media in between the computers (routers I expect). I think there isn't a way where you can say "use that specific route". The routers have different protocols (OSPF, EIGRP, RIPv2) and they do the load balancing. The only way you would be sure of one specific route is to use static routing, but this isn't dynamically done where your computer decides the route.
This is normal because :
if you would be able to chose a route, DoS would be quite easy to do to kill one route.