How to set up smartphones and PCs. Informational portal
  • home
  • Reviews
  • The difference between a router and a switch and a router from a switch. Switch or switch: functions and features of a network device

The difference between a router and a switch and a router from a switch. Switch or switch: functions and features of a network device

If you need to connect several computers to each other, or provide Internet access to a certain number of devices, the question arises regarding the choice of hardware for building a home network. To do this, you need to use special network equipment. There are different devices and each has its own purpose and function, and today we will look at the most common devices used in home or SOHO (Small-Office-Home-Office) networks.

Hub (Hub)

Hub literally means a center, or node of activity, which unites connected devices into one network. The network hub has several connectors into which subscribers are connected via twisted pair. The principle of operation is quite simple and outdated. The hub has one IP address and distributes information between all connected computers in the same way, therefore, all devices connected to the network constantly receive data packets, even if they are not intended for them. Therefore, the more computers are connected to the network, the slower the connection speed. Nowadays, the need to use hubs is gradually disappearing, they are replaced by switches or switches.

What is a switch?

The task of the switch is the same as that of the hub - to connect a certain number of subscribers into the network.

But in this regard, the network switch is more advanced, here the disadvantages of the hub are taken into account, and the switches have a completely different way of transferring data. Thus, when one computer accesses another, the switch itself determines who the information is intended for and transfers it specifically to the recipient, without affecting and thereby loading other computers. Consequently, the connection speed and performance is much higher than that of a network built using a hub. The only drawback is that each subscriber requires its own ip address, and most providers provide only one.

Another device for creating a network is a router (router)

In the context of networks, a switch is a network device that performs packet switching (switch). The switch unites the devices connected to it into one local network (in the general case). He replaced the hub (concentrator), from which it differs in that each port of the switch has its own collision domain, and the hub has one for all ports. Well, the hub simply sent out the packets coming to any port to all its ports, and the switch determines where the packet is destined for and sends it only to the required port

Network switch or switch, switch (from the English switch - switch) - a device designed to connect several nodes of a computer network within one segment. Unlike a hub, which distributes traffic from one connected device to all others, a switch only transmits data directly to the recipient. 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 works at the data link layer of the OSI model, and therefore, in the general case, it can only combine nodes of the same network by their MAC addresses. Routers are used to connect multiple networks based on the network layer. How the switch works The switch stores a special table (MAC table) in memory, which indicates the correspondence of the MAC address of the host to the port of the switch. When the switch is turned on, this table is empty, and it works in learning 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 data packets, determining the MAC address of the sending computer, and enters it into the table. Subsequently, if a packet intended for this computer arrives at one of the switch ports, this packet will be sent only to the corresponding port. If the MAC address of the recipient computer is not yet known, then the packet will be duplicated on all interfaces. Over time, the switch builds a complete table for all of its ports, and as a result, traffic is localized. Features and types of switches Switches are divided into managed and unmanaged (the most simple). More complex switches allow you to manage switching at the channel (second) and network (third) layers of the OSI model. They are usually named accordingly, for example Layer 2 Switch or simply abbreviated as L2. The switch can be controlled via the Web interface protocol, SNMP, RMON, etc. Many managed switches allow you to perform additional functions: VLAN, QoS, aggregation, mirroring. Complex switches can be combined into one logical device - a stack, in order to increase the number of ports

A hub (aka a switch) is a device for combining several computers into a network. Its action is simple: having received a data packet from one port, it sends it to all the others. If several packets go to the same port at the same time, then they collide. Hence and the so-called. "collisions" that slow down the network. A switch (aka a hub) is the same hub, only with "brains". It remembers what address is on each of its ports, and when a data packet arrives (and the packet header contains information about to whom and from whom), it sends it to the desired port. A router (aka a router) is a device that combines a switch and a proxy server. That is, this device can work as a server, uniting several computers and providing them with access to the Internet through one external address. Sometimes one of the computers on the network can serve as a router. But if the purchase of a separate computer for a router is impractical, a simpler option is put in the form of a separate device. Of course, he has fewer opportunities, but so does the price.

We will talk about switches in local networks with 5th and 8th ports.

First, a few words about how a switch (switch) differs from a hub (HUB).

In general terms, the differences (in favor of the switch) can be characterized as:

  • high throughput
  • high speed of information transfer
  • greater reliability and a guarantee of the correctness of the transmitted information
  • as a result, it reduces the congestion of the entire network or its individual sections

How is this achieved?

Let's try to explain this without special terms.

A hub is simply a device where all network cables from computers are connected, and it allows information to pass only from one network node to another at a given moment. And before that, he offers information to each node of the network until he gets to the one who should receive it. In addition, the hub (if there are several who want to receive or send information) sequentially decides who to allow the transmission or reception of information packets in a random way, "tossing a coin". From this, collisions appear. All this is done over one bus with a bandwidth of 100 Mbit / sec.

The switch is a smarter device, and after the first connection to the local network, it memorizes the network address of each node in a special memory of the address table. Even a small switch remembers 8K to 16K (for 5, 8-port) host addresses. This table is needed for packet switching. When requesting the transmission or reception of a packet from a node, the switch determines the address of both the transmitting and the receiving and switches them with each other. The number of such pairs, which will not affect performance, depends on the throughput of the internal bus. For example, in 5- and 8-port models from TRENDware - TRENDnet TE100-S55E and S88E, it is more than 1 Gbit / sec. This is more than 10 times the bus performance of the hub, and even the network congestion is 10 times greater than the maximum limit for the hub, network clients will not feel, and the network will work just as quickly.

There is also a purely mechanical (electrical) way to increase the data transfer rate between the client and the switch. The switch can work not only in one direction (half duplex) over a network cable, but in two directions (full duplex). Thus, the exchange rate between the client and the switch increases up to 200 Mbit / sec.

If we draw an analogy with highways, then a hub is a section of road with only one lane, to which 5 or 8 roads converge on each side. Only one car can pass at a given time and only in one direction. The rest are standing and honking - a traffic jam.

A switch is a two-way road section with five lanes in each direction for 5 or 8 incoming lanes. Moreover, all stripes can be connected at different levels without interfering with each other and without intersecting. Therefore, 10 cars (5 pairs) can drive along it at the same time without noticing each other. Which road would you take?

But this does not exhaust the advantages of the switch. It also has built-in intermediate memory, a clipboard, in which those packets that are intended for currently busy clients are stored. When they are free, the switch itself will transfer the data to the addressees without the participation of the transmitting clients. For TRENDnet 5- and 8-port switches, the buffer memory is 512 Kbyte and 1 MByte per device, respectively. Returning to the analogy with highways: 0 is a transit warehouse where a car can unload its cargo (package) and drive away without occupying the road and allowing others to pass.

It is approximately clear that the switch allows you to pump through itself a much larger flow of information and much faster.

And why and who needs it?

In my opinion, there are several networking scenarios that require a small switch.

1. Small peer-to-peer network with a lot of exchange from each to everyone. For example, large graphic files (drawings, posters, photos, etc.) are exchanged.

2. There are several groups in the network, in which the traffic (traffic) occurs more intensively than with other nodes on the network. So that the exchange of active groups does not affect the performance of everyone else, they must be isolated. This is exactly what is done with switches. If each group is united by one hub, and these hubs are already connected to the switch, then only what should pass between the groups will pass between the groups.

3. If the network has more than one server or several nodes where information "flows": servers, print servers, Internet servers, etc. Then, by connecting them to the switch, you will speed up the work with them both due to the transmission speed (200MB / s full duplex) and due to the division of streams (1 Gbps internal bus) and free up the network.

4. To some extent, switches can also be used as repeaters (extenders) of the network. If using two hubs you can build a network only within a radius of 205 m (for a 100 Mbps network), then using 4 switches, you can try to stretch the network up to 500 m.

Surely there are many more applications.

However, with the price difference between TRENDware hubs and switches, they can be used almost everywhere.

Let's see what a switch can look like using the TRENDnet TE100-S55E / 88E devices as an example. This is a small metal box 171x100x28 mm, with an external 220V power supply unit and a panel of connectors on the back side. The front panel contains LEDs for power indication, operating mode at 10/100 Mbps, collision / fullduplex, link / activity indicator.

For those who do not like boxes and remote power supplies (and it is also more difficult to take away), the TE100-S4PCI internal switch is available, which also allows you to network up to 5 devices. Moreover, instead of a box and a power supply unit, you get a network adapter for the same price into which the switch is built-in.

When these lines go out of print, another "small" switch with 16 ports will already be available.

Most often, modern specialists use a switch to connect several computers to a network. What it is and how it works, system administrators usually do not explain, since the equipment is in their competence, but in fact it is best to explain to users in advance what equipment they will be working with.

What it is?

A network switch (or, as it is more commonly called today, a switch) - what is it? It is a specialized device that is used to connect a number of completely independent nodes in a network, as well as to connect several objects. When using such a device, it is possible to transfer traffic from one connected computer to another, while the switch itself determines which specific user the requested or directed information is intended for, after which the data is sent in a given direction.

What are these devices for?

Improving the level of performance and security is the main goal for which the switch is used. Not all modern users of such devices know what it is, but at the same time many get quite a lot of benefit from it, which they do not even know about. Thanks to the use of this technology, various network segments that do not have access to certain information are deprived of the possibility of processing or filtering it.

What do providers use?

Today, for providers, ensuring an extremely high degree of network security, as well as achieving its stable operation, are especially important aspects, because access to the Internet for millions of users directly depends on this. It is for this reason that in order to build a stable working network, modern providers, including both urban and first-level companies, use a specialized switch. Absolutely everyone in such companies knows what it is, because they are forced to constantly work with such equipment, and they know not only the basic principles of operation of such equipment, but also perfectly understand which devices to use in certain situations, and also what features the equipment has from one or another manufacturer.

Most often, a modern switch from D-Link or another company is a managed switch. That is, the system administrator always has the opportunity to go to the network interface of the installed device and program it in the way he needs.

How do such devices work?

There is a specialized switching table in the device memory, which contains a complete list of existing MAC addresses. In the future, the table will be filled in during the operation of the equipment, since the device constantly analyzes the sender's address. Data transmission to the corresponding port will be carried out only after the Internet switch determines that the station address is in the table. At the moment, this technology is the most optimal option for ensuring stable and secure operation of various networks. That is why this principle is used today by absolutely all modern switches, including the well-proven D-Link switch.

What are they like?

There are three main switching options, the use of which directly depends on how long it will take to wait for a response from the equipment, as well as how reliable the information transfer will be. In this case, the provider himself takes into account what exactly the requirements for him are put forward by the user, after which he chooses the most relevant switching method. In particular, providers are guided by the basic needs of their target audience, as well as taking into account the city's infrastructure and, of course, their capabilities.

There are switches that use the store-and-forward feature. Such devices initially completely read the information in the frame, after which they check it for errors and, if they are absent, they already redirect the data to a specific switching port.

The end-to-end type of information transfer is characterized by the fact that in this case the destination address is the only thing that the switch used in the frame reads. In this case, the computer, as well as the information provided by it, is not checked for errors, and the frame is simply redirected further to the destination address. Due to the use of such technology, the time required for the transfer of all information is significantly reduced, but there are also situations when the data simply does not reach the end user or does not reach the end user with certain errors.

How to connect?

Initially, of course, you need to buy a switch, the price of which will depend on which manufacturer and characteristics you choose (the range is wide - from several hundred rubles to several thousand or more). There is nothing complicated about connecting the switch:

  1. Insert the cable that your provider has provided to you into the network card of the main computer. In the future, you will use it as the main server.
  2. The second network card must connect to the switch through a specialized patch cord.
  3. After that, all other computers are connected to the device as well.

That's it, now the computers are physically united, after which all that remains is the competent configuration of the equipment.

How to set up?

After the computers are connected by the switch, you need to properly configure the network. Initially, the computer is configured through which the Internet will be distributed to the rest of the machines (the administrator is selected):

  1. We go to the "Network Control Center" through the "Control Panel".
  2. Click on "Change adapter parameters".
  3. We find our active connection and open its properties.
  4. We are looking for the "Access" tab and mark the item that allows other users to use the Internet connection through this computer.
  5. Go to "Network", find the "TCP / IPv4" protocol and open its properties.
  6. Enter the default address for the origin server: 192.168. 0.1.
  7. Click "Ok".

It is worth noting that on all other computers that are also connected to the switch, you will need to specify the IP address, but in this case, instead of "1", there should be any other digit or a number from 2 to 250 at the end. and in the first case, the "Subnet mask" will be filled in completely automatically, but in the "Main gateway" item you will need to register 192. 168.0.1., choosing it as your main server. This point is especially important, since otherwise the computer simply cannot find the server.

After that, the configuration of the switch will be completed. Now the Internet from one computer will be distributed to all other machines that are connected to it using this device, and all data will be transmitted in an extremely safe and stable mode.

To create a local or home network, you need special devices. This article will tell you a little about them. I will try to explain it as simply as possible so that everyone understands.

The purpose .

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

The difference .

What is a hub

A hub is a repeater. Everything that is connected to it will be repeated. One is given per hub and therefore everything is connected.
For example, you connected 5 computers via the Hub. To transfer data from the fifth computer to the first, this data will pass through all computers on the network. It is similar to a parallel telephone - any computer can access your data and you can also. This also increases the load and distribution. Accordingly, the more computers are connected, the slower the connection and the greater the load on the network. That is why in our time fewer and fewer hubs are released and less and less use them. They will soon disappear altogether.

What is a switch?


The switch replaced 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 split the network into more than 2 computers, then you will need more IP addresses. This usually depends on the ISP, and they usually only give one IP address.

What is a router?


Router - it is often also called a router. Why? Yes, because it is the link between two different networks and transfers data based on a specific route specified in its routing table. To put it very simply, a router is an intermediary between your network and the Internet. The router corrects all the mistakes of its predecessors and that is why it is the most popular nowadays. Especially when you consider the fact that often routers are 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 both separately: PC -> router -> Internet, and in conjunction 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 the network and access the Internet.

So. Let me summarize briefly.

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

Top related articles