Switching levels. How to choose a network switch (switch, switch, English switch)

Buy L2 switch

Switches are the most important component of modern communication networks. This section of the catalog contains both Managed Layer 2 Gigabit Ethernet Switches and Unmanaged Switches Fast Ethernet... Depending on the tasks to be solved, switches of the access level (2 levels), aggregation and cores, or switches with multiple ports and a high-performance bus are selected.

The principle of operation of devices is to store data on the correspondence of their ports to the IP or MAC address of the device connected to the switch.

Networking diagram

To achieve high speeds, information transfer technology is widely used using a Gigabit Ethernet (GE) and 10 Gigabit Ethernet (10GE) switch. The transmission of information at high speeds, especially in large-scale networks, implies the choice of such a network topology that allows flexible distribution of high-speed streams.

A multi-layered approach to creating a network using managed Layer 2 switches optimally solves such problems, since it implies the creation of a network architecture in the form of hierarchical levels and allows:

  • scale the network at every level without affecting the entire network;
  • add different levels;
  • expand functionality networks as needed;
  • minimize resource costs for troubleshooting;
  • promptly solve problems with network congestion.

The main network applications based on the proposed equipment are Triple Play services (IPTV, VoIP, Data), VPN, implemented through a universal traffic transport of various kinds- IP network.

Managed switches of the 2nd level of Gigabit Ethernet technology allow to create a network architecture consisting of three levels of hierarchy:

  1. Core Layer... Formed by core switches. Communication between devices is carried out via fiber-optic cable according to the "redundant ring" scheme. Core switches support high network bandwidth and allow 10Gigabit streaming between large nodes settlements, for example, between urban areas. The transition to the next level of the hierarchy - the level of distribution, is carried out over an optical channel at a speed of 10Gigabit through optical XFP ports. The features of these devices are high bandwidth and packet processing from L2 to L4.
  2. Distribution Layer... Formed by edge switches. Communication is carried out via fiber-optic cable according to the "redundant ring" scheme. This level allows organizing the transmission of a stream at a speed of 10Gigabit between points of congestion of users, for example, between residential areas or a group of buildings. Connection of switches of the distribution level to the lower level - the access level is carried out via optical channels 1Gigabit Ethernet over SFP optical ports. Features of these devices: wide bandwidth and packet processing from L2 to L4, as well as support for the EISA protocol, which allows you to restore communication within 10ms when the optical ring is broken.
  3. Access Layer... It is made up of L2 managed switches. Communication is carried out via fiber-optic cable at 1Gigabit speeds. Access level switches can be divided into two groups: with only an electrical interface and also having optical SFP ports for creating a ring at their level and connecting to the distribution level.

Switch (switch)- a device designed to connect several nodes of a computer network within one or more network segments. The switch operates at the link (second) layer of the OSI model. Routers are used to connect multiple networks based on the network layer.

Unlike a hub, which distributes traffic from one connected device to all others, the switch transmits data only directly to the recipient (the exception is broadcast traffic to all network nodes and traffic for devices for which the outgoing port of the switch is not known). This improves the performance and security of the network by eliminating the need (and ability) to process data that was not intended for the rest of the network.

The switch stores in memory a switch table (stored in an associative memory), which specifies the correspondence of the MAC address of the host to the port of the switch. When the switch is powered on, this table is empty and it is in learn mode. In this mode, data arriving on a port is transmitted to all other ports on the switch. In this case, the switch analyzes the frames (frames) and, having determined the MAC address of the sending host, enters it into the table for some time. Subsequently, if one of the switch ports receives a frame intended for a host whose MAC address is already in the table, then this frame will be transmitted only through the port specified in the table. If the destination host MAC address is not associated with any switch port, then the frame will be sent to all ports, except for the port from which it was received. Over time, the switch builds a table for all active MAC addresses, as a result of which the traffic is localized. It should be noted low latency (latency) and high forwarding speed on each port of the interface.

Switches coordinate transmission by fabric switching. They have inner memory, in which the table of MAC addresses of all computers is formed.

Network hub (hub)- a device for combining computers into Ethernet network using cable infrastructure such as twisted pair... Currently superseded by network switches.

The concentrator operates on the 1st (first) physical layer of the OSI network model, relaying the incoming signal from one of the ports to the signal to all other (connected) ports, thus realizing the typical Ethernet topology common bus, with half-duplex operation. Collisions (that is, an attempt by two or more devices to start transmission at the same time) are handled similarly to Ethernet on other media - the devices stop transmission on their own and resume the attempt at a random interval. A network hub also ensures uninterrupted operation of the network if a device is disconnected from one of the ports or if the cable is damaged, as opposed to, for example, a network on a coaxial cable, which then stops working entirely.

9. The ip header. Service Type

IPv 4

V modern network The Internet uses IP version 4, also known as IPv4. In this version of IP, each host is assigned an IP address of 4 octet (4 bytes) length. In this case, computers in subnets are connected by common initial bits of the address. The number of these bits, common for a given subnet, is called the subnet mask (previously, the division of the address space into classes - A, B, C was used; the network class was determined by the range of values ​​of the most significant octet and determined the number of addressed nodes in this network, now classless addressing is used).

A convenient form of writing an IP address (IPv4) is to write in the form of four decimal numbers (from 0 to 255), separated by periods, for example, 192.168.0.1 ... (or 128.10.2.30 - traditional decimal form of address representation)

IP header

An IP packet consists of a header and a data field. The header is variable in length from 20 to 60 bytes in 4-byte increments. The payload can also be variable in length, ranging from 8 to 65515 bytes.

IP header structure (v.4):

    Version- 4 bits

    Header length- 4 bits (IHL (InternetHeaderLength) is the length of the IP-packet header in 32-bit words. It is this field that indicates the beginning of the data block ( English payload- payload) in a package. The minimum valid value for this field is 5)

    Service type (service) (TOS) - 1 byte (8 bits) -

1-3 bits are priority (default 0 - 000, highest 7 - 111),

4 bits - latency (0 - normal, 1 - low),

5 bit - throughput(0 - normal, 1 - high),

6 bits - reliability field (0 - normal, 1 - high),

7 bits - cash costs (0 - normal, 1 - low),

8 bits - reserved - zero

    Total length- 2 bytes - total length packet (IP datagrams), i.e. header + payload. Payload length = total length - 4 * header length. Package length in octets(bytes), including header and data. The minimum valid value for this field is 20, the maximum is 65,535 bytes.

    Package number (identifier)- 2 bytes - used to recognize packets formed by fragmentation of the original packet. All fragments must have the same value for this field. Identifier - a value assigned by the sender of the packet and intended to determine the correct sequence of fragments when assembling the packet. For a fragmented packet, all fragments have the same identifier.

    Flags field- 3 bits -

1 bit - reserved - zero

2 bits - do not fragment (Don’t Fragment - DF) - set to 0 if fragmentation is enabled, to 1 - if disabled

3 bits - are there more fragments (More Fragments - MF) - set to 0 if there are no more fragments following the current one, to 1 - if this fragment is not the last and there is still one.

3 bits of flags. The first bit should always be zero, the second DF (don’t fragment) bit determines whether the packet is fragmented, and the third MF (more fragments) bit indicates whether this packet is the last in the packet chain.

    Fragment offset- 13 bits - specifies the offset in bytes of the data field of this packet from the beginning of the general data field of the original fragmented packet. It is used when assembling / disassembling packet fragments when transmitting them between networks with different MTU values. The offset must be a multiple of 8 bytes. Fragment offset is a value that determines the position of the fragment in the data stream. The offset is given by the number of 8-byte blocks, so this value needs to be multiplied by 8 to convert to bytes.

    Lifetime (TTL) - 1 byte - means the time limit during which a packet can travel across the network. The lifetime of a given packet is measured in seconds and is set by the transmission source. On routers and in other nodes of the network, one is subtracted from the current lifetime after each second; one is also subtracted when the delay time is less than a second. Since modern routers rarely process a packet longer than one second, the lifetime can be considered equal to the maximum number of nodes that are allowed to pass through. this package before it reaches its destination. If the time-to-live parameter becomes zero before the packet reaches the recipient, the packet will be discarded. Lifetime can be viewed as a clockwork self-destruct mechanism. The value of this field changes when the IP packet header is processed. Time to live ( TTL) is the number of routers that this packet can pass. As the router passes through, this number will decrease by one. If the value of this field is zero, then the packet must be discarded and a message can be sent to the sender of the packet. Time exceeded (ICMP type 11 code 0).

    Protocol top level - 1 byte - one byte and indicates which upper layer protocol the information placed in the packet data field belongs to (for example, it can be TCP segments, UDP datagrams, ICMP or OSPF packets) Protocol - the next layer Internet protocol identifier indicates, what protocol data the packet contains, for example, TCP or ICMP (see. IANA protocol numbers and RFC 1700). V IPv6 called "Next Header".

    Header checksum- 2 bytes - calculated by header only. Since some of the header fields change their value during the transmission of the packet over the network (for example, the time to live), the checksum is checked and recalculated each time the IP header is processed.

    IP-address of the sender- 4 bytes

    IP-address of the recipient- 4 bytes

MTU- In computer networks, the term maximum transmission unit (MTU) means the maximum size of the useful data block of one packet (eng. payload) that can be transmitted by the protocol without fragmentation. When talking about MTU, we usually mean the data link protocol of the OSI network model. However, this term can also be applied to the physical layer (media mtu) and network layer (ip mtu). The term MTU may not be associated with a specific level of the model: tunnel mtu, vlan mtu, routing mtu, mpls mtu ...

The limitation on the maximum frame size is imposed for several reasons:

    To reduce retransmission time in the event of packet loss or fatal packet corruption. The likelihood of loss increases with the length of the packet.

    So that during half-duplex operation the host does not occupy the channel for a long time (also for this purpose, an interframe interval is used. Interframe gap)).

    The larger the packet is sent, the more waiting for other packets to be sent, especially on serial interfaces. Therefore, a small MTU was relevant in the days of slow dial-up connections.

    Small size and performance of network buffers for incoming and outgoing packets. However, buffers that are too large also degrade performance.

The MTU value is determined by the standard of the corresponding protocol, but can be overridden automatically for a specific stream (by the PMTUD protocol) or manually for the required interface. On some interfaces, the default MTU may be set below the maximum possible. The MTU value is bounded downward, usually by the minimum allowable frame length.

For a high-performance network, the reasons for the initial MTU limits are outdated. For this reason, Jumbo frames with increased MTU have been developed for Ethernet.

MaximumTransmissionUnit (MTU) is used to determine the maximum block size (in bytes) that can be transmitted at the link layer of the OSI network model.

IP-package- a formatted block of information transmitted over a computer network, the structure of which is determined by the protocol IP... In contrast, computer network connections that do not support IP packets, such as traditional point-to-point connections in telecommunications, simply transfer data as a sequence of bytes, characters, or bits. By using packet formatting, the network can transmit long messages more reliably and efficiently.

Often when choosing a certain network device for your network, you might hear phrases such as "L2 switch", or "L3 device".

In this case, we are talking about layers in the OSI network model.

A device of the L1 level is a device operating at the physical level, in principle, they "do not understand" anything about the data that they transmit, and work at the level of electrical signals - the signal has arrived, it is transmitted further. These devices include the so-called "hubs" that were popular in the early days of Ethernet networks, as well as a wide variety of repeaters. These types of devices are commonly referred to as hubs.

L2 devices operate at the data link layer and perform physical addressing. Work at this level is performed with frames, or as it is sometimes also called "frames". There are no ip-addresses at this level, the device identifies the sender and the receiver only by the MAC address and transmits frames between them. Such devices are usually called switches, sometimes specifying that this is a "L2 switch"

L3 devices operate at the network layer, which is designed to determine the path of data transmission, and understand the IP addresses of devices, determine the shortest routes. Devices of this level are responsible for installing different types connections (PPPoE and the like). These devices are commonly referred to as routers, although they are often referred to as "L3 switch"

L4 devices are responsible for ensuring reliable data transmission. These are, let's say, "advanced" switches, which, based on information from the packet headers, understand that traffic belongs to different applications, and can make decisions about redirecting such traffic based on this information. The name of such devices has not settled down, sometimes they are called "smart switches", or "L4 switches".

news

Firm "1C" informs about the technical separation of the versions of PROF and CORP of the platform "1C: Enterprise 8" (with additional protection of licenses of the CORP level) and the introduction of a number of restrictions on the use of licenses of the PROF level from 11.02.2019.

However, a source in the Federal Tax Service explained to RBC that the decision of the tax authorities should not be called a delay. But if the entrepreneur does not have time to update cash register and from January 1, it will continue to issue checks with VAT 18%, while reflecting the correct rate of 20% in the reporting, the tax service will not consider this as a violation, he confirmed.

If we consider the properties of the OSI model at the second level and read the classical definition, then we can understand that this level has received the bulk of the switching actions.

The data link layer (formally it is called the information-channel layer) solves the issues of reliable transit of all data over the physical channel. The link layer is characterized by a solution to the problems of physical addressing (not to be confused with network and logical addressing), network topology management, linear discipline (how the end client can use this network channel), channel failure messages, high-quality delivery of data packets and orderly control of information flows. ...

The data link layer in the OSI model, by its functionality, creates an effective platform for some modern technologies... The fact that manufacturers to this day develop devices for the second switching level speaks of the relevance and reliability of such a solution.

In the switch, data transmission passes through several parallel channels at a maximum speed, which is limited only by the bandwidth "wire speed", more precisely, by the specification of the network protocol. This effect is achieved due to the fact that the switch has a large number of centers for transmission and processing of frames and work with data transmission buses.

Considering technologically a LAN switch, it can be noted that this is a special device, the main purpose of which is to significantly increase the data transfer rate by attracting parallel streams between different nodes to the process. common network... This device differs from the "standard" Hub-hubs, which can give only one channel for data transmission for all streams in the network - it allows you to "distribute" information several times faster due to transmission over several channels.

Local network switches with a classic (since the 90s) design work only according to the OSI model of the second layer. They use the parallel frame forwarding architecture of channel protocols to achieve the highest network performance. The basic principle of operation is laid down in the IEEE 802.1H and 801.D standards, which explain the bridge operation algorithm. In addition, Layer 2 switches have many new features, some of which can be found in the revision of the 802.1D-1998 standard, while others have not yet gone through extensive standardization.

LAN switches are very different in their functionality, and, as a result, the price range for such devices is also wide. For example, 1 port can cost from $ 50 to $ 1000 depending on the technologies used. What is the reason for such huge differences? The fact is that LAN switches are used to solve problems at various levels:

Top-class switches provide high-quality data transfer and high performance. In addition to port density, these switches feature extensive data management. They allow servicing entire communication lines without losing data transfer rates.

Low-end switches usually lack ports and extensive management functionality. They are best used in small local area networks so as not to overload them with a lot of data.

Also one of the main differences is the switch architecture. The operation of modern switches is based on ASIC controllers, whose device and normal work with other LAN modules of the switch plays a vital role. In turn, ASIC controllers can be conditionally divided into two classes - these are large-action ASICs that can work with a huge number of ports, and small-action ASICs that can serve only a few ports and are combined into matrices for subsequent switching.

How to choose a switch given the existing variety? The functionality of modern models is very different. You can purchase both a simple unmanaged switch and a multifunctional managed switch, which is not much different from a full-fledged router. An example of the latter is the Mikrotik CRS125-24G-1S-2HND-IN from the new Cloud Router Switch line. Accordingly, the price of such models will be much higher.

Therefore, when choosing a switch, first of all, you need to decide which of the functions and parameters of modern switches you need, and for which you should not overpay. But first, a little theory.

Types of switches

However, if earlier managed switches differed from unmanaged switches, including a wider set of functions, now the difference can only be in the possibility or impossibility remote control device. Otherwise, manufacturers add additional functionality even to the simplest models, often increasing their cost.

Therefore on this moment the classification of switches by levels is more informative.

Switch levels

In order to choose the switch that best suits our needs, you need to know its level. This parameter is determined based on which OSI (data transfer) network model the device is using.

  • Devices first level using physical data transmission have practically disappeared from the market. If someone else remembers hubs, then this is just an example of the physical layer, when information is transmitted in a continuous stream.
  • Level 2... This includes almost all unmanaged switches. The so-called channel network model. Devices divide the incoming information into separate packets (frames, frames), check them and send them to a specific recipient device. The basis for distributing information in Layer 2 switches is MAC addresses. Of these, the switch makes the addressing table, remembering which port corresponds to which MAC address. They don't understand IP addresses.

  • Level 3... By choosing such a switch, you get a device that already works with IP addresses. And also supports many other possibilities for working with data: converting logical addresses to physical ones, network protocols IPv4, IPv6, IPX, etc., pptp connections, pppoe, vpn and others. On the third, network data transmission level, almost all routers and the most "advanced" part of switches work.

  • Level 4... The OSI networking model used here is called transport... Even not all routers come with support for this model. Traffic distribution occurs at an intelligent level - the device can work with applications and, based on the headers of data packets, send them to the desired address. In addition, transport layer protocols, such as TCP, guarantee reliable delivery of packets, preserve a certain sequence of their transmission, and are able to optimize traffic.

Choosing a switch - reading the characteristics

How to choose a switch by parameters and functions? Let's consider what is meant by some of the commonly used designations in the characteristics. The basic parameters include:

Number of ports... Their number varies from 5 to 48. When choosing a switch, it is better to provide a margin for further network expansion.

Base baud rate... Most often we see the designation 10/100/1000 Mbps - the speeds that each port of the device supports. That is, the selected switch can operate at 10 Mbps, 100 Mbps, or 1000 Mbps. There are quite a few models that are equipped with both gigabit and 10/100 Mb / s ports. Most modern switches work according to the IEEE 802.3 Nway standard, automatically detecting the port speed.

Bandwidth and internal bandwidth. The first quantity, also called a switching matrix, is the maximum amount of traffic that can be passed through the switch per unit of time. It is calculated very simply: number of ports x port speed x 2 (duplex). For example, an 8-port Gigabit switch has a bandwidth of 16 Gbps.
Internal throughput is usually indicated by the manufacturer and is only needed for comparison with the previous value. If the declared internal bandwidth is less than the maximum, the device will not cope well with heavy loads, slow down and freeze.

Auto MDI / MDI-X detection... This is autodetection and support for both standards by which it was compressed twisted pair, without the need for manual control of connections.

Expansion slots... Possibility of connecting additional interfaces, for example, optical.

MAC Address Table Size... To select a switch, it is important to calculate in advance the size of the table you need, preferably taking into account the future expansion of the network. If there are not enough records in the table, the switch will overwrite the new ones, and this will slow down the data transfer.

Form factor... The switches are available in two types of chassis: desktop / wall-mount and rack-mountable. In the latter case, the standard device size is 19-inches. The special rack mount ears can be detachable.

Choosing a switch with the functions we need to work with traffic

Flow control ( Flow control, IEEE 802.3x protocol). Provides for the negotiation of send and receive data between the sending device and the switch at high loads, in order to avoid packet loss. The function is supported by almost every switch.

Jumbo frame- increased packages. It is used for speeds from 1 Gbit / s and above, allows you to speed up data transfer by reducing the number of packets and the time for their processing. There is a function in almost every switch.

Full-duplex and Half-duplex modes... Almost all modern switches support auto-negotiation between half-duplex and full-duplex (data transmission in one direction only, data transmission in both directions at the same time) to avoid network problems.

Traffic prioritization (IEEE 802.1p standard)- the device is able to identify more important packets (for example, VoIP) and send them first. When choosing a switch for a network where a significant part of the traffic will be audio or video, you should pay attention to this function.

Support VLAN(standard IEEE 802.1q). VLAN is a convenient tool for delimiting separate areas: the internal network of the enterprise and the network common use for clients, various departments, etc.

Mirroring (traffic duplication) can be used to ensure security within the network, to monitor or verify the performance of network equipment. For example, all incoming information is sent to one port for verification or recording by certain software.

Port forwarding... You may need this function to deploy a server with Internet access, or for online games.

Loop protection - STP and LBD functions... Especially important when choosing unmanaged switches. It is almost impossible to detect the formed loop in them - a looped section of the network, the cause of many glitches and freezes. LoopBack Detection automatically blocks the port on which the loop occurs. The STP protocol (IEEE 802.1d) and its more advanced descendants - IEEE 802.1w, IEEE 802.1s - act a little differently, optimizing the network for a tree structure. Initially, the structure provides for spare, looped branches. By default, they are disabled, and the switch starts them only when there is a disconnect on some main line.

Link Aggregation (IEEE 802.3ad)... Increases bandwidth by combining multiple physical ports into one logical port. The maximum bandwidth for the standard is 8 Gbps.

Stacking... Each vendor uses their own stacking designs, but in general terms, this feature refers to the virtual aggregation of multiple switches into a single logical device. The goal of stacking is to get more ports than is possible using a physical switch.

Switch functions for monitoring and troubleshooting

Many switches detect a cable connection fault, usually when the device is turned on, as well as the type of fault - wire breakage, short circuit, etc. For example, D-Link has special indicators on the case:

Virus Traffic Protection (Safeguard Engine)... The technique allows you to increase the stability of work and protect CPU from being overloaded by the "garbage" traffic of virus programs.

Power supply functions

Energy saving.How to choose a switch that will save you energy? Pay attentione for the availability of energy saving functions. Some manufacturers, such as D-Link, produce switches with adjustable power consumption. For example, a smart switch monitors devices connected to it, and if any of them is not working at the moment, the corresponding port is put into "sleep mode".

Power over Ethernet (PoE, IEEE 802.af standard)... A switch using this technology can power the devices connected to it over the twisted pair.

Built-in lightning protection... Very desired function, however, remember that such switches must be grounded, otherwise the protection will not work.


site