1 Definitions
1.1 Simplex
Simplex means that device A can only send signals, while device B can only receive signals. The communication is unidirectional. It is just like the relationship between a lighthouse and a ship. The lighthouse emits light signals, and the ship can only receive these signals to ensure that it is sailing on the correct course.
1.2 Half-duplex
That is, half-duplex communication. In half-duplex mode, device A can send signals to device B, and device B can also send signals to device A, but these two processes cannot occur simultaneously. The most typical example is like the walkie-talkie we see in movies and TV works:
007: Calling headquarters. Requesting support. OVER.
Headquarters: Copy that. Reinforcements will arrive within 5 minutes. OVER.
007: It'll take as long as 5 minutes?! Hurry up! OVER.
Headquarters: ……
Here, after each side finishes speaking a sentence, they need to say "OVER" and then switch to the receiving state. At the same time, it also informs the other party that they can start speaking now. If both sides are in the receiving state simultaneously, or in the sending state simultaneously, normal communication cannot be carried out.
1.3 Full-duplex
Full-duplex is one step further than half-duplex. While device A is sending signals to device B, device B can also send signals to device A. A typical example is making a phone call.
A: Listen to me...
B: Let me speak first. The situation is like this...
Both A and B can hear what the other is saying while they are speaking themselves. This is full-duplex.
For full-duplex Ethernet, the IEEE has formulated the 802.3x full-duplex/flow control standard, which makes specific provisions for the flow control mechanism in the full-duplex mode. Among various Ethernet standards (10/100/1000 Base), except for 100 Base T4, all have full-duplex capabilities. However, in practical applications, it seems that only Gb Ethernet (that is, Gigabit Ethernet) uses the full-duplex mode.
The MAC protocol of Ethernet is CSMA/CD, but in full-duplex Ethernet, collision detection (CD) is not required. This enables Gb Ethernet to break through the segment length limit of more than 40 meters (more precisely, 41.2m, this data can be calculated according to the limitations of IEEE timing rules, and it will not be introduced in detail here). In practical applications, if a certain station in the network needs to work in the full-duplex mode, a network card that supports full-duplex must be installed at this station, and networking devices such as HUBs/routers connected to the full-duplex station are required to be equipped with full-duplex ports.
In this way, if you want to work in the full-duplex mode, you must first have hardware support.
The main advantage of full-duplex Ethernet is that it can simultaneously realize data transmission in two directions on two independent channels, thereby increasing the total bandwidth of the link. Therefore, it is only suitable for stations such as file servers that require simultaneous two-way data transmission. For stations that generally only perform one-way data transmission, full-duplex Ethernet has no advantages. So, full-duplex Ethernet has great limitations in application. Full-duplex Ethernet is mainly used in the situation of switch interconnection, especially for Gb Ethernet switches. In Windows 2000 (Win2K), the settings related to duplex for the network card can be found in "Local Connection - Properties - Configuration - Advanced", where there is an item "Link Speed & Duplex", and its value is generally "Auto Detect". It is recommended not to make any changes.
There is a Duplex light on the switch. If it is on, it indicates that the switch is working in the duplex mode. Currently, the vast majority of switches can automatically identify and support the duplex mode, and there is no need for manual settings.
2 Differences between Full-duplex and Half-duplex
Full Duplex means that data can be sent and received simultaneously. It's similar to a normal phone call where you can hear the other person while speaking. Currently, most network cards support full duplex.
Half Duplex means that only one action occurs within a certain time period. Take a simple example: on a narrow road, only one vehicle can pass at a time. If two vehicles are coming from opposite directions, one has to wait for the other to pass first. This example vividly illustrates the principle of half duplex. Early walkie - talkies and early hubs are products based on half duplex. With the continuous progress of technology, half duplex will gradually fade out of the stage of history.
- The half-duplex transmission mode adopts Carrier Sense Multiple Access/Collision Detection (CSMA/CD). Traditional shared LANs operate in the half-duplex mode, and transmission collisions are likely to occur on the line. Nodes connected to a hub (that is, multiple nodes share a connection to a switch port) must operate in the half-duplex mode. Because such nodes must be capable of collision detection. It is similar to a single-lane bridge.
- The full-duplex transmission mode can be used for point-to-point Ethernet connections and Fast Ethernet connections, and there will be no collisions at the same time, because they use two different lines in the twisted pair. It is similar to a two-lane bridge.
- Generally, the duplex type of the network card can be modified in the advanced properties of the network card, and the default is auto-negotiation. There is a Duplex light on the switch. If it is on, it indicates that the switch is operating in the full-duplex mode. Currently, the vast majority of switches can automatically identify and support the duplex mode, and there is no need for manual settings.
Rs232 and Rs422 are full-duplex, while the RS-485 standard is a half-duplex communication protocol. RS-485 is suitable for both the sender and the receiver to share a pair of wires for communication. It is also applicable for multiple points to share a pair of wires for bus networking, but the communication can only be in half-duplex mode.