Easy to understand "Routing and switching"

Source: Internet
Author: User
Tags switches

Routing and switching are two important concepts in the network world. The traditional exchange occurs in the second layer of the network, which is the data link layer, while the routing occurs in the third layer, the network layer. In the new network, the intelligent and exchange performance of the routing is organically combined, the three-tier switch and the multi-layer switch are used extensively in the campus network. This article will introduce some basic concepts of routing and exchange, which are divided into four parts: network hierarchy, switching, routing and all-switched campus network.

Network hierarchy

The definition of network Reference Model gives a clear functional hierarchy division. The most commonly mentioned are the ISO OSI reference model and the TCP/IP protocol cluster.

The OSI reference model defined by the International Organization for Standardization (ISO) divides the computer network into seven levels by function, which is what we often call a seven-tier model or a seven-tier structure. The direct benefit of network functional layering is that these levels can be different from each other, developed by different manufacturers of various levels of hardware and software equipment can be used together. A level of device update or software rewrite will not affect other levels. There is a general correspondence between each level of the TCP/IP protocol system and the ISO reference model.

The middle layer of OSI, layer fourth, performs the transfer function, which provides reliable data transfer from one computer to another. The Transport layer (transport Layer) is a connecting layer, which has three layers below it, is related to the data transmission function, there are three layers above, provide the function related to the network application.

Three layers below OSI. The physical layer (physical Layer) is responsible for the actual transfer of data signals, and the Data Link layer (link Layer) is responsible for frame transfer within the network, while the Network layer (network Layer) is responsible for computer addressing and data transfer between networks.

On the three layer of OSI. The application layer (application Layer) is the highest level, it is responsible for providing user interface, commonly used in the Internet e-mail services, file transfer services, etc. are provided by this layer. The presentation layer (presentation Layer) is responsible for the presentation of data, such as encryption before sending data, decryption when receiving data, translation in both English and Chinese, and so on, which is the function provided by this layer. Session Layer is responsible for the establishment and termination of network data transmission, computer name conversion to address the work is also done on this floor.

The traditional sense of exchange is the second layer of the concept. The function of the data link layer is to transfer frames inside the network. The so-called "internal network" means that this layer of transmission does not involve the network between the device and network addressing. Popular understanding, an Ethernet transmission, a WAN line on the transmission of the data Link layer is responsible for. The so-called "frame" refers to the structure of the data transmitted, usually frames have frame head and frame end, the head has a source header two-level address, and the end of the frame usually contains the check information, the content is the user's data.

The data link layer covers a wide range of features, so it is divided into two tiers, the MAC (media access control, media access controls) layer and the LLC (Logical Link Control, logical link controls) layer. The common two-tier standard for LAN and metropolitan area networks is the IEEE 802 protocol. In the WAN, HDLC (high-level Data link Control, Advanced link controls), PPP (point-to-point Protocol, Point-to-Point Protocol) and frame Relay (Frame relay) and other protocols are widely used.

Routing is the concept of a third tier. The network layer is the most important in the Internet, its function is end-to-end transmission, where the meaning is that no matter how far the two computers, the number of networks between the middle, this layer to ensure that they can communicate with each other. For example, our commonly used ping command is a network layer of command, Ping, which means that the network layer function is normal. In general, the network layer does not guarantee the reliability of communication, that is, although normally the data can reach the destination, even if there is an exception, the network layer does not make any corrections and recovery work.

Network layer commonly used protocols have IP, IPX, AppleTalk, etc., where the IP protocol is the cornerstone of the Internet. In the TCP/IP protocol system, other secondary protocols in the third tier include ARP (address resolution), RARP (reverse address resolution), ICMP (Internet Message Control) and IGMP (Group Management Protocol) and so on. Because the network interconnection device has the path selection function, we often put the RIP, OSPF and other routing protocols on this layer.

Exchange

Turning to the issue of exchange, in the broadest sense, any data forwarding can be called an exchange. Of course, now we are referring to the narrow-sense exchange, which includes only the forwarding of the data link layer. Network people understand that the exchange is mostly from the switch started, the circuit switch in the communication network has been used for decades, do frame switching devices, especially the large-scale use of Ethernet switches is a matter of recent years.

Understand the role of Ethernet switches from the principle of the Network Bridge. Traditional Ethernet is a shared type, if there are four computers A, B, C and D on the network segment, then A and B communication, C and D can only be passive listening. If the cable segment (ie micro), A, b in a paragraph, C, d in another paragraph, then A and B communication, C and D can also communicate, so that the original 10M bandwidth theoretically becomes 20M. At the same time, in order to ensure that the two network segments can communicate with each other, you need to connect them with the bridge, the bridge is a two network card computer.

When the entire network was just started, the bridge knew nothing about the topology of the network. At this point, suppose that a sent the data to B, because the network is broadcast, so the bridge also received, but the bridge does not know to B on its own left or right, it will be the default forwarding, that is, on another network card to send this information. Although doing a useless forwarding, but through this process, the bridge learns to data sender A on its left. When every computer on the network sends data, the bridge is smart, knowing which network segment each computer is on. When a sends the data to B, the bridge does not forward the data, while C can send the data to D.

As can be seen from the above example, the bridge can reduce the probability of network conflict, which is our main purpose of using the bridge, known as reducing the conflict domain. But the bridge does not stop the broadcast, the broadcast information is isolated to rely on three layers of connecting devices, routers.

According to the thought of the cable segment, the more cable segment, the higher the available bandwidth. The limit situation is that each computer is in a separate cable segment, if there are 10 computers on the network, you need a ten-port bridge to connect them. But the implementation of such a bridge is not realistic, the speed of software forwarding can not keep up, so there is a switch, the switch is the above multiport bridge hardware or firmware, to achieve lower costs and higher performance.

An important function of a switch is to avoid swapping loops, which involves STP (spanning tree Protocol, branching trees protocol). The Branch tree Protocol's function is to avoid data frames being cycled through the network that the switch forms. As the following illustration shows, if there are redundant links in the network, the STP protocol now selects the root switch (Route bridge), then determines the path between each non-root switch and the root switch, and finally, sets all the links on this path to a forwarding (Forward) state. The connection between the remaining switches is a redundant link, which is placed in a blocking (block) state.

Another important feature of the switch is the VLAN (virtual LAN, VPN). The benefits of VLANs are mainly three:

* The separation of the ports. Even on the same switch, ports on different VLANs are not able to communicate. Such a physical switch can be used as a plurality of logical switches.

* Security of the network. Different VLAN can not communicate directly, which eliminates the security of broadcast information.

* Flexible management. Changing the network to which the user belongs does not have to change ports and lines, only the software configuration.

VLANs can be divided by port or MAC address.

Sometimes we need to maintain the consistency of the VLAN configuration on the network that the switch forms. This requires exchange of VLAN information between the switches according to the VTP (VLAN Trunk protocol,vlan Backbone protocol). The VTP protocol runs only on the port between the backbone ports (Trunk port), which is the switch.

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.