Computer Network--CSMA/CD Protocol __ Internet

Source: Internet
Author: User
data link layer of LAN

LAN is characterized by a network owned by a unit, and the number of geographical and site are limited
The advantages of the local area network:
(1) With the broadcast function, from a site can easily access the whole network, the host on the local area network can share a variety of hardware and software resources connected to the LAN
(2) Facilitate the expansion and gradual evolution of the system, the location of the equipment can be flexibly adjusted and changed
(3) Improve the reliability, usability and survivability of the system.
One of the issues to be considered in shared channels is how to enable many users to share communication media resources reasonably and conveniently.
(1) Static division of the channel, as long as the user assigned to the channel will not conflict with other users. But the price is high.
(2) dynamic access control , also known as Multi-point access , is characterized by the channel is not fixed to users when communicating.
random Access to all users can send information randomly. If two or more users happen to be sending messages at the same time, a collision will occur on the shared media.
Controlled Access users cannot send information randomly and must obey certain control.

The IEEE 802 committee splits the LAN's data link layer into two tiers, the Logical Link Control LLC and the media access control Mac two sub layers. The content associated with access to the transport media is placed on the Mac child layer, while the LLC sub layer is independent of the transport media, regardless of the transmission media and the MAC subnet LAN is transparent to the LLC sub layer. CSMA/CD Protocol

The bus is characterized by the fact that when a computer sends data, all the computers on the bus can detect the data. This is the mode of broadcast communication. In order to achieve one-to-one communication on the bus, you can make each computer's adapter have an address that is different from the other adapters. When the data frame is sent, the address of the receiving station is stated in the first header. The adapter can receive this data frame only if the destination address in the data frame is consistent with the hardware address stored in the adapter ROM. (This can be done through the mixed mode of network card sniffing).
For the convenience of communication, Ethernet has taken the following two kinds of measures:
1 A more flexible way to work without connection, that is, you do not have to establish a connection before you can send data directly. The adapter does not number the data frames that are sent, nor does it require a postback acknowledgement. Doing so can make Ethernet work very simple. So the services provided by Ethernet are the delivery of the best effort, that is, unreliable services .
Error retransmission is up to the top, but Ethernet does not know that this is a retransmission frame, but rather as a new data frame to transmit.

2 The data sent by Ethernet use Manchester coded signal.

CSMA/CD Protocol Essentials:
Multi-point accessMany computers are connected to a single bus in a multiple-point access mode. The essence of the protocol is "carrier monitoring" and "Collision detection".
Carrier MonitoringIs the listening channel, no matter before sending, or in the sending, each station must continuously detect the channel.
Detects the channel before sending, in order to get the right to send. In the transmission detection channel, is in order to find in time there are no other stations to send and the impact of the site sent.
Collision DetectionThe edge of the adapter detects the change of the signal voltage on the channel in order to determine whether the other stations are sending the data when sending the data. When several stations simultaneously send data on the bus, the amplitude of the signal voltage on the bus will increase (overlap).
BecauseThe propagation delay of electromagnetic wave in 1km cable is 5usTherefore, the data sent by A to B is not transmitted to B until about 5us.
Obviously, when using the CSMA/CD protocol, one station cannot send and receive at the same time. SoEthernet with CSMA/CD protocol is not possible for full-duplex communication and only Half-duplex communication
Each station after sending its own data for a short period of time, there is the possibility of encountering collisions. Therefore, Ethernet can not guarantee that a certain period of time the data frame must be successfully sent out.
The first station to send the data frame, after sending the data frame at most 2t after the time to know whether the sent data frame has been impacted. So this time period is calledRace Period。 Contention period is also known as the collision window, after the period of contention has not detected a collision, to be sure this send will not collide.
Ethernet Usageavoidance of truncated binary indicesAlgorithm to determine the timing of retransmission after collisions.
Ethernet provides a minimum frame length of 64 bytes, or 512bit. If you are sending very few data, you must add some padding bytes so that the frame length is not less than 64 bytes. For 10mb/s, the time to send 512bit requires 51.2us, which is the contention period mentioned above.
Thus, when the Ethernet is sending data, if there is no collision in the contention period, then the data sent by the subsequent will certainly not collide. If a collision occurs, it must be within 64 bytes before sending.
Soframes that are less than 64 bytes in length are invalid frames that are aborted due to a conflict
Ethernet also stipulates that the minimum interval between frames is 9.6us equivalent to 96 bit time.

The main points of the CSMA/CD agreement are as follows:
(1) Ready to send: The adapter from the network layer to get a packet, plus the Ethernet header and tail, composed of Ethernet frame, into the adapter ring from the. However, you must first detect the channel before you send it.
(2) Detection channel: If the channel is busy detected, then constantly detect, waiting for the channel to become idle. This frame is sent if the channel is idle and the channel remains idle for 96-bit time (the minimum interval between frames is guaranteed).
(3) in the transmission process is still constantly testing the channel, that is, the network adapter to the edge of the monitor. mac layer of Ethernet

Hardware address for 1.MAC layer
In the local area network, the hardware address is also called the physical address or the MAC address. In the design of all computer systems, the identification system is a core problem. In identifying a system, an address is a very important identifier for identifying a system.
The name indicates the resource we are looking for, the address indicates where the resource is, and the route tells us how to get there.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.