How IP Network Routing Works

您的数据在到达最终目的地之前会停止大量停止

路由是该过程数据包move from one节点(机器或设备)到另一个计算机网络until the packets reach the final destination.

了解网络路由

You can think of network routing as similar to a public transportation system. The entire bus system, including all the stops, is like the network, and the stops are like the nodes. As a bus rider who must make several transfers to get where you're going, you're like the data that travels between each node until it reaches its final destination.

When data is transferred from one device to another on an互联网协议(IP) network, it is broken down into smaller units called packets. In addition to the actual data, each packet includes a header that contains information to help it arrive at its destination, similar to the physical address information you might find on a mailed envelope. But, instead of physical addresses, the header information includes:

  • IP地址源节点和目标节点的。
  • Packet numbers that reassemble the packets in the correct order when the packets reach the destination.
  • 其他有用的技术信息。
The network of the office building
Yagi Studio / Getty Images

How Routing Works

考虑一个场景,李在中国的计算机将电子邮件发送给纽约的Jo的机器。传输控制协议(TCP)和其他协议可与Li的机器上的数据一起使用,然后将其发送到IP模块,在该模块中,将数据包捆绑到IP数据包中并通过网络发送。要到达世界另一端的目的地,数据包必须通过许多路由器。这些路由器所做的工作称为路由。

Each of the intermediate routers reads the destination IP address of each received packet. Based on this information, the router sends the packets in the appropriate direction. Each router has a routing table where information about neighboring routers (nodes) is stored.

This information includes the cost (in terms of network requirements and resources) of forwarding a packet in the direction of that neighboring node. Information from this table is used to decide the most efficient node to use or the best route on which to send the data packets. Each packet can be sent in a different direction, but all eventually get routed to the same destination machine.

On reaching Jo's machine, the packets are consumed by the machine, where the IP module reassembles the packets and sends the resulting data to the TCP service for further processing.

IP/TCP Reliability

IP和TCP协议共同使用,以确保传输是可靠的。这意味着没有丢失数据包,所有数据包都按顺序进行,并且没有不合理的传输延迟。在某些服务中,TCP被取代Unified Datagram Packet(UDP),这不能确保可靠性,而是将数据包发送到。一些Voice over Internet Protocol(VoIP) systems use UDP for calls because lost packets don't affect call quality.

此页面有用吗?