First, the hub, that is, the hub. Its function can be simply understood as connecting some machines to form a LAN. The switch (also known as the switch-type hub) works basically the same as the hub. They are both layer-2 (data link layer) devices. However, there is a difference in performance between the two: The Hub uses the shared bandwidth, while the switch uses the exclusive bandwidth. That is, if 10 machines are connected to a 10 m hub and only 1 m is allocated to each machine, the switch can implement storage forwarding and other functions because of its own CPU and ram, no bandwidth is shared, that is, each machine is 10 m. In this way, when the number of machines is large or the data volume is large, there will be a significant difference between the two.
A vro differs significantly from the preceding two. Its function is to connect different network segments and find the most suitable path for data transmission in the network. Generally, individual users do not need much. A vro is generated after a vswitch, just as a vswitch is generated after a hub. Therefore, the vro and vswitch are also associated, and they are not completely independent of each other. Vro mainly overcomes the problem that vswitches cannot route and forward data packets.
In general, the main difference between a vro and a vswitch lies in the following aspects:
(1) different levels of work
The original switch was working at the data link layer (Layer 2) of the OSI/RM open architecture, and the router was designed to work at the network layer of the OSI model at the beginning. Because the switch operates on the second layer (data link layer) of OSI, its working principle is relatively simple, while the router works on the third layer (Network Layer) of OSI ), more protocol information can be obtained, and routers can make more intelligent forwarding decisions.
(2) Data Forwarding depends on different objects
A vswitch uses a physical address or a MAC address to determine the destination address for data forwarding. A vro uses the idnumber (IP address) of different networks to determine the data forwarding address. IP addresses are implemented in software and describe the network where the device is located. Sometimes these layer-3 addresses are also calledProtocol addressOrNetwork Address. The MAC address is usually provided by the hardware and allocated by the NIC manufacturer, and has been fixed to the NIC. Generally, it cannot be changed. The IP address is usually automatically assigned by the network administrator or the system.
(3) Traditional vswitches can only be divided into conflicting domains, but not broadcast domains. vrouters can be divided into broadcast domains.
The CIDR Block connected by the vswitch still belongs to the same broadcast domain. broadcast packets are transmitted across all CIDR blocks connected to the vswitch. In some cases, communication congestion and security vulnerabilities may occur. The CIDR blocks connected to the vro are allocated to different broadcast domains, and the broadcast data does not pass through the vro. Although vswitches above Layer 3 Have VLAN functions and can also be divided into broadcast domains, communication between subbroadcast domains is different, and communication between them still requires routers.
(4) The router provides firewall services.
The router only forwards data packets on a specific website. It does not support packet transmission through the routing protocol or unknown destination network, thus preventing broadcast storms.
The switch is generally used for the connection of the LAN-WAN.BridgeIt is a device at the data link layer. Some switches can also implement layer-3 switching. A vro is used for Wan-WAN connections. It can resolve forwarding groups between different networks and act on the network layer. They only accept the group from one line and then forward it to another line. These two lines may belong to different networks,And adopt different protocols.
In comparison, vro features more powerful than vswitches, but the speed is also relatively slow and expensive. layer-3 vswitches have both the ability to forward packets at the wire speed of vswitches and the good control function of vrouters, therefore, it is widely used.
Currently, most of the individual's broadband access methods are ADSL, so let's briefly describe the access to ADSL. Most of the purchased ADSL cats have the routing function (in many cases, the routing function is blocked when the manufacturer leaves the factory, because the routing function is not enabled during Telecom installation and DHCP is enabled, enable the ADSL routing function). If an individual accesses the Internet or a few computers pass through ADSL, you only need to purchase one or more hubs or switches if the computer is large. Please purchase a vswitch because the price difference between the hub and the vswitch is very small. You don't have to pursue high prices, because product homogeneity is very serious today, and there is no problem with my cheapest switch.
For a reference, we recommend that you buy an 8-port instance to meet the expansion requirements. The general price is about 100 yuan. Connect all the computers to the vswitch. All you need to do is to insert the network cable of each machine into the switch interface, insert the cat network cable into the uplink interface, and then set the routing function, DHCP, and so on to share the internet.
Currently, vswitches and vrouters are used in combination. The specific combination method can be determined based on the specific network conditions and requirements.