Overview of switches for Linux network application programming

Source: Internet
Author: User

Packet Tracer entry One, switch overview The switch works at the OSI (Open Systems Interconnect Reference Model) data link layer, and any two network nodes (network devices) that access the switch are bandwidth-exclusive. Second, the switch principle switch has a very high bandwidth of the back bus and the internal switching matrix. All the ports on the switch are hooked up on the back bus, and after the control circuit receives the packet, the processing port looks in the in-memory address table to determine which port the destination Mac hangs on, and transmits the packet to the destination port via the internal switch fabric, and the destination Mac does not exist to broadcast to all ports. After the receive Port responds, the switch "learns" the new MAC address and adds it to the internal MAC address table.  Three, Exchange Mode (1) Storage and forwarding: The switch receives the data frame to store it in the buffer, analyzes the data frame, obtains the information related to the destination address (this process performs the error check), and sends the frame data from the appropriate port. (2) passthrough forwarding: processing data immediately after the switch receives data (no error checking), even if the transmission is not completed.  The switch only reads the MAC information of the frame data, which makes it easy to determine which port the data is from. (3) Fragment separation: This is a solution between the two former. It checks whether the packet is 64 bytes long, if it is less than 64 bytes, the packet is discarded, and if it is greater than 64 bytes, the package is sent. Data validation is also not provided in this way. Its data processing speed is faster than the storage and forwarding method, but slower than through-pass. Four or two-layer, three-layer, four-layer switch two-layer switch: The two-layer switch works on the data link layer in the 7-tier model, analyzing the MAC information in the packet, and forwarding the data based on the MAC information.  If there is no Mac information for the destination address, the switch will broadcast the destination MAC address recorded in the Mac table, facilitating the next forward data (this is the Switch learning feature). Layer three switch: based on the traditional two layer switch, the network layer forwarding technology is adopted. We know that the host communication of different networks generally requires router forwarding, if only a local area network is divided into multiple subnets, inter-subnet communication using routers, then the communication efficiency between these subnets will be due to the router interface low speed, complex and greatly reduced. The IP analysis function in the three layer switch is required to quickly link the hosts of different network segments.  His quick origins came from his borrowed two-storey high-bandwidth back bus. Quad switch: It does not only analyze the mac,ip of the data when it forwards the data, but also the port number (port) of the data to be analyzed.

Transferred from: http://blog.csdn.net/lianghe_work/article/details/44625865

Overview of switches for Linux network application programming

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.