The difference between a vswitch and a hub can be divided into the following three points:
1. According to the OSI architecture, a hub belongs to the first layer of OSI physical layer equipment, while a switch belongs to the second layer of OSI data link layer equipment. This means that the hub only synchronizes, scales up, and shaping data transmission, and cannot effectively process short frames and fragments in data transmission, the integrity and correctness of data transmission cannot be guaranteed. The switch can not only synchronize, zoom in, and shaping data transmission, but also take short frames and fragments into consideration.
2. according to the working method, the hub is a broadcast mode. That is to say, when a port of the hub is working, all other ports can listen to the information, which may lead to a broadcast storm, when the network is large, the network performance will be greatly affected. The switch can avoid this phenomenon. When the switch works, only the requested port and the destination port correspond to each other without affecting other ports, therefore, the vswitch can isolate conflicts and diseases to effectively suppress broadcast storms.
3. in terms of bandwidth, no matter how many ports the hub has, all ports share a bandwidth. At the same time, only two ports can be used to send data. 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.
Currently, 80% of the LAN is Ethernet, and a large number of devices are connected to the hub or switch in the LAN. The LAN connected by a hub is called a shared LAN, and the LAN connected by a switch is called a switched LAN. What are the differences between them?
As you know, CSMA/CD (Multi-Channel Access/conflict detection for carrier listeners) is used in Ethernet. For the sender, each time it sends a data message, first, listen to the network. When it detects that the line is empty, it immediately sends data. Otherwise, it continues detection until the line is idle. For the acceptor, first confirm the received signal. If it is sent to itself, it will receive it; otherwise, it will be ignored.
When introducing the differences between a hub and a vswitch, let's talk about the two concepts of sharing and switching in the network. For example, if a road with 10 lanes is not marked with a traffic route, a vehicle can only snatch or occupy a road in a disordered state, A vehicle that is prone to traffic jams and reverse driving will crash, reducing the traffic capacity. In order to avoid the above situation, we need to mark the vehicle lines on the road to ensure that each vehicle does its own way and does not interfere with each other. A shared-bandwidth network is equivalent to an unordered state. When the number of data and users exceeds a certain limit, a collision or conflict will occur, leading to a decline in network performance. The exchange network avoids the deficiency of the shared network. The exchange technology is to independently send each information packet from the port to the destination port based on the destination address of the transmitted information packet, it avoids collision with other ports and increases the actual throughput of the network.
The main problem with shared Ethernet is that all users share bandwidth. The actual available bandwidth of each user decreases with the increase of the number of users. This is because when the information is busy, multiple users may compete for one channel, while one channel only occupies one user at a certain time, therefore, a large number of monitoring waits often, resulting in jitters, stagnation, or distortion during signal transmission, seriously affecting network performance.
The Hub is a repeater, and the main function of the repeater is to rebuild and enlarge the received signal, so that the degraded signal can be regenerated (restored) to the sending status, to expand the transmission distance of the network, without the ability to transmit signals in a targeted manner.
In switched Ethernet, the switch provides a dedicated information channel for each user, unless two source ports attempt to send information to the same destination port at the same time, otherwise, the source port and the target port can communicate at the same time without conflict.
A vswitch works in a different way than a hub. Other connection methods and speed options are basically the same as those of a hub.
1. Router (route)
A Router works at the network layer and can connect to different types of networks. You can select a data transfer path for the device. A vro has three features:
1. Working at the network layer:
Vrouters work on Layer 3, and vrouters are Layer 3 network devices. If you do not understand this, let's talk about hubs and vswitches first. The hub works on the first layer (that is, the physical layer) and has no smart processing capability. For it, data is only current. When the current of a port is transferred to the Hub, it simply transmits the current to other ports. The computer connected to other ports does not receive the data. A vswitch works on the second layer (that is, the data link layer). It is more intelligent than a hub. For it, the data on the network is a set of MAC addresses, it can identify the source MAC address and target MAC address in the frame, so it can establish a connection between any two ports, but the switch does not know the IP address, only the MAC address. A vro works on Layer 3 (Network Layer). It is smarter than a vswitch. It can understand the IP address in the Data. if it receives a packet, it checks the IP address, if the target address is in the local network, the packet is forwarded to the local network.
2. Different types of networks can be connected:
Our common hubs and switches are generally used to connect to Ethernet. However, if two network types are connected, such as Ethernet and ATM networks, hubs and switches will not work. A vro can connect different types of LAN and WAN, such as Ethernet, ATM, FDDI, and ring-based network. For different types of networks, the format and size of frames transmitted by them are different, just as road transportation uses vehicles to load goods, while railway transportation is the same as loading goods in the unit of car skin. When changing from car transportation to railway transportation, the goods must be placed on the train skin. The same is true for the data in the network, data is transmitted from one type of network to another type of network. The frame format must be converted. Vrouters have this capability, but vswitches and hubs do not. In fact, what we call the "Internet" is connected by various routers. Because there are different types of networks on the Internet, the hubs and switches cannot perform this task at all, therefore, the router must assume this role.
3. The router has the path selection capability:
On the Internet, there may be many paths from one node to another. The router can select a smooth and fast shortcut, which will greatly increase the communication speed and reduce the communication load of the network system, saves network system resources, which is not the performance of the hub and L2 Switch.
Ii. vswitches
A switch can be divided into two-layer switches (also known as Ethernet switches) and three-layer switches (also known as node switches ).
Indicates the former. The Layer 2 (data link layer) of the OSI operating system is used to expand the lan. The working principle is relatively simple. The routing is selected based on the MAC address addressing through the station table, the vswitch automatically establishes and maintains the site table. There are two differences between a Node switch and an Ethernet switch: first, the Node switch works in the WAN, And the Ethernet switch works in the LAN. Second, different functions. The Node switch is used to store and forward data groups, and the built-in forwarding table is used to implement the routing selection protocol, which is the node in the network topology. The ethernet switch is used to connect the hosts in the LAN, there is no forwarding table internally. Only the MAC address and host ing table are logically in the bus structure. Ethernet, fast Ethernet, FDDI, and ring-based network are commonly referred to as traditional LAN. They are shared LAN with shared media and bandwidth. To increase bandwidth, vrouters are often used for network division. A network is divided into multiple CIDR blocks. Each CIDR block has different subnet addresses and broadcast domains to reduce network conflicts, increase network bandwidth. The micro-network segment is no longer able to meet the high bandwidth requirements of LAN expansion and new network applications. Some people say that "the traditional LAN has come to an end"
In recent years, the emerging exchange LAN technology can solve a series of problems such as low network efficiency, insufficient network bandwidth, and difficult network expansion caused by shared LAN. It fundamentally changes the structure of the shared LAN and solves the bandwidth bottleneck problem. Currently, exchange Ethernet, switching ring, exchange FDDI, and ATM are widely used. LAN switching has become the mainstream of LAN technology today. The switch provides the bridging capability and the function of adding bandwidth to the existing network. The switches used on l a n are similar to the bridges because they all operate on the m a c sub-layer of the data link layer (Layer 1, the device addresses of all incoming network traffic are verified. Similar to the bridge, the switch maintains an address information table and uses this information to determine how to filter and forward l a n traffic, the switch uses the exchange technology to increase the total input and output of data and the bandwidth of the installation media. Generally, the forwarding delay of a vswitch is very small, which can economically divide the network into small conflicting domains to provide higher bandwidth for each workstation.
Iii. Differences between Ethernet switches and routers:
1. Different Levels of work:
The original switch was working on the data link layer (Layer 2) of the OSI/RM open architecture, and the router was initially designed to work on the network layer of the OSI model. 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 called protocol addresses or network addresses. 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. Can broadcast domains be separated?
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 support 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 not allowed, and communication between them still requires routers.
4. A Router provides a Firewall Service. It only forwards data packets of a specific address. It does not transmit data packets that do not support the routing protocol and transmits data packets of the target network to prevent broadcast storms.