开发者

Tracerouting in UDP protocal

开发者 https://www.devze.com 2023-03-15 10:41 出处:网络
I am using UDP network protocol to send message from various clients to a root server. The message from client to server may not be sent directly and may be sent via other clients.

I am using UDP network protocol to send message from various clients to a root server.

The message from client to server may not be sent directly and may be sent via other clients.

I want to know the clients via which the message is sent by looking at the message received at the root server. How to do 开发者_Python百科this?


UDP does not include this information. You'll need to include something in your protocol if you want to keep track of servers through which the message has passed.

The traceroute program uses a trick to get bounced packets by setting the TTL to an increasing number. It starts with a TTL of 1 so that the first bounce comes from the closest server to the source. It then tries a TTL of 2 to get a bounce from the second server on the path, and so on.


traceroute is client-side and heuristic, i.e. works only for stable connections. Since you are essentially constructing an overlay network, the only ways to get information about the route is reconstructing the routing according to your routing algorithm (hard, and probably infeasible in a distributed network) or having each relay add a note (typically consisting of the relay's name, and the previous IP address) to the message.

0

精彩评论

暂无评论...
验证码 换一张
取 消