Definition of vrouters and vswitch hubs and their differences

Source: Internet
Author: User

Hubs, switches, and routers, which are known as network hardware, have always been active in the network field. However, many cainiao who are new to the network are annoyed by the fact that, they are not only similar in appearance, but also often stay together. It is a bit difficult to tell who they are! Let's take a look at the differences and relationships between them!
How sanjianke works
1. Hub
1. What is a hub?
Before you know the hub, you must first understand the repeater. In the network we come into contact with, the simplest thing is that two computers form a "dual-Host Interconnect" through two NICs. Generally, the two NICs act as signal lines by unshielded twisted pair wires. Because the signal power of the twisted pair will gradually decrease when the signal is transmitted, the signal distortion will occur when the signal is reduced to a certain extent. Therefore, while ensuring the signal quality, the maximum transmission distance of twisted pair wires is 100 meters. When the distance between the two computers exceeds 100, in order to achieve dual-host interconnection, People install a "Repeater" between the two computers ", the function of this function is to sort out the incomplete signals that have been degraded, generate a complete signal again, and then transmit it again.
A repeater is the predecessor of a general hub. A hub is actually a multi-port repeater. Generally, a hub has a number of RJ45 interfaces, such as 4, 8, 16, 24, and 32. Through these interfaces, the hub can "relay" the corresponding number of computers. Because it is in a "center" position in the network, the Hub is also called "Hub ".
 
2. Working Principle of the hub
The working principle of the hub is very simple. For example, Figure 2 shows a hub with eight ports connected to eight computers. The Hub is in the "center" of the network and forwards signals through the hub. Eight computers can communicate with each other. The specific communication process is as follows: if Computer 1 needs to send a piece of information to computer 8, when computer 1's Nic sends the information to the hub through twisted pair wires, the Hub does not directly send the information to computer 8. It broadcasts the information and sends the information to the eight ports at the same time, when the computer on the eight ports receives the broadcast information, it checks the information. if it finds that the information is sent to itself, it receives the information; otherwise, it ignores it. Because the information is sent from computer 1 to computer 8, computer 8 will eventually receive the information, this information is not received because it is not its own.

3. Features of The Hub
Shared bandwidth
The bandwidth of a hub is the maximum speed it can achieve during communication. Currently, the hubs used for small and medium-sized LAN mainly include 10 Mbps, 10/100 Mbps, and Mbps adaptive.
A hub with a bandwidth of 10 MB can transmit data at a maximum speed of 10 Mbps. Even if the computer connected to the Hub uses a Mbps Nic, the data transmission speed is still 10 Mbps. The 10/100 Mbps adaptive hub can automatically adjust the bandwidth according to the speed of the NIC connected to the port. when connected to a 10 Mbps Nic, the bandwidth is 10 Mb. when connected to a Mbps Nic, the bandwidth is 100 Mb. Therefore, this type of hub is also called a "dual-speed hub ".
A hub is A "shared" device. The Hub itself cannot identify the destination address. When A host A in the same LAN transmits data to host B, packets are transmitted in a hub-based network in broadcast mode. Each terminal verifies the address information of the data packet header to determine whether to receive the packets.
Since a hub can only transmit one set of information during a clock cycle, if a hub is connected to a large number of machines and multiple machines often need to communicate at the same time, the efficiency of the hub will be poor, such as information congestion and collision.
Why? For example, in Figure 2, when computer 1 sends a message to computer 8 through the hub, if computer 2 also wants to send the information to computer 7 through the hub, when it tries to contact the hub, it finds that the hub is busy with computer 1, so computer 2 will "carry" the data and wait in front of the hub, and always ask the hub to stop computer 1 for help. If computer 2 successfully "grabs" the Hub (because the hub is "shared", it is easy to grab it ), at this time, the data of Computer 1 in the transmission status will be stopped, so computer 1 will also "grab" The Hub ......
It can be seen that the actual speed of each port on the hub is not only related to the bandwidth of the hub, but also the number of devices that work at the same time. For example, if a 10 Mb hub is connected to eight computers and the eight computers work at the same time, the actual bandwidth of each computer is 10/8 = 1.25 Mb!
Half Duplex
Full Duplex: When two devices send and receive data, both parties can send or receive data at the same time. This transmission mode is full duplex. For a half-duplex transmission device, when one device sends data, the other device can only receive the data, but cannot send the data at the same time.
Because the hub transmits information through "broadcast", the hub can only transmit data in half-duplex mode. For example, if Computer 1 and computer 8 need to transmit data to each other, when computer 1 sends data, computer 8 can only receive data sent from computer 1, and only wait for Computer 1 to stop sending and prepare for receiving, it can send its own information to computer 1 or other computers.

Ii. vswitches
1. What is a vswitch?
A switch is also called a switch-type hub. It re-generates information and forwards it to a specified port after internal processing. It can automatically address and exchange information, the switch sends each information packet independently from the source port to the destination port based on the destination address of the information packet to avoid collision with other ports. A vswitch in the broad sense is a device that implements information exchange in a communication system.
2. How the vswitch works
In a computer network system, switches are designed to address the weakness of the shared working mode. A hub is represented by a shared working mode. If a hub is compared to a postman, the postman is an unliterate "dumb"-asking him to send a mail, he doesn't know how to send the mail to the recipient directly based on the address on the letter. Instead, he only delivers the mail to all the recipients, and then asks the recipient to determine whether the recipient is his own Based on the address information! The switch is a "smart" postman-the switch has a high-bandwidth back bus and an internal switching matrix. All the ports of the switch are attached to the back bus. When the control circuit receives the data packet, the processing port searches for the address table in the memory to determine the target MAC address (the hardware address of the NIC) the port on which the NIC is attached, and data packets are quickly transmitted to the destination port through the internal switching matrix. If the target MAC does not exist, the switch broadcasts all the ports. After receiving the port response, the switch "learns" the new address and adds it to the internal address table.
It can be seen that when receiving a "letter" from a network card, the switch will quickly send the letter to the recipient based on the above address information and its "resident residence booklet. In case the recipient's address is not in the "user register", the switch will distribute the email to all people like a hub, and then find the recipient. After finding the receiver, the switch will immediately register the information of the receiver to the "user register", so that the mail can be delivered quickly when serving the customer.
3. vswitch performance characteristics
Dedicated bandwidth
Because the switch can intelligently send data to the destination based on the address information, it does not "Disturb" non-recipients when transmitting data like the hub. In this way, the switch can transmit data between multiple port groups at the same time. In addition, each port can be considered as an independent network segment, and both parties that communicate with each other enjoy all the bandwidth, without competing with other devices. For example, when host A sends data to host D, host B can send data to host C at the same time, the two transmissions all enjoy the bandwidth of the network. Assume that they use a 10 Mb switch, then the total traffic of the switch is 2*10 Mb = 20 Mb.
Full Duplex
When two ports on a vswitch are communicating, they can implement full-duplex communication because the channels between them are relatively independent.
 
Iii. Differences between hubs and switches
According to the working principle of the two, the switch and the hub are very different. First, from the perspective of the OSI architecture, the hub belongs to the first layer of the OSI physical layer device, and the switch belongs to the second layer of the OSI data link layer device.
Second, from the perspective of working methods, the hub adopts a "broadcast" mode, so it is easy to generate a "broadcast storm". When the network scale is large, the performance will be greatly affected. When a vswitch works, only the requested port and the destination port respond to each other without affecting other ports, therefore, vswitches can isolate conflicting domains to a certain extent and effectively suppress the emergence of "broadcast storms.
In addition, from the bandwidth perspective, no matter how many ports the hub has, all ports share a bandwidth. At the same time, only two ports can be used to transmit data, while other ports can only wait, at the same time, the hub can only work in half duplex mode. For a vswitch, each port has an exclusive bandwidth. When the two ports work, other ports are not affected, at the same time, the switch can not only work in half duplex mode, but also in full duplex mode.
If the difference between a vswitch and a hub is described in the simplest language, it should be the difference between intelligence and non-intelligence. To put it bluntly, a hub is only a network device connected to multiple computers. It can only play a role in signal amplification and transmission, and cannot process fragments in the signal. Therefore, it is prone to errors during transmission. A switch can be seen as an intelligent hub. In addition to all the features of the hub, it also has the functions of automatic addressing, switching, and processing. In addition, in the data transmission process, the sender and receiver work independently and do not have a relationship with other ports, so as to prevent data loss and improve throughput.
 
Iv. vro
1. Role of vro
Through hubs or switches, we can build many computers into a relatively large LAN (figure 3), but when the number of machines reaches a certain number, the problem arises: for LAN composed of hubs, due to the use of the "broadcast" mode, when the network size is large, information in the transmission process of collision, congestion is becoming more and more serious, even if the switch, this situation also exists. Second, this lan is not secure and is not conducive to management.
 
To solve these problems, people divide a large network into small subnets and CIDR blocks, or directly divide them into multiple VLANs (Virtual LAN ), in a VLAN, the information sent by a host can only be sent to other hosts with the same VLAN number. Other VLAN members cannot receive the information or broadcast frames. After VLAN division, the network can effectively suppress broadcast storms on the network, increase network security, and centralize management and control (figure 4 ).
What if hosts in different VLANs need to communicate with each other in a LAN? At this time, you have to use a Router (Router, forwarder) to help. Vrouters can connect computers in different subnets, CIDR blocks, and VLANs to allow them to communicate freely. In addition, we all know that the current network has many types of structures, and the Protocols and speeds used by different networks are also different. When two networks of different structures need to be interconnected, they can also be achieved through routers. A router can connect two LAN segments with similar or different architectures to form a larger LAN or a wan.
It can be seen that a router is a network device that connects multiple networks or CIDR blocks. It can translate data information between different networks, CIDR blocks, or VLANs ", so that they can "read" each other's data to form a larger network.
 
2. How routers work
Routing refers to the activity of moving information from the source location to the target location through a interconnected network. Then how does a router translate? When we are studying and translating English, we will certainly prepare an English-Chinese dictionary to implement the conversion between English and Chinese. For a router, it also has a path table, a dictionary for translation. The Routing Table stores data about various transmission paths, such as the subnet flag information, the number of online routers, and the name of the next router. The path table can be set by the system administrator or dynamically modified by the system. It can be automatically adjusted by the router or controlled by the host.
Different subnets and CIDR blocks can be connected through routers. Therefore, different routers and hubs and vswitches are generally installed in the "backbone" Area of the network, rather than working in the Grass-roots layer as hubs and vswitches. For example, a large-scale enterprise LAN generally divides the entire network into multiple VLANs based on management, security, and performance considerations. As a result, when a VLAN communicates with a VLAN, you must use a vro.
For this enterprise network, it must be connected to the Internet. For enterprises, they generally use ddnleased lines of China Telecom or use ADSL, Cable, and ISDN to connect the enterprise network to the Internet, at this time, because of the different network systems and protocols used, routers are also required to interconnect the enterprise network with the Internet.

 

This article is from "Computer Tips"

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.