Next talk about routing and switching

Source: Internet
Author: User
Tags network function
Routing and switching are two important concepts in the online world. Traditional switching occurs on the second layer of the network, that is, the data link layer, while routing occurs on the third layer and network layer. In the new network, intelligent routing and switching performance are organically combined. layer-3 switches and multi-layer switches are widely used in the campus network. This article introduces some basic concepts of routing and switching, which are divided into four parts: network hierarchy, switching, routing, and fully-switched campus network.
Network Hierarchy
The definition of the network reference model provides clear functional hierarchy. The iso osi reference model and TCP/IP protocol cluster are the most commonly mentioned.
The OSI reference model defined by the International Organization for Standardization divides the computer network into seven layers by function, which we often call a layer-7 model or layer-7 structure. The direct advantage of network function layering is that these layers can perform their respective duties, and different levels of hardware and software devices developed by different manufacturers can be used together. Device updates or software rewriting at one level do not affect other levels. Each layer in the TCP/IP protocol system corresponds to the reference model of ISO. As shown in:

The OSI intermediate layer, that is, Layer 4, implements the transmission function, which provides reliable data transmission from one computer to another. The transport layer is an upper-and lower-layer that provides data transmission-related functions. The transport layer also provides network application-related functions.
The lower layer of OSI. The physical layer is responsible for the actual transmission of data signals, the data link layer is responsible for the transmission of frames within the network, and the network layer) responsible for computer addressing and data transmission between networks.
OSI is in the upper layer. The application layer is the highest level. It provides user * interfaces, e-mail services and file transmission services commonly used in the Internet. The presentation layer is responsible for data representation, such as data encryption before sending, decryption when receiving data, and translation between Chinese and English. The Session Layer is responsible for establishing and terminating network data transmission, and converting computer names to addresses is also completed at this layer.
In the traditional sense, exchange is the second concept. The function of the data link layer is to transmit frames within the network. The so-called "inside the network" means that the transmission of this layer does not involve inter-network devices and inter-network addressing. Generally speaking, the data link layer is responsible for transmission over an Ethernet network and over a WAN leased line. The so-called "frame" refers to the structure of the transmitted data. Generally, the frame has a frame header and a frame tail, and the source object L2 address in the header, while the frame tail usually contains verification information, the content between the beginning and end is the user data.
The data link layer provides many functions, so it is divided into two sub-layers: the MAC (Media Access Control) layer and the LLC (Logical Link Control) layer. The common L2 standard for LAN and man is IEEE 802 protocol. In the wide area network, HDLC (High-Level Data Link Control, advanced Link Control), PPP (Point-to-Point Protocol, Point-to-Point Protocol), and Frame Relay (Frame Relay) and other protocols are widely used.
Routing is a layer-3 concept. The network layer is the most important in the Internet, and its function is end-to-end transmission. The meaning of end-to-end is no matter how far the two computers are, how many networks are separated between them, this layer ensures that they can communicate with each other. For example, the commonly used ping command is a network-layer command. If Ping succeeds, the network-layer function is normal. Generally, the network layer does not guarantee the communication reliability. That is to say, although data can reach the destination under normal circumstances, even if an exception occurs, the network layer does not perform any correction and restoration work.
Common network-layer protocols include IP, IPX, and appletalk. IP is the cornerstone of Internet. In the TCP/IP protocol system, other third-level auxiliary protocols include ARP (Address Resolution), RARP (Reverse Address Resolution), and ICMP (internet packet control) and IGMP (Group Management Protocol. Because all network interconnection devices have the path selection function, we often discuss the rip, OSPF, and other routing protocols at this layer.
Exchange
When talking about exchange, in a broad sense, any data forwarding can be called exchange. Of course, we now refer to the narrow sense of exchange, which only includes data link layer forwarding. Most people who work on the Network understand that switching starts from switches. Circuit switches have been used in the communication network for decades, in particular, the large-scale use of Ethernet switches has occurred in recent years.
To understand the role of an Ethernet switch, we should also start with the principle of the bridge. Traditional Ethernet is shared. If there are four computers A, B, C, and D on the network segment, C and D can only be passively listened to when a communicates with B. If the cable segments are separated (I .e. micro-), A and B are in the same segment, and C and D are in the other segment, C and D can communicate with each other at the same time, in this way, the original 10 M bandwidth is theoretically 20 m. At the same time, to ensure that the two network segments can communicate with each other, you need to use a bridge to connect them. The bridge is a computer with two NICs, as shown in:

When the entire network was just started, the bridge knew nothing about the topology of the network. At this time, assume that a sends data to B, because the network is broadcast-type, so the bridge also receives the data, but the bridge does not know whether B is on its own left or right, and it will forward the data by default, this message is sent to another ENI. Although a useless Forwarding is done, through this process, the bridge learns that the data sender a is on its own left. After each computer on the network sends data, the bridge is intelligent. It knows where each computer is located. When a sends data to B again, the bridge does not forward the data. At the same time, C can send data to D.
From the above example, we can see that the bridge can reduce the probability of network conflicts, which is the main purpose of using the bridge, called to reduce the conflict domain. However, the bridge cannot prevent broadcasting. The isolation of broadcast information depends on a layer-3 connected device and router.
The more cable segments, the higher the available bandwidth. The limit is that each computer is in an independent cable segment. If there are ten computers on the network, a bridge with ten ports is required to connect them. However, it is unrealistic to implement such a bridge, and the speed of software forwarding cannot be kept up, so with a switch, the switch is to convert the above multi-port bridge hardware or firmware, to achieve lower costs and higher performance.
An important function of a vswitch is to avoid switching loops, which involves STP (Spanning Tree Protocol ). The function of the branch Tree Protocol is to avoid repeated transmission of data frames in a network composed of switches. As shown in, if there are redundant links in the network, the STP protocol selects the root switch (Route Bridge), and then determines the path between each non-root switch and the root switch. Finally, set all links in this path to the forward status. The connections between other switches are redundant links and block.

Another important function of a vswitch is VLAN (Virtual LAN ). There are three main benefits of VLAN:
? Port separation. Even on the same vswitch, ports in different VLANs cannot communicate. Such a physical switch can be used as multiple logic switches.
? Network security. Different VLANs cannot communicate directly, eliminating the insecure broadcast information.
? Flexible Management. To change the network to which the user belongs, you do not have to change the port and line. You only need to configure the software.
VLAN can be divided by port or MAC address.
Sometimes, we need to maintain VLAN configuration consistency on the network composed of switches. Therefore, the switches need to exchange VLAN information according to the VTP (VLAN trunk protocol, VLAN backbone protocol. The VTP protocol runs only on the backbone port (trunk port), that is, the port between switches.
Routing
A router is a connection device between networks. One of its important tasks is path selection. This function is the core of router intelligence. It is implemented by the Administrator's configuration and a series of route computing.
Route calculation * involves Dynamic and Static Routing, Which is manually set by the Administrator. Although manual configuration of all routes can make the network work normally, it also brings some limitations. After the network topology changes, the static route does not change automatically. Therefore, the network administrator must intervene. The default route is a static route and is also set by the Administrator. If the route table of the target network is not found, the router sends the information to the default router (gateway of last resort ). Dynamic computing *, as the name suggests, is a route automatically calculated by the router. The rip and OSPF are typical examples of dynamic computing.
In addition, you can divide route calculation into DV and LS. DV (distance, Distance Vector) calculation * transmits the route information of the current router to the adjacent router, and the adjacent router adds the information to its route table. While ls (link state) calculates * transmits the link state information to all routers in the domain, and the receiving router uses this information to build a network topology, use the Shortest Path in graph theory to calculate the priority * to determine the route. In contrast, distance vector calculation * is relatively simple, while link state calculation * is more complex, and the CPU and memory occupied are also greater. However, because the link status calculation * uses its own computing results, it is not easy to generate a route loop. Rip is a typical example of DV class calculation *, while OSPF is the representative protocol of LS.
The four most common routing protocols are rip, IGRP, OSPF, and OSPF.
Rip (routing information protocols) is the most widely used distance vector protocol, which was developed by Xerox in 1970s. At that time, Rip was part of the Xerox network service (Xerox Network Service) protocol cluster. The TCP/IP version of RIP is the license version of Xerox protocol. The biggest feature of RIP is that both the implementation principle and configuration side * are very simple. Rip is based on the number of hops and regularly sends update messages to the neighbor router.
IGRP is a Cisco proprietary protocol and is only implemented in a Cisco router. It is also a distance vector protocol, so it has something in common with rip in many places, such as broadcast update. The biggest difference between it and rip is measured by *, load balancing, and so on. IGRP supports weighted load balancing on multiple paths, so that the network bandwidth can be used more rationally. In addition, unlike rip, which uses only the number of hops as the measurement basis, IGRP uses multiple parameters to form a composite measurement value, which may include the following factors: bandwidth, latency, load, reliability, MTU (maximum transmission unit), and so on.
The OSPF protocol was developed in late 1980s S and became an industrial standard in Early 1990s S. It is a typical Link Status Protocol. The main features of OSPF include: support for vlsm (long subnet mask), fast convergence, low bandwidth usage, and so on. The OSPF protocol exchanges link status information between neighbors so that the router can establish a link status database (LSD). Then, the router uses SPF (Shortest Path First, Shortest Path First) based on the information in the database) calculate * The route table. The main reason for selecting a path is bandwidth.
It is an enhanced version of IGRP and is also a proprietary routing protocol of Cisco. The extensive Update (dual) algorithm * is used by the company. To some extent, it is similar to the Distance Vector Algorithm *, but it has a shorter convergence time and better feasibility. As an extension of IGRP, VPN supports multiple routing protocols, such as IP, IPX, and appletalk. When running in an IP environment, you can also perform a smooth connection with IGRP because their vertices * are consistent.
The above four routing protocols are both intra-Domain Routing Protocols, which are usually used within the autonomous system. When connecting Autonomous Systems, Inter-Domain Routing protocols such as BGP (border gateway protocols) and EGP (external gateway protocols) are often used. Currently, the Inter-Domain Routing Protocol used on the Internet is the fourth version of BGP.
Convergence is an important problem encountered during route computing * selection. Convergence time refers to the time required to know the change from the change of the network topology to the change of all related routers on the network, and to make the change accordingly. The shorter the time, the smaller the network disturbance to the whole network. If the convergence time is too long, the routing cycle will appear.
In the preceding domain routing calculation *, the convergence time of RIP and IGRP is relatively long, which is an order of magnitude in minutes. OSPF is shorter and can be converged in dozens of seconds, after the network topology changes, the convergence status can be reached in a few seconds.
Fully-switched Campus Network
The traditional campus network is composed of routers and switches. As shown in, a vswitch is responsible for internal network transmission and VLAN Division to ensure the security and flexibility of the Layer 2. The vro completes addressing and data forwarding between networks.
Generally, the performance of a vro is worse than that of A vswitch, because the vro is a software-based look-up table forwarding, And the vswitch can implement hardware-based pass-through forwarding. However, in a traditional campus network, routers do not become the network bottleneck. Because 80% of the data volume is communication within the network, only 20% of the data is for remote access. That is to say, most of the information transmitted through the vswitch does not pass through the vro. This is the 80/20 traffic model of traditional networks.

In recent years, due to the rise of the Internet/Intranet computing model, applications have been centrally managed, rather than being dispersed in networks of various departments as before. The traffic model of campus networks has undergone great changes. A large amount of network access is remote, that is, through the router. This is called the New 20/80 traffic model. As a result, routers gradually become network bottlenecks.
To solve this problem technically, the network vendor has developed a layer-3 Switch, also known as a route switch. It is a combination of the performance of traditional switches and the intelligence of routers. The route selection is still completed by the vro, but the routing result is retained by the vswitch in its own route cache. In this way, the first data packet in a data stream passes through the router, and all subsequent data packets are directly forwarded by the switch table. Thanks to hardware forwarding, layer-3 switches can achieve line rate routing, as shown in.

The layer-3 switches produced by many manufacturers are the combination of vswitches and vrouters. For example, vswitches of Cisco 6500, and series can select routing modules to implement layer-3 functions.
As a result, the campus network is dominated by switches and layer-3 switches. the fully-switched campus network adapts to the new traffic model and completely overcomes the router bottleneck of the traditional network, this greatly improves network efficiency. At the same time, vrouters are not unemployed and are still used for remote connections and dial-up access.
The first part of this article reviews the layered structure of the network. Next we will talk about the principles of traditional routing and switching, finally, it introduces how to combine the advantages of routing and switching in the current campus network to better meet the user's traffic model.
Routing, switching, and Routing Switching are three main issues in this article.
Due to space limitations, we will not repeat specific protocols. Sometimes it is helpful to understand the Protocol workflow and specific devices, such as Cisco routers and switches, to understand the network principles.

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.