The engineer explains the difference between the hub switch router

Many people find it difficult to distinguish the difference between hubs, switches, and routers. This article is a senior engineer to help you understand the distinction in an easy-to-understand way.
1. Distinguish between hubs, switches, and routers (figurative method)
One day, you go to the school where your girlfriend Xiaofang (the name is tentatively) attended to find her, then what is your approach:
How the hub works
You stand in the school atrium and yell "Xiaofang, I'm here for you!" (Broadcast)
If someone else is yelling at this time, you must wait until he has finished yelling. (queue)
If you happen to encounter another person shouting at the same time as you when you shout, then neither you nor his shouting will be heard. (conflict)
When you shout, you can't hear what others are saying, and only when you finish shouting do you start listening. (Half-duplex working mode, monitoring)
Sure enough, your girlfriend's voice came from the opposite building, "Go to hell!" (response)
How the switch works
Your girlfriend notified you of her mobile number (Mac address) in advance.
You dialed her cell phone. (establish connection)
Said to her "I'm looking for you, because I think you want to die, my sweetheart, my baby...". (Exclusive Channel)
Your girlfriend was impatient to hear it, and before you finished speaking, she replied "It's numbing to death"! (Full duplex mode)
How the router works
You record in your pink notebook the information of the seat number XX of the XX class XX class where all your girlfriends are located in advance (build a routing table)
You found Xiaofang's address (IP address), and determined how to find her (routing).
You went to the school concierge and asked about the building where the XX department is located. You went to the XX department and asked about the classroom of the XX class. Then you went to the XX classroom and asked about the position of seat XX... After N times of inquiries (N jumps), you finally came to the small In front of Fang.
Through the above-mentioned analogy, I believe everyone has a clearer concept of the difference between hubs, switches, and routers. Next, we will analyze the differences between hubs, switches, and routers in a formal concept, so that everyone can have a deeper understanding.
Second, what is a hub
The hub, also called 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 a heavy network, so we can't see the hub in medium and large networks. Today's hubs generally use full-duplex mode, and the transmission rate of common hubs on the market is generally 100Mbps. Next we understand several concepts of hubs:
Shared
The biggest feature of the hub is the use of 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 a data packet to B within a unit time, A is sent to the three ports of B, C, and D (this phenomenon is the IP broadcast described next ), but only B receives, and other ports will not receive the data sent by A after judging that it is not the data they need in the first unit of time. Until A sends the IP broadcast again, in the unit time before A sends the IP broadcast again, C and D are idle, 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 ports are connected under the common channel.
IP broadcast
The so-called IP broadcast (also known as: mass sending) means that when the hub sends data to the lower device, it will send the obtained data to each port regardless of where the original data comes from. If there is data from the port that needs the source, it will be in Receiving state, and unneeded ports are in reject state. For example: in the network, when client A sends a data packet to client B, the hub will send a group of data packets from A to each port, at this time B is in the receiving state, and other ports are in Rejection status; the same is true outside the network. When client A sends the domain name "https://", it passes through the hub and then through DNS domain name resolution, it sends the IP address (202.108.36.172) back to the hub. At this time, the hub will send a group to all connected ports, and the machine that needs this address will be in the receiving state (client A is in the receiving state), and it will be in the rejecting state if it is not needed.
Unit of time
This should be the simplest term, and it can also be understood as the working frequency of the Hub. For example, a Hub with a working frequency of 33MHz, what can the Hub do in a unit of time? The above has already been mentioned when explaining the sharing type. Example, but one thing that needs to be explained here is that, for example, we sometimes see that A is sending data to B at the same time, and C is also sending data to D. This seems a bit contradictory, and it is true. , Then why does it seem that the two are doing it 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 receive the broadcast at the same time in the first unit time , But C and D will refuse to receive the data sent by A from the second unit time, because C and D have determined that these data are not the data they need. And in the second unit of time, C also sends a data broadcast, A, B, and D all accept, but only D will receive these data. These operations only take 2 to 3 units of time, but it is difficult for us to perceive them, and it feels like they are "performing" at the same time.
Three, what is a switch
The switch is a kind of network equipment based on MAC (hardware address of the network card) that can complete the function of encapsulating and forwarding data packets. The switch can "learn" the MAC address and store it in the internal address table. By establishing a temporary switching path between the originator and target receiver of the data frame, the data frame can directly reach the destination address from the source address.
Definition of LAN switch
Ethernet, Fast Ethernet, FDDI, and Token Ring networks are often referred to as traditional LANs. They are all shared LANs that share media and bandwidth. In order to increase bandwidth, routers are often used for network segmentation, and a network is divided into multiple network segments. Each network segment has a different subnet address and different broadcast domain to reduce conflicts on the network and increase network bandwidth. The micro network segment can no longer meet the high bandwidth requirements of LAN expansion and new network applications. Some people say that "traditional LANs have come to an end."
The switching LAN technology that has emerged in recent years can solve a series of problems such as low network efficiency caused by shared LANs, inability to provide sufficient network bandwidth, and difficult network expansion. It fundamentally changed the structure of the shared LAN and solved the bandwidth bottleneck problem. At present, there are switched LANs such as switched Ethernet, switched token ring, switched FDDI and ATM, among which switched Ethernet is the most widely used. Switching LAN has become the mainstream of today's LAN technology.
The switch provides bridging capabilities and the ability to increase bandwidth on existing networks. The switches used on the LAN are similar to the bridges, because they all operate on the MAC sublayer of the data link layer (layer 2), and both check the device addresses of all incoming network traffic. Similar to a bridge, the switch maintains a table of information about addresses and uses this information to determine how to filter and forward LAN traffic.
Unlike bridges, switches use switching technology to increase the total input and output of data and the bandwidth of the installation medium. Generally, the switch has a small forwarding delay, which can economically divide the network into small conflicting domains, and provide higher bandwidth for each workstation.
Fourth, what is a router
Router (Router) is a network device that works on the third layer of OSI (network layer), has the ability to connect different types of networks and can select data transmission paths. Routers have three characteristics: they work on the network layer, they can connect to different types of networks, and they can choose the data transmission path.
1. The router works on the third layer. The router is a third-layer network device, so everyone may not understand it. Let's talk about hubs and switches first. The hub works at the first layer (the physical layer). It has no intelligent processing capabilities. For it, data is just current. When the current from one port is passed to the hub, it simply transmits the current to other ports. As for whether the computer connected to the other port receives the data, it does not matter. The switch works at the second layer (the data link layer). It is smarter than the hub. For it, the data on the network is a collection of MAC addresses. It can distinguish the source and destination MAC addresses in the frame. , So you 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 at the third layer (the network layer). It is more "smart" than the switch. It can understand the IP address in the data. If it receives a data packet, it checks the IP address in it. If the destination address is The local network ignores it, and if it is from another network, the data packet is forwarded out of the local network.
2. Routers can connect to different types of networks. Our common hubs and switches are generally used to connect to Ethernet, but if you connect two types of networks, such as Ethernet and ATM networks, hubs and switches will not be available. Useful. The router can connect different types of local area networks and wide area networks, such as Ethernet, ATM network, FDDI network, token ring network, etc. For different types of networks, the format and size of the data unit-frame (Frame) transmitted are different, just like road transportation uses cars as a unit to load goods and railway transportation uses wagons as a unit to load goods. For railway transportation, goods must be loaded from cars to train wagons. The same is true for data in the network. When data is transmitted from one type of network to another, frame format conversion must be performed. Routers have this capability, but switches and hubs do not. In fact, what we call the "Internet" is connected by various routers. Because there are various types of networks on the Internet, hubs and switches are simply not up to this task, so routers must play this role.
3. The router has path selection capability. In the Internet, there may be many paths from one node to another. The router can choose a smooth and fast shortcut, which will greatly increase the communication speed, reduce the communication load of the network system, and save network system resources , This is a performance that hubs and Layer 2 switches simply do not have.

Circuit Board Dismantaling Machine

Dismantle Machine,E Waste Dismantling,Pcb Dismantling Machine,Electronic Board Dismantling Machine

Xinxiang Traceability Environmental Protection Equipment Co., Ltd. , https://www.syrecycle.com