A detailed description of Ethernet switches and their devices

Source: Internet
Author: User

Ethernet switches are still commonly used. So I studied Ethernet switches and their devices. I would like to share them with you here. I hope they will be useful to you. Ethernet is the most widely used in L2 switches ). At present, more than 90% of local area networks around the world use Ethernet technology. With the development of Ethernet technology, this technology has entered the access network and man fields. In this article, the author puts forward a new idea of virtual circuits in the Ethernet switch technology.

1. Ethernet Classification

Ethernet features that multiple data terminals share the transmission bus. Ethernet switches can be divided into 10 Mbit/s Ethernet, 100 Mbit/s Ethernet, 1 000 Mbit/s gibit Ethernet, and 10 Gbit/s Ethernet according to their bus transmission rate; ethernet can be divided into coaxial cable Ethernet, twisted pair Ethernet and fiber multi-mode and single-mode Ethernet according to the transmission media of its bus.

2. CSMA/CD) Protocol

The core idea of a shared Ethernet switch is that multiple hosts share public transmission channels. The Time Division, frequency division, or code classification method is used in telephone communication to allow multiple user terminals to share public transmission channels. However, in data communication, data is abrupt. If you use a fixed time slot, frequency band, or channel for data communication, it will cause a waste of resources. If multiple hosts share the public transmission channel bus) and do not take any measures, there will inevitably be a collision and conflict. The CSMA/CD protocol is designed to solve the public transmission channel contention of multiple hosts.

1) The carrier listens to multiple accesses to CSMA)

MAC frame of each Ethernet frame) the physical address MAC address of both the active host and the host ). When a host on the Internet needs to send MAC frames, it should first listen to the channel. If the channel is idle, it will be sent; if a carrier indicates a baseband signal on the channel is found), it will not be sent. When the channel is idle, it will be sent immediately or delay a random time before sending, this greatly reduces the number of collisions.

2) collision detection CD)

For collision detection, when the signal swing on the bus exceeds the normal value, it is considered that a conflict occurs. This detection method is prone to errors, because there is a decline in signal transmission on the road. When the two hosts are far away from each other, the signal of the other host is very weak, an error occurs if the range of conflict detection is not reached when the signal is superimposed with the signal sent by the local host. For this reason, IEEE 802? Limit 3 limits the length of the cable. Currently, a large number of conflict detection methods are used to send data from the host sender to the cable. the receiver of the host receives the data again, and then compares it with the sent data to determine whether it is consistent. If they are consistent, no conflict occurs. If they are inconsistent, a conflict occurs.

3 MAC frame format

Each frame starts with a 7-byte forward code. The forward code is a "1010" interchange code, which is used to synchronize the receiver clock of the target host with the transmitter clock of the source host. Next is the frame start separator Byte "10101011", used to indicate the start of the frame.

The frame includes two addresses: the destination address and source address. If the highest bit of the destination address is "0", it indicates the normal address. If it is "1", it indicates the Group address. The secondary high of an address is used to identify whether it is a local address or a global address. The local address is allocated by the local network manager. If you leave this local network, this address is meaningless. The global address is uniformly allocated by IEEE to ensure that no two hosts in the world have the same global address. About 1013 global addresses are allowed. Global addresses can be used for global MAC frame addressing. The length of the data field indicates the number of bytes of data in the data field. The value ranges from 0 ~ 1 500. The data domain length is "0", but too short frames may cause problems during transmission. One of the reasons is that when the host detects a conflict, it stops sending, at this time, some data has been sent to the cable, but the target host cannot simply distinguish whether this is a correct frame or a spam frame. To this end, IEEE stipulates that the correct length must be greater than 64 bytes. If the length is smaller than 64 bytes, it must be filled with a fill field to the minimum length of the frame.

4 Ethernet Interconnection

According to the OSI 7-layer model, Ethernet can be interconnected on lower 3 and higher 3 layers. The connected network element devices include relay devices, hubs, bridges, routers, switches, and gateways.

4.1 Repeater

The repeater operates on the physical layer of the OSI Layer 7 model. After a digital pulse signal passes through a certain distance, it will produce attenuation and waveform distortion, causing an error code at the receiving end. Relay is used to expand the data signal transmitted over the network. The repeater works at the physical layer and is completely transparent to high-level protocols. Two networks connected by relay are equivalent to one network for the link layer. Relay only serves to expand the distance, and cannot provide the function of isolating and extending the effective bandwidth.

4.2 Hub)

A hub is like a multi-port forwarder with a star structure. Each port can send and receive data. When a port receives data from a host connected to the port, it is forwarded to another port. Before data forwarding, each port is regenerated, shaping, and re-scheduled.

Hubs can be connected to each other to form a multi-level star structure. However, the two hosts with the farthest distance are limited by the maximum transmission latency, so they can only be connected to several levels. When the number of connected hosts is too large, the bus load is heavy and conflicts occur frequently, leading to a decrease in network utilization. Like a repeater, a hub operates on the physical layer of the OSI Layer-7 model and cannot provide isolation, which is equivalent to a multi-port repeater.
 
4.3 Bridge

The bridge works on the MAC layer of the layer 7 OSI model ). When an Ethernet frame passes through the bridge, the bridge checks the source and target MAC addresses of the frame. If the two addresses belong to different networks, the bridge will forward the MAC frame to the other network, and vice versa. Therefore, the bridge can filter and forward MAC frames, which can isolate networks. For a shared network, isolation between networks increases the effective bandwidth of the network. The simplest form of a bridge is to connect two port bridges of two local networks. When multiple local networks are interconnected, a multi-port bridge or Ethernet switch can be used to avoid reducing the effective bandwidth of the network. However, the following disadvantages exist in connecting devices that work on the Link Layer:

1) A multi-port bridge or Ethernet switch has only a simple route table. When a port receives a packet, if the device cannot find the corresponding output port based on its destination address, this packet is broadcast to all ports. When the network is large, it may cause a broadcast storm;

2) multi-port bridges or Ethernet switches have no link layer protocol conversion function, so different protocols cannot be interconnected, such as Ethernet and X.25, FR, N-ISDN and ATM networks.

4.4 vro

There is a large and complex route table in the vro, and the route table can be maintained in a timely manner based on changes in the network topology and load. When the router cannot find the output port corresponding to the data packet input by a port, it deletes the package. Because the router abolished the broadcast mechanism, it can suppress broadcast storms.

4.5 Gateway

The gateway works on the three layers of the OSI Layer 7 model, namely the dialog layer, presentation layer, and application layer. A gateway is used for interconnection between two completely different networks. It features a high-level protocol conversion function. The most typical application of a Gateway is an IP Phone gateway. The 64 kbit/s encoded voice and No? Ipv7 common signaling is converted to an IP packet and sent to the Internet for transmission, so that the two completely different networks of the PSTN and the Internet can be interconnected.

5. Ethernet Switch

5.1 basic principles of Ethernet Switches

To improve network efficiency, a large network must segment the network on the link layer to improve the effective bandwidth of the network. For small networks, you can use bridges to segment the network. For large networks, Ethernet switches are often used to segment the network. That is, an Ethernet switch is used to divide a shared Ethernet into several network segments. The segmented network is called switched Ethernet. In switched Ethernet, the host in each network segment still adopts the CSMA/CD mechanism for media contention, while the switch connected to each network segment adopts the routing mechanism. If a shared Ethernet bandwidth is M and N hosts exist in total, the average bandwidth of each host is M/N. If an eight-port ethernet switch is introduced into the network and the network is divided into eight CIDR blocks, the bandwidth of each CIDR block is still M, and the total bandwidth is extended to 8 M.

Currently, cascade operations of multiple switches are introduced in large and medium-sized Ethernet networks. A user-level switch can connect one port to one host, so that the host can enjoy all the bandwidth of the connected port without competing for network resources.
After a switch is introduced into Ethernet to segment the network, can the network capacity be infinitely expanded? The answer is no. Because MAC frame addressing in an Ethernet switch adopts the broadcast method, when the network is too large, it may cause a broadcast storm. This requires a router to segment the network at the network layer. The router divides the computer network into several subnets, which reduces the broadcast domain of the underlying Ethernet and limits the broadcast storm.

5.2 Ethernet switch Routing

When a port in the vswitch receives a MAC frame, the first task of the vswitch is to find the output port based on the destination address of the MAC frame, and then forward the MAC frame to the output port. Generally, an Ethernet switch contains a route table that selects an output port for each MAC frame based on the destination address of the received MAC frame.

1) fixed route

A fixed route refers to a vswitch with a manually configured route table indicating each port and its corresponding destination address. Although a fixed route is a routing method, if the network size is too large, it will become a heavy task to configure the route table, in addition, the network in which the switch is located often changes the network configuration or adds or deletes hosts. It is difficult for the network administrator to update the route table in time to adapt to the changes in the topology.

2) self-learning Routing

In practical applications, a dynamic route table is usually created through self-learning to automatically adapt to changes in the network topology. The dynamic route table can be continuously modified through self-learning Based on the manually created route table.

Self-learning is to create or refresh a route table based on the source address that arrives at the MAC frame of each port. If the switch receives a mac frame from port X and checks that the source address of the MAC frame is A address, it indicates that all MAC frames whose destination address is A address should be forwarded through port X. After receiving the MAC frame with the source address A from Port X, the switch control part checks the route table. If the destination address in the route table does not have A address, add A address to the destination address corresponding to port X. If the destination address in the table has A address, however, if the corresponding port is port Y, you need to modify the route table. As can be seen from the above, the Ethernet switch uses the broadcast frame and self-learning method to establish the route table. Once the route table is configured, the subsequent Ethernet frames are not marked based on the destination MAC address) and the route table selects the route, to form a virtual circuit from the source host to the target host.
 

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.