Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the characteristics of Router, Switch and Hub

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what are the characteristics of Router, Switch and Hub". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the characteristics of Router, Switch and Hub".

1. Router (Router)

A router is a network device that works on the third layer of OSI, the network layer, has the ability to connect different types of networks and can choose data transmission paths. Therefore, it has three characteristics: working on the network layer, being able to connect different types of networks, and being able to choose data transmission paths.

1. The router works on the third layer, and the router is the layer 3 network device. You may not understand this. Let's talk about hubs and switches first. The hub works at the first layer (that is, the physical layer), and it has no intelligent processing capacity. for it, the data is just a current. When the current from one port is transmitted to the hub, it simply transmits the current to another port. As for whether the computer connected to the other port receives the data or not, it doesn't care. The switch works in the second layer (that is, the data link layer), which is smarter than the hub. For it, the data on the network is a collection of MAC addresses. It can distinguish the source MAC address from the destination MAC address in the frame, so it can establish a connection between any two ports, but the switch does not know the IP address, it only knows the MAC address. The router works in the third layer (that is, the network layer). It is smarter than the switch. It can understand the IP address in the data. If it receives a packet, it checks the IP address in it, ignores it if the destination address belongs to the local network, and forwards the packet out of the local network if it belongs to another network.

2. Routers can connect different types of networks. Our common hubs and switches are generally used to connect Ethernet, but if we connect the two network types, such as Ethernet and ATM, hubs and switches will be useless. 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 transmit data units-Frame, in different formats and sizes, just as road transport loads goods in cars while rail transport loads goods in wagons. When changing from car transport to rail transport, goods must be placed from cars to train wagons, and so is the data in the network, which is transferred from one type of network to another. Frame format conversion must be performed. Routers have this capability, while switches and hubs do not. In fact, what we call "Internet" is connected by all kinds of routers, because there are different types of networks on the Internet, hubs and switches are simply not competent for this task, so routers must play this role.

3. Routers have the ability of path selection. In the Internet, there may be many paths from one node to another. Routers can choose smooth and fast shortcuts, which will greatly improve the communication speed and reduce the communication load of the network system. Save network system resources, which is the performance that hubs and layer 2 switches do not have at all.

2. Switch (Switch)

Switch is a kind of network device based on MAC (hardware address of network card) identification, which can complete the function of encapsulating and forwarding packets. The switch can "learn" the MAC address and store it in the internal address table, making the data frame directly from the source address to the destination address by establishing a temporary switching path between the originator and the target receiver of the data frame.

Definition of LAN switch

Ethernet, Fast Ethernet, FDDI and token Ring are often called traditional Lans. They are all shared Lans with shared media and bandwidth. In order to improve the bandwidth, routers are often used to divide a network into multiple network segments, each with different subnet addresses and different broadcast domains, in order to reduce conflicts on the network and improve network bandwidth. The miniaturized network segment can no longer meet the needs of local area network expansion and new network applications for high bandwidth. some people say that "traditional local area network has come to an end".

In recent years, the emerging switched local area network technology can solve a series of problems caused by shared local area network, such as low network efficiency, insufficient network bandwidth and difficult network expansion. It fundamentally changes the structure of shared local area network and solves the problem of bandwidth bottleneck. At present, there are switched Ethernet, switched token Ring, switched FDDI and ATM and other switched Lans, among which switched Ethernet is the most widely used. Switched local area network has become the mainstream of local area network technology.

The switch provides bridging capabilities and the ability to increase bandwidth on existing networks. Switches used on L A N are similar to bridges in that they operate on the M A C sublayer of the data link layer (layer 2) and verify the device addresses of all incoming network traffic. Similar to bridges, switches maintain a table of information about addresses and use that information to determine how to filter and forward L A N traffic.

Unlike bridges, switches use switching technology to increase the sum of input and output of data and the bandwidth of installation media. Generally, the forwarding delay of the switch is very small, which can economically divide the network into small collision domains and provide higher bandwidth for each workstation.

3. Hub (Hub)

Hub, also known as Hub in English, belongs to the data link layer in the OSI model. Cheap price is its biggest advantage, but because the hub is a shared device, the efficiency becomes very low in the heavy network, so we can not see the hub in the medium-and large-scale network. Today's hubs generally use full-duplex mode, and the transmission rates of common hubs in the market are generally 100Mbps. Next, let's take a look at several concepts of hubs:

Shared type

The most important feature of a hub is the shared mode, which means that when one port is sending data to another port, the other ports are in a "waiting" state. Why "wait"? For example, when A sends packets to B per unit time, An is sent to ports B, C and D (this phenomenon is immediately followed by the IP broadcast described below), but only B receives, and other ports will no longer receive the data sent by An after the first unit of time determines that they do not need the data. Until A sends the IP broadcast again, C and D are idle for a unit of time before A sends the IP broadcast again, or data can be transmitted between C and D. We can understand that there is only one channel inside the hub (that is, the common channel), and then all the ports are connected below the common channel.

IP broadcast

The so-called IP broadcast (also known as: group sending) means that when sending data to lower-level devices, the hub sends the obtained data to every port regardless of where the original data comes from. If any port needs the data from the source, it will be in the receiving state, and the unneeded port will be in the rejected state. For example, when on the network, when client A sends packets to client B, the hub sends the packet group from A to each port, so B is in the receiving state and other ports are in the rejected state. The same is true outside the network, when client A sends the domain name "https://www.toutiao.com/"" through the hub, and then sends the IP address (202.108.36.172) back to the hub through the DNS domain name resolution. At this point, the hub group is sent to all access ports, and the machine that needs this address is in the receiving state (client An is in the receiving state), and if it is not needed, it is in the rejected state.

Unit time

This should be the simplest term, and it can also be understood as the working frequency of Hub, such as Hub with a working frequency of 33MHz, so what can Hub do per unit time? The above has given an example in explaining the shared type, but one point that needs to be explained here is that, for example, we sometimes see that An is sending data to B at the same time, C is also sending data to D. this seems to be a bit contradictory, and it is true, so why does it seem that both are going on at the same time? Because when A sends data to B in the first unit time, due to broadcast reasons, B, C and D will be broadcast at the same time in the first unit time, but CMagery D will refuse to receive the data sent by A from the second unit time, because C and D have determined that the data is not the data they need. And in the second unit of time, C also sends a data broadcast, which is accepted by An and D, but only D will receive the data. These operations only take two or three units of time, but it is difficult for us to detect that they feel like they are "going on" at the same time.

IV. The difference between router (Router) and switch (Switch)

Routers can automatically assign IP to your local area network, like a traffic policeman, telling your computer where to go; the switch is used to distribute network data.

The router is at the network layer, it addresses according to the IP address, the router can handle the TCP/IP protocol, but the switch cannot; the switch is at the trunk layer, it addresses according to the MAC address

A router can assign an IP to many hosts, which only show that an IP; switch can connect many hosts, each with its own IP.

Routers can provide firewalls, but switches do not provide this function. Hubs and switches are used for port expansion, that is, to expand the access point of the local area network, that is, to connect the local area network to more computers; routers are used to connect to the network, that is, to connect different networks

The router acts like a post office, delivering the letter to the addressee's address, and its task is completed. But mail to your dormitory, and this address is not exclusive to you, so Uncle Wang (switch) still needs to give the letter to you. He doesn't care about the address of the recipient, only looks at the name of the recipient, and then calls you to pick it up. Without a post office, you can't send letters to friends all over the world. But the existence of Uncle Lou Guan Wang can enable you to communicate with your friends in the dormitory. The post office system is composed of the wide area network, and the dormitory building is the local area network, which does not need a router to build the local area network.

5. The difference between switches and hubs

The hub is a repeater with many ports, which works at the physical layer and is a layer 1 device, while the switch uses MAC forwarding, works at the data link layer, and is a layer 2 device.

The port of a hub is a shared network bandwidth. the more ports are connected, the slower the network speed is, and its network speed will be occupied by other ports, while the switch enjoys the network bandwidth exclusively for each port, such as the 100-megabit switch we usually use. it ensures that each port has a hundred megabytes of network bandwidth.

All devices connected to the hub are graded bandwidth, because there is only one communication line on the hub, so the bandwidth is divided equally. When one of the devices sends data, the other devices can only receive but not send, while the devices connected to the switch will not affect each other, and each port can enjoy the exclusive bandwidth.

All ports of the hub are located in a collision domain and a broadcast domain, while each port of the switch is a collision domain and all ports are in a broadcast domain.

The working principle of the hub is the broadcasting principle. No matter which port the signal packet received from will be sent to other ports in the form of broadcast, it is easy to have problems, especially when the network range is large, the network performance will be affected. On the other hand, the switch switches according to the MAC address, which can specify which port the network card of the MAC address is on, and then only send the signal packet to the corresponding port, so that it is not prone to large-scale network performance failures.

The self-efficiency of the switch is relatively low, so it can only send out one signal packet at a time.

Thank you for reading, the above is the content of "what are the characteristics of Router, Switch and Hub". After the study of this article, I believe you have a deeper understanding of what are the characteristics of Router, Switch and Hub, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report