Basic Concepts
All sites in a switched LAN are connected to a switching hub or LAN switch. Switching hubs or LAN switches have switching functions. Their characteristics are: all ports are not connected at ordinary times. When the workstation needs to communicate, the switching hub or LAN switch can connect to many ports at the same time, so that each pair of ports can communicate exclusively. The media transfers data without conflicts, and the connection is disconnected after the communication is completed. Since the common communication medium is eliminated, each site uses a link independently, there is no conflict problem, and the average data transmission rate of users can be increased, that is, the capacity can be expanded. The advantages of switched LAN: (1) It adopts a star topology structure, which is easy to expand, and the bandwidth of each user is not reduced due to the increase of interconnected devices. (2) Since the common communication medium is eliminated, each site uses a link independently, there is no conflict problem, and the average data transmission speed of users can be improved. The switched LAN is a star topology both physically and logically, and multiple switching hubs can be connected in series to form a multi-level star structure.
Main functions
Functions of switched LAN: Switched LAN can provide users with some functions that cannot be realized by shared LAN, mainly including the following aspects:
< p>(1) Isolation of conflict domains In shared Ethernet, the CSMA/CD algorithm is used for media access control. If two or more stations simultaneously detect that the channel is idle and there are frames ready to be sent, they will collide. A group of sites that compete for channel access is called a collision domain. Obviously, stations in the same collision domain compete for channels, which will lead to collisions and back-offs. However, stations in different conflict domains will not compete for the common channel, and they will not conflict. In a switched LAN, each switch port corresponds to a collision domain, and the port is the end of the collision domain. Because the switch has a switching function, there will be no conflict between sites with different ports. If only one computer site is connected to each port, there will be no conflicts between any pair of sites. If a port is connected to a shared LAN, then there will be conflicts between all sites on the port, but there will be no conflicts between the sites on this port and the sites on other ports of the switch. Therefore, the switch isolates the conflict domain of each port.(2) Extend the distance The switch can extend the distance of the LAN. Each switch port can be connected to a different LAN. Therefore, each port can reach the maximum distance required by different LAN technologies, regardless of the length of the LAN connected to other switch ports.
(3) Increase the total capacity In a shared LAN, the capacity is shared by all access devices. In a switched LAN, since each port of the switch has a dedicated capacity, the total capacity of the switched LAN increases with the number of ports of the switch. Therefore, the data transmission capacity provided by the switch is much larger than that of the shared LAN.
(4) Data rate flexibility For shared LANs, different LANs use different data rates, but all devices connected to the same shared LAN must use the same data rate. For switched LANs, each port of the switch can use different data rates, so sites can be deployed at different data rates, which is very flexible.
Basic principles
The core device of a switched LAN is a LAN switch, which can establish multiple concurrent connections between its multiple ports. A typical switched LAN is a switched Ethernet (switchedEthernet), and its core component is an Ethernet switch (Ethernetswitch). The Ethernet switch can have multiple ports, and each port can be individually connected to a node, or it can be connected to a shared medium-type Ethernet hub. 1. Classification of LAN switches: According to the different functions performed, LAN switches can be divided into two types. (1) Layer 2 switching: Perform bridging function, which forwards data according to MAC address. The switching speed is fast, but the control function is weak and there is no routing function. (2) Three-layer exchange: It forwards data according to the IP address and has a routing function. Layer 3 switching is an organic combination of Layer 2 switching and routing functions.
Internal structure
The internal structure of the switch determines the performance of the switch. There are four main internal structures used.
(1) Shared memory structure: shared The memory structure is that the frame is directly transmitted from the memory to the output port. There is no need to use the backplane bus connection between the modules. The central switching engine is relied on to provide a high-performance connection for all ports. The central switching engine checks each input packet to determine the route. . This method is easy to implement, but requires a large memory capacity and high management costs. And because it takes time to access the storage, it is impossible to achieve wire-speed switching between a large number of ports, so it is more suitable for small system switches.
(2) Cross bus structure: The cross bus structure establishes a direct point-to-point connection between ports, and each module is directly connected to any other module. Each module handles the connection problem by itself. There is no need for a central exchange display module for centralized control. This structure is suitable for single-point transmission, and there are certain problems with multi-point transmission.
(3) Hybrid cross bus structure: The hybrid cross bus structure is improved on the basis of the cross bus structure. It divides the integrated cross bus matrix into small cross matrixes, which are connected by a high-performance bus. The advantage is that it reduces the number of crossover buses, reduces costs, and reduces bus contention. But the bus connecting the cross matrix may be called a new performance bottleneck.
(4) Ring bus structure: This structure supports up to 4 switching engines in a ring and allows switching matrix interconnection of different speeds, and the rings are connected by switching engines. Different from the previous structures, this structure has an independent control bus, which is used to collect bus status, process routing, flow control and clean up the data bus. The biggest advantage of the ring bus structure is its strong expansion capability and low cost. Because the ring structure is used, it is easy to gather bandwidth. When the number of ports increases, the bandwidth increases accordingly. In addition, it effectively avoids the bus bottleneck caused by system expansion.
Exchange method
Generally, the exchange mainly realizes exchange through the following 4 methods.
(1) Straight-through: In this mode, the switch only needs to know the destination MAC address of the frame to successfully forward the frame to the destination. After the switch has read enough information in the frame and can identify the destination address, it will immediately send the frame to the destination port. The advantage of the straight-through type is that since no storage is required, the delay is very small and the exchange is very fast. But the disadvantage is that because there is no buffer, the content of the data packet is not saved by the Ethernet switch, so it is impossible to check whether the transmitted data packet is wrong, it cannot provide error detection capability, and it is easy to lose packets.
(2) Store-and-forward: The store-and-forward method is to store the data packet of the input port first, and then perform CRC check, and then take out the destination address of the data packet after processing the error packet, and find the MAC address The table is converted into an output port to send out packets. Because this method can perform error detection on the data packets entering the switch, and greatly reduce the invalid frames in the network, it can effectively improve the network performance. But the disadvantage is that the data processing delay is large due to the need to store and forward. However, with the decrease of ASIC and the increase of processor speed, many new switches can complete the entire frame inspection in a short time, so this This exchange method is widely used.
(3) Fragment isolation: Fragment isolation is a combination of the above two technologies. It checks whether the length of the data packet is enough for 64B, if it is less than this value, it means it is a fake packet, then discard the packet; if it is greater than this value, then send the packet. This method also cannot provide data verification. Its data processing speed is faster than store-and-forward, but slower than straight-through.
(4) Intelligent switching mode: The smart switching mode combines the advantages of both straight-through and store-and-forward. Whenever possible, the switch always adopts the pass-through mode, but once the network error rate exceeds the preset threshold, the switch will adopt the store-and-forward mode. When the network error rate drops, the pass-through mode is restarted.
Technical features
1. Low switching delay This is the main feature of the LAN switch. From the perspective of the magnitude of the transmission delay time, if the LAN switch is tens of μs, then the bridge It is a few hundred μs, and the router is several thousand μs.
2. Supports different transmission rates and working modes. The ports of the LAN switch can be designed to support different transmission rates, such as ports that support 10Mb/s, ports that support 100Mb/s, and those that support 100Mb/s. Port. At the same time, the port can also be designed to support two working modes, half-duplex and full-duplex.
3. Support virtual local area network service Switched local area network is the basis of virtual local area network, Ethernet switches can basically support virtual local area network service.
Full-duplex LAN
Concept
1. The concept of full-duplex LAN All shared LANs are half-duplex, that is, the channel is in any Data can only be transmitted in one direction at a time, either sending data or receiving data, not both. Because all users in a shared LAN rely on a single shared medium, it is technically impossible to send and receive data at the same time. Each site of a full-duplex LAN can send and receive data at the same time, one pair of wires is used to send data, and the other pair of wires is used to receive data. Switching technology is a necessary prerequisite for full-duplex Ethernet, because full-duplex requires a point-to-point connection with only two stations. But one thing to note is that the switched LAN is not automatically full-duplex operation. Only when a full-duplex port is set in the switch and some corresponding improvements are made, the switched LAN is a full-duplex LAN.
Advantages
2. The advantages of a full-duplex local area network due to simultaneous transmission and reception, which can theoretically double the transmission speed. For example, the link rate of 10BASE-T twisted pair that works in full duplex mode can reach 20Mbit/s. The length of the network segment is no longer restricted by the timing requirements of the shared medium half-duplex LAN, it is only restricted by the signal transmission capability of the medium system itself. For example, in half-duplex mode, the length of the 100BASE-FX optical fiber network segment is limited to 412m, while the length of the same media system in full-duplex mode can reach 2000m. 3. Full-duplex LAN standard IEEE and the 802.3x full-duplex LAN standard were formally formulated in March 1997. The standard specifies the use of full-duplex operation and a full-duplex flow control mechanism. The IEEE802.3x standard stipulates that full-duplex operation should meet the following requirements: the physical medium must support simultaneous transmission and reception of signals without interference; a full-duplex point-to-point link must connect two sites; both sites on the LAN can and have Configure to use full duplex mode. This means that two LAN interfaces must be able to send and receive frames at the same time.
Virtual Local Area Network
Concept
VLAN is roughly equivalent to a broadcast domain, that is, VLAN simulates a group of terminal devices, although they are located in different physical network segments However, they are not restricted by their physical location, and they communicate with each other as if they are in the same local area network. VLAN is derived from the concept of traditional LAN, which is basically the same as traditional LAN in function and operation, and provides interconnection and data transmission of terminal systems within a certain range. The main difference between it and the traditional LAN is the word "virtual", that is, the composition of the network is different from that of the traditional LAN, which also leads to the difference in performance.
Classification
(1) Port VLAN, port VLAN is divided into single switch port definition VLAN and multi-switch port definition VLAN. (2) MAC VLAN, a VLAN defined based on MAC can be regarded as a user-based VLAN. This kind of VLAN requires that all users must be configured in at least one VLAN in the initial stage. The initial configuration is completed manually, and then users can be automatically tracked.
Main advantages
(1) Reduce the cost of workstation movement and change. (2) VLAN and switching technology make each network segment contain fewer users, while the broadcast domain has expanded to 1000 or more users.
Networking technology
1. Group-level switching network: a typical group, you can use a basic 10mbit/s Ethernet switch, with some 100mbit/s ports, and One or more local file servers are connected, 2. Department-level switching network: Several group switching networks are combined to form a department-level switching network, which is generally a two-level switching network. The first-level or lower-level switches specifically support specific groups, including local servers. One or several switches at the upper level are used to connect the department servers of the group switch. Group users' access to departmental servers needs to cross the group boundary, that is, through the backbone switch. 3. Enterprise-level switching network: If you need to use routers to connect geographically dispersed departments on the department-level switches, an enterprise-level switching network is formed.
Networking technology Group-level switching network: A typical group can use a basic 10Mbit/s Ethernet switch with some 100Mbit/s ports that can be connected to one or more local file servers. 2. Department-level switching network: Several group switching networks are combined to form a department-level switching network, which is generally a two-level switching network. The first-level or lower-level switches specifically support specific groups, including local servers. One or several switches at the upper level are used to connect the department servers of the group switch. Group users' access to departmental servers needs to cross the group boundary, that is, through the backbone switch. 3. Enterprise-level switching network: If you need to use routers to connect geographically dispersed departments on department-level switches, an enterprise-level switching network is formed.
Architecture
1 Large LANs are always connected by multiple LANs through various network interconnection devices, such as bridges, routers or switches. Because the increasing requirements for LAN bandwidth must be under the fixed 10Mbps or 16Mbps bandwidth limit of Ethernet or Token Ring, the number of different LAN segments in a typical LAN design is rapidly increasing. Switched LAN, as a technology that can increase the capacity of the LAN by adding network segments, has quickly established its own position. This is because the LAN switch can provide high-quality message transmission services in multiple network segments at a lower cost. This is just like routers in the past, as interconnecting devices connecting LAN segments have largely replaced interconnection bridges, and LAN switches tend to replace routers in LANs.
The role of routing in a switched LAN: Before understanding the respective roles of switching and routing in a LAN, you should first understand the difference between these two technologies. LAN switches are a bit like bridges. Usually they interconnect the same types of LAN segments, such as all Ethernet segments or token ring segments. They transmit information transparently between ports. Take the token ring network as an example, using source routing. Transparent switches are invisible to end stations. They learn by checking all the information packets transmitted to their ports in the LAN segment, thereby knowing the location of each station, and according to the destination network address in each information packet. The packet is sent to the appropriate port. This also means that their operation is independent of the communication protocol with the end station, whether it is the TCP/IP protocol, or NovellIPX, NETBIOS or IBM's SNA protocol. The source routing switch of the token ring network is different from the transparent switch only in that the source routing switch sends the information packet to the corresponding port based on the information inserted into each information packet by the end station, which is also independent Based on the underlying network protocol.
But in some cases, switches can be used to interconnect different types of local area networks. For example, some switches can interconnect FDDI backbone networks and Ethernet segments. In this case, the switch just does some simple conversion work between the Ethernet and FDDI frames, thus following the transparency principle of the opposite station. On the other hand, routers are designed to have the ability to transmit any type of network information packet to any other type of network, and they are opaque to the end station: in fact, when an Ethernet end station wants the station at the other end of the router When communicating, it only addresses the corresponding router, not the destination site. When a router receives a packet destined for another network segment from an Ethernet segment, the router takes out the header of the packet, checks the destination address in the header, and then queries the corresponding table based on the information to determine the destination Whether the site is located in a directly connected LAN segment, otherwise, the information packet should be sent to another router. After making the corresponding decision, the router will add a new header to the information packet and send it out.
In order to determine which port the information packet is forwarded to, routers need to maintain complex lookup tables. These tables are constructed by each router cooperating with other routers in the network. These routers pass through this The routing status information of the network, the protocols and processes involved in routing selection are complicated, require a lot of calculations, and take up memory. All in all, the most significant difference between switching and routing in a local area network is that it requires much more complicated processing for information packets to pass through a router than to pass through a switch. Therefore, under the premise of achieving the same level of performance, the cost of the router is much more than that of the switch, and it takes less time for a packet to pass through the switch than to pass through the router, so the switch provides a shorter delay; but on the other hand , The processing power of the router can be used to provide a greater degree of control than the switch.
Network design goals
1. Obtain higher processing power at a reasonable cost. 2. Lower end-to-end delay. 3. It has the flexibility to adjust the communication mode. 4. Easy to configure and install. 5. Minimize management burden. 6. The effective control switching technology for network resource access is the dominant technology, and the local area network design where routing technology plays an important but smaller role can best meet most of the above design goals. A high percentage of switching technologies in this mix is usually satisfactory because switching technologies can provide greater communication processing capabilities at a lower cost than routing technologies, and switches are easier to install, configure, and manage.
The role of routing in switched LANs. In switched LANs, there are mainly four basic functions performed by routers. A clear understanding of them will help to understand that routing is in switched LANs. These four functions are as follows: 1. Split the switched LAN into multiple broadcast domains and connect these domains together. 2. The transmission of information packets between different subnets. 3. As a technology for interconnecting different local area networks. 4. Provide a mechanism for secure access to resources on the local area network. Of course, the router performs more than these functions. When connecting the local area network to the wide area network, the router undertakes the conversion of many protocols, such as from the local area network protocol to the point-to-point protocol (PPP) for dedicated line or telephone line connection, or frame relay.
(1) Divide the switched LAN into multiple broadcast domains. Some LAN technologies (such as Ethernet and Token Ring) provide for any site to send a packet to all other sites in the LAN The ability of this is also called broadcasting. Almost all the network protocols of the local area network use broadcast to realize the mechanism of operation and management. For example, enabling the client to locate the server, allowing the dissemination of information about available network resources, and so on. Generally speaking, the more sites connected to the same local area network, the greater the amount of broadcast traffic generated. This situation is still true for large-scale LANs formed by connecting multiple LAN segments through bridges or switches.
(2) The amount of broadcast traffic in a local area network is not only determined by the number of sites connected to the local area network, but also affected by many other factors, such as the number of servers and routers on the local area network. The number, the type of protocol used, the frequency with which the user initiates and terminates the network application, etc. At the same time, the observable broadcast characteristics in the token ring network are different from that of the Ethernet, because the token ring network uses a source route detection frame (SourceRouteEXPloreFrames), which will face multiple routes when passing through a bridged network. The choice will copy itself. Because there are many factors that affect LAN broadcast traffic, it is difficult to give a general measurement index. However, the actual network measurement shows that even a common bridge or switch is used to connect a local area network with hundreds or even thousands of nodes.
The average broadcast communication volume generally does not exceed 10-30 information packets per second, and there are only 100-150 information packets per second in the occasional peak period. And 30 broadcast packets per second means that they occupy about two and a half thousandths of the Ethernet channel, (here we assume that the average length of broadcast packets is 100 bytes). Therefore, the impact of the broadcast stream on the performance of the entire network is negligible. Although the broadcast stream on the LAN has little effect on network performance, the same situation does not apply to WAN connections. In this case, the broadcast communication stream will occupy a considerable part of the valuable WAN bandwidth, and the router plays a role in minimizing the impact of broadcast communication in this environment. The current trend in the types and usage of network protocols and software is: tend to reduce the broadcast communication traffic in the local area network.
(3) Broadcast Storm (BroadcastStorm) System administrators with many years of network management experience may be aware of broadcast storms. In a large network, a high-level broadcast communication stream may temporarily bombard a certain part of the network, causing the site to lose its connection with the server, so when these sites try to reestablish their connection, it triggers more broadcast communication streams, thus causing The ripple effect is the broadcast storm. Eventually, the rapidly growing broadcast traffic flow will flood the entire network and paralyze the entire network. The router can solve the broadcast storm problem well. The broadcast packet sent by the client to find the server is intercepted at the router. Forward forwarding by the router. Therefore, the router provides a type of firewall for broadcast packets. This suppresses the chain reaction that may trigger a broadcast storm. The fear of broadcast storms has caused the router to be the center of the LAN design. Later we will explain the router-centric network structure. Undoubtedly, in large LANs interconnected by bridges, broadcast storms can cause serious network service loss. However, the emergence of this problem is mainly due to three facts that have not been paid enough attention so far:
The use of remote bridges to connect external network points through low-speed dedicated lines. This original remote LAN bridge has little or no broadcast packet filtering capabilities. Therefore, the broadcast communication traffic that originally occupied a negligible bandwidth in the 10Mbps Ethernet may soon bomb the 64Kbps line. The result of losing connections between sites can easily trigger a broadcast storm. In practice, routers are often used to support low-speed lines to connect to remote sites, and routers are used to prevent remote lines from being bombarded by broadcast packets. The characteristics when the end station implements the IP protocol stack are also prone to cause a broadcast storm. Many early ways to implement the IP protocol stack are described in the information about IP, all of which may cause a broadcast storm. For example, in the early version of Berkeley UNIX, the site will continue to forward a packet with a wrong IP, and the site may send out ICMP error messages for specific broadcast packets. The current version of the IP implementation has eliminated this problem.
Poor implementation of the end station's network interface and protocol stack. Due to historical reasons, insufficient processing power, insufficient buffer memory, and immature software implementation of the protocol stack have caused excessive sensitivity to the broadcast communication flow in the local area network. If in the case of relatively low-level broadcast traffic, the LAN interface becomes congested, the connection may be lost, and the site's efforts to re-establish the connection form the conditions that trigger a broadcast storm. After more than ten years of technological development, the LAN interface can handle very high broadcast streams. The lower limit of the communication flow that may cause a broadcast storm has also increased a lot. All in all, the risk of broadcast storms in switched LANs is greatly exaggerated. If the moderate attention is shifted to how to better configure the switched LAN, there is no reason why a large LAN with thousands of nodes cannot be built, and it still has the advantages of good cost performance and scalability.
(4) Transmission of information packets between subnets. A large number of applied network protocols such as IP, IPX, and NetBIOS provide a network layer addressing structure independent of the underlying LAN transmission. Both IP and IPX are addressable protocols. In other words, they implement a hierarchical addressing scheme, and use Tathagata to identify all network hosts. NetBIOS is a non-addressable protocol, because the network host simply identifies it with a name without a hierarchical structure. The addressing structure of the network protocol is of great significance to the design of switched local area networks. Because of the hierarchical nature of network addresses, network hosts need to be divided into many groups, and the hosts in each group have the same network identification number. The way that a host in a certain group wants to communicate with a host in another group is to send the information packet to the router, and the router will forward it.
Switching equipment
Network switching equipment refers to equipment that uses network switching technology. According to different network switching modes, switching equipment can be divided into: circuit switching mode, storage datagram mode, packet datagram mode, virtual circuit mode, and ATM switching mode.