Layer-3 Exchange

Source: Internet
Author: User

Ling huchong entered Huashan when he was 14 years old, and Yue linshan was eight years old. During the day, Yue wuqun gave two people a guide to jianfa. At night, Ling huchong told her story to tell her to fall asleep. Later, Yue Bu group received Lao de Nuo, Lu Da and other apprentices, and was busy practicing Zixia, so there was no time to give advice to his disciples. As a result, he made a HUB. From then on, Huashan school realized electronic education, and Yue weiqun gave lectures to every apprentice on the Internet. This method was quickly promoted within Wuyue jianpan. In order to interconnect Wuyue Jianpi, a router was developed by Zuo Leng Chan, the manager of Songshan school, to enable interconnection between Wuyue Jianpi. Ling huchong told stories to her sister through the Internet at night.

Soon Yue linshan was sixteen years old and turned into a slim little girl. Linghu Chong finds that his eyes are always involuntarily stuck on the younger sister. Every time he is with the younger sister, he can always hear a strong heartbeat. After a period of time, one night, Ling huchong sent a romantic poem to her sister online: You are wind, I am sand, You Are bees, I am flowers, you are combs, And I am hair, you are toothpaste and I am a toothbrush.

The next day, at a regular meeting of the Huashan school, Ling huchong came to the meeting room with an uneasy mood and found that the younger sister was hiding behind master with a red face, while other younger siblings were secretly smiling at themselves, A naughty younger brother called his toothbrush brother and ran away. Asked Lu Dayou, he realized that he was using NetXRay to capture all his online masterpiece. Ling huchong was excited, so he studied RFC in closed doors and developed LanSwitch. It can identify the MAC address of the device. In this way, only the data sent by Ling Hu Chong to xiaoshimei can be received by herself. At night, Ling huchong can tell stories to her sister online with peace of mind. Occasionally, her hand itch can also give her a few words that I want and can't say at ordinary times. Then, she glared at her face and imagined her facial expression.

LanSwitch is a layer-2 switching device. It can understand the MAC address of the layer-2 network protocol address. The L2 Switch constantly collects data during operations to create its own address table, which is quite simple and mainly indicates the port on which a MAC address is found, when the switch receives a data packet, it checks the target MAC address of the packet and its address table to determine the port from which the packet is sent. Instead of the HUB, any sender data will appear on all the ports of the HUB (whether or not required for you ). In this way, LanSwitch improves the efficiency and security of the system.

In the next year, yueda group recruited a large number of disciples, and the Huashan school was greatly expanded. The LanSwitch was used for many secondary connections. However, it was inevitable that the disciples were mixed. At that time, a group of three or four generations of disciples of Huashan sent worship of Tian boguang, a lone man, and set up a tianxie Association. The broadcast often argued that the competition was still eight hundred or 1 km reasonable; one of the Third Generation disciples is xxx, which broadcasts the xx algorithm in the Huashan school every day. What makes Ling yuchong unable to stand is that as master grows older, he becomes more and more arrogant, every sentence must be repeated 20 times and then broadcast on the Internet. Ling huchong wanted to use a broadcast domain specially with xiaoshimei, Lu Dayou, and others. However, if another LanSwitch was used, Master would not agree. Therefore, he modified the LanSwitch software and changed xiaoshimei, lu Dayou and others divide themselves into a virtual network (VLAN). When others use another VLAN, the broadcast packet is sent only within the VLAN, And the VLAN is connected through the router. Yue binqun is also affected by Tian Xie and xxx, but in order to fight against Zuo Leng Chan, when employing people, he can only endure it. I am very happy to know about it, but he is still modifying the software for Ling huchong, let him go to the cliff for a year without going down the hill within one year. In the Huashan school, VLAN is re-used for subnet division, which is divided into five subnets: Master and teacher Niang, Master girl and Lin Ping in a VLAN. xx master uses a VLAN, while Tian Xie uses a VLAN, another disciple uses a VLAN, and another VLAN exists on the cliff. Ling Hu rushed to the cliff, not sad. Finally, the world is quiet. Relying on the router of Zuo Leng Chan, Ling Hu Chong can also tell stories and chat to her sister-in-law on the Internet every day.

The introduction of LAN switches enables dedicated bandwidth between network nodes. However, for L2 broadcast packets, L2 switches broadcast on each network node. At the same time, for MAC addresses that cannot be recognized by L2 switches, they must also be broadcast in the broadcast domain. When multiple L2 switches are connected, all devices in the L2 switching network receive a broadcast message. In a large Layer-2 broadcast domain, a large number of broadcasts greatly reduce the efficiency of layer-2 forwarding. In order to avoid broadcast storms caused by broadcast on large switches, A L2 Switch Network must be further divided into multiple virtual networks (VLANs ). In a virtual network (VLAN), the information sent by a workstation can only be sent to other sites with the same virtual network number (VLANID) members cannot receive the information or broadcast frames. Virtual networks (VLANs) can be used to control broadcast storms on networks and increase network security. Communication between different virtual networks (VLANs) must be performed through routers.

However, happiness will always be short-lived, and there will always be endless troubles. With the increasing power of the entire Wuyue Sword School, the speed of routers is getting slower and slower. Linghu Chong finds that every time she tells a story to her younger sister, her answers always come late and seldom talk. She always says "well", "oh" or "I listen ". One day, the router could no longer be pinged, and Ling Hu Chong had no messages about her sister-in-law for three days. She couldn't help looking for her sister-in-law on an empty display screen. On a sleep night, she secretly went down the hill to find her sister-in-law, when I got to the front of my sister-in-law's window, I found my sister-in-law chatting with Tom Online. I didn't pay attention to myself. I felt sore and went back to the cliff, causing a serious illness. After being ill, I worked hard and finally made a router one day. At this time, Ling Hu Chong found that Huashan had thirty VLANs, And the router had to allocate an interface for each VLAN, the interface is not enough. In addition, the switching speed between two subnets through the router is much lower than that of layer-2 switching.

After a L2 Switch is divided into virtual subnets, a problem occurs: forwarding between different virtual subnets needs to be achieved through other routers. Forwarding between different VLAN nodes of a layer-2 switch requires the use of router equipment to achieve a great waste of ports, and the high cost of the router, low efficiency makes it unable to meet the three-layer forwarding requirements in the case of a large number of subnets. The concept of three-layer switching is introduced in this case. //

This evening, Ling Hu was very lazy and relaxed. At this moment, a dark shadow appeared in front of him. It turned out to be an old man of the wind and fairy bone. After hearing the questions from Ling Hu Chong, Feng Qingyang said: the router interface is not enough. You can leave the router inside the LanSwitch. The switching speed is slow because the router looks for a CIDR Block route, while LanSwitch directly queries the MAC corresponding to the port, of course, the speed is fast. Why can't I find the port based on the IP address? As long as he heard it, he admired it, but he still did not understand that there were so many IP addresses and frequent changes. How can he directly find the port? Feng Qingyang said:

"Sit down first. Let me ask you, how many disciples are there in Huashan school? "

"About sixteen thousand. "

"Do you know where they live? "

"I don't know. "

"Yue Bu group asks you to find someone who doesn't know where to live. How can you find someone? "

"Check the phone number system of Huashan Pi, find his address, and then look for him. "

"How can I find this person again after you come back? "

"How to..., check the phone number Inquiry System of Huashan school, find his address, and then look for him. "

"Do you know the address of this person? "

"Yes, but master said that Huashan has so many addresses and they often change. You don't need to know the addresses. "

"Yue weiqun, this kid, has taught his disciples to become wood! I ask you, what do you think you should find? "

"Go directly! "

"OK! You are not too benzene. After you know a person's address, do you always remember it? "

"Some people remember. I forgot everything else. "

"Why did you forget? "

"Because I can't remember so many people who haven't been looking for him for a while. "

"How do I obtain the address in the phone number query system of Huashan school? "

"I shouted his name in the open room. When he heard it, he came to me and told me his address. "

Feng Qingyang asked a lot of questions similar to the sharp turn of the brain, and then Feng Qingyang said: "Do you understand the principle of directly finding the Port Based on the IP address? When you understand this truth, you will naturally make a layer-3 Switch ". After carefully recalling today's speech, Ling Hu Chong finally understands the same principle as that of layer-2 forwarding from MAC address to outbound port, layer-3 forwarding can also be directly mapped from an IP address to an outbound port. IP address routing can be learned through ARP, which also requires aging. In this way, in addition to the first packet to be forwarded between VLANs, the host route needs to be obtained through ARP, and other packets can be directly identified based on the IP address. The forwarding speed is much higher than the forwarding speed of the router. When I looked up, the wind was gone.

One year later, Linghu rushed down to the cliff and successfully launched the Quidway S8016 route switch. Implements interconnection between VLANs and vrouters such as Songshan and heimu cliff.

A layer-3 Switch adds a layer-3 switch function on the basis of a layer-2 switch. However, instead of simply adding a layer-2 switch to a router, a layer-3 Switch uses different forwarding mechanisms. Router forwarding adopts the longest matching method, which is complicated and usually implemented using software ,. The Routing Query of a layer-3 switch is for a stream. It uses the CACHE technology and is easily implemented using ASIC. Therefore, it can greatly reduce costs and achieve fast forwarding.

Many articles will mention the difference between a layer-3 Switch and a router. Generally, a layer-3 switch is fast and cheap. None of these are wrong, but the scenario is the aggregation layer. As we can see, in the aggregation layer, the layer-3 switch can be used to directly mount a host, because it can obtain its host route, so the layer-3 switch can be quickly searched; for hosts connected to multiple subnets through other routers, layer-3 switches have the same processing as routers, and the longest matching method is used to find the next hop, it is forwarded by the next hop router.

Therefore, the common networking mode is to use GSR on the backbone layer, and the aggregation layer uses a layer-3 switch. Of course, for a small man, you can also directly build a layer-3 Switch without GSR.


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.