简体   繁体   English

关于网络协议

[英]About network protocol

TCP这样的协议如何识别新帧的开始?

TCP can be viewed as an ordered stream of bytes. TCP可以视为字节的有序流。 I don't think TCP needs to identify the beginning of new frames . 我认为TCP不需要确定新的开始。 Frames are usually related to medium access control protocols such as ETHERNET . 通常与介质访问控制协议(例如ETHERNET)有关

ETHERNET protocol uses a preamble (sequence of bytes) to identify beginning of a frame . ETHERNET协议使用前导码 (字节序列)来标识帧的开始。

This is a common TCP/IP STACK used on LANs: 这是LAN上使用的常见TCP / IP STACK:

TCP <-- transport (byte streams here)
------
IP <-- network (packets here)
------
ETHERNET <-- medium access (frames here)
------
RJ45 cable <-- physical layer 

How does ETHERNET ensure that the preamble won't occur in TCP/IP section? ETHERNET如何确保在TCP / IP部分中不会出现前同步码?

A TCP stream is carried in (broken into) one or more IP packets. TCP流被携带(分解为一个或多个)IP数据包。

IP packets are carried in Ethernet frames. IP数据包在以太网帧中传输。

The IP network device driver splits its IP packets into one or more Ethernet frames before transmission (splitting the IP packets, and adding Ethernet frame headers), and after reception it reassembles Ethernet frames into IP packets (discarding Ethernet frame headers and combining IP packet fragments). IP网络设备驱动程序在传输之前将其IP数据包拆分为一个或多个以太网帧(拆分IP数据包,并添加以太网帧头),并在接收后将其重新组合为IP数据包(丢弃以太网帧头并组合IP数据包片段) )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM