Differences between layer-3 switching and Routing

Source: Internet
Author: User

Differences between traditional switching and Routing

After a layer-3 switch routes the first data stream, it will generate a ing table between the MAC address and IP address. When the same data stream passes through again, the table is directly routed from the second layer instead of the second layer, which eliminates the network delay caused by router selection and improves the efficiency of packet forwarding.

Assume that two machines that use the IP protocol communicate with each other through the layer-3 switch ,... If two machines are not in the same subnet, if machine A needs to communicate with machine C, machine A must send an ARP packet to the "Default Gateway, the IP address of the "Default Gateway" has been set in the system software. This IP address actually corresponds to the layer-3 Switch module of the layer-3 switch. Therefore, when sending an ARP request to the IP address of the "Default Gateway" from machine A, if the layer-3 Switch module obtains the MAC address of the target machine C during the previous communication, send the MAC address of C to machine A. Otherwise, the layer-3 Switch module broadcasts an ARP request to the target machine based on the routing information, the target machine C receives the ARP request and replies to its MAC address to the layer-3 Switch module. The layer-3 Switch module saves the address and sends it back to machine. Later, when data packets are forwarded between A and C, they are encapsulated with the MAC address of the destination machine. The data forwarding process is all forwarded to the second layer for exchange, enabling high-speed information exchange. The so-called one-time routing and multiple exchanges.

Question 1: The second paragraph says "Send machine A to reply to the MAC address of C". I have used ethereal to capture packets, and the L3 switch returns the MAC address corresponding to its own IP default gateway, in principle, the L3 switch cannot return the MAC address of C to A. Because 1, A and C are not in the same CIDR block, it makes no sense for A to save the MAC address of C. 2, if A sends an ARP request without the IP address of C, how can the L3 switch know that A wants to communicate with C?

So what is this saying? But why is it popular? Is my understanding incorrect? Packet Capture error?

Question 2: Can I determine whether the default gateway is A router or L3 switch if I only capture packets from A and C as A black box?

Question 3: "After a layer-3 switch routes the first data stream, it will generate a ing table between MAC addresses and IP addresses." What table is this table? Is it the MAC correspondence between the destination IP address and the next hop IP address? I have never seen such a table. There are arp tables and route tables on the router, MAC tables on the switch, mac tables, arp tables, and route tables on the L3 switch. But I have never seen this table in document 1 on the L3 switch?

Question 4: How does one understand "one-time route selection and multiple exchanges? Document 1 says, "When the same data stream passes through again, it will pass directly from the second layer rather than the second route based on this table." In my understanding, after L3 receives the same data stream, it will view the target IP address, find the MAC address and interface corresponding to the next hop IP address, and then transfer it out.

However, if I modified the next hop on the L3 switch, how can I refresh this table?

Differences in opinion

My point of view:

Problem 1: The above paragraph is incorrect. The switch will never be able to respond to host A with host C's MAC, instead, it uses its own MAC address that corresponds to the Virtual Interface of the network segment of host. That is to say, layer-3 exchange does not change the data sending and receiving processes.

Problem 2: If the default gateway is regarded as a black box, it cannot be determined whether it is a layer-3 switch or a layer-3 route.

Question 3/4: The table contact context you mentioned should refer to a forwarding table for hardware forwarding. The routing process of layer-3 switching is basically completed by hardware, when the first packet is forwarded, the system will form a separate forwarding table. The subsequent forwarding will be completed by the table queried by the special ASIC hardware, and will not go through the routing process of the software query, this improves the forwarding speed, but it does not fundamentally change the data forwarding process. This is "one route, multiple exchanges".

What is the difference between layer-3 switching and layer-3 routing:

1. A layer-3 switch can provide a much higher forwarding rate than a vro, while a vro has a lower forwarding rate.
2. A layer-3 Switch generally only supports IP protocol forwarding. A vro generally supports multiple protocols.
3. layer-3 switches have a single interface and a large number of interfaces. Vrouters have a variety of interface types, but generally have a small number of interfaces of a single type.
4. A layer-3 switch can connect to a single network type. A vro can interconnect multiple heterogeneous networks.

In addition, I think there is no essential difference between a vswitch and a vro in forwarding. It is nothing more than hardware or software. Moreover, the current high-speed Router also draws on the switch technology and implements some hardware forwarding, so it also has terms such as "Fast forwarding" and "Fast forwarding.

Related Articles]

  • Summary and prospects of router equipment development (1)
  • Correctly configure the Cisco Router password to ensure Network Security
  • Overview of How to quickly restore a router's IOS operating system

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.