Understanding the hardware: differences between routers, switches, hubs

Source: Internet
Author: User
Tags switches

Turn from: The difference between routers, switches, hubs

Another, Layman's watch lively--recommended "switch and router difference"

Terminology interpretation

Router: (Router) is a device that connects each LAN and WAN in the Internet. The routing table is recorded in the router, which automatically selects and sets the route according to the channel situation, and sends the signal in the order of the best path. Occurs at the network layer.

Switch: A network device used for the forwarding of electrical (optical) signals. It provides a unique electrical signal path for any of the two network nodes that access the switch, sending the transmitted information to the appropriate route that meets the requirements. Occurs at the data link layer.

Hubs: (hub) is a device that connects multiple Ethernet twisted-pair or fiber-optic assemblies to a single piece of physical media. Occurs at the physical layer.

Differences from the contact between routers and switches
Routers Switch
Working level Network layer Data Link Layer
Forwarding basis IP Address MAC address
Function Connect to different networks Connect to a computer on your local area network
Broadband impact Shared Broadband Exclusive broadband access

Routers are connected to different network segments, which are responsible for connecting the LAN to the WAN and the Internet, and finding the most appropriate path for data transfer in the network. If you use the same router to access the Internet (a common broadband), the Internet will affect each other.

Simply say the router specialized network, switch just distribution, routing is for you to find the way to let you surf the Internet, the switch is only responsible for opening the door, the switch above to no route you are not on the net.

The difference between hubs and switches

Switches, also known as switched hubs, are similar, both based on Mac recognition, but have essentially different differences.

From the point of view of work, the hub is a broadcast mode, that is, when one of the hubs of the hub works, all other ports can listen to information, prone to broadcast storms, network performance will be greatly affected when the network is large. The switch can avoid this phenomenon, when the switch after the operation, only the port and the destination port to make the request to each other and not affect the other ports, so the switch can isolate the conflict and disease effectively suppress the generation of broadcast storms.

Data transfer: When the hub is working, if a computer in the LAN to send messages, all the computers within the LAN can receive this message , the security is poor, and each time only one send, only this send completed other computers can be sent again, this is called half-duplex mode. And the switch has "memory function", it can be sent directly to the target computer according to the corresponding MAC address. But if you send a message to a new computer, the transmission will also be broadcast, only to find the computer and remember its MAC address before it can be sent directly to it. a computer connected by a switch can send messages at the same time without affecting each other, just as we call them, which is called full-duplex mode, and the transfer rate is much higher than that of a hub.

Broadband occupancy: Through the hub, all computers share a broadband, if the broadband is 100M, there are 5 computers, each computer only 20M, if through the switch, all the computers are 100M. Why is it?

The main problem with hubs (shared Ethernet) is that all users share bandwidth, and the actual available bandwidth per user decreases as the number of network users increases. This is because when the information is busy, multiple users may enter the "contention" a channel, and a channel at a time only to allow a user to occupy, so a large number of often in the monitoring wait state, resulting in the signal in the transmission of jitter, stagnation or distortion, seriously affecting the performance of the network.

In switched Ethernet, the switch supplies the information channel dedicated to each user, unless the two source ports attempt to send the information to the same destination port at the same time, otherwise each source port can communicate with the respective destination port simultaneously without conflict.

By comparison, it can be found that the switch and the hub have a great advantage, so now basically with the switch, the hub has gradually been eliminated.

Product Overview Hubs

Hub is essentially a repeater, and the main function of the repeater is to connect the received signal to reshape the regeneration amplification, so that the attenuated signal regeneration (recovery) to the state at the time of transmission, in order to expand the network transmitting distance, and do not have the direction of the signal transmission capacity.

The hub works on the first layer (i.e. the physical layer), it has no intelligent processing power, for it, the data is only the current , when the current of one port to the hub, it simply transmits the current to the other ports, as for the other ports connected to the computer receive this data, it does not matter.

Switch

Switches can be divided into two tiers of switches (also called Ethernet switches) and three-layer switches (also known as node switches), usually referred to as the former.

The switch is working on the second layer (the Data link layer), it is more intelligent than the hub, for it, the data on the network is a collection of MAC address , it can distinguish between the source MAC address and the destination MAC address in the frame, so can be in any two ports to establish a connection, But the switch does not know the IP address, only the MAC address.

switch is mainly used to extend the local area network, its working principle is relatively simple, according to the MAC address, select routing through the station table, the establishment and maintenance of the station table automatically by the switch . The difference between a junction switch and an Ethernet switch is two points: one is that the node switch works on the WAN, and the Ethernet switch works on the LAN. Second, the function is different, the node switch is used to store the forwarding data packet, built-in forwarding, implementation of routing protocol, is the node in the network topology ; The Ethernet switch is used to connect the internal network host, there is no forwarding , Only the MAC address and the host's mapping table , logically the bus structure.

In recent years, the technology of switched LAN has been able to solve a series of problems, such as low network efficiency, insufficient network bandwidth and difficult network expansion. It fundamentally changes the structure of the shared LAN, and solves the bandwidth bottleneck problem. At present, switched Ethernet, switching token ring, switched FDDI and ATM switched LAN, which is the most widely used in switching Ethernet. Switched LAN has become the mainstream of today's LAN technology. The switch provides bridging capabilities and the ability to increase bandwidth on existing networks. Switches for L A N are similar to bridges because they all operate on the M A C sub-layer of the Data Link layer (layer 2nd), all of which verify the device address of all incoming network traffic. Similar to the bridge, the switch maintains a table of information about the address and uses that information to decide how to filter and forward the L-N traffic is different from the bridge, and the switch uses the switching technology to increase the input and output sum of the data and the bandwidth of the installation media. General switch forwarding latency is very small, can be economically divided into small conflict domain, for each workstation to provide higher bandwidth.

Router

The router is working on the third layer (the network layer), it is more "intelligent" than the switch, it can understand the IP address in the data, if it receives a packet, it checks the IP address , if the destination address is local network is ignored, if it is the other network, The packet is forwarded to the local network.

Our common hubs and switches are typically used to connect to Ethernet, but if you connect two types of network, such as Ethernet and ATM networks, hubs and switches will not be useful.

Routers can connect different types of LAN and WAN, such as Ethernet, ATM network, FDDI network, Token Ring network and so on. different types of networks, the format and size of the transmitted data units-frames (frame) is different , just like road transport is the car for the unit load goods, and rail transport is a wagon as a unit load of goods, from the car transport to rail transport, must put the goods from the car to the train wagon , the same is true for data in the network, where data is transferred from one type of network to another, and frame format conversion is required. Routers have this capability, and switches and hubs do not. In fact, what we call "the Internet" is connected by a variety of routers, because there are different types of networks on the Internet, hubs and switches are simply not up to the task, so the role must be assumed by routers.

In the Internet, from one node to another node, there may be many paths, routers can choose an unobstructed shortcut, will greatly improve communication speed , reduce network system communication load, save network system resources, this is the hub and two layer switch does not have the performance at all.

Other concepts

Citation: The difference between hubs, switches, routers, bridges, gateways

Bridges (bridge)

Simply said that the bridge is a hardware network protocol translator, if you have 2 computers, a compatible machine installed Windows, one is Apple installed OS2, then the default network protocol between the two computers is different, the compatible machine may only say TCP/IP, the Mac will only say Apple talk, As if two foreigners can not speak each other's language, how to do? Find a translator, the bridge is translation.
In the 386, 486 era, the bridge may be a computer with a protocol translator installed, and today the switch also includes this feature. Today's operating systems in order to communicate with each other, support more protocols, the operating system itself can be a network bridge, now the concept of bridge has faded out. More is called bridging, forwarding, protocol two times package.
Bridge can also be said to be quite a two-layer switch port, and the network bridge is mainly implemented by the software, the switch is mainly implemented by hardware!

gateways (Gateway)

Gateway (protocol Converter) is an interconnection network that operates on the OSI Network layer with a protocol conversion facility, so called a facility, because the gateway is not necessarily a device, it is possible to implement gateway functionality in a single host.  

The gateway is used for heterogeneous network interconnection in the following scenarios:
1). Heterogeneous LAN, such as the interconnection of dedicated switching network PBX and the local area network following the IEEE802 standard.
2). Interconnection of LAN and WAN.
3). The interconnection of the WAN with the WAN.
4). LAN and Host interconnection (when the host's operating system is incompatible with the network operating system, you can connect through the gateway).
Classification of Gateways
1) Protocol gateways: Protocol gateways typically do protocol conversions between network regions that use different protocols.
2) Application Gateway: An application gateway is a system that translates data between different data formats.
3) Security Gateway: Security Gateway is a fusion of various technologies, with important and unique protection, ranging from protocol-level filtering to very complex application-level filtering.

Understanding the hardware: differences between routers, switches, hubs

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.