• Selecting a Suitable LAN Device. How is a switch different from a router? Network equipment Why do you need a switch in a local network?

    The logical topology of an Ethernet network is a multi-access bus in which all devices share access to the same communication medium. This logical topology determines how nodes on a network view and process frames sent and received on that network. However, virtually all Ethernet networks today use a star or extended star physical topology. This means that in most Ethernet networks, end devices are typically connected to a Layer 2 LAN switch in a point-to-point manner.

    A Layer 2 LAN switch performs switching and filtering based only on the OSI link layer MAC address. The switch is completely transparent to network protocols and user applications. The Layer 2 switch creates a table of MAC addresses, which it then uses to make packet forwarding decisions. Layer 2 switches rely on routers to transfer data between independent IP subnets.

    Switches use MAC addresses to transmit data across the network through their switch fabric to the appropriate port towards the destination host. The switch fabric provides integrated channels and complementary machine programming tools to control the path of data through the switch. For a switch to know which port to use to transmit a unicast frame, it first needs to know what hosts are on each of its ports.

    The switch determines how to process incoming frames using its own MAC address table. It creates its own MAC address table by adding the MAC addresses of hosts that are connected to each of its ports. After entering the MAC address for a particular host connected to a specific port, the switch will be able to send traffic intended for that host through the port that is associated with the host for subsequent transmissions.

    If the switch receives a data frame for which there is no destination MAC address in the table, it forwards the frame on all ports except the one on which the frame was received. If a response is received from the destination host, the switch enters the host's MAC address into the address table using data from the frame's source address field. In networks with multiple connected switches, the MAC address tables contain multiple MAC addresses of the ports connecting the switches, which reflect elements outside the node. Typically, switch ports used to connect two switches have multiple MAC addresses entered into the corresponding table.

    In the past, switches used one of the following forwarding methods to switch data between network ports:

      Buffered switching

      Switching without buffering

    In buffered switching, when the switch receives a frame, it stores the data in a buffer until the entire frame is received. During storage, the switch analyzes the frame to obtain information about its destination. The switch also checks for errors using the tail of the Ethernet cyclic redundancy check (CRC) frame.

    When using unbuffered switching, the switch processes data as it arrives, even if the transfer has not yet completed. The switch buffers just enough frames to read the destination MAC address so it can determine which port to forward the data to. The destination MAC address is specified in 6 bytes of the frame after the preamble. The switch looks up the destination MAC address in its switch table, determines the outgoing interface port, and forwards the frame to its destination node through the switch's dedicated port. The switch does not check the frame for any errors. Because the switch does not have to wait for the entire frame to be buffered and does not perform error checking, switching without buffering is faster than switching with buffering. However, because the switch does not check for errors, it forwards corrupt frames throughout the network. During forwarding, damaged frames reduce throughput. Ultimately, the destination NIC rejects the corrupted frames.

    Modular switches offer greater configuration flexibility. They typically come in a variety of chassis sizes, allowing for multiple modular line cards to be installed. The ports are actually located on line cards. The line card is inserted into the switch chassis, similar to expansion cards installed in a PC. The larger the chassis, the more modules it supports. As shown in the picture, there are many different chassis sizes to choose from. If you purchased a modular switch with a 24-port line card, you can easily install another of the same card, increasing the total number of ports to 48.

    03/18/1997 Dmitry Ganzha

    Switches occupy a central place in modern local area networks. TYPES OF SWITCHING SWITCHING HUBS METHODS OF PACKET PROCESSING RISC AND ASIC ARCHITECTURE OF HIGH-CLASS SWITCHES BUILDING VIRTUAL NETWORKS THIRD LEVEL SWITCHING CONCLUSION Switching is one of the most popular modern technologies.

    Switches occupy a central place in modern local area networks.

    Switching is one of the most popular modern technologies. Switches are displacing bridges and routers to the periphery of local networks, leaving behind them the role of organizing communications through the global network. This popularity of switches is primarily due to the fact that they allow, through microsegmentation, to increase network performance compared to shared networks with the same nominal bandwidth. In addition to dividing the network into small segments, switches make it possible to organize connected devices into logical networks and easily regroup them when necessary; in other words, they allow you to create virtual networks.

    What is a switch? According to the IDC definition, “a switch is a device designed in the form of a hub and acting as a high-speed multiport bridge; the built-in switching mechanism allows segmentation of the local network and allocation of bandwidth to end stations in the network” (see M. Kulgin’s article “Build a network, plant a tree..." in the February issue LAN). However, this definition applies primarily to frame switches.

    TYPES OF SWITCHING

    Switching usually refers to four different technologies - configuration switching, frame switching, cell switching, and frame-to-cell conversion.

    Configuration switching is also known as port switching, where a specific port on a smart hub module is assigned to one of the internal Ethernet segments (or Token Ring). This assignment is made remotely through software network management when users and resources join or move on the network. Unlike other switching technologies, this method does not improve the performance of the shared LAN.

    Frame switching, or LAN switching, uses standard Ethernet (or Token Ring) frame formats. Each frame is processed by the nearest switch and transmitted further across the network directly to the recipient. As a result, the network turns into a set of parallel high-speed direct channels. We will look at how frame switching is carried out inside a switch below using the example of a switching hub.

    Cell switching is used in ATM. The use of small fixed-length cells makes it possible to create low-cost, high-speed switching structures at the hardware level. Both frame switches and mesh switches can support multiple independent workgroups regardless of their physical connection (see the section "Building virtual networks").

    The conversion between frames and cells allows, for example, a station with an Ethernet card to communicate directly with devices on an ATM network. This technology is used to emulate a local network.

    In this lesson we will be primarily interested in frame switching.

    SWITCHING HUBS

    The first switching hub, called EtherSwictch, was introduced by Kalpana. This hub made it possible to reduce network contention by reducing the number of nodes in a logical segment using microsegmentation technology. Essentially, the number of stations in one segment was reduced to two: the station initiating the request and the station responding to the request. No other station sees the information transmitted between them. Packets are transmitted as if through a bridge, but without the delay inherent in a bridge.

    In a switched Ethernet network, each member of a group of multiple users can be simultaneously guaranteed 10 Mbps throughput. The best way to understand how such a hub works is to use an analogy with a regular old telephone switch, in which the participants in the dialogue are connected by a coaxial cable. When a subscriber called “eternal” 07 and asked to be connected to such and such a number, the operator first of all checked whether the line was available; if so, he connected the participants directly using a piece of cable. No one else (with the exception of the intelligence services, of course) could hear their conversation. After the call ended, the operator disconnected the cable from both ports and waited for the next call.

    Switching hubs operate in a similar way (see Figure 1): they forward packets from an input port to an output port through the switch fabric. When a packet arrives at an input port, the switch reads its MAC address (i.e., layer 2 address) and it is immediately forwarded to the port associated with that address. If the port is busy, the packet is placed in a queue. Essentially, a queue is a buffer on an input port where packets wait for the desired port to become free. However, the buffering methods are slightly different.

    Figure 1.
    Switching hubs function similarly to older telephone switches: they connect an input port directly to an output port through a switch fabric.

    PACKET PROCESSING METHODS

    In end-to-end switching (also called in-flight switching and bufferless switching), the switch reads only the address of the incoming packet. The packet is transmitted further regardless of the absence or presence of errors in it. This can significantly reduce packet processing time, since only the first few bytes are read. Therefore, it is up to the receiving party to identify defective packets and request their retransmission. However, modern cable systems are reliable enough that the need for retransmission on many networks is minimal. However, no one is immune to errors in the event of a damaged cable, faulty network card, or interference from an external electromagnetic source.

    When switching with intermediate buffering, the switch, receiving a packet, does not transmit it further until it reads it completely, or at least reads all the information it needs. It not only determines the recipient's address, but also checks the checksum, i.e. it can cut off defective packets. This allows you to isolate the error-producing segment. Thus, buffer-and-forward switching emphasizes reliability rather than speed.

    Apart from the above two, some switches use a hybrid method. Under normal conditions, they provide end-to-end switching, but monitor the number of errors by checking checksums. If the number of errors reaches a specified threshold, they enter switching mode with forward buffering. When the number of errors decreases to an acceptable level, they return to end-to-end switching mode. This type of switching is called threshold or adaptive switching.

    RISC AND ASIC

    Often, buffer-forward switches are implemented using standard RISC processors. One advantage of this approach is that it is relatively inexpensive compared to ASIC switches, but it is not very good for specialized applications. Switching in such devices is carried out using software, so their functionality can be changed by upgrading the installed software. Their disadvantage is that they are slower than ASIC-based switches.

    Switches with ASIC integrated circuits are designed to perform specialized tasks: all their functionality is “hardwired” into the hardware. There is also a drawback to this approach: when modernization is necessary, the manufacturer is forced to rework the circuit. ASICs typically provide end-to-end switching. The switch fabric ASIC creates dedicated physical paths between an input and output port, as shown in .

    ARCHITECTURE OF HIGH-CLASS SWITCHES

    High-end switches are typically modular in design and can perform both packet and cell switching. The modules of such a switch perform switching between networks of different types, including Ethernet, Fast Ethernet, Token Ring, FDDI and ATM. In this case, the main switching mechanism in such devices is the ATM switching structure. We will look at the architecture of such devices using the Bay Networks Centillion 100 as an example.

    Switching is accomplished using the following three hardware components (see Figure 2):

  • ATM backplane for ultra-high-speed cell transfer between modules;
  • a CellManager special-purpose integrated circuit on each module to control cell transfer across the backplane;
  • a special-purpose SAR integrated circuit on each module to convert frames to cells and vice versa.
  • (1x1)

    Figure 2.
    Cell switching is increasingly being used in high-end switches due to its high speed and ease of migration to ATM.

    Each switch module has I/O ports, buffer memory, and a CellManager ASIC. In addition, each LAN module also has a RISC processor to perform frame switching between local ports and a packet assembler/disassembler to convert frames and cells into each other. All modules can independently switch between their ports, so that only traffic destined for other modules is sent through the backplane.

    Each module maintains its own table of addresses, and the main control processor combines them into one common table, so that an individual module can see the network as a whole. If, for example, an Ethernet module receives a packet, it determines who the packet is addressed to. If the address is in the local address table, then the RISC processor switches the packet between local ports. If the destination is on another module, then the assembler/disassembler converts the packet into cells. The CellManager specifies a destination mask to identify the module(s) and port(s) to which the cells payload is destined. Any module whose board mask bit is specified in the destination mask copies the cell to local memory and transmits the data to the corresponding output port in accordance with the specified port mask bits.

    BUILDING VIRTUAL NETWORKS

    In addition to increasing productivity, switches allow you to create virtual networks. One of the methods for creating a virtual network is to create a broadcast domain through a logical connection of ports within the physical infrastructure of a communication device (this can be either a smart hub - configuration switching or a switch - frame switching). For example, the odd ports of an eight-port device are assigned to one virtual network, and the even ports are assigned to another. As a result, a station in one virtual network becomes isolated from stations in another. The disadvantage of this method of organizing a virtual network is that all stations connected to the same port must belong to the same virtual network.

    Another method for creating a virtual network is based on the MAC addresses of connected devices. With this method of organizing a virtual network, any employee can connect, for example, his laptop computer to any switch port, and it will automatically determine whether his user belongs to a particular virtual network based on the MAC address. This method also allows users connected to the same switch port to belong to different virtual networks. For more information about virtual networks, see the article by A. Avduevsky “Such real virtual networks” in the March issue of LAN for this year.

    LEVEL 3 SWITCHING

    For all their advantages, switches have one significant drawback: they are unable to protect the network from avalanches of broadcast packets, and this leads to unproductive network load and increased response time. Routers can monitor and filter unnecessary broadcast traffic, but they are orders of magnitude slower. Thus, according to Case Technologies documentation, the typical performance of a router is 10,000 packets per second, and this cannot be compared with the same indicator of a switch - 600,000 packets per second.

    As a result, many manufacturers have begun to build routing capabilities into switches. To prevent the switch from being significantly slowed down, various techniques are used: for example, both Layer 2 switching and Layer 3 switching are implemented directly in hardware (ASICs). Different manufacturers call this technology differently, but the goal is the same: the routing switch must perform Layer 3 functions at the same speed as Layer 2 functions. An important factor is the price of such a device per port: it should also be low, like that of switches (see article by Nick Lippis in the next issue of LAN magazine).

    CONCLUSION

    Switches are both structurally and functionally very diverse; It is impossible to cover all their aspects in one short article. In the next tutorial, we'll take a closer look at ATM switches.

    Dmitry Ganzha is the executive editor of LAN. He can be contacted at: [email protected].


    Switches in the local network


    To create a local or home network, you need special devices. From this article you will learn a little about them. I will try to explain as simply as possible so that everyone can understand.

    Purpose .

    Hub, switch and router are designed to create a network between computers. Of course, after creation, this network will also function.

    Difference .

    What is a hub

    A hub is a repeater. Everything that is connected to it will be repeated. One is given to the hub and therefore everything is connected.
    For example, you connected 5 computers through the Hub. To transfer data from the fifth computer to the first, the data will pass through all the computers on the network. It's like a parallel phone - any computer can access your data, and so can you. Due to this, the load and distribution also increases. Accordingly, the more computers are connected, the slower the connection will be and the greater the load on the network. This is why nowadays fewer and fewer hubs are being produced and less and less are being used. Soon they will completely disappear.

    What is a switch?


    The switch replaces the hub and corrects the shortcomings of its predecessor. Each connected to the switch has its own separate IP address. This reduces the load on the network and each computer will receive only what it needs and others will not know about it. But the switch has a disadvantage associated with dignity. The fact is that if you want to divide the network into more than 2 computers, then you will need more IP addresses. This usually depends on the provider, and they usually only provide one IP address.

    What is a router?


    Router - it is often also called a router. Why? Yes, because it is a link between two different networks and transmits data based on a specific route specified in its routing table. To put it very simply, the router is an intermediary between your network and Internet access. The router corrects all the mistakes of its predecessors and that is why it is the most popular nowadays. Especially considering the fact that routers are often equipped with Wi-Fi antennas for transmitting the Internet to wireless devices, and also have the ability to connect USB modems.

    The router can be used either separately: PC -> router -> Internet, or together with other devices: PC -> switch/hub -> router -> Internet.

    Another advantage of the router is its easy installation. Often, only minimal knowledge is required from you to connect, configure a network and access the Internet.

    So. Let me summarize briefly.

    All these devices are needed to create a network. Hub and switch are not very different from each other. A router is the most necessary and convenient solution for creating a network.

    Connecting the Internet to an apartment or private house always raises many questions. To begin with, we choose an Internet provider if there are plenty to choose from. Then we take a closer look at the tariffs, and only then try to find out how a switch differs from a router.

    Equipment

    Both devices belong to the category They are designed for the operation of computer networks. These include not only a switch and router, but also a hub, patch panel, etc. Anything can be assigned to one of the groups: active or passive. You need to understand what the difference between them is.

    Active

    These devices are built on electronic circuits that receive electrical power. Such equipment is designed to amplify and convert the signal. The main characteristic is the use of special algorithms for processing. What does it mean?

    The Internet network works with batch sending of files. Each such set has its own technical parameters: this includes materials about its sources, purposes, data integrity, etc. These indicators make it possible to transfer packets to the desired address.

    The active device not only finds the signal, but also processes these technical parameters. It directs them through streams in accordance with built-in algorithms. This ability allows the device to be called as such.

    Passive

    This group does not receive the necessary power from the electrical network. Works with distribution and reduction of signal levels. Such devices can easily include cables, plug and socket, balun, patch panel. Some attribute this to telecommunication cabinets, cable trays, etc.

    Variety

    Since the network is active mainly thanks to the first group of devices, we will talk about it. This includes ten devices of different types. For example, a network adapter that is located in the computer itself. Network equipment of this type is now found in all PCs and helps connect to a LAN.

    The repeater should also be included here. The device has two ports and works with signal duplication. Thus, it helps to increase the size of the network segment. A concentrator is also an active piece of equipment, sometimes called a hub. It operates with 4-32 channels and serves for the interaction of all participants in the network.

    Well, finally, we come to the question of how a switch differs from a router. Although besides them, there is also a repeater, media converter, bridge and network transceiver.

    Router

    So let's start with this device. People simply call it a router. It serves to forward packets between different network segments. At the same time, it is guided by rules and routing tables. The device connects networks with different architectures. In order to carry out the process correctly, it studies the typology and determines the rules that the administrator has set.

    To understand the question of how a switch differs from a router, it is important to understand the operating principles of one and the other device. So, the router first studies information about the recipient: looks at his address and the name of the set. Then it goes to and identifies the path for transferring files. If the tables do not contain the necessary information, data packets are discarded.

    Sometimes other methods may be used to select the desired path. For example, the sender's address, upper-level protocols and all data that is hidden behind the name of the set are studied.

    Routers interact with address translation, filter transit streams according to prescribed rules, and encrypt or decrypt transmitted files.

    Switch

    A network switch or switch is a device that interacts with the connection of several PC network nodes. The entire process does not extend beyond several or one part of the network.

    This equipment also belongs to the active group. It operates at the OSI data link layer. Since the switch was initially configured to work with bridge parameters, it can be considered as a multiport bridge. To combine several lines at the network level, a router is used.

    The switch has no control over the propagation of traffic from one gadget to the rest. It conveys information only to the right person. The process has good performance and ensures the security of the Internet network.

    The switch's job is to store a switch table and use it to determine the mappings between MAC addresses. When the equipment is connected, the table is empty and is filled in as the device learns itself.

    Files that arrive on one of the ports are immediately sent over other channels. The device begins to examine the frames and, after determining the sender's addresses, temporarily enters the information into the archive. When a port receives a frame whose address has already been recorded, it will be transmitted along the path specified in the configuration.

    Difference

    How is a switch different from a router? At first glance, it is definitely worth saying that the main differences between these devices lie in the principles of operation. There is a rather interesting analogy that easily explains the difference.

    Let's say we have a corporate mail server. The employee sent a file that should reach the recipient through an internal or local delivery system. In this case, the switch is a mail server, and the router is a local one.

    What do we have? The switch does not analyze the content of mail and its type. It stores a list of all employees of the company, the addresses of their offices. Therefore, its main task is to transfer mail to a specific recipient.

    In this whole story, the router works as a postman delivering information to people who work outside the company. He checks the contents and can independently change the delivery rules if any additional information is found in the letter.

    The disadvantage of a router compared to a switch lies in the difficult and costly administration. Specialists who work with this equipment must master a huge number of parameters. In this case, the configuration must always be consistent with another configuration on the network.

    Conclusions

    Most companies are trying to modernize their network, so they replace outdated equipment with a switch between routers and networks. New devices help improve productivity, while their older counterparts continue to improve security.

    Setting up a router and switch is not easy. It is better for the average user not to go here at all. When setting up a home network, specialists come to install this equipment and configure it at the same time. This process is not easy. It is individual for each provider and specific network.

    If any failures occur, then you need to contact your Internet provider, because if there are problems with the setup, then you will not be able to cope without it.