简体   繁体   English

IEEE 802.2 逻辑链路控制层(以太网)是全双工的吗?

[英]Is IEEE 802.2 Logical Link Control Layer (Ethernet) full duplex?

I have a situation where I am using pcap_sendpacket() to put packets on the wire at the LLC layer at the same time as I am receiving packets using pcap_dispatch() with an associated callback function.我有一种情况,我使用pcap_sendpacket()将数据包放在 LLC 层的线路上,同时我使用带有关联回调函数的pcap_dispatch()接收数据包。 The sending and receiving is occuring in different threads of execution.发送和接收发生在不同的执行线程中。

I have observed when the incoming packet rate is particularly high, I am not seeing my outgoing packets appear on the wire (using wireshark).我观察到当传入数据包速率特别高时,我没有看到我的传出数据包出现在线路上(使用wireshark)。 However, I am also not seeing pcap_sendpacket() failing (returning -1).但是,我也没有看到pcap_sendpacket()失败(返回 -1)。 Is it possible that the connection is not full duplex, ie if the bandwidth of the network connection is full then the outgoing packets could be blocking indefinitely somehow?连接是否可能不是全双工的,即如果网络连接的带宽已满,那么传出的数据包可能会以某种方式无限期地阻塞?

I have a situation where I am using pcap_sendpacket() to put packets on the wire at the LLC layer我有一种情况,我使用 pcap_sendpacket() 将数据包放在 LLC 层的线路上

That's not the layer at which packets are put on the wire - they're put on the wire at the data link layer, below the LLC layer;那不是将数据包放在线路上的层——它们被放在数据链路层的线路上,低于 LLC 层; on Ethernet, it's at the 802.3 layer, not the 802.2 layer.在以太网上,它位于 802.3 层,而不是 802.2 层。

Is IEEE 802.2 Logical Link Control Layer (Ethernet) full duplex? IEEE 802.2 逻辑链路控制层(以太网)是全双工的吗?

It is neither full-duplex nor half-duplex.它既不是全双工也不是半双工。

It's also not Ethernet;它也不是以太网; it can run on top of Ethernet, but it can also run on top of FDDI or Token Ring or IEEE 802.11 or....它可以运行在以太网之上,但它也可以运行在 FDDI 或令牌环或 IEEE 802.11 或....

Perhaps you're thinking about IEEE 802.3, which is Ethernet?也许您正在考虑 IEEE 802.3,即以太网? If so, there are both full-duplex and half-duplex versions of Ethernet.如果是这样,则以太网有全双工和半双工两种版本。

I have observed when the incoming packet rate is particularly high, I am not seeing my outgoing packets appear on the wire (using wireshark).我观察到当传入数据包速率特别高时,我没有看到我的传出数据包出现在线路上(使用wireshark)。

Ethernet adapters don't receive their own packets;以太网适配器不接收它们自己的数据包; if a host sends a packet, and code on that host is capturing on the adapter on which the packet is being sent, that's because the OS's networking stack takes packets being sent and provides them as input to the packet capture mechanism, not because the packet was received by the network adapter on which you're capturing.如果主机发送数据包,并且该主机上的代码正在发送数据包的适配器上捕获,那是因为操作系统的网络堆栈接收正在发送的数据包并将它们作为数据包捕获机制的输入,而不是因为数据包由您正在捕获的网络适配器接收。

Perhaps the packets are arriving too fast for the packet receiving thread to see them?也许数据包到达的速度太快以至于数据包接收线程无法看到它们? Use pcap_stats() to see if any packets are being dropped.使用pcap_stats()查看是否有任何数据包被丢弃。

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

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