Detailed analysis of switches, routers, hubs and the difference between the application of the skills

Source: Internet
Author: User
Tags switches
Recently saw a lot of people asking about the switch, hub, router is what, function, what is the difference, the author on these questions to do some simple answers.

First of all said Hub, that is, hubs. Its role can be simply understood to connect some machines to form a local area network. A switch (also known as a switched hub) works roughly the same as a hub. But there is a difference in performance: the way the hub uses shared bandwidth works, and the switch is the exclusive bandwidth. In this way, when there is a lot of machine or large amount of data, the two will be more obvious. The router and the above two obvious difference, its role is to connect different network segments and find the network data transfer the most appropriate path, can be said that under normal circumstances, individual users need not. Routers are generated after the switch, just as the switch is generated after the hub, so routers and switches are also connected, not completely independent of the two devices. Routers mainly overcome the inability of the switch to route and forward packets.

In general, the main differences between routers and switches are shown in the following areas:

(1) Different levels of work

The initial switch is the data link layer that works in the OSI/RM open architecture, which is the second tier, and the router begins by designing the network layer that works at the OSI model. Since the switch works on the second layer of OSI (data link layer), it works fairly simply, and routers work on the third layer of OSI (the network layer) to get more protocol information, and routers can make more intelligent forwarding decisions.

(2) Data forwarding based on different objects

A switch uses a physical address or a MAC address to determine the destination address of the forwarded data. The router uses the ID number of the different network (that is, the IP address) to determine the address of the data forwarding. IP addresses are implemented in software that describes the network where the devices are located, and sometimes these third-tier addresses are also called Protocol addresses or network addresses. MAC addresses are usually hardware-led, distributed by the manufacturer of the network adapter, and have been cured to the network card, which is generally not to be changed. IP addresses are usually assigned automatically by your network administrator or system.

(3) Traditional switches can only split the conflict domain, can not split the broadcast domain;

The network segments that are connected by the switch still belong to the same broadcast domain, and broadcast packets propagate across all network segments connected to the switch, which in some cases can lead to traffic congestion and security vulnerabilities. The network segments that are connected to the router are assigned to different broadcast domains, and broadcast data does not go through the router. Although the third layer above the switch has VLAN function, can also split broadcast domain, but each sub broadcast domain is unable to communicate the communication, the communication between them still needs the router.

(4) The router provides the service of the firewall

Routers can prevent broadcast storms by forwarding only packets of specific addresses, sending packet transmissions that do not support routing protocols, and sending unknown destination network packets.

Switches are generally used for lan-wan connections, switches to Network Bridge, data link layer equipment, some switches can also achieve the third layer of exchange. Routers are used for connections between Wan-wan, which can be used to resolve the forwarding groupings between opposite-sex networks, and to use the network layer. They just accept the input grouping from one line, and then forward to another line. These two lines may belong to different networks and use different protocols. Comparatively speaking, the function of the router is more powerful than the switch, but the speed is relatively slow and the price is expensive, the third layer switch has the ability of the switch speed forwarding message and the good control function of the router, so it can be widely used.

At present, the personal comparison of multiple broadband access is ADSL, so the author on the ADSL access to a simple explanation. Nowadays, most of the ADSL cats have routing function (many of the time the factory will be in the factory to block the routing function, because most of the telecom installation is not enabled by the routing function, enable DHCP. Open ADSL Routing function, if the personal Internet or a few of the few through the ADSL itself can be, if the computer more you just need to buy one or more hubs or switches. In view of the fact that the price of hubs and switches is very small and is not a special cause, please purchase a switch. There is no need to pursue high prices, because today's product homogeneity is very serious, my cheapest switch now has no problem. Give you a reference quote, suggest you buy a 8-port to meet the expansion of demand, the general price of about 100 yuan. Connect the switch and all the computers will be connected to the switch. The only thing left to do is to plug each machine's network cable into the switch's interface and plug the cat's network cable into the uplink interface. Then set the routing function, DHCP and so on, you can share the Internet.

Read the above explanation readers should have some understanding of the switches, hubs, routers, the current use of mainly switches, routers, the combination of the use of specific methods can be based on specific network conditions and needs to determine.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.