What is a Switch Port?

Switch (Switch) means "switch" is a kind of network equipment used for electrical (optical) signal forwarding. It can provide an exclusive electrical signal path for any two network nodes of the access switch. The most common switch is an Ethernet switch. Other common ones are telephone voice switches and fiber switches.

Switch (Switch) means "switch" is a kind of network equipment used for electrical (optical) signal forwarding. It can provide an exclusive electrical signal path for any two network nodes of the access switch. The most common switch is an Ethernet switch. Other common ones are telephone voice switches and fiber switches.
Chinese name
switch
Foreign name
Switch / Ethernet switch
Use
Indispensable device for network connection
Attributes
Network equipment

Switch definition

Exchange is a collective term for technologies that send information to be transmitted to the corresponding routing that meets the requirements according to the needs of the two ends of the communication to transmit information, using manual or automatic equipment. The switches can be divided into WAN switches and LAN switches according to different working positions. A wide-area switch is a device that performs information exchange functions in a communication system. It is applied at the data link layer. The switch has multiple ports, each of which has a bridging function, and can be connected to a LAN or a high-performance server or workstation. In fact, switches are sometimes referred to as multi-port bridges.
A network switch is a device that expands the network and can provide more connection ports in a sub-network in order to connect more computers. With the development of the communications industry and the advancement of the national economy informatization, the network switch market is steadily rising. It is cost-effective, highly flexible, relatively simple, and easy to implement. Ethernet technology has become the most important LAN networking technology today, and network switches have become the most popular switches. [1]
Switch is the English name of the switch. This product is upgraded from the original hub, and it is not much different from the hub in appearance. Because the two ends of the communication need to transmit information, and the way to send the information to be transmitted to the corresponding router that meets the required standards through equipment or labor, this technology is the switch technology. In a broad sense, the devices that implement information exchange functions in communication systems are switches. [2]

Switch history

"Switch" is a foreign word derived from the English "Switch". The original meaning was "switch". When the Chinese technical community introduced this word, it was translated as "exchange". In English, the verb "exchange" and the noun "exchange" are the same word (note that "exchange" here refers to the signal exchange in telecommunication technology, which is not the same concept as the exchange of goods). [3]
In 1993, local area network switching equipment appeared. In 1994, a surge in switching network technology was set off in China. In fact, the switching technology is a simplified, low-cost, high-performance, and high-port-intensive switching product. The complex switching technology that reflects the bridging technology operates at the second layer of the OSI reference model. Like the bridge, the switch makes relatively simple decisions about message forwarding based on the MAC address in each packet. This forwarding decision generally does not take into account other deeper information hidden in the packet. Different from the bridge, the switch has a small forwarding delay and operates close to the performance of a single LAN, far exceeding the forwarding performance between ordinary bridged Internet networks. [3]
Switching technology allows shared and dedicated LAN segments to adjust bandwidth to alleviate bottlenecks in the flow of information between LANs. Existing switching products for Ethernet, Fast Ethernet, FDDI and ATM technologies. [3]
Similar to traditional bridges, switches provide many network interconnection functions. Switches can economically divide the network into small conflicting domains, providing higher bandwidth for each workstation. The transparency of the protocol allows the switch to be installed directly in a multi-protocol network with simple software configuration; the switch uses existing cables, repeaters, hubs, and network cards of the workstation without the need for high-level hardware upgrades; the switch is transparent to the workstation In this way, the management overhead is low, which simplifies the operation of adding network nodes, moving and changing the network. [3]
Utilizing a specially designed integrated circuit enables the switch to forward information in parallel on all ports at line rate, providing much higher operating performance than traditional bridges. Application-specific integrated circuit technology enables the switch to achieve the above performance with more ports, and its port cost is lower than traditional bridges. [3]

Switch classification

Broadly speaking, there are two types of network switches: WAN switches and LAN switches. WAN switches are mainly used in the telecommunications field to provide a basic platform for communications. LAN switches are used in local area networks to connect terminal devices such as PCs and network printers. It can be divided into Ethernet switches, Fast Ethernet switches, Gigabit Ethernet switches, FDDI switches, ATM switches and token ring switches from the perspective of transmission media and transmission speed. In terms of scale applications, it can be divided into enterprise-level switches, department-level switches, and workgroup switches. The dimensions of each manufacturer's division are not completely the same. Generally speaking, enterprise-level switches are rack-type, department-level switches can be rack-type (with fewer slots), or fixed-configuration. Class switch is fixed configuration (function is relatively simple). On the other hand, from the perspective of the scale of the application, as a backbone switch, the switches supporting large-scale enterprise applications with more than 500 information points are enterprise-level switches, and the switches supporting medium-sized enterprises with less than 300 information points are department-level switches, while supporting 100 The switches within this information point are workgroup-level switches. [3]

Switch Ethernet Switch

With the rapid development of computers and their interconnection technology (also commonly known as "network technology"), Ethernet has become the short-distance two-tier computer network with the highest penetration rate so far. The core component of Ethernet is the Ethernet switch. [3]
Ethernet switch
Regardless of whether it is manual or program-controlled switching, it is to transmit voice signals, and it is a "circuit switching" that requires exclusive lines. Ethernet is a computer network that needs to transmit data, so it uses "packet switching." However, no matter what kind of switching method is adopted, the feature that the switch provides an "exclusive path" between two points will not change. As far as Ethernet equipment is concerned, the essential difference between a switch and a hub is that when A sends a message to B, if it passes through the hub, all network nodes connected to the hub will receive this message (that is, sent in broadcast form) , But the network card will filter out the information not sent to the machine at the hardware level; and if it passes the switch, unless the A informs the switch to broadcast, the message C sent to B will never be received. except). [3]
Ethernet switch manufacturers have launched Layer 3 or even Layer 4 switches according to market demand. However, its core function is still Layer 2 Ethernet data packet exchange, but with a certain ability to process IP layer and even higher layer data packets. A network switch is a device that expands the network and can provide more connection ports in a subnet in order to connect more computers. With the development of the communications industry and the advancement of the national economy informatization, the network switch market is steadily rising. It has the characteristics of high cost performance, high flexibility, relatively simple, and easy to implement. [3]

Switch Optical Switch

Optical switching is the next-generation switching technology being developed. All switching technologies are based on electrical signals. Even fiber-optic switches first convert optical signals into electrical signals, exchange them, and then return the optical signals to another optical fiber. Due to the low photoelectric conversion rate and the physical bottleneck of the processing speed of the circuit, people want to design a kind of "optical switch" that does not need to undergo photoelectric conversion. Its internal circuit is not a circuit but an optical path. It is the switching optical path. This will greatly increase the processing speed of the switch. [3]

Switch remote configuration

In addition to the direct connection of the switch to the computer through the "Console" port, it can also be connected through a common port. At this time, you cannot use the local configuration to configure the switch. Instead, you need to configure the switch through Telnet or a Web browser. The specific configuration method is as follows:
1.Telnet
The Telnet protocol is a remote access protocol that you can use to log in to the switch for configuration.
Assuming the switch IP is: 192.168.0.1, the switch configuration through Telnet only takes two steps: [3]
Step 1. Click Start, Run, and enter "Telnet 192.168.0.1"
Step 2. After inputting, click the "OK" button, or click the Enter key to establish a connection with the remote switch. Then, you can configure and manage the switch accordingly.
Web
Through the web interface, you can set the switch as follows:
Step 1. Run a web browser, enter the switch IP in the address bar, and press Enter. The following dialog box appears.
Step 2. Enter the correct username and password.
In step 3, the connection is established and the switch configuration system can be entered.
Step 4. Follow the prompts to perform switch settings and parameter modifications. [3]

Switch Features

Because the switch has a high-bandwidth internal switching matrix and a back bus, and all ports are connected to this back bus, through the internal switching matrix, data packets can be directly and quickly transmitted to the destination node instead of all nodes. It will not waste network resources, resulting in very high efficiency. At the same time, the security of data transmission is very high, which is welcomed and generally praised by users. [2]
The difference between sharing the same bandwidth with each port of the hub is that the data bandwidth of the switch is exclusive. Under this premise, in the same time period, the switch can transmit data to multiple nodes, and each node can be regarded as an independent network segment and enjoy a fixed part of the bandwidth independently, so there is no other equipment Necessary to compete. [2]

Switch working principle

The switch works at the second layer of the OSI reference model, the data link layer. The CPU inside the switch will form a MAC table by mapping the MAC address to the port when each port is successfully connected. In future communications, packets destined for this MAC address will only be sent to its corresponding port, not all ports. Therefore, the switch can be used to divide the data link layer broadcast, that is, the collision domain; but it cannot divide the network layer broadcast, that is, the broadcast domain.
The switch has a high-bandwidth back bus and an internal switching matrix. All the ports of the switch are connected to this back bus. After the control circuit receives the data packet, the processing port will look up the address comparison table in the memory to determine the NIC (network card) of the destination MAC (the hardware address of the network card). On which port, the packet is quickly transmitted to the destination port through the internal switching matrix. If the destination MAC does not exist, it is broadcast to all ports. After receiving the response from the port, the switch will learn the new MAC address and add it to the internal MAC address table. Using a switch can also "segment" the network. By comparing the IP address table, the switch allows only necessary network traffic to pass through the switch. The filtering and forwarding of the switch can effectively reduce the collision domain, but it cannot divide the network layer broadcast, that is, the broadcast domain.

Switch port

The switch can perform data transmission between multiple port pairs at the same time. Each port can be regarded as an independent physical network segment (Note: non-IP network segment), and the network equipment connected to it enjoys the full bandwidth alone, without the need to compete with other equipment. When node A sends data to node D, node B can send data to node C at the same time, and both transmissions enjoy the full bandwidth of the network and have their own virtual connection. If a 10Mbps Ethernet switch is used here, the total traffic of the switch at this time is equal to 2 × 10Mbps = 20Mbps, and when a 10Mbps shared HUB is used, the total traffic of a HUB will not exceed 10Mbps. In short, a switch is a network device based on MAC address identification that can complete the function of encapsulating and forwarding data frames. The switch can "learn" the MAC address and store it in the internal address table. By establishing a temporary exchange path between the initiator and the target receiver of the data frame, the data frame can reach the destination address directly from the source address.

Working principle of switch data transfer

After any node of the switch receives the data transmission instruction, it quickly searches the address table stored in the memory to confirm the connection position of the network card of the MAC address, and then transmits the data to the node. If the corresponding location is found in the address table, the transmission is performed; if not, the switch will record the address to facilitate the next search and use. The switch generally only needs to send the frame to the corresponding point, and does not need to send the hub to all nodes, thereby saving resources and time and increasing the rate of data transmission. [2]

Switch data transmission method

The data transmission through the exchange mode is actually the data transmission mode of the switch. The previous hubs used the shared method to transmit data. There was no way to request the speed of communication. The sharing mode of the hub, which is often referred to as a shared network, uses the hub as a connection device and has only one direction of data flow, so the efficiency of network sharing is very low. In contrast, the switch can identify each computer connected to itself, and memorize and identify the physical address of each computer's network card, which is often called the MAC address. Under such a premise, there is no need to perform broadcast searching, and the memory MAC address can be directly found to the corresponding location and a temporary dedicated data transmission channel can be used to complete the data without interference from the two nodes Transmission of communication. Since the switch also has a full-duplex transmission mode, it is also possible to form a three-dimensional and crossed data transmission channel structure by simultaneously establishing temporary dedicated channels between multiple pairs of nodes. [2]

Switch use

The main functions of the switch include physical addressing, network topology, error checking, frame sequence, and flow control. The switch also has some new functions, such as support for VLAN (virtual local area network), support for link aggregation, and some even have firewall functions. [3]
Learn :
The Ethernet switch understands the MAC address of the device connected to each port, maps the address to the corresponding port, and stores it in the MAC address table in the switch cache. [3]
Forwarding / filtering :
When the destination address of a data frame is mapped in the MAC address table, it is forwarded to the port connected to the destination node instead of all ports (if the data frame is a broadcast / multicast frame, it is forwarded to all ports) [3]
Eliminate the loop :
When the switch includes a redundant loop, the Ethernet switch avoids the generation of the loop through the spanning tree protocol, while allowing a backup path to exist.
In addition to being able to connect to the same type of network, the switch can also interconnect between different types of networks, such as Ethernet and Fast Ethernet. Many switches today provide high-speed connection ports that support Fast Ethernet or FDDI, for connecting other switches in the network or providing additional bandwidth for key servers with large bandwidth consumption. [3]
Generally speaking, each port of the switch is used to connect to an independent network segment, but sometimes in order to provide faster access speed, we can directly connect some important network computers to the ports of the switch. In this way, the network's key servers and important users have faster access speeds and support greater information traffic. [3]
Finally, briefly summarize the basic functions of the switch:
1. Like hubs, switches provide a large number of ports for cable connections, which allows for star topology cabling.
2. Like repeaters, hubs, and bridges, when it forwards frames, the switch regenerates an undistorted square electrical signal.
3 Like bridges, switches use the same forwarding or filtering logic on each port.
4 Like a bridge, a switch divides a local area network into multiple conflict domains, and each conflict domain has independent broadband, which greatly increases the bandwidth of the local area network.
5. In addition to the functions of bridges, hubs, and repeaters, the switch also provides more advanced features such as virtual local area networks (VLANs) and higher performance. [3]
Traditional switches evolved from bridges and belong to the second layer of the OSI, the data link layer equipment. It addresses according to the MAC address, selects a route through the station table, and the establishment and maintenance of the station table is performed automatically by the switch. A router belongs to the third layer of the OSI, that is, a network layer device. It is addressed according to an IP address and is generated through a routing table routing protocol. The biggest advantage of the switch is fast. Since the switch only needs to identify the MAC address in the frame, it directly selects the forwarding port based on the MAC address. The algorithm is simple and easy for ASIC to implement, so the forwarding speed is extremely high. But the working mechanism of the switch also brings some problems. [3]
1. Loop: According to the switch address learning and station table establishment algorithm, loops are not allowed between switches. Once a loop exists, the spanning tree algorithm must be started to block the ports that generate the loop. The routing protocol of routers does not have this problem. There can be multiple paths between routers to balance the load and improve reliability. [3]
2. Load concentration: There can only be one path between switches, so that information is concentrated on one communication link, and dynamic distribution cannot be performed to balance the load. The router's routing protocol algorithm can avoid this. The OSPF routing protocol algorithm can not only generate multiple routes, but also can choose different optimal routes for different network applications. [3]
3 Broadcast control: The switch can only reduce the collision domain, not the broadcast domain. The entire switched network is a large broadcast domain, and broadcast packets are scattered to the entire switched network. The router can isolate the broadcast domain, and broadcast packets cannot be broadcast through the router. [3]
4 Subnetting: The switch can only recognize MAC addresses. MAC addresses are physical addresses and use a flat address structure. Therefore, you cannot divide subnets based on MAC addresses. The router recognizes the IP address. The IP address is assigned by the network administrator. It is a logical address and the IP address has a hierarchical structure. It is divided into a network number and a host number. It can be conveniently used to divide the subnet. The main function of the router is to Connect to different networks. [3]
5. Confidentiality: Although the switch can also filter the frames based on the source MAC address, destination MAC address, and other contents of the frame, the router implements the packets based on the source IP address, destination IP address, and TCP port address of the packet. Filtering is more intuitive and convenient. [3]

Switch manual exchange

The history of electrical handshaking should go back to the early days of the telephone. When the phone was invented, it only needed a long enough wire, plus two phones at the end, to enable two people who were far apart to have a voice conversation. [3]
After the number of telephones increased, to enable everyone who owns the telephone to communicate with each other, we could not pull a line between every two telephones. So people set up a telephone office, and each telephone user connected a line to a large circuit board in the telephone office. When A wants to talk to B, he asks the telephone operator to connect with B's phone. The operator uses a wire, one end of which is inserted into the hole on the circuit board, and the other end of which is inserted into the hole of B. This is the "connection", which is equivalent to temporarily pulling A and B a telephone line. Called. When the call is over, the operator disconnects the wire, which is called "disconnecting". The whole process is "manual exchange", which is actually a "close switch" and "disconnect switch" process. Therefore, translating "swap" into "switch" is technically easier to understand. [3]

Switch circuit program control

The efficiency of manual switching is too low to meet the needs of large-scale deployment of telephones. With the development of semiconductor technology and the maturity of switch circuit technology, people have found that electronic technology can be used to replace manual exchange. As long as the phone terminal user sends a series of electrical signals to the electronic device, the electronic device can connect the circuit of the requesting party and the requested party according to a preset program, and exclusively own this circuit and will not share it with third parties (of course, Due to design flaws, there may be situations where multiple people share the circuit, which is commonly known as "string". This exchange method is called "program-controlled exchange". This kind of equipment is also called program-controlled switch. [3]
Because the technology of program-controlled exchange has been monopolized by developed countries for a long time and the equipment is expensive, China's telephone penetration rate has not been high. With the successive development of program-controlled switches by enterprises such as Huawei and ZTE, telephones have been rapidly popularized in China. [3]
The communication protocol commonly used by voice program-controlled switches is Signaling System No. 7 [3]

Comparison of switches and hubs

1. From the perspective of the OSI architecture, the hub belongs to the first layer of the physical layer device, and the switch belongs to the second layer of the data link layer device of OSI. In other words, the hub only plays the role of synchronization, amplification, and shaping of data transmission. It cannot effectively process the short frames and fragments in data transmission, and cannot guarantee the integrity and correctness of data transmission. Data transmission is synchronized, amplified, and shaped, and short frames, fragments, etc. can be filtered. [3]
2. Judging from the working mode, the hub is a broadcast mode, that is, when one port of the hub is working, all other ports can listen to information, which is prone to broadcast storms. When the network is large, the network performance will be greatly affected The switch can avoid this phenomenon. When the switch is working, only the requesting port and the destination port respond to each other without affecting other ports. Therefore, the switch can isolate the collision domain and effectively suppress the occurrence of broadcast storms. [3]
3 In terms of bandwidth, no matter how many ports the hub has, all ports share a bandwidth. Only two ports can transmit data at the same time, and other ports can only wait. At the same time, the hub can only work in half-duplex mode. For the switch, each port has an exclusive bandwidth. When two ports work, it does not affect the work of other ports. At the same time, the switch can work not only in half-duplex mode but also in full-duplex mode. [3]

Switch exchange mode

Switches exchange in the following three ways:
1) Straight-through:
A straight-through Ethernet switch can be understood as a line matrix telephone switch that crosses each other vertically and horizontally. When it detects a data packet at the input port, it checks the header of the packet, obtains the destination address of the packet, starts the internal dynamic lookup table to convert to the corresponding output port, connects at the intersection of input and output, and passes the data packet directly to Corresponding ports for switching functions. Because no storage is needed, latency is very small and swapping is very fast, which is its advantage. Its disadvantage is that because the content of the data packet is not saved by the Ethernet switch, it cannot check whether the transmitted data packet is wrong, and it cannot provide error detection capability. Because there is no buffer, input / output ports with different rates cannot be directly connected, and packet loss is easy. [3]
2) Store and forward:
Store-and-forward is the most widely used method in the field of computer networks. It first stores the data packets of the input port, and then performs a CRC (Cyclic Redundancy Check) check. After the error packets are processed, the destination address of the data packet is taken out and converted into an output port to be sent out through a lookup table. Because of this, the store-and-forward method has a large delay in data processing. This is its disadvantage, but it can perform error detection on the data packets entering the switch and effectively improve network performance. It is especially important that it can support the conversion between ports with different speeds and maintain the cooperative work between high-speed ports and low-speed ports. [3]
3) Debris isolation:
This is a solution somewhere in between. It checks whether the length of the data packet is 64 bytes. If it is less than 64 bytes, it indicates that it is a fake packet, then it is discarded; if it is larger than 64 bytes, it is sent. This method also does not provide data verification. Its data processing speed is faster than the store and forward method, but slower than the straight-through method. [3]

Switch port switching

Port switching technology first appeared in slot-type hubs. The backplane of such hubs is usually divided into multiple Ethernet segments (each network segment is a broadcast domain). No bridges or routing connections are required. Not connected. After the Ethernet main module is inserted, it is usually assigned to a network segment of a backplane. Port switching is used to allocate and balance the ports of the Ethernet module among multiple network segments of the backplane. Depending on the level of support, port switching can also be broken down into: [3]
Module exchange: The entire module is migrated to the network segment.
Port group switching: Generally, the ports on the module are divided into several groups, and each group of ports allows network segment migration.
Port-level switching: Supports migration of each port between different network segments. This switching technology is based on the first layer of OSI and has the advantages of flexibility and load balancing capabilities. If properly configured, fault tolerance can also be achieved to a certain extent, but the characteristics of the shared transmission medium have not been changed, and thus it cannot be called a true exchange. [3]

Switch frame switching

Frame switching is the most widely used LAN switching technology. It provides a mechanism for parallel transmission by micro-segmenting the traditional transmission medium to reduce the collision domain and obtain high bandwidth. Generally speaking, the implementation technology of each company's products will be different, but the network frame processing methods are generally as follows: [3]
Pass-through switching: Provides wire-speed processing capabilities. The switch reads only the first 14 bytes of the network frame and transmits the network frame to the corresponding port.
Store-and-Forward: Perform error detection and control by reading network frames. [3]
The former method is very fast, but it lacks more advanced control over network frames, lacks intelligence and security, and cannot support the exchange of ports with different rates. As a result, manufacturers focus on the latter technology. [3]
Some manufacturers even decompose the network frames into cells of a fixed size. The cell processing is extremely easy to implement with hardware and has a fast processing speed. At the same time, it can complete advanced control functions (such as the MADGE LET hub) such as Priority control. [3]

Switch Cell Exchange

ATM technology uses a fixed-length 53-byte cell exchange. Because the length is fixed, it is easy to implement in hardware. ATM uses a dedicated non-differential connection and runs in parallel. Multiple nodes can be established at the same time through a switch, but it does not affect the communication capabilities between each node. ATM also allows multiple virtual links to be established between the source node, the destination, and the node to ensure sufficient bandwidth and fault tolerance. ATM uses statistical time-division circuits for multiplexing, which can greatly improve channel utilization. ATM's bandwidth can reach 25M, 155M, 622M and even Gb transmission capacity. However, with the emergence of 10 Gigabit Ethernet, ATM technology, which once represented the future direction of the development of network and communication technology, has gradually lost its significance. [3]

Switch layer differences

Difference between Layer 2 Switch , Layer 3 Switch and Layer 4 Switch

Switch Layer 2 Switching

The development of Layer 2 switching technology is relatively mature. Layer 2 switches are data link layer devices. They can identify MAC address information in packets, forward them based on MAC addresses, and record these MAC addresses and corresponding ports in one of their own Address table. [3]
The specific workflow is as follows:
1) When the switch receives a data packet from a certain port, it first reads the source MAC address in the packet header, so that it knows which port the machine with the source MAC address is connected to;
2) Read the destination MAC address in the packet header and look up the corresponding port in the address table;
3) If there is a port corresponding to the destination MAC address in the table, copy the data packet directly to this port;
4) If the corresponding port is not found in the table, the data packet is broadcast to all ports. When the destination machine responds to the source machine, the switch can record which port the destination MAC address corresponds to, and the next time the data is transmitted, It is no longer necessary to broadcast on all ports. This process is continuously circulated, and the MAC address information of the entire network can be learned. This is how the Layer 2 switch establishes and maintains its own address table.
The following three points can be inferred from the working principle of the Layer 2 switch:
1) Because the switch exchanges data of most ports at the same time, this requires a wide bandwidth of the switching bus. If the Layer 2 switch has N ports, the bandwidth of each port is M, and the bandwidth of the switch bus exceeds N × M, then This switch can achieve wire-speed switching
2) Learn the MAC address of the machine connected to the port, write it into the address table, and the size of the address table (usually two representations: one is BEFFER RAM, and the other is the value of the MAC entry). The size of the address table affects the access capacity of the switch.
3) Another is that the Layer 2 switch generally contains an ASIC (Application Specific Integrated Circuit) chip, which is specially used to handle packet forwarding, so the forwarding speed can be very fast. Because each manufacturer adopts different ASICs, it directly affects product performance.
The above three points are also the main technical parameters for judging the performance of Layer 2 and Layer 3 switches. In this regard, please pay attention to comparison when considering equipment selection. [3]

Switch Layer 3 Switching

Let's first take a look at the working process of a Layer 3 switch through a simple network.
Equipment using IP A ------------------------ Layer-3 Switch ------------------ ------ Device B using IP
For example, if A wants to send data to B and the destination IP is known, then A uses the subnet mask to obtain the network address and determine whether the destination IP is on the same network segment as itself. If it is on the same network segment but does not know the MAC address required to forward the data, A sends an ARP request, B returns its MAC address, A uses this MAC to encapsulate the packet and send it to the switch. MAC address table to forward data packets to the corresponding ports.
If the destination IP address is not on the same network segment, then A needs to communicate with B, and there is no corresponding MAC address entry in the flow cache entry, then the first normal data packet is sent to a default gateway. Generally set in the operating system, the IP of this default gateway corresponds to the Layer 3 routing module, so for data that is not on the same subnet, the MAC address of the default gateway is first put in the MAC table (by the source host A completes); then the layer 3 module receives this packet, queries the routing table to determine the route to B, and constructs a new frame header, where the MAC address of the default gateway is used as the source MAC address, and host B is used The MAC address is the destination MAC address. Through a certain identification trigger mechanism, establish the correspondence between the MAC addresses and forwarding ports of hosts A and B, and record the entry table of the flow cache, and the subsequent data from A to B (the Layer 3 switch must confirm that it is from A to B instead of A The data to C, but also read the IP address in the frame.), Directly to the Layer 2 switching module to complete. This is commonly referred to as multiple forwarding on a single route. [3]
The above is a brief summary of the working process of a Layer 3 switch. We can see the characteristics of the Layer 3 switch:
1) Realize high-speed data forwarding by combining hardware. This is not a simple stacking of Layer 2 switches and routers. Layer 3 routing modules are directly stacked on the high-speed backplane bus of Layer 2 switching, which breaks through the interface speed limit of traditional routers and can reach tens of Gbit / s. Counting the backplane bandwidth, these are two important parameters for Layer 3 switch performance. [3]
2) Simple routing software simplifies the routing process. Most of the data forwarding, except for the necessary routing, is handled by the routing software, which is forwarded by the layer 2 module at high speed. Most of the routing software is processed and optimized software, and it is not a simple copy of the software in the router.
Choice of Layer 2 and Layer 3 switches
Layer 2 switches are used in small local area networks. Needless to say, in small local area networks, broadcast packets have little effect. The fast switching function of the Layer 2 switch, multiple access ports, and low prices provide a very complete solution for small network users.
The advantages of a Layer 3 switch are that the interface types are abundant, the supported Layer 3 functions are powerful, and the routing capability is strong. It is suitable for routing between large networks. Its advantages are choosing the best route, load sharing, link backup, and other networks. The router has functions such as routing information exchange. [3]
The most important function of a Layer 3 switch is to speed up the fast forwarding of data within a large local area network. The addition of routing functions also serves this purpose. If a large-scale network is divided into small local area networks according to factors such as departments, regions, etc., this will lead to a large number of Internet visits. Simply using a Layer 2 switch cannot achieve Internet visits. For example, simply using a router, due to the limited number of interfaces and The slow route forwarding speed will limit the speed and scale of the network. A Layer 3 switch with fast forwarding function of the routing function becomes the first choice.
Generally speaking, in a network where the internal network has a large amount of data traffic and requires a fast forwarding response, if all Layer 3 switches do this work, it will cause an excessive load on the Layer 3 switches and affect the response speed. It is a good networking strategy for the router to complete the advantages of different devices. Of course, the premise is that the customer's pockets are very good, otherwise the second best is to let the Layer 3 switch also serve as the Internet interconnection. [3]

Layer 4 switching

A simple definition of Layer 4 switching is: it is a function that determines the transmission not only based on the MAC address (Layer 2 bridge) or source / destination IP address (Layer 3 routing), but also based on TCP / UDP ( Layer 4) Application port number. Layer 4 switching functions are like virtual IPs, pointing to physical servers. The services it transmits are subject to a variety of protocols, including HTTP, FTP, NFS, Telnet, or other protocols. These services require complex load balancing algorithms based on physical servers. [3]
In the IP world, the type of service is determined by the terminal's TCP or UDP port address, and the application range in the layer 4 exchange is determined by the source and terminal IP addresses, TCP, and UDP ports. A virtual IP address (VIP) is set up for each server group used for searching in the layer 4 exchange, and each group of servers supports a certain application. Each application server address stored in the domain name server (DNS) is a VIP, not a real server address. When a user applies for an application, a VIP connection request (for example, a TCP SYN packet) with the target server group is sent to the server switch. The server switch selects the best server in the group, replaces the VIP in the terminal address with the IP of the actual server, and passes the connection request to the server. In this way, all packets in the same interval are mapped by the server switch and transmitted between the user and the same server. [3]
Features:
The fourth layer of the OSI model is the transport layer. The transport layer is responsible for end-to-end communication, that is, coordinating communication between the network source and the target system. In the IP protocol stack, this is the protocol layer where TCP (a transport protocol) and UDP (user packet protocol) are located.
In the fourth layer, the TCP and UDP headers contain port numbers, which can uniquely distinguish which application protocols (such as HTTP, FTP, etc.) each packet contains. The endpoint system uses this information to distinguish the data in the packet, especially the port number so that a receiving computer system can determine the type of IP packet it receives and hand it to the appropriate high-level software. The combination of a port number and a device IP address is often called a "socket." Port numbers between 1 and 255 are reserved and they are called "well-known" ports, that is, they are the same in all host TCP / IP stack implementations. In addition to "familiar" ports, standard UNIX services are allocated in the range of 256 to 1024 ports, and custom applications generally allocate port numbers above 1024. A list of assigned port numbers can be found on RFC1700 "Assigned Numbers". [3]
The additional information provided by the TCP / UDP port number can be used by the network switch, which is the basis of Layer 4 switching. Layer 4 switches can act as a "virtual IP" (VIP) front-end to the server. Each server and server group supporting a single or universal application is configured with a VIP address. This VIP address is sent out and registered on the domain name system. When issuing a service request, the Layer 4 switch recognizes the start of a session by determining the start of TCP. It then uses sophisticated algorithms to determine the best server to handle this request. Once this decision is made, the switch associates the session with a specific IP address and replaces the VIP address on the server with the server's real IP address. [3]
Each Layer 4 switch maintains a connection table associated with the source IP address and source TCP port that match the selected server. The Layer 4 switch then forwards the connection request to this server. All subsequent packets are remapped and forwarded between the client and server until the switch discovers the session. In the case of Layer 4 switching, access can be connected with real servers to meet user-defined rules, such as making each server have an equal number of accesses or allocating transport streams based on the capacity of different servers. [3]
1) Speed
In order to be effective in corporate networks, Layer 4 switching must provide comparable performance to Layer 3 wire-speed routers. That is, Layer 4 switching must operate at all media speeds on all ports, even on multiple Gigabit Ethernet connections. Gigabit Ethernet speed is equivalent to routing at the maximum speed of 1488,000 packets per second (assuming the worst case scenario, where all packets are the smallest size defined by the network and 64 bytes in length). [3]
2) Server capacity balancing algorithm
According to the desired capacity balance interval size, there are many algorithms for the layer 4 switch to allocate applications to the server. There are simple detection of the latest connection in the loop, detection of loop delay, or detection of the closed loop feedback of the server itself. Of all the predictions, closed-loop feedback provides the most accurate detection of the server's existing traffic. [3]
3) Table capacity
It should be noted that the switch that performs Layer 4 switching needs to have the ability to distinguish and store a large number of transmission entries. This is especially true when switches are at the core of an enterprise network. Many Layer 2 / Layer 3 switches prefer the size of the send table to be proportional to the number of network devices. For Layer 4 switches, this number must be multiplied by the number of different application protocols and sessions used in the network. Therefore, the size of the send list increases rapidly with the number of endpoint devices and application types. Layer 4 switch designers need to consider this growth in tables when designing their products. Large table capacity is critical to manufacturing high-performance switches that support Layer 4 traffic at wire speed. [3]
4) Redundancy
The Layer 4 switch has a function that supports redundant topologies. With a dual-link NIC fault-tolerant connection, it is possible to build a completely redundant system from one server to the NIC, link and server switch. [3]

Switch management mode

Manageable switches can be managed through the following ways: through RS-232 serial port (or parallel port) management, management through a web browser, and management through network management software. [3]

Switch serial management

The manageable switch comes with a serial cable for switch management. First plug one end of the serial cable into the serial port on the back of the switch, and the other end into the serial port of an ordinary computer. Then power on the switch and computer. The HyperTerminal program is provided in both Windows 98 and Windows 2000. Open "HyperTerminal", after setting the connection parameters, you can interact with the switch through the serial cable, as shown in Figure 1. This method does not occupy the bandwidth of the switch, so it is called "Out of Band Management". [3]
In this management mode, the switch provides a menu-driven console interface or command-line interface. You can use the "Tab" key or arrow keys to move through the menus and submenus, press the Enter key to execute the corresponding command, or use the dedicated switch management command set to manage the switch. The command set of switches of different brands is different, and even the switches of the same brand have different commands. It is more convenient to use menu commands. [3]

Web Switch Web Management

Managed switches can be managed through the Web (web browser), but you must assign an IP address to the switch. This IP address is not used for anything other than the management switch. By default, the switch does not have an IP address. You must specify an IP address through the serial port or other methods to enable this management method. [3]
When using a web browser to manage the switch, the switch is equivalent to a Web server, except that the web pages are not stored in the hard disk, but in the NVRAM of the switch. The Web programs in the NVRAM can be upgraded through the program. When the administrator enters the IP address of the switch in the browser, the switch passes the webpage to the computer like a server, and at this time it feels like you are visiting a website, as shown in Figure 2. This method occupies the bandwidth of the switch, so it is called "In band management". [3]
If you want to manage the switch, just click the corresponding function item on the webpage, and change the parameters of the switch in the text box or drop-down list. Web management can be performed on the local area network, so remote management can be achieved. [3]

Switch software management

Network-manageable switches all follow the SNMP protocol (Simple Network Management Protocol). The SNMP protocol is a set of network equipment management specifications that comply with international standards. Any device that complies with the SNMP protocol can be managed by network management software. You only need to install a set of SNMP network management software on a network management workstation, and you can easily manage the switches, routers, servers, etc. on the network through the LAN. The interface of the SNMP network management software is shown in Figure 3. It is also an in-band management method. [3]
Management of network-manageable switches can be managed in the above three ways. Which one does it take? When the switch is initially set up, it often has to go through out-of-band management; after setting the IP address, you can use in-band management. In-band management Because management data is transmitted through a publicly-used LAN, remote management can be achieved, but the security is not strong. Out-of-band management is communicated through the serial port, and data is only transmitted between the switch and the management machine, so the security is strong; however, due to the limitation of the length of the serial cable, remote management cannot be achieved. So which method to use depends on your requirements for security and manageability. [3]

Switch hardware failure

Switch failures can generally be divided into two categories: hardware failures and software failures. Hardware failure mainly refers to the failure of components such as the switch's power supply, backplane, modules, and ports, which can be divided into the following categories.

Switch power failure

The power supply is damaged or the fan is stopped due to unstable external power supply, or aging of the power line or lightning, which prevents normal factory operation.
Damage to other parts inside the machine due to power supply also often occurs. If the PowER indicator on the panel is green, it means normal: if the indicator is off, the switch is not supplying power normally. This kind of problem is easy to find, easy to solve, and the easiest to prevent. In response to this kind of failure, the supply of external power should be done first. Generally, an independent power line is introduced to provide independent power, and a voltage regulator is added to avoid transient high or low voltage. If conditions permit, you can add an uninterruptible power supply to ensure the normal power supply of the switch, some provide voltage stabilization function, and some do not, you should pay attention to the selection. Set professional lightning protection measures in the equipment room to prevent lightning damage to the switch. There are many professional companies doing lightning protection projects, which can be considered when implementing network cabling. [4]

Switch port failure

This is the most common hardware failure. Whether it is a fiber optic port or a twisted pair RJ-45 port, you must be careful when plugging and unplugging the connector. If the fiber plug is soiled accidentally, the fiber port may be contaminated and communication may not be performed properly. We often see many people like plugging and unplugging connectors under power, which is theoretically possible, but this also unintentionally increases the failure rate of the port. [4]
In addition, careless handling may cause physical damage to the port. If the size of the crystal head purchased is too large, it is easy to damage the port when plugged into the switch. In addition, if a part of the twisted-pair cable connected to the port is exposed outdoors, in case this cable is struck by lightning, it will cause the connected switch port to be damaged or cause more unexpected damage. Generally, a port failure is caused by a certain port or several ports being damaged. Therefore, after troubleshooting the computer connected to the port, you can determine whether it is damaged by replacing the connected port. If you encounter such a fault, you can try to clean the port with an alcohol cotton ball after the power is turned off. If the port is indeed damaged, you can only replace the port. [4]

Switch module failure

The switch is composed of many modules, such as: stacking modules, management modules (control modules), and expansion modules. The chances of these modules failing are small, but once problems occur, they will suffer huge economic losses. If you are not careful when inserting or removing a module, or if you encounter a collision when carrying the switch, or if the power supply is unstable, this kind of failure may occur. [4]

Switch backplane failure

Each module of the switch is plugged into the backplane. If the environment is humid, the circuit board is wet or short-circuited, or the components are damaged due to factors such as high temperature and lightning strikes, the circuit board may not work properly. For example: poor heat dissipation performance or too high ambient temperature causes the temperature inside the machine to rise, causing components to burn out. Under the condition that the external power supply is normal, if the internal modules of the switch are not working properly, it may be that the backplane is broken. In this case, even an electrical maintenance engineer, there is nothing to do. The only way is to replace the back Board. [4]

Switch cable failure

In fact, this kind of fault is not a fault of the switch itself in theory. However, in actual use, cable faults often cause the switch system or port to fail to work normally. Therefore, this kind of fault is also classified as a switch hardware fault. For example, the connectors are not tightly connected, the cables are arranged in the wrong order or are not standardized when the cables are made, the crossover cables should be used but the straight cables should be used. The two optical fibers in the optical cables are staggered, and the incorrect line connection causes a network loop Wait. [4]

Switch test technology

Nowadays, the switch sets new requirements on the performance of the switch based on application requirements. There have been new developments in network integrated services, security, and intelligence. Protocol testing is a basic switch testing technology. Network protocols are proposed to improve the efficiency of testing and the effectiveness of communication in order to ensure communication rules. In an age of increasing network communications, network protocols are also essential. The basic requirements of network protocols are correct functions, good interoperability, and superior performance. The initial prototype of protocol testing was software testing. The main classifications are black box testing, white box testing, and gray box testing. Now briefly explain the basic principles of black box testing, use an incentive to make it act on the test object, and use the response of the test object. Without considering the specific structure and principle of the test object, we can still draw A transfer function, this transfer function is the data we need. Using this principle, it is also possible to test switches in Ethernet. By transmitting a piece of data and information to the switch and analyzing the information returned by it, you can judge the switch's failure. [5]

Prospects for switch development

With the rapid development of cloud computing and virtualization technologies, the convergence of data center services has placed higher requirements on the performance, functionality, and reliability of switches. However, since the data center switch can carry various services, it provides better guarantee for data transmission. The data center switch will carry more future services in the future, and has good scalability for the development of future networks. Therefore, I believe that for the establishment of future data centers, data center switches will evolve with the times and develop higher-performance, stable, and newer technology switches for the needs of the network. Now that it has entered the data era, I believe that data center switches will definitely be ambitious. [6]
The world is advancing, science and technology are developing, and the Internet is constantly accelerating. From the advent of the first network card, to today's universal Gigabit Ethernet cards, 10 Gigabit network cards, and even many super 10 Gigabit network cards. It indicates that the world is undergoing earth-shaking changes, data traffic is constantly increasing, and traditional switches can no longer meet today's increasingly complex networks and huge amounts of traffic. In order to better support various services such as video, voice, and files. High-speed hardware and a new generation of switching systems are required to handle increasing data traffic. With the rapid development of cloud computing, the establishment of data centers will bring greater challenges, and the requirements for switch performance and backplane bandwidth will become higher. The data center switch was born under this environment, replacing the traditional switch to work in the data center. Provides higher reliability, more stable performance, and greater throughput. There are newer technologies to solve complex networks. [6]

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?