1 Preface
Computer networks are often formed by the interconnection of many different types of networks. If several computer networks are physically connected together and cannot communicate with each other, then this "interconnection" is meaningless. Therefore, when talking about "interconnection", it is suggested that these computers can communicate with each other. That is to say, in terms of functions and logic, these computer networks have formed a large computer network, or an interconnected network, or Internet.
Some intermediate devices or systems are used to connect networks. ISO is called relay. Based on the level of the relay system, there can be the following five relay systems:
1. The physical layer is often referred to as the first layer, layer L1) repeater system ).
2. data link layer (Layer 2), that is, bridge or bridge ).
3. Layer 3, layer L3) relay system, that is, Cisco router (router ).
4. A mixture of bridges and Cisco routers. brouter) provides both bridge and Cisco router functions.
5. A relay system above the network layer, that is, the gateway ).
When the relay system is a forwarder, it is generally not called network interconnection, because it only expands a network, and it is still a network. High-level gateways are rarely used due to their complexity. Therefore, network interconnection generally refers to networks that are connected by switches and Cisco routers. This article mainly describes the differences between vswitches and Cisco vrouters.
2 vswitches and Cisco Routers
"Exchange" is the most frequently used word on the network today. It can be applied on any occasions from the bridge to the ATM to the telephone system. It is hard to figure out what is the real exchange. In fact, the word exchange first appeared in the telephone system, specifically to achieve the exchange of voice signals between two different telephones, the device to complete this work is the telephone switch. Therefore, in terms of intention, exchange is only a technical concept, that is, to complete the forwarding of signals from the device entry to the exit. Therefore, any device that meets this definition can be called a switch device. It can be seen that "Exchange" is a widely used term. When it is used to describe the second layer of the data network, it actually refers to a bridge device; when it is used to describe the third-layer device of the data network, it also refers to a routing device.
We often mention that an Ethernet switch is actually a multi-port L2 network device based on the bridge technology, it provides low-latency and Low-overhead channels for data frame forwarding from one port to another.
It can be seen that the core of the switch should have an exchange matrix to provide a channel for communication between any two ports, or a fast exchange bus, to send data frames received by any port from other ports. In actual devices, the function of the switching matrix is usually completed by a dedicated chip ASIC. In addition, there is an important assumption in the design philosophy of the Ethernet switch, that is, the speed of the switching core is very fast, so that the normal large-volume data will not cause congestion. In other words, the exchange capability is opposite to the transmitted information. The design of the ATM switch is that the exchange capability is limited to the transmitted information ).
Although the second layer Ethernet switch is developed based on a multi-port bridge, after all, the switch has more features, making it the best way to get more bandwidth, it also makes the network easier to manage.
Cisco routers are group switches or network layer relay devices in the network layer of the OSI protocol model. The basic function of Cisco routers is to transmit data IP packets to the correct network, including:
1. IP datagram forwarding, including path finding and transmission of the datagram;
2. subnet isolation to prevent broadcast storms;
3. Maintain the route table and exchange route information with other Cisco routers. This is the basis for IP packet forwarding;
4. IP datagram error handling and simple congestion control;
5. Filtering and accounting of IP datagram.
For networks of different sizes, Cisco routers have different roles.
On the backbone network, Cisco routers are mainly used for route selection. The Cisco router on the backbone network must know the path to all the lower-Layer Networks. This requires maintaining a large route table and responding to connection status changes as quickly as possible. A Cisco router failure may cause serious information transmission problems.
In the regional network, Cisco routers are mainly used for network connection and route selection, that is, to connect the Grass-roots network units in the lower layer-campus network, and to forward data between the lower-Layer Networks.
Inside the campus network, Cisco routers are primarily used to separate subnets. In the early days, the grass-roots network unit was LAN. All hosts were in the same logical network. With the continuous expansion of the network scale, the LAN has evolved into a campus network composed of multiple subnets connected to the high-speed trunk and Cisco routers. Each subnet is logically independent, and a Cisco router is the only device that can separate them. It is responsible for packet forwarding and broadcast isolation between subnets, the Cisco router on the border is responsible for connecting to the upper-layer network.
3 what is the difference between Layer 2 vswitches and Cisco vrouters?
Traditional switches are developed from bridges and belong to the OSI Layer 2 (data link layer device. It selects routes from the station table based on MAC address addressing. The establishment and maintenance of the station table is automatically implemented by the switch. A Cisco router is a layer-3 network-layer device of OSI. It is addressing IP addresses and is generated by the routing protocol through the route table. The biggest advantage of a vswitch is that it is fast. Because the vswitch only needs to identify the MAC address in the frame, the selection of forwarding Port Based on the MAC address is simple, Which is easy for ASIC implementation. Therefore, the forwarding speed is extremely high. However, the working mechanism of vswitches also brings about some problems:
1. Loop: Based on the vswitch address learning algorithm and the station table, no loop is allowed between vswitches. Once a loop exists, the Spanning Tree Algorithm must be enabled to block the ports that generate the loop. The Cisco router routing protocol does not solve this problem. There are multiple channels between Cisco routers to balance the load and improve reliability.
2. Load aggregation: only one channel is available between switches, so that information is concentrated on one communication link and cannot be dynamically allocated to balance the load. The Cisco router routing protocol algorithm can avoid this. The OSPF routing protocol algorithm can not only generate multiple routes, but also select different optimal routes for different network applications.
3. Broadcast control: A vswitch can only narrow down the conflicted domain, but not the broadcast domain. The entire exchange network is a large broadcast domain, where broadcast packets are spread to the entire exchange network. The Cisco router can isolate broadcast domains, and broadcast packets cannot be broadcast through the Cisco router.
4. subnet division: The switch can only recognize MAC addresses. The MAC address is a physical address and uses a flat address structure. Therefore, you cannot divide subnets Based on the MAC address. The Cisco router identifies the IP address, which is assigned by the network administrator. The IP address is a logical address and has a hierarchical structure. It is divided into network and host numbers, which can be easily used to divide subnets, the main function of a Cisco router is to connect to different networks.
5. confidentiality: although the switch can also filter Frames Based on the source MAC address, target MAC address, and other frames, however, the Cisco router filters packets based on the source IP address, destination IP address, TCP port address, and other content, which is more intuitive and convenient.
6. media-related: A switch can also be used as a bridge device to convert between the link layer and the physical layer. However, this conversion process is complicated and is not suitable for ASIC implementation. This will inevitably reduce the forwarding speed of the switch. Therefore, currently, vswitches primarily Interconnect Networks with the same or similar physical media and link protocols, instead of connecting networks with different link protocols. Different Cisco routers are used for interconnection between different networks. Therefore, they can connect networks with different physical media, link layer protocols, and network layer protocols. Although Cisco routers have advantages in functions, they are expensive and have low packet forwarding speeds.
In recent years, vswitches have made many improvements to improve performance. The most prominent improvement is the virtual network and layer-3 switching.
Dividing subnets can narrow the broadcast domain and reduce the impact of broadcast storms on the network. Each interface of a Cisco router is connected to a subnet. broadcast packets cannot be broadcast by a Cisco router. subnets connected to different interfaces of a Cisco router belong to different subnets. The subnet ranges are physically divided by the Cisco router. For a vswitch, each port corresponds to a CIDR block. Because the subnet consists of several CIDR blocks, you can logically divide subnets by combining vswitch ports. Broadcast packets can only be broadcast within the subnet and cannot be spread to another subnet. By rationally dividing the logical subnet, broadcast can be controlled. Because logical subnets are composed of vswitch ports and have no physical correlation, they are called virtual subnets or virtual networks. The virtual network technology eliminates the need for Cisco routers to isolate broadcast packets, and the virtual network INTRANET segment has nothing to do with its physical location, that is, the adjacent network segment can belong to different virtual networks, however, the two CIDR blocks that are far from each other may belong to the same virtual network. Terminals in different virtual networks cannot communicate with each other, enhancing access control over network data.
Vswitches and Cisco routers are the contradiction between performance and functions. The switch exchange speed is fast, but the control function is weak. The control performance of Cisco routers is strong, but the packet forwarding speed is slow. The latest technology to resolve this conflict is layer-3 switching, which provides both the ability to forward packets at the wire speed of the switch and the good control function of the Cisco router.
4. Differences between layer-3 vswitches and Cisco vrouters
Before the emergence of layer-3 switching technology, there was almost no need to differentiate routing devices from Cisco routers. They were exactly the same: Providing routing functions was exactly what Cisco routers were doing. However, currently, layer-3 switches are fully capable of performing most of the functions of traditional Cisco routers. As a device for network interconnection, layer-3 switches have the following features:
1. forward business flows based on layer-3 addresses;
2. full exchange of functions;
3. Special services such as packet filtering or authentication can be completed;
4. perform or not perform route processing.
Layer-3 switches have the following advantages over traditional Cisco Routers:
1. transmission bandwidth between subnets can be arbitrarily allocated: each interface of a traditional Cisco router is connected to a subnet. The transmission rate of a subnet through a Cisco router is limited by the bandwidth of the interface. The layer-3 switch is different. It can define multiple ports as a virtual network and use a virtual network composed of multiple ports as a virtual network interface, the information in the virtual network can be sent to the layer-3 Switch through the port that forms the virtual network. The number of ports can be specified arbitrarily, so there is no limit on the inter-subnet transmission bandwidth.
2. reasonable configuration of Information Resources: As there is no difference between the resource rate in the subnet access and the resource rate in the global network access, it is of little significance to set a separate server in the subnet. Setting a server group in the global network not only saves money, more reasonable configuration of information resources.
3. Cost Reduction: Generally, vswitches are used to form subnets, and Cisco routers are used to interconnect subnets. Currently, layer-3 switches are used for network design, which can be divided into any virtual subnets, and inter-subnet communication can be completed through the layer-3 routing function of the switch. This saves expensive Cisco routers.
4. Flexible Connections between switches: As switches, there are no circuits between them. As Cisco routers, there are multiple channels to improve reliability and balance load. Layer-3 switches use the Spanning Tree Algorithm to block the loop port. However, when selecting a route, the blocked path is still used as an optional path for route selection.
5 conclusion
To sum up, the switch is generally used for the LAN-WAN connection, the switch belongs to the bridge, is the data link layer equipment, some switches can also realize the third layer of the exchange. A Cisco router is used for WAN-WAN connections. It can resolve forwarding groups between different networks and act on the network layer. They only accept the input 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, Cisco routers have more powerful functions than switches, but the speed is relatively slow and expensive. layer-3 switches have both the ability to forward packets at the same speed and have good control functions of Cisco routers, therefore, it is widely used.