CN115412475A - Route control method, device, computer equipment and storage medium - Google Patents

Route control method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN115412475A
CN115412475A CN202110586124.2A CN202110586124A CN115412475A CN 115412475 A CN115412475 A CN 115412475A CN 202110586124 A CN202110586124 A CN 202110586124A CN 115412475 A CN115412475 A CN 115412475A
Authority
CN
China
Prior art keywords
switch
virtual
port
virtual port
port number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110586124.2A
Other languages
Chinese (zh)
Inventor
谢安
沈利
胡寅亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110586124.2A priority Critical patent/CN115412475A/en
Publication of CN115412475A publication Critical patent/CN115412475A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/252Store and forward routing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a route control method, a route control device, computer equipment and a storage medium. The method relates to the technical field of communication, and comprises the following steps: allocating the same virtual port number to the switches with the same hop number in each equivalent path between the source device and the destination device, generating a virtual port list, establishing a virtual port-physical port mapping table between the virtual port number and the physical port number group of the corresponding next switch for each switch, deploying the virtual port list to the access switch between the source device and the destination device, and deploying each virtual port-physical port mapping table to the corresponding switch; in the scheme, for each equivalent path between the source device and the destination device, only one virtual port list needs to be deployed on the access switch, so that the number of entries used for source routing on the access switch in the campus routing network is greatly reduced.

Description

Routing control method, routing control device, computer equipment and storage medium
Technical Field
The present application relates to the field of communications, and in particular, to a method and an apparatus for controlling routing, a computer device, and a storage medium.
Background
The source routing is a strategy for routing based on a source address, and can realize a function of selectively sending a data packet to different destination addresses according to a plurality of different sub-networks or internal network addresses. The user of the source route may specify some or all of the routers/switches along which the transmitted packets pass.
In the related art, a mainstream source routing technology is a source routing scheme based on an Internet Protocol (IP). The principle is that a transmitting end embeds a series of IP addresses in the header of an IP data packet, and the IP addresses represent interface IP addresses on a network path needing to be passed through. When a forwarding device (such as a switch) of the network receives a data packet, it takes out an IP address each time and forwards the packet to the device interface of the specified IP address until the data packet is sent to the destination.
However, when the source route is applied to the campus routing network, since the terminal cannot be modified, the source routing path needs to be marked on the access switch for the data packet, which requires recording the mapping between the destination user and the path on the access switch.
Disclosure of Invention
The embodiment of the application provides a routing control method, a routing control device, computer equipment and a storage medium, which can reduce the number of table entries for source routing on an access switch in a campus routing network, and the technical scheme is as follows:
in one aspect, a routing control method is provided, where the method is performed by a root node device in a campus routing network, and the method includes:
acquiring each equivalent path from a source user to a destination user in the campus routing network; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user;
acquiring each virtual and real port group based on each equivalent path; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a corresponding switch communicated to a next switch in each equivalent path; the switch in the same virtual and real port group has the same hop count in each equivalent path;
allocating virtual port numbers to the switches; the switches corresponding to the same virtual and real port group are allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers;
obtaining a virtual port list and a virtual port-physical port mapping table corresponding to each switch; the virtual port list comprises the virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the virtual port-physical port mapping table comprises a mapping relation between a virtual port number and a physical port number group;
sending the virtual port list to the access switch, so that the access switch adds the virtual port list to a data packet when receiving the data packet sent to the destination user by the source user;
and respectively deploying the corresponding virtual port-physical port mapping tables to the switches, so that when each switch receives the data packet, the data packet is sent to the next switch according to the virtual port list and the corresponding virtual port-physical port mapping tables.
In one possible implementation, the allocating a virtual port number to each switch includes:
when an existing virtual port number corresponding to a physical port number group in a first virtual-real port group exists, multiplexing the existing virtual port number as a virtual port number which is allocated to a switch in the first virtual-real port group at this time; the first virtual and real port group is any one of the virtual and real port groups;
and when the existing virtual port number does not exist, allocating a new virtual port number to the switch in the first virtual-real port group.
The possible implementation scheme provides a scheme for multiplexing the virtual port number of the virtual switch, different virtual port numbers do not need to be respectively allocated to the combination of each source user and each destination user, and the problem that the number of the virtual port numbers in the system is too large is avoided.
In a possible implementation scheme, obtaining each virtual-real port group based on each equal cost path includes:
extracting a topological graph from the campus routing network based on the equivalent paths; the topology map comprises the switches, interconnection links among the switches and interconnection physical port numbers among the switches;
and acquiring each virtual and real port group based on the topological graph.
The above possible implementation scheme provides a scheme for acquiring virtual and real port groups through a topological graph.
In one possible implementation, the method further comprises:
when a second switch has a previous switch in each equivalent path, sending a virtual port number corresponding to the previous switch of the second switch in each equivalent path to the second switch;
when a second switch has a next switch in each equivalent path, sending a virtual port number corresponding to the next switch of the second switch in each equivalent path to the second switch;
wherein the second switch is any one of the switches.
According to the possible implementation scheme, the front and rear virtual port numbers of the switch are sent to the switch, so that the switch can detect the connectivity with the front and rear switches according to the front and rear virtual port numbers, and therefore the available source routing table entry can be updated immediately.
In a possible implementation, acquiring equivalent paths from a source user to a destination user in the campus routing network includes:
and when receiving a data packet which is sent to the destination user by the source user through a specified channel and is sent by the access switch, executing the step of acquiring each equivalent path from the source user to the destination user in the campus routing network.
The possible implementation scheme provides a triggering mode for generating the source routing table entry, and can realize the generation of the source routing table entry according to the requirement and avoid unnecessary table entry generation.
In one possible implementation, the virtual port-to-physical port mapping table is added in an ethernet frame of the packet.
In one aspect, a routing control method is provided, where the method is performed by an access switch of a corresponding source user in a campus routing network, and the method includes:
receiving a data packet sent by the source user to a destination user;
adding a virtual port list from the source user to the destination user to the data packet;
sending the data packet to a next switch in the campus routing network according to a virtual port-physical port mapping table corresponding to the access switch;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, each virtual and real port group based on each equal cost path after acquiring each equal cost path from the source user to the destination user, and allocating a virtual port number to each switch; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a corresponding switch communicated to a next switch in each equivalent path; the switch in the same virtual and real port group has the same hop count in each equivalent path; the switches corresponding to the same virtual and real port group are allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers; the virtual port list comprises the virtual port numbers of the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in the equivalent paths from small to large; the virtual port-physical port mapping table contains the mapping relation between the virtual port number and the physical port number group.
In one possible implementation, adding the virtual port list from the source user to the destination user to the data packet includes:
and adding the virtual port list and the hash value of the flow five-tuple to an Ethernet frame of the data packet.
The possible implementation scheme provides a mode of carrying the hash value of the flow quintuple by the Ethernet frame, so that when a subsequent switch forwards a data packet, the hash value of the flow quintuple can be obtained by analyzing the second layer protocol, and the analysis of the three layers of protocols is not needed, thereby improving the forwarding efficiency of the source route.
In one aspect, a routing control method is provided, where the method is performed by an intermediate switch in a campus routing network, and the method includes:
receiving data packets which are forwarded by other switches in the park routing network and are sent to a target user by a source user;
analyzing a virtual port list from the data packet;
acquiring a target virtual port number corresponding to the intermediate switch from the virtual port list;
sending the data packet to a next switch in the campus routing network based on the target virtual port number and a virtual port-physical port mapping table corresponding to the target virtual port number;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, virtual and real port groups based on equivalent paths after acquiring the equivalent paths from a source user to a destination user and allocating virtual port numbers to switches; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a corresponding switch communicated to a next switch in each equivalent path; the switch in the same virtual and real port group has the same hop count in each equivalent path; the virtual port numbers allocated to the switches corresponding to the same virtual and real port groups are the same, and the virtual port numbers allocated to the switches corresponding to different virtual and real port groups are different; the virtual port list comprises the virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the virtual port-physical port mapping table contains the mapping relation between the virtual port number and the physical port number group.
In yet another aspect, a routing control apparatus is provided, the apparatus being used for a root node device in a campus routing network, and the apparatus including:
a path acquisition module, configured to acquire equivalent paths from a source user to a destination user in the campus routing network; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user;
a virtual and real port group obtaining module, configured to obtain each virtual and real port group based on each equivalent path; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a corresponding switch communicated to a next switch in each equivalent path; the switch in the same virtual and real port group has the same hop count in each equivalent path;
a virtual port number allocation module, configured to allocate a virtual port number to each switch; the switches corresponding to the same virtual and real port group are allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers;
a table obtaining module, configured to obtain a virtual port list and a virtual port-physical port mapping table corresponding to each switch; the virtual port list comprises the virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the virtual port-physical port mapping table comprises a mapping relation between a virtual port number and a physical port number group;
a list sending module, configured to send the virtual port list to the access switch, so that when the access switch receives a data packet sent by the source user to the destination user, the virtual port list is added to the data packet;
a mapping table sending module, configured to deploy the corresponding virtual port-physical port mapping tables to the switches, respectively, so that when each switch receives the data packet, the data packet is sent to a next switch according to the virtual port list and the corresponding virtual port-physical port mapping tables.
In still another aspect, a routing control apparatus for an access switch of a corresponding source subscriber in a campus routing network is provided, the apparatus comprising:
the data packet receiving module is used for receiving the data packet sent to the destination user by the source user;
the list adding module is used for adding the virtual port list from the source user to the destination user into the data packet;
a data packet sending module, configured to send the data packet to a next switch in the campus routing network according to a virtual port-physical port mapping table corresponding to the access switch;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, each virtual and real port group based on each equal cost path after acquiring each equal cost path from the source user to the destination user, and allocating a virtual port number to each switch; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a corresponding switch communicated to a next switch in each equivalent path; the switch in the same virtual and real port group has the same hop count in each equivalent path; the virtual port numbers allocated to the switches corresponding to the same virtual and real port groups are the same, and the virtual port numbers allocated to the switches corresponding to different virtual and real port groups are different; the virtual port list comprises the virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the virtual port-physical port mapping table contains the mapping relation between the virtual port number and the physical port number group.
In yet another aspect, a routing control apparatus is provided, the apparatus being for an intermediate switch in a campus routing network, the apparatus comprising:
a data packet receiving module, configured to receive a data packet that is forwarded by another switch in the campus routing network and is sent to a target user by a source user;
the list analyzing module is used for analyzing a virtual port list from the data packet;
a virtual port number obtaining module, configured to obtain a target virtual port number corresponding to the intermediate switch from the virtual port list;
a packet sending module, configured to send the packet to a next switch in the campus routing network based on the target virtual port number and a virtual port-physical port mapping table corresponding to the target virtual port number;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, each virtual and real port group based on each equal cost path after acquiring each equal cost path from the source user to the destination user, and allocating a virtual port number to each switch; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a next switch which is communicated to each equivalent path by the corresponding switch; the switch in the same virtual and real port group has the same hop count in each equivalent path; the switches corresponding to the same virtual and real port group are allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers; the virtual port list comprises the virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the virtual port-physical port mapping table comprises a mapping relation between a virtual port number and a physical port number group.
In yet another aspect, a computer device is provided, the computer device being a root node device in a campus routing network, the computer device comprising a processor, a memory, and a transceiver;
the processor is used for acquiring each equivalent path from a source user to a destination user in the campus routing network; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user;
the processor is further configured to obtain each virtual and real port group based on each equal cost path; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a corresponding switch communicated to a next switch in each equivalent path; the switch in the same virtual and real port group has the same hop count in each equivalent path;
the processor is further configured to allocate a virtual port number to each switch; the virtual port numbers allocated to the switches corresponding to the same virtual and real port groups are the same, and the virtual port numbers allocated to the switches corresponding to different virtual and real port groups are different;
the processor is further configured to obtain a virtual port list and a virtual port-physical port mapping table corresponding to each switch; the virtual port list comprises the virtual port numbers of the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in the equivalent paths from small to large; the virtual port-physical port mapping table comprises a mapping relation between a virtual port number and a physical port number group;
the transceiver is configured to send the virtual port list to the access switch, so that when the access switch receives a data packet sent by the source user to the destination user, the virtual port list is added to the data packet;
the transceiver is further configured to deploy the corresponding virtual port-physical port mapping tables to the switches, so that when each switch receives the data packet, the data packet is sent to a next switch according to the virtual port list and the corresponding virtual port-physical port mapping tables.
In yet another aspect, a computer device is provided, the computer device being an access switch for a corresponding source user in a campus routing network, the computer device comprising a processor, a memory, and a transceiver;
the transceiver is used for receiving a data packet sent to a destination user by the source user;
the processor is used for adding a virtual port list from the source user to the destination user to the data packet;
the transceiver is further configured to send the data packet to a next switch in the campus routing network according to a virtual port-physical port mapping table corresponding to the access switch;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, each virtual and real port group based on each equal cost path after acquiring each equal cost path from the source user to the destination user, and allocating a virtual port number to each switch; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a corresponding switch communicated to a next switch in each equivalent path; the switch in the same virtual and real port group has the same hop count in each equivalent path; the virtual port numbers allocated to the switches corresponding to the same virtual and real port groups are the same, and the virtual port numbers allocated to the switches corresponding to different virtual and real port groups are different; the virtual port list comprises the virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the virtual port-physical port mapping table contains the mapping relation between the virtual port number and the physical port number group.
In yet another aspect, a computer device is provided, the computer device being an intermediate switch in a campus routing network, the computer device comprising a processor, a memory, and a transceiver;
the transceiver is used for receiving data packets which are forwarded by other switches in the campus routing network and are sent to a target user by a source user;
the processor is used for analyzing a virtual port list from the data packet;
the processor is further configured to obtain a target virtual port number corresponding to the intermediate switch from the virtual port list;
the transceiver is further configured to send the data packet to a next switch in the campus routing network according to a virtual port-physical port mapping table corresponding to the access switch;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, each virtual and real port group based on each equal cost path after acquiring each equal cost path from the source user to the destination user, and allocating a virtual port number to each switch; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a next switch which is communicated to each equivalent path by the corresponding switch; the switch in the same virtual and real port group has the same hop count in each equivalent path; the virtual port numbers allocated to the switches corresponding to the same virtual and real port groups are the same, and the virtual port numbers allocated to the switches corresponding to different virtual and real port groups are different; the virtual port list comprises the virtual port numbers of the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in the equivalent paths from small to large; the virtual port-physical port mapping table contains the mapping relation between the virtual port number and the physical port number group.
In still another aspect, a computer device is provided, and the computer device includes a processor and a memory, where the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the above-mentioned routing control method.
In yet another aspect, a computer-readable storage medium is provided, in which a storage medium has stored therein a computer program for execution by a processor to implement the above-described route control method.
In yet another aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the routing control method.
The technical scheme provided by the application can comprise the following beneficial effects:
the method comprises the steps of distributing the same virtual port number for switches with the same hop number in each equivalent path between source equipment and destination equipment, generating a virtual port list, establishing a virtual port-physical port mapping table between the virtual port number and a physical port number group corresponding to the next switch for each switch, deploying the virtual port list to an access switch between the source equipment and the destination equipment, deploying each virtual port-physical port mapping table to the corresponding switch, adding a virtual port list to a data packet sent to a destination user by a source user by a subsequent access switch, and sending the data packet to the next switch by each switch between the source equipment and the destination equipment according to the virtual port list in the data packet and the virtual port-physical port mapping table of the switch; in the scheme, for each equivalent path between the source device and the destination device, only one virtual port list needs to be deployed on the access switch, and a mapping table does not need to be deployed for each equivalent path, so that the number of entries used for source routing on the access switch in the campus routing network is greatly reduced, and the problem of "explosion" of entries caused by the source routing in the access switch of the campus routing network is avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
Figure 1 is a network architecture diagram illustrating a campus routing network, according to an example embodiment;
FIG. 2 is a table entry diagram illustrating an IP-based source routing in accordance with an exemplary embodiment;
FIG. 3 is a flow chart diagram of a method of route control according to an example embodiment;
FIG. 4 is a schematic illustration of a subpicture extraction in accordance with an exemplary embodiment of the present application;
FIG. 5 is a schematic diagram illustrating virtual port number classification according to an exemplary embodiment of the present application;
fig. 6 is a flowchart of a method of a routing control method performed by an access switch according to an exemplary embodiment of the present application;
fig. 7 is a flowchart of a method of route control performed by an intermediate switch according to an exemplary embodiment of the present application;
FIG. 8 is a data plane forwarding flow diagram that is addressed by an exemplary embodiment of the present application;
FIG. 9 is a format diagram of an Ethernet frame to which an exemplary embodiment of the present application relates;
FIG. 10 is a flow diagram of data plane table entry scrubbing in accordance with an illustrative embodiment of the present application;
fig. 11 is a block diagram illustrating the structure of a routing control apparatus according to an exemplary embodiment;
fig. 12 is a block diagram showing the construction of a route control apparatus according to an exemplary embodiment;
fig. 13 is a block diagram illustrating the structure of a routing control apparatus according to an exemplary embodiment;
FIG. 14 is a schematic block diagram of an electronic device provided by an exemplary embodiment of the present application;
fig. 15 is a schematic structural diagram of a computer device according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
The scheme shown in the embodiment of the application can be applied to realizing the source routing function in the campus routing network. Referring to fig. 1, a network architecture diagram of a campus routing network according to an embodiment of the present application is shown. As shown in fig. 1, in a typical campus routing network, at least three layers of switches may be included, a core switch layer 101, an aggregation switch layer 102, and an access switch layer 103. Wherein, each layer of switch comprises one to a plurality of switches.
The core switches in the core switch layer 101 may be connected to the aggregation switches in the aggregation switch layer 102 through physical ports, so as to establish an interconnection link.
The aggregation switches in aggregation switch layer 102 may connect with the access switches in access switch layer 103 through physical ports to establish an interconnection link.
In addition, the core switches in the core switch layer 101 may also be connected through physical ports to establish an interconnection link; accordingly, the aggregation switches in the aggregation switch layer 102 may also be connected through physical ports to establish an interconnection link.
The access switch in the access switch layer 103 may be connected to a terminal of a user through a physical port to establish an interconnection link with the terminal.
Since the terminal cannot be modified when the source route is applied in the campus routing network, a mapping table corresponding to each equal cost path between a source user and a destination user needs to be recorded on an access switch, thereby causing the problem of "explosion" of entries on the access switch, please refer to fig. 2, which shows a table entry diagram of an IP-based source route. As shown in fig. 2, when a user a communicates with a user B, the access switch R5 needs to store a port list corresponding to 4 equal cost paths between the user a and the user B, when the user a communicates with a user C, the access switch R5 needs to store a port list corresponding to 2 equal cost paths between the user a and the user C, and when the user a communicates with a user D, the access switch R5 needs to store a port list corresponding to 2 equal cost paths between the user a and the user D. For example, when forwarding a data packet using a root node (R0 or R1 in fig. 2), the number of equal cost paths is related to the number of multi-path hops from the source access switch to the root node and the number of multi-path hops from the root node to the destination access switch, i.e. the number of equal cost paths is the multiplication of the two.
For the above problem, in the solution provided in the embodiment of the present application, each equal-cost path from a source user to a destination user in a campus routing network may be obtained through a root node device in the campus routing network; the equal cost path includes the access switch of the source user (i.e. the source access switch), and other switches between the access switch and the destination switch; the destination switch is a switch connected to the destination subscriber (i.e., the destination access switch); then, the root node device obtains each virtual and real port group based on each equivalent path; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises the physical port number of the next switch which is communicated to each equivalent path by the corresponding switch; the switch in the same virtual and real port group has the same hop count in each equivalent path; then, the root node device allocates virtual port numbers for the switches; the switch corresponding to the same virtual and real port group is allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers; the root node equipment obtains a virtual port list and a virtual port-physical port mapping table corresponding to each switch; the virtual port list comprises the virtual port numbers of the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in the equivalent paths from small to large; the virtual port-physical port mapping table comprises a mapping relation between a virtual port number and a physical port number group; then the root node equipment sends the virtual port list to the access switch, so that when the access switch receives a data packet sent to the destination user by the source user, the virtual port list is added to the data packet; and the root node device deploys the corresponding virtual port-physical port mapping table to each switch, so that when each switch receives the data packet, the data packet is sent to the next switch according to the virtual port list and the corresponding virtual port-physical port mapping table.
The root node device may be a core switch in the core switch layer 101.
Through the scheme, in the campus routing network, for the source route between each source user and each target user, no matter how many equivalent paths exist between the source user and each target user, only one virtual port list needs to be deployed on the source access switch, so that the list items deployed on the access switch can be greatly reduced, and the problem of 'explosion' of the list items on the access switch is avoided.
Please refer to fig. 3, which is a flowchart illustrating a routing control method according to an exemplary embodiment. This method can be used in the campus routing network shown in figure 1. As shown in fig. 3, the flow of the routing control method may include the following steps:
step 301, the root node device obtains each equal cost path from the source user to the destination user in the campus routing network.
The equivalent path comprises the access switch of the source user and other switches between the access switch and the destination switch; the destination switch is a switch connected to the destination subscriber.
The root node device may be a core switch in the campus routing network, that is, the core switch performs discovery of a full-network topology as the root node device of the whole campus routing network, and when a plurality of core switches exist in the campus routing network, any one core switch may be selected as the root node device, and other core switches may be used as backup root node devices.
The master and standby roles of the root node device may be elected and determined by each core switch, and the master and standby roles of the root node device may be switched. For example, each core switch elects a primary root node device and one or more backup root node devices, and when the primary root node device fails, a certain backup root node device may be switched to the primary root node device.
The equivalent path in the embodiment of the present application refers to a path that includes a source access switch between a source user and a destination user, but does not include a destination access switch.
For example, the switch connected to the source user is a switch a (i.e., the source access switch), the switch connected to the destination user is a switch b (i.e., the destination switch/the destination access switch), and in the process that the data packet sent by the source user is sent to the user b in the campus routing network by a source routing manner, the data packet passes through the switch a, the switch c, the switch d, and the switch b in sequence, so that a path formed by the switch a, the switch c, and the switch d is an equivalent path from the source user to the destination user. In a campus routing network, multiple equal cost paths may exist simultaneously from a source user to a destination user.
In a possible implementation manner, when the root node device receives a data packet that is sent by the access switch through a specified channel and is sent by the source user to the destination user, the step of obtaining each equal cost path from the source user to the destination user in the campus routing network is performed.
In this embodiment of the present application, in order to avoid unnecessary generating steps of the virtual port list and the virtual port-physical port mapping table, the computing pressure of the root node device and the entry storage pressure of each switch in each equivalent path are reduced, and the root node device may perform the step of acquiring each corresponding equivalent path only when an event occurs in the campus routing network, where a data packet is sent from a source user to a target user, so as to subsequently generate the virtual port list and the virtual port-physical port mapping table.
For example, when a virtual port list and a virtual port-physical port mapping table are not generated between the user a and the user B (for example, the user a sends a data packet to the user B for the first time), the data packet sent by the user a to the user B is sent to the root node device through the specified channel, and after receiving the data packet, the root node device can obtain each equivalent path from the source user to the destination user in the campus routing network; for example, the root node device may obtain each equal cost path from the source user to the destination user according to the source IP and the destination IP in the data packet.
And the equivalent paths are calculated and stored in advance by the root node equipment.
Step 302, the root node device obtains each virtual and real port group based on each equal cost path.
Wherein, each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises the physical port number of the corresponding switch communicated to the next switch in each equivalent path; and the switch in the same virtual and real port group has the same hop count in each equivalent path.
Because the switches are connected through the physical ports, in each equivalent path between the source user and the destination user, one switch may be connected to different next switches through different physical ports, that is, when one switch receives a data packet sent to the destination user by the source user and sends the data packet to different next switches, the data packet can be finally sent to the destination user. In this embodiment of the present application, for any switch in each equal cost path, the root node device forms a physical port number group by using physical port numbers corresponding to all physical ports of the switch and the next switch in each equal cost path, where the physical port numbers are connected to the switch and the next switch in each equal cost path; and the physical port number groups corresponding to the switches with the same hop count in each equivalent path form a virtual and real port group.
In one possible implementation, the root node device may extract a topology map from the campus routing network based on the equal cost paths; the topological graph comprises the switches, interconnection links among the switches and interconnection physical port numbers among the switches; and acquiring each virtual and real port group based on the topological graph.
In this embodiment, the root node device maintains a network topology of the entire campus routing network, after obtaining each equal cost path between a source user and a destination user, the root node device may extract a topology map from the network according to each equal cost path, where the topology map may be marked with port information corresponding to the original network topology (for example, a correspondence between physical port numbers of switches), and then the root node device may determine, according to the topology map, physical port number groups corresponding to the switches, respectively, and add physical port numbers corresponding to the switches with the same hop count in each equal cost path to the same virtual and real port group.
In step 303, the root node device assigns a virtual port number to each switch.
The virtual port numbers allocated to the switches corresponding to the same virtual and real port groups are the same, and the virtual port numbers allocated to the switches corresponding to different virtual and real port groups are different.
In this embodiment of the present application, in order to implement aggregation of physical ports on each equal cost path between a source user and a target user on an access switch, a root node device may allocate a same virtual port number to a switch corresponding to each virtual-real port group.
For example, if there are 3 virtual and real port groups between the source user and the target user according to the hop count of the switch, the root node device allocates 3 virtual port numbers to each virtual and real port group, each virtual port number is shared by each switch in the corresponding virtual and real port group, and the virtual port numbers corresponding to different virtual and real port groups are different.
For example, virtual and real port group 1 (corresponding to switch a, i.e. a physical port number group including switch a), virtual and real port group 2 (corresponding to switches b and c), and virtual and real port group 3 (corresponding to switches d and e) exist between the source user and the target user, and the root node device allocates virtual port numbers to the three virtual and real port groups as virtual port number v1, virtual port number v2, and virtual port number v3, respectively, where the virtual port number v1 corresponds to switch a, the virtual port number v2 is shared by switch b and switch c, and the virtual port number v3 is shared by switch d and switch e.
In a possible implementation manner, in the process of allocating a virtual port number to each switch, when there is an existing virtual port number corresponding to a physical port number group in a first virtual-real port group, the root node device multiplexes the existing virtual port number into a virtual port number allocated to the switch in the first virtual-real port group this time; the first virtual and real port group is any one of the virtual and real port groups; correspondingly, when the existing virtual port number does not exist, the root node device allocates a new virtual port number to the switch in the first virtual-real port group.
In the campus routing network, because there are combination relations between multiple source users and destination users, data packets between different source users and destination users may pass through the same switch, and correspondingly, the switch corresponds to different combinations of source users and destination users, there may be corresponding physical port number groups, and each physical port number group needs its own virtual port number. In order to avoid the excessive number of virtual port numbers, in this embodiment of the present application, for one virtual port group, if a switch in the virtual port group is in a different combination of a source user and a destination user, and a corresponding physical port number group is the same (if the virtual port group includes multiple switches, it is necessary that corresponding physical port number groups of the multiple switches in different combinations of the source user and the destination user are the same), the same virtual port number may be allocated to the physical port number group.
For example, suppose that a packet p1 sent by a source user a to a destination user B and a packet p2 sent by a source user C to a destination user D may both pass through a switch a/switch B, where the next switch for the switch a/switch B to send the packet p1 is a switch C or a switch D, and the next switch for the switch a/switch B to send the packet p2 is also a switch C or a switch D; the switch a corresponds to a physical port number group consisting of the physical port number to switch c and the physical port number to switch d, and switch b corresponds to a physical port number group consisting of the physical port number to switch c and the physical port number to switch d. For the two physical port number groups, when the root node device first allocates virtual port numbers to a source user a and a destination user B, it determines that a corresponding virtual port number has not been allocated, and allocates the same virtual port number (such as v 1) to the two physical port number groups, where the virtual port number v1 is shared by a switch a and a switch B; when the subsequent root node device allocates virtual port numbers to the source user C and the destination user D, the same virtual port number is determined to be allocated to the two physical port number groups, and the virtual port number v1 is directly multiplexed.
Step 304, the root node device obtains a virtual port list and a virtual port-physical port mapping table corresponding to each switch.
The virtual port list comprises virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the mapping table of virtual port to physical port comprises the mapping relation between the virtual port number and the physical port number group.
In this embodiment of the present application, for a plurality of virtual port numbers allocated to each switch in each equal cost path between a source user and a destination user, the root node device may arrange each virtual port number according to data that the hop count of the corresponding switch in each equal cost path is from small to large, so as to obtain a virtual port list.
In addition, for each switch in each equivalent path between the source user and the target user, the root node device establishes a mapping relationship between the virtual port number allocated to the switch and the physical port number group of the switch as a virtual port-physical port mapping table of the switch.
For different combinations of source users and target users, the mapping tables of virtual ports to physical ports corresponding to the same switch may be different. That is, for a switch a, there may be a virtual port-to-physical port mapping table L1 corresponding to the source subscriber a and the destination subscriber B, or there may be a virtual port-to-physical port mapping table L2 corresponding to the source subscriber C and the destination subscriber D.
Step 305, the root node device sends the virtual port list to the access switch, and the access switch receives the virtual port list.
In this embodiment of the present application, after the root node device generates the virtual port list corresponding to the source user and the target user, the virtual port list may be sent to the access switch corresponding to the source user.
The root node device may send the virtual port list to the access switch corresponding to the source user in a source routing manner.
Step 306, when the access switch receives the data packet sent by the source user to the destination user, the virtual port list is added to the data packet.
In this embodiment, when the access switch subsequently receives a data packet sent by the source user to the destination user, the virtual port list may be added to the data packet, so that the subsequent switch determines the physical port of the next hop according to the virtual port list.
In one possible implementation, the virtual port-to-physical port mapping table is added in the ethernet frame of the packet.
Step 307, the root node device deploys a corresponding virtual port-physical port mapping table to each switch, and each switch receives the virtual port-physical port mapping table deployed by the root node device.
In this embodiment of the present application, after the root node device generates the virtual port-physical port mapping tables of each switch corresponding to the source user and the target user, the virtual port-physical port mapping tables of each switch may be deployed in the corresponding switches respectively.
The root node device may send a message to the switch that needs to bind the virtual port number in a source routing manner, so as to bind the virtual port and the real port in each switch (i.e., deploy a virtual port-physical port mapping table).
Step 308, when each switch receives the data packet, the switch sends the data packet to the next switch according to the virtual port list and the corresponding mapping table between the virtual port and the physical port.
In this embodiment, after receiving a data packet sent/forwarded by another switch, if the virtual port list is analyzed from the data packet, any switch in the equivalent paths may query the virtual port-physical port mapping table according to a virtual port number corresponding to itself in the virtual port list, obtain a physical port of a next switch, and send the data packet to the next switch.
In a possible implementation manner, when a second switch has a previous switch in each equivalent path, sending a virtual port number corresponding to the previous switch of the second switch in each equivalent path to the second switch; when a second switch has a next switch in each equivalent path, sending a virtual port number corresponding to the next switch of the second switch in each equivalent path to the second switch; wherein the second switch is any one of the switches.
In this embodiment, for each switch in each of the above equivalent paths, the root node device may further send a previous virtual port number/a next virtual port number of the switch in the above virtual port list to the switch, so that the switch may subsequently check connectivity between switches corresponding to the previous virtual port number according to the previous virtual port number, and/or check connectivity between switches corresponding to the next virtual port number according to the next virtual port number.
That is to say, an embodiment of the present application provides a virtual port generation scheme, which includes two steps:
1) Extracting subgraphs; the root node equipment extracts the topological subgraphs related to the paths according to the calculated equivalent paths and marks port information corresponding to the original topology;
2) Binding virtual ports and real ports; and the root node determines physical port number groups to be bound according to the extracted topological graph, determines a virtual port number for each physical port number group, and binds the virtual port number with a physical port number in the physical port number group, wherein the physical port number group in the same virtual port group corresponds to the same virtual port number.
In an exemplary scheme, the generating and deploying scheme of the virtual port may refer to the following steps:
s1, after receiving a user request (namely a data packet sent to a target user by a source user), a root node device finds out multi-paths (namely all equivalent paths) between accesses which are calculated and stored in advance according to the source user and the target user, extracts a topological subgraph according to multi-path information, and marks port information corresponding to an original topology in the subgraph. Please refer to fig. 4, which illustrates a sub-graph extraction diagram according to an embodiment of the present application. As shown in fig. 4, there are four paths between the user a and the user B, and the root node device extracts the nodes R0, R1, R2, R3, R4, R5, and R8 and the interconnection links between the nodes in the complete topology, and records the port information in the meta topology.
S2, determining a vport set of a virtual port group to be bound as { vport group 1, vport group 2 and vport group 3} according to the expanded topological graph (namely the extracted topological subgraph); and for each vport group, determining a binding set of the switch and the port in the group. For example, vport group 2 is { R0: {2,3}, R1: {2,3} }.
And S3, for each vport group, determining the consistent virtual port numbers distributed on all the switches in the group. For example, a virtual port number y is assigned to R0 and R1.
Please refer to fig. 5, which illustrates a virtual port number classification diagram according to an embodiment of the present application. As shown in fig. 5, when allocating a virtual port, the following two cases can be distinguished.
Case 1-multiplexing the existing virtual port number. For example, it is queried whether there already exists a consistent virtual port to physical port mapping table on R0, R1, where the mapping table may be in the form of: key = virtual port number, value = physical port number group. For example, entry < y, (2, 3) >, where y is the virtual port number and 2,3 are both physical port numbers. If present, multiplexing can be straightforward. Using {2,3} reverse lookup on R0 to see if there is already a virtual port-to-physical port mapping table; the 2,3 reverse lookup is used on R1 to see if a virtual port to physical port mapping table already exists. If there is a common virtual port w on R0, R1 both mapping to {2,3}, then w is recorded and the w reference count is incremented by one.
Case 2: no multiplexing, direct creation. I.e. a corresponding mapping table entry is created in the virtual-real port table of each switch. For example, a table entry { y- > {2,3} } is created in R0, representing the mapping of a virtual port to physical port 2 and port 3; the table entry y- > {2,3} }iscreated in R1, representing the mapping of virtual port y to physical port 2 and port 3.
And S4, the root node equipment informs the access switch corresponding to the source user of the virtual port list, and deploys the virtual port-physical port mapping table to the corresponding switch.
In the embodiment of the application, virtual and real port mapping and installation based on centralized calculation of root node equipment are realized, namely, virtual and real port mapping relations are calculated by the root node equipment based on extracted subgraphs, virtual and real ports are installed and bound to the switch, and non-root node equipment does not need calculation.
In this embodiment of the present application, based on the solutions shown in steps 301 to 308, when receiving a data packet sent by a source user to a destination user, an access switch corresponding to the source user may trigger a root node device to generate a virtual port list and a virtual port-physical port mapping table corresponding to each switch on an equal-cost path, or may send the data packet in a source routing manner based on the virtual port list. A method flowchart of the routing control method executed by the access switch may be as shown in fig. 6.
Step 601, the access switch receives a data packet sent by a source user to a destination user.
In the embodiment of the present application, in the campus routing network, when a terminal of a source user sends a data packet to a terminal of a destination user, the data packet is first submitted to an access switch corresponding to the source user.
In step 602, the access switch adds the virtual port list from the source user to the destination user to the packet.
In a possible implementation manner, the access switch may query the virtual port list through an address of the destination user, and add the virtual port list to the packet if the virtual port list is queried.
If the access switch is connected to the terminals of multiple users at the same time, the access switch can also query the virtual port list through the address of the source user and the address of the destination user.
In this embodiment of the present application, if a root node device has generated and deployed a virtual port list and a virtual port-physical port mapping table corresponding to each switch on each equal-cost path for a source user and a target user, the virtual port list and the virtual port-physical port mapping table corresponding to an access switch are sent to the access switch, and the access switch may store the virtual port list and an address of the target user (or an address of the source user and an address of the target user) in a corresponding manner, so as to perform subsequent query.
In a possible implementation manner, if the virtual port list is not queried, the access switch may forward the data packet to the root node device through the designated channel, so as to trigger the root node device to generate a corresponding virtual port list and a virtual port-physical port mapping table corresponding to each switch on each equal cost path.
In one possible implementation, the access switch adds the virtual port list and the hash value of the flow five tuple to the ethernet frame of the packet.
Step 603, the access switch sends the data packet to the next switch in the campus routing network according to the mapping table of the virtual port to the physical port corresponding to the access switch.
In this embodiment of the present application, when a physical port number group in a virtual port-physical port mapping table corresponding to the access switch includes at least two physical port numbers, a physical port number corresponding to a next switch is determined from the at least two physical port numbers based on a hash value of a flow quintuple corresponding to the data packet; and sending the data packet to the next switch in the campus routing network based on the determined physical port number corresponding to the next switch.
In this embodiment of the present application, for a situation where a virtual port number corresponds to multiple physical port numbers in a virtual port-physical port mapping table, an access switch may determine one physical port number of the multiple physical port numbers according to a hash value of a flow quintuple corresponding to a data packet, and send the data packet through the determined physical port number.
When the access switch receives a subsequent virtual port number (i.e., a virtual port number corresponding to a next switch in each equivalent path) in the virtual port list sent by the root node device, the access switch may further check connectivity between the access switch and the next switch according to the subsequent virtual port number, and when the access switch and the next switch are not connected, remove a physical port number between the access switch and the next switch from a virtual port-physical port mapping table corresponding to the virtual port number in the virtual port list of the access switch.
In this embodiment, based on the solutions shown in steps 301 to 308, when receiving a data packet forwarded by another switch and sent by a source user to a destination user, an intermediate switch in each equal cost path may send the data packet in a source routing manner according to a virtual port-physical port mapping table corresponding to the intermediate switch. A method flowchart of the routing control method executed by the intermediate switch may be as shown in fig. 7.
In step 701, the intermediate switch receives data packets forwarded by other switches in the campus routing network and sent by the source user to the target user.
In the embodiment of the present application, after a virtual port list is added to an access switch, a packet sent by a source user to a target user is transmitted one by one on one of equal cost paths.
At step 702, the intermediate switch parses the virtual port list from the packet.
When one intermediate switch in each equal cost path receives the data packet transmitted by other switches, the virtual port list can be analyzed from the data packet.
For example, the intermediate switch may parse the virtual port list from the ethernet frame of the packet. Optionally, the intermediate switch may further parse the hash value of the flow quintuple of the data packet from the ethernet frame of the data packet.
In step 703, the intermediate switch obtains the target virtual port number corresponding to the intermediate switch from the virtual port list.
In this embodiment of the present application, after receiving the data packet, if it is determined that the data packet is a source routing data packet, the intermediate switch may obtain a pointer length in the ethernet frame, and obtain a virtual port number in a virtual port list pointed by the pointer as a target virtual port number corresponding to the intermediate switch.
Step 704, the intermediate switch sends the packet to the next switch in the campus routing network based on the target virtual port number and the virtual port-physical port mapping table corresponding to the target virtual port number.
After the intermediate switch acquires the target virtual port number, the intermediate switch can query a virtual port-physical port mapping table corresponding to the local target virtual port number to acquire a physical port number corresponding to the next switch, and send the data packet to the next switch through the corresponding physical port by the queried physical port number corresponding to the next switch.
In a possible implementation manner, when a physical port number group in a virtual port-physical port mapping table corresponding to the target virtual port number includes at least two physical port numbers, a physical port number corresponding to a next switch is determined from the at least two physical port numbers based on a hash value of a flow quintuple corresponding to the data packet; and sending the data packet to the next switch in the campus routing network based on the determined physical port number corresponding to the next switch.
Referring to fig. 8, a data plane forwarding flowchart according to an embodiment of the present application is shown. As shown in fig. 8, the source routing flow according to the embodiment of the present application is as follows:
s1, a root node device calculates paths among all accesses in advance and stores the paths on the root node.
S2, the source user A sends a data packet to the destination user B, and after the access switch R4 receives the data packet, the matching on the R4 fails and the data packet is sent to the R1 through an uplink port by default.
Wherein, R4 may match the address of the user B in the data packet, and determine whether the virtual port list corresponding to the address of the user B exists on the access switch R4. If yes, the matching is successful, otherwise, the matching is determined to be failed.
And S3, after receiving the packet sent to the user B by the user A, the R1 matches the table entry, still fails, and is transmitted to the root node R0 through the uplink port by default.
And S4, the root node device calculates and installs virtual and real port mapping table entries (namely, generates and sends a virtual port list and virtual port-physical port mapping tables of all the switches): the root node device forwards the message through the downstream source route of the IDPortMsg message, where the port sequence of the source route is 1- >1 (IDPortMsg is sent to R4 by the root node R0 in a source route manner, and as shown in fig. 8, the physical port sequences from R0 to R4 are 1 (physical port No. 1 of R0) - >1 (physical port No. 1 of R1)), and sends the message to the access switch R4, and notifies the access switch of an installation table entry (user B: x- > 3), where "user B: x in x- >3 "refers to a virtual port x on R4, and the physical port mapped by x on R4 is physical port number 1 and 2, which indicates that the port can be sent to R1 and R2, and the physical port number 3 on R1 and R2 are directly connected to R7, which indicates that the port can be sent to user B from R1 and R2; that is, the sequence of source ports to user B is x, 3, where x is a virtual port; the root node equipment forwards the message by a VPortMsg downlink source route, the port sequence of the source route is 1- >1, the message is sent to an access switch R4, and an installation table item (a virtual port x is: {1,2 }) of the access switch is informed, namely real ports corresponding to the virtual port x are 1 and 2.
And S5, after the root node equipment installs the table entry on the R4 in the access switch, the R4 is successfully matched with the message sent to the user B by the user A. Putting the source port sequence x- >3 into an Ethernet frame; and determining that there are two paths leading to the user B according to the virtual ports {1,2}, calculating a hash value of a quintuple in the packet, storing the hash value in an ethernet frame, selecting a path according to the hash value (for example, assuming that the hash value is h, there are two physical ports 1 and 2 corresponding to x in R4, executing h%2, if the result is 0, sending to the physical port No. 1, and if 1, sending to the physical port No. 2), and forwarding to the next hop, in the embodiment shown in fig. 8, it is assumed that R1 is sent according to the hash value.
Please refer to fig. 9, which shows a format diagram of an ethernet frame according to an embodiment of the present application, where a destination address is a known multicast address, a source routing type field indicates a source routing frame, a length indicates the number of subsequent source ports, a pointer indicates a current source port, a source port sequence field stores a port sequence, and a hash value indicates a hash of a flow quintuple.
S6, after receiving the source routing packet, the R1 analyzes the Ethernet frame to obtain the next port needing to be forwarded as a No. 3 physical port, and therefore the next port needing to be forwarded is directly forwarded to the access switch R7 based on the No. 3 physical port.
And S7, the exchanger R7 fills in the destination and the source address, removes the mark, the length, the pointer, the source port sequence and the hash value, and forwards the message to the user B normally.
The scheme provides a forwarding mode based on a source port, only the access switch needs to analyze more than two layers of headers of the packet in the forwarding process, and only two layers of frames (namely Ethernet frames) need to be analyzed in subsequent forwarding, so that the table look-up times in the forwarding process are obviously reduced; in addition, the hash value of the quintuple of the data packet is placed at the head of the two-layer frame, so that the subsequent switch does not need to repeatedly carry out hash operation in the load balancing process. That is to say, compared with a source routing mode that a third table (a routing table is searched to obtain a next hop IP Address, an Address Resolution Protocol (ARP) table is searched to obtain a next hop Media Access Control (MAC) Address, and a MAC table is searched to obtain a next hop forwarding port) needs to be searched based on a destination IP routing, and a source routing mode that a second table (an ARP table is searched to obtain a next hop MAC Address, and a MAC table is searched to obtain a next hop forwarding port) needs to be searched based on an IP source routing, in the embodiment of the present application, only a virtual-real port mapping table (which is a linear table, and the searching cost is small) needs to be searched once. Compared with the mode that each hop needs to calculate the hash value of the quintuple in the load balancing routing process, the hash value of the quintuple only needs to be calculated once at the access switch in the embodiment of the application.
In a possible implementation manner, before analyzing the virtual port list from the data packet, the intermediate switch also receives a virtual port number, which is sent by the root node device and corresponds to a previous switch in each equivalent path, of the intermediate switch;
correspondingly, the intermediate switch can check the connectivity between the intermediate switch and the previous switch based on the virtual port number corresponding to the previous switch; when the intermediate switch is not communicated with the previous switch, deleting the virtual port-physical port mapping table corresponding to the target virtual port number.
In one possible implementation, the intermediate switch sends a first link failure message to a next switch in the campus routing network, the first link failure message being used to trigger the next switch in the campus routing network to check connectivity with other switches.
In a possible implementation manner, before analyzing the virtual port list from the data packet, the intermediate switch also receives a virtual port number corresponding to a next switch in each equivalent path, which is sent by the root node device;
correspondingly, the intermediate switch can check the connectivity between the intermediate switch and the next switch based on the virtual port number corresponding to the next switch; when the intermediate switch is disconnected from the next switch, removing the physical port number between the intermediate switch and the next switch from the virtual port-physical port mapping table corresponding to the target virtual port number.
In one possible implementation, the intermediate switch may further send a second link failure message to a previous switch in the campus routing network, where the second link failure message is used to trigger the previous switch in the campus routing network to check connectivity with other switches
Wherein the intermediate switch may periodically perform a step of checking connectivity between the intermediate switch and the previous/next switch; the intermediate switch may also trigger the step of checking the connectivity between the intermediate switch and the next switch to be executed when receiving a link failure message sent by a previous switch, or trigger the step of checking the connectivity between the intermediate switch and the previous switch to be executed when receiving a link failure message sent by a next switch.
Referring to FIG. 10, a flow chart of data plane entry scrubbing according to an embodiment of the present application is shown. As shown in fig. 10, the data plane entry cleaning process according to the embodiment of the present application is as follows:
s1, recording front and rear virtual ports by each virtual port-physical port mapping table. E.g., virtual port on R2, maintains connectivity to virtual port "1" on R5, while also maintaining connectivity to virtual port y on R0, R1. For example, in fig. 10, R2 may periodically send a message to physical port No. 1 of R5, and if a response is received from virtual port No. 1 of R5, it indicates that it is connected to virtual port No. 1 of R5; meanwhile, the R2 also continuously sends messages to the physical port No. 1 on the R0 and the physical port No. 1 on the R1, if the responses of the two ports are not received, disconnection is indicated, and if not, connection is indicated.
And S2, when the link fails, the switch clears the unavailable physical port in the port list.
Assuming that the links R0-R2 are in failure, after R2 finds the physical port number 3 down, the mapping table of the virtual port to the physical port number 3 is modified immediately, and the physical port number 3 corresponding to the virtual port x is removed. And after the R0 is disconnected with the previous virtual port x, directly clearing a virtual port-physical port mapping table corresponding to the virtual port y on the R0.
S3, clearing the table entries hop by hop based on the recorded front/back virtual ports; if the next virtual port fails, propagate forward; if the previous virtual port fails, it is propagated backwards.
For example, messages for R0-R2 link failures continue to propagate forward on R2, since R2 finds that virtual port number 1 on R5 remains connected, so the forward propagation of messages on R2 terminates. The messages for the R0-R2 link failure continue to propagate backward on R0, because R0 finds that virtual port number z on R3 remains connected, so the messages terminate propagating backward on R3.
According to the scheme, the table entries are cleaned on the data plane for the topology change caused by the link fault, the root node is not required to be accessed, and the problem of expandability caused by maintenance of the whole network topology by the root node is remarkably solved. That is to say, compared with a scheme that entries need to be reported to a root node when topology changes occur, and the root node maintains entries on a switch (which may cause a large load pressure to the root node, and when a network scale is large, the root node may become a bottleneck, and expandability is poor).
To sum up, in each equivalent path between the source device and the destination device, the switches with the same hop count allocate the same virtual port number, generate a virtual port list, establish a virtual port-physical port mapping table between the virtual port number and the physical port number group corresponding to the next switch for each switch, deploy the virtual port list to the access switch between the source device and the destination device, and deploy each virtual port-physical port mapping table to the corresponding switch, the subsequent access switch adds the virtual port list in the packet sent to the destination user by the source user, and each switch between the source device and the destination device can send the packet to the next switch according to the virtual port list in the packet and its own virtual port-physical port mapping table; in the scheme, for each equivalent path between the source device and the destination device, only one virtual port list needs to be deployed on the access switch, and a mapping table does not need to be deployed for each equivalent path, so that the number of entries used for source routing on the access switch in the campus routing network is greatly reduced, and the problem of "explosion" of entries caused by the source routing in the access switch of the campus routing network is avoided.
Fig. 11 is a block diagram illustrating a configuration of a routing control apparatus according to an exemplary embodiment. The apparatus may implement all or part of the steps executed by the root node device in the above-mentioned routing control method of the present application. The device comprises:
a path obtaining module 1101, configured to obtain each equal cost path from a source user to a destination user in the campus routing network; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user;
a virtual-real port group obtaining module 1102, configured to obtain each virtual-real port group based on each equivalent path; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a corresponding switch communicated to a next switch in each equivalent path; the switch in the same virtual and real port group has the same hop count in each equivalent path;
a virtual port number allocating module 1103, configured to allocate a virtual port number to each switch; the virtual port numbers allocated to the switches corresponding to the same virtual and real port groups are the same, and the virtual port numbers allocated to the switches corresponding to different virtual and real port groups are different;
a table obtaining module 1104, configured to obtain a virtual port list and a virtual port-physical port mapping table corresponding to each switch; the virtual port list comprises the virtual port numbers of the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in the equivalent paths from small to large; the virtual port-physical port mapping table comprises a mapping relation between a virtual port number and a physical port number group;
a list sending module 1105, configured to send the virtual port list to the access switch, so that when the access switch receives a data packet sent by the source user to the destination user, the virtual port list is added to the data packet;
a mapping table sending module 1106, configured to deploy the corresponding virtual port-physical port mapping tables to the switches, respectively, so that when each switch receives the data packet, the data packet is sent to a next switch according to the virtual port list and the corresponding virtual port-physical port mapping tables.
In one possible implementation manner, the virtual port number allocating module includes:
the multiplexing submodule is used for multiplexing the existing virtual port number into the virtual port number which is allocated to the switch in the first virtual-real port group at this time when the existing virtual port number corresponding to the physical port number group in the first virtual-real port group exists; the first virtual-real port group is any one of the virtual-real port groups;
and the allocation submodule is used for allocating a new virtual port number to the switch in the first virtual-real port group when the existing virtual port number does not exist.
In a possible implementation manner, the virtual and real port group obtaining module includes:
a topology map extraction submodule, configured to extract a topology map from the campus routing network based on the equal cost paths; the topology map comprises the switches, interconnection links among the switches and interconnection physical port numbers among the switches;
and the port group acquisition submodule is used for acquiring each virtual and real port group based on the topological graph.
In one possible implementation, the apparatus further includes:
a first virtual port number sending module, configured to send, to a second switch, a virtual port number corresponding to a previous switch in each equivalent path of the second switch when the previous switch exists in each equivalent path of the second switch;
a second virtual port number sending module, configured to send, to a second switch, a virtual port number corresponding to a next switch of the second switch in each equivalent path when the second switch has the next switch in each equivalent path;
wherein the second switch is any one of the switches.
In a possible implementation manner, the path obtaining module is configured to, when receiving a data packet sent by the access switch through a specified channel and sent by the source user to the destination user, perform a step of obtaining each equivalent path from the source user to the destination user in the campus routing network.
In one possible implementation, the virtual port-to-physical port mapping table is added in an ethernet frame of the data packet.
Fig. 12 is a block diagram illustrating a configuration of a routing control apparatus according to an exemplary embodiment. The apparatus may implement all or part of the steps executed by the access switch in the above-mentioned routing control method of the present application. The device comprises:
a data packet receiving module 1201, configured to receive a data packet sent by the source user to a destination user;
a list adding module 1202, configured to add the virtual port list from the source user to the destination user to the data packet;
a data packet sending module 1203, configured to send the data packet to a next switch in the campus routing network according to a virtual port-physical port mapping table corresponding to the access switch;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, virtual and real port groups based on equivalent paths after acquiring the equivalent paths from a source user to a destination user and allocating virtual port numbers to switches; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a next switch which is communicated to each equivalent path by the corresponding switch; the switch in the same virtual and real port group has the same hop count in each equivalent path; the switches corresponding to the same virtual and real port group are allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers; the virtual port list comprises the virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the virtual port-physical port mapping table comprises a mapping relation between a virtual port number and a physical port number group.
In one possible implementation manner, the list adding module includes:
the list query submodule is used for querying the virtual port list through the address of the target user;
and the list adding submodule is used for adding the virtual port list into the data packet if the virtual port list is inquired.
In one possible implementation, the apparatus further includes:
and the data packet forwarding module is used for forwarding the data packet to the root node equipment through a specified channel if the virtual port list is not inquired.
In a possible implementation manner, the data packet sending module includes:
a physical port number determining submodule, configured to determine, when a physical port number group in a virtual port-physical port mapping table corresponding to the access switch includes at least two physical port numbers, a physical port number corresponding to a next switch from the at least two physical port numbers based on a hash value of a flow quintuple corresponding to the data packet;
and the data packet sending submodule is used for sending the data packet to the next switch in the park routing network based on the determined physical port number corresponding to the next switch.
In a possible implementation manner, the list adding module is configured to add the virtual port list and the hash value of the flow five tuple to an ethernet frame of the data packet.
Fig. 13 is a block diagram showing the structure of a route control apparatus according to an exemplary embodiment. The apparatus may implement all or part of the steps executed by the access switch in the above-mentioned routing control method of the present application. The device comprises:
a data packet receiving module 1301, configured to receive a data packet that is forwarded by another switch in the campus routing network and is sent to a target user by a source user;
a list parsing module 1302, configured to parse a virtual port list from the data packet;
a virtual port number obtaining module 1303, configured to obtain a target virtual port number corresponding to the intermediate switch from the virtual port list;
a packet sending module 1304, configured to send the packet to a next switch in the campus routing network based on the target virtual port number and a virtual port-physical port mapping table corresponding to the target virtual port number;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, each virtual and real port group based on each equal cost path after acquiring each equal cost path from the source user to the destination user, and allocating a virtual port number to each switch; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a corresponding switch communicated to a next switch in each equivalent path; the switch in the same virtual and real port group has the same hop count in each equivalent path; the switches corresponding to the same virtual and real port group are allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers; the virtual port list comprises the virtual port numbers of the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in the equivalent paths from small to large; the virtual port-physical port mapping table contains the mapping relation between the virtual port number and the physical port number group.
In a possible implementation manner, the data packet sending module includes:
a physical port number determining submodule, configured to determine, when a physical port number group in a virtual port-physical port mapping table corresponding to the target virtual port number includes at least two physical port numbers, a physical port number corresponding to a next switch from the at least two physical port numbers based on a hash value of a flow quintuple corresponding to the packet;
and the data packet sending submodule is used for sending the data packet to the next switch in the park routing network based on the determined physical port number corresponding to the next switch.
In one possible implementation, the apparatus further includes:
a first virtual port number receiving module, configured to receive a virtual port number that is sent by the root node device and corresponds to a previous switch in each equivalent path of the intermediate switch;
the device further comprises:
a first connectivity check module, configured to check connectivity between the intermediate switch and the previous switch based on a virtual port number corresponding to the previous switch;
a mapping table deleting module, configured to delete the virtual port-physical port mapping table corresponding to the target virtual port number when the intermediate switch is not connected to the previous switch.
In one possible implementation, the apparatus further includes:
and the first fault message sending module is used for sending a first link fault message to the next switch in the campus routing network, wherein the first link fault message is used for triggering the next switch in the campus routing network to check the connectivity with other switches.
In one possible implementation, the apparatus further includes:
a second virtual port number receiving module, configured to receive a virtual port number that is sent by the root node device and corresponds to a next switch in each equivalent path of the intermediate switch;
the device further comprises:
a second connectivity check module, configured to check connectivity between the intermediate switch and the next switch based on a virtual port number corresponding to the next switch;
a physical port number removing module, configured to remove, when the intermediate switch is not connected to the next switch, a physical port number between the intermediate switch and the next switch from a virtual port-physical port mapping table corresponding to the target virtual port number.
In one possible implementation, the apparatus further includes:
and the second fault message sending module is used for sending a second link fault message to a previous switch in the campus routing network, wherein the second link fault message is used for triggering the previous switch in the campus routing network to check the connectivity with other switches.
It is understood that a computer device (e.g., a switch, including a core switch, an aggregation switch, an access switch) includes corresponding hardware structures and/or software modules (or units) for performing the respective functions in order to implement the above-described functions. The elements and algorithm steps of each example described in connection with the embodiments disclosed herein may be embodied as hardware or in a combination of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the subject matter of the embodiments of the present application.
In the embodiment of the present application, a computer device (for example, a switch) may be divided into functional units according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit. It should be noted that, in the embodiment of the present application, the division of the unit is schematic, and is only one logic function division, and when the actual implementation is realized, another division manner may be provided.
In the case of an integrated unit, fig. 14 shows a schematic view of a possible structure of the electronic device involved in the above-described embodiment. The electronic device 1400 includes: a processing unit 1402 and a communication unit 1403. The processing unit 1402 is used for controlling and managing actions of the electronic device 1400. The electronic device 1400 may also include a memory unit 1421 for storing program codes and data for the electronic device 1400.
The Processing Unit 1402 may be a Processor or a controller, such as a Central Processing Unit (CPU), a general-purpose Processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, and the like. The communication unit 1403 may be a communication interface, a transceiver circuit, etc., wherein the communication interface is a generic term and may comprise one or more interfaces, such as an interface between a routing device and a computing node device. The storage unit 1421 may be a memory.
When the processing unit 1402 is a processor, the communication unit 1403 is a communication interface, and the storage unit 1421 is a memory, the electronic device according to the embodiment of the present application may be a computer device shown in fig. 15.
Referring to fig. 14, the computer device 1510 comprises: processor 1512, communication interface 1513, memory 1513. Optionally, computer device 1510 may also include a bus 1514. Wherein, the communication interface 1513, the processor 1512, and the memory 1513 may be connected to each other by a bus 1514; the bus 1514 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 1514 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 14, but this is not intended to represent only one bus or type of bus.
The electronic/computer device shown in fig. 14 or fig. 15 described above may be a switch.
For example, a processor in the computer device may execute the processing steps executed by the root node device in the above method embodiments, including the above steps 301, 302, 303, and 304; the transceiver in the computer device may perform the transceiving steps performed by the root node device in the above method embodiments, including the above steps 305 and 307.
Alternatively, the processor in the computer device may execute the processing steps executed by the access switch, including the step 602, in the above-described method embodiments; the transceiver in the computer device may perform the transceiving steps performed by the access switch in the above method embodiments, including the above steps 601 and 603.
Or, a processor in the computer device may execute the processing steps executed by the intermediate switch in the above method embodiments, including the above steps 702 and 703; the transceiver in the computer device may perform the transceiving steps performed by the intermediate switch, including the above steps 701 and 704, in the above-described various method embodiments.
The steps of a method or algorithm described in connection with the disclosure of the embodiments disclosed herein may be embodied in hardware or may be embodied in software instructions executed by a processor. The software instructions may be comprised of corresponding software modules (or units) that may be stored in Random Access Memory (RAM), flash Memory, read Only Memory (ROM), erasable Programmable Read Only Memory (EPROM), electrically Erasable Programmable Read Only Memory (EEPROM), registers, a hard disk, a removable disk, a compact disc Read Only Memory (CD-ROM), or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC. Additionally, the ASIC may reside in an electronic device. Of course, the processor and the storage medium may reside as discrete components in an electronic device.
The present application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the routing control method.
Those skilled in the art will recognize that the functionality described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof, in one or more of the examples described above. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the embodiments of the present application in further detail, and it should be understood that the above-mentioned embodiments are only specific embodiments of the present application, and are not intended to limit the scope of the embodiments of the present application, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the embodiments of the present application should be included in the scope of the embodiments of the present application.

Claims (24)

1. A routing control method performed by a root node device in a campus routing network, the method comprising:
acquiring each equivalent path from a source user to a destination user in the campus routing network; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user;
acquiring each virtual and real port group based on each equivalent path; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a next switch which is communicated to each equivalent path by the corresponding switch; the switch in the same virtual and real port group has the same hop count in each equivalent path;
allocating virtual port numbers to the switches; the virtual port numbers allocated to the switches corresponding to the same virtual and real port groups are the same, and the virtual port numbers allocated to the switches corresponding to different virtual and real port groups are different;
obtaining a virtual port list and a virtual port-physical port mapping table corresponding to each switch; the virtual port list comprises the virtual port numbers of the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in the equivalent paths from small to large; the virtual port-physical port mapping table comprises a mapping relation between a virtual port number and a physical port number group;
sending the virtual port list to the access switch so that the access switch adds the virtual port list to a data packet when receiving the data packet sent to the destination user by the source user;
and deploying the corresponding virtual port-physical port mapping table to each switch respectively, so that when each switch receives the data packet, the data packet is sent to the next switch according to the virtual port list and the corresponding virtual port-physical port mapping table.
2. The method of claim 1, wherein assigning a virtual port number to each switch comprises:
when an existing virtual port number corresponding to a physical port number group in a first virtual-real port group exists, multiplexing the existing virtual port number as a virtual port number which is allocated to a switch in the first virtual-real port group at this time; the first virtual and real port group is any one of the virtual and real port groups;
and when the existing virtual port number does not exist, allocating a new virtual port number to the switch in the first virtual and real port group.
3. The method of claim 1, wherein obtaining each virtual-real port group based on each equal cost path comprises:
extracting a topological graph from the campus routing network based on the equivalent paths; the topology map comprises the switches, interconnection links among the switches and interconnection physical port numbers among the switches;
and acquiring each virtual and real port group based on the topological graph.
4. The method of claim 1, further comprising:
when a second switch has a previous switch in each equivalent path, sending a virtual port number corresponding to the previous switch of the second switch in each equivalent path to the second switch;
when a second switch has a next switch in each equivalent path, sending a virtual port number corresponding to the next switch of the second switch in each equivalent path to the second switch;
wherein the second switch is any one of the switches.
5. The method of claim 1, wherein obtaining equivalent paths from a source subscriber to a destination subscriber in the campus routing network comprises:
and when receiving a data packet which is sent to the destination user by the source user and is sent by the access switch through a specified channel, executing a step of acquiring each equivalent path from the source user to the destination user in the campus routing network.
6. The method according to any of claims 1 to 5, wherein the virtual port-to-physical port mapping table is added in an Ethernet frame of the packet.
7. A routing control method performed by an access switch of a corresponding source subscriber in a campus routing network, the method comprising:
receiving a data packet sent to a destination user by the source user;
adding a virtual port list from the source user to the destination user to the data packet;
sending the data packet to a next switch in the campus routing network according to a virtual port-physical port mapping table corresponding to the access switch;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, each virtual and real port group based on each equal cost path after acquiring each equal cost path from the source user to the destination user, and allocating a virtual port number to each switch; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a next switch which is communicated to each equivalent path by the corresponding switch; the switch in the same virtual and real port group has the same hop count in each equivalent path; the switches corresponding to the same virtual and real port group are allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers; the virtual port list comprises the virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the virtual port-physical port mapping table contains the mapping relation between the virtual port number and the physical port number group.
8. The method of claim 7, wherein adding the list of virtual ports from the source user to the destination user to the packet comprises:
inquiring the virtual port list through the address of the destination user;
and if the virtual port list is inquired, adding the virtual port list to the data packet.
9. The method of claim 8, further comprising:
and if the virtual port list is not inquired, forwarding the data packet to the root node equipment through a specified channel.
10. The method of claim 7, wherein sending the packet to a next switch in the campus routing network according to the virtual port-to-physical port mapping table corresponding to the access switch comprises:
when a physical port number group in a virtual port-physical port mapping table corresponding to the access switch comprises at least two physical port numbers, determining a physical port number corresponding to a next switch from the at least two physical port numbers based on a hash value of a flow quintuple corresponding to the data packet;
and sending the data packet to the next switch in the campus routing network based on the determined physical port number corresponding to the next switch.
11. The method according to any one of claims 7 to 10, wherein adding the list of virtual ports from the source user to the destination user to the data packet comprises:
and adding the virtual port list and the hash value of the flow five-tuple to an Ethernet frame of the data packet.
12. A routing control method performed by an intermediate switch in a campus routing network, the method comprising:
receiving data packets which are forwarded by other switches in the campus routing network and are sent to a target user by a source user;
parsing a virtual port list from the data packet;
acquiring a target virtual port number corresponding to the intermediate switch from the virtual port list;
sending the data packet to a next switch in the campus routing network based on the target virtual port number and a virtual port-physical port mapping table corresponding to the target virtual port number;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, each virtual and real port group based on each equal cost path after acquiring each equal cost path from the source user to the destination user, and allocating a virtual port number to each switch; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a next switch which is communicated to each equivalent path by the corresponding switch; the switch in the same virtual and real port group has the same hop count in each equivalent path; the switches corresponding to the same virtual and real port group are allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers; the virtual port list comprises the virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the virtual port-physical port mapping table contains the mapping relation between the virtual port number and the physical port number group.
13. The method of claim 12, wherein sending the packet to a next switch in the campus routing network based on the virtual port number and a virtual port-to-physical port mapping table corresponding to the target virtual port number comprises:
when a physical port number group in a virtual port-physical port mapping table corresponding to the target virtual port number comprises at least two physical port numbers, determining a physical port number corresponding to a next switch from the at least two physical port numbers based on a hash value of a flow quintuple corresponding to the data packet;
and sending the data packet to the next switch in the campus routing network based on the determined physical port number corresponding to the next switch.
14. The method of claim 12, wherein prior to parsing the virtual port list from the packet, further comprising:
receiving a virtual port number which is sent by the root node device and corresponds to a previous switch in each equivalent path of the intermediate switch;
the method further comprises the following steps:
checking connectivity between the intermediate switch and the previous switch based on the virtual port number corresponding to the previous switch;
and when the intermediate switch is not communicated with the previous switch, deleting the virtual port-physical port mapping table corresponding to the target virtual port number.
15. The method of claim 14, further comprising:
and sending a first link failure message to a next switch in the campus routing network, wherein the first link failure message is used for triggering the next switch in the campus routing network to check the connectivity with other switches.
16. The method of claim 12, wherein prior to parsing the virtual port list from the packet, further comprising:
receiving a virtual port number which is sent by the root node equipment and corresponds to a next switch in each equivalent path of the intermediate switch;
the method further comprises the following steps:
checking connectivity between the intermediate switch and the next switch based on the virtual port number corresponding to the next switch;
when the intermediate switch is not communicated with the next switch, removing the physical port number between the intermediate switch and the next switch from the virtual port-physical port mapping table corresponding to the target virtual port number.
17. The method of claim 16, further comprising:
and sending a second link failure message to a previous switch in the campus routing network, wherein the second link failure message is used for triggering the previous switch in the campus routing network to check the connectivity with other switches.
18. A routing control apparatus, for use in a root node device in a campus routing network, the apparatus comprising:
a path acquisition module, configured to acquire equivalent paths from a source user to a destination user in the campus routing network; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user;
a virtual and real port group obtaining module, configured to obtain each virtual and real port group based on each equivalent path; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a next switch which is communicated to each equivalent path by the corresponding switch; the switch in the same virtual and real port group has the same hop count in each equivalent path;
a virtual port number allocation module, configured to allocate a virtual port number to each switch; the switches corresponding to the same virtual and real port group are allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers;
a table obtaining module, configured to obtain a virtual port list and a virtual port-physical port mapping table corresponding to each switch; the virtual port list comprises the virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the virtual port-physical port mapping table comprises a mapping relation between a virtual port number and a physical port number group;
a list sending module, configured to send the virtual port list to the access switch, so that when the access switch receives a data packet sent by the source user to the destination user, the virtual port list is added to the data packet;
a mapping table sending module, configured to deploy the corresponding virtual port-physical port mapping tables to the switches, respectively, so that when each switch receives the data packet, the data packet is sent to a next switch according to the virtual port list and the corresponding virtual port-physical port mapping tables.
19. A routing control apparatus for an access switch of a corresponding source subscriber in a campus routing network, the apparatus comprising:
the data packet receiving module is used for receiving the data packet sent to the destination user by the source user;
the list adding module is used for adding the virtual port list from the source user to the destination user into the data packet;
a data packet sending module, configured to send the data packet to a next switch in the campus routing network according to a virtual port-physical port mapping table corresponding to the access switch;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, virtual and real port groups based on equivalent paths after acquiring the equivalent paths from a source user to a destination user and allocating virtual port numbers to switches; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a corresponding switch communicated to a next switch in each equivalent path; the switch in the same virtual and real port group has the same hop count in each equivalent path; the switches corresponding to the same virtual and real port group are allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers; the virtual port list comprises the virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the virtual port-physical port mapping table contains the mapping relation between the virtual port number and the physical port number group.
20. A routing control apparatus for an intermediate switch in a campus routing network, the apparatus comprising:
a data packet receiving module, configured to receive a data packet that is forwarded by another switch in the campus routing network and is sent to a target user by a source user;
the list analyzing module is used for analyzing a virtual port list from the data packet;
a virtual port number obtaining module, configured to obtain a target virtual port number corresponding to the intermediate switch from the virtual port list;
a packet sending module, configured to send the packet to a next switch in the campus routing network based on the target virtual port number and a virtual port-physical port mapping table corresponding to the target virtual port number;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, each virtual and real port group based on each equal cost path after acquiring each equal cost path from the source user to the destination user, and allocating a virtual port number to each switch; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a corresponding switch communicated to a next switch in each equivalent path; the switch in the same virtual and real port group has the same hop count in each equivalent path; the switches corresponding to the same virtual and real port group are allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers; the virtual port list comprises the virtual port numbers of the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in the equivalent paths from small to large; the virtual port-physical port mapping table contains the mapping relation between the virtual port number and the physical port number group.
21. A computer device, wherein the computer device is a root node device in a campus routing network, the computer device comprising a processor, a memory, and a transceiver;
the processor is used for acquiring each equivalent path from a source user to a destination user in the campus routing network; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user;
the processor is further configured to obtain each virtual and real port group based on each equal cost path; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a next switch which is communicated to each equivalent path by the corresponding switch; the switch in the same virtual and real port group has the same hop count in each equivalent path;
the processor is further configured to allocate a virtual port number to each switch; the virtual port numbers allocated to the switches corresponding to the same virtual and real port groups are the same, and the virtual port numbers allocated to the switches corresponding to different virtual and real port groups are different;
the processor is further configured to obtain a virtual port list and a virtual port-physical port mapping table corresponding to each switch; the virtual port list comprises the virtual port numbers of the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in the equivalent paths from small to large; the virtual port-physical port mapping table comprises a mapping relation between a virtual port number and a physical port number group;
the transceiver is configured to send the virtual port list to the access switch, so that when the access switch receives a data packet sent by the source user to the destination user, the virtual port list is added to the data packet;
the transceiver is further configured to deploy the corresponding virtual port-physical port mapping tables to the switches, so that when each switch receives the data packet, the data packet is sent to a next switch according to the virtual port list and the corresponding virtual port-physical port mapping tables.
22. A computer device, wherein the computer device is an access switch of a corresponding source user in a campus routing network, the computer device comprises a processor, a memory and a transceiver;
the transceiver is used for receiving a data packet sent to a destination user by the source user;
the processor is used for adding a virtual port list from the source user to the destination user to the data packet;
the transceiver is further configured to send the data packet to a next switch in the campus routing network according to a virtual port-physical port mapping table corresponding to the access switch;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, each virtual and real port group based on each equal cost path after acquiring each equal cost path from the source user to the destination user, and allocating a virtual port number to each switch; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a corresponding switch communicated to a next switch in each equivalent path; the switch in the same virtual and real port group has the same hop count in each equivalent path; the virtual port numbers allocated to the switches corresponding to the same virtual and real port groups are the same, and the virtual port numbers allocated to the switches corresponding to different virtual and real port groups are different; the virtual port list comprises the virtual port numbers of the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in the equivalent paths from small to large; the virtual port-physical port mapping table contains the mapping relation between the virtual port number and the physical port number group.
23. A computer device, wherein the computer device is an intermediate switch in a campus routing network, the computer device comprising a processor, a memory, and a transceiver;
the transceiver is used for receiving data packets which are forwarded by other switches in the park routing network and are sent to a target user by a source user;
the processor is used for analyzing a virtual port list from the data packet;
the processor is further configured to obtain a target virtual port number corresponding to the intermediate switch from the virtual port list;
the transceiver is further configured to send the data packet to a next switch in the campus routing network according to a virtual port-physical port mapping table corresponding to the access switch;
the virtual port list and the virtual port-physical port mapping table are obtained by acquiring, by a root node device, virtual and real port groups based on equivalent paths after acquiring the equivalent paths from a source user to a destination user and allocating virtual port numbers to switches; the equivalent path comprises an access switch of the source user and other switches between the access switch and a destination switch; the destination switch is a switch connected with the destination user; each virtual and real port group comprises a physical port number group of each switch in each equivalent path; the physical port number group comprises a physical port number of a next switch which is communicated to each equivalent path by the corresponding switch; the switch in the same virtual and real port group has the same hop count in each equivalent path; the switches corresponding to the same virtual and real port group are allocated with the same virtual port number, and the switches corresponding to different virtual and real port groups are allocated with different virtual port numbers; the virtual port list comprises the virtual port numbers of all the switches, and the virtual port numbers in the virtual port list are arranged according to the sequence of hop counts in all the equal cost paths from small to large; the virtual port-physical port mapping table comprises a mapping relation between a virtual port number and a physical port number group.
24. A computer-readable storage medium, in which a computer program is stored, the computer program being adapted to be executed by a processor to implement a routing control method according to any one of claims 1 to 17.
CN202110586124.2A 2021-05-27 2021-05-27 Route control method, device, computer equipment and storage medium Pending CN115412475A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110586124.2A CN115412475A (en) 2021-05-27 2021-05-27 Route control method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110586124.2A CN115412475A (en) 2021-05-27 2021-05-27 Route control method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115412475A true CN115412475A (en) 2022-11-29

Family

ID=84156151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110586124.2A Pending CN115412475A (en) 2021-05-27 2021-05-27 Route control method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115412475A (en)

Similar Documents

Publication Publication Date Title
US11570285B2 (en) Packet processing method, network node, and system
CN110636001B (en) Method for sending network performance parameters and calculating network performance and network node
CN109246017B (en) Method and device for inquiring multicast forwarding path
US8576721B1 (en) Local forwarding bias in a multi-chassis router
US8117301B2 (en) Determining connectivity status for unnumbered interfaces of a target network device
CN107171883B (en) Method, device and equipment for detecting forwarding table
EP2595349A2 (en) Routing scheme based on virtual space representation
US20070171844A1 (en) Determining network paths
US8948049B2 (en) Method and systems for determining path of a virtual connection through a network
CN115552861B (en) Method for generating forwarding table item, method for sending message, network equipment and system
WO2010045794A1 (en) Method for obtaining link aggregation group information, and node and system thereof
CN113497754B (en) Forwarding path establishing method and device and computer readable storage medium
CN111404822B (en) Data transmission method, device, equipment and computer readable storage medium
CN105591974A (en) Message processing method, device and system
US20220255857A1 (en) Packet Processing Method, Network Node, and System
US7782790B1 (en) Extensions to the path verification protocol to support link bundling constructs
JP7430224B2 (en) Packet processing methods and gateway devices
CN101674229B (en) Information management method of link aggregation group and network node
US20120051364A1 (en) Distributed routing according to longest match principle
CN108881064B (en) Message information acquisition method and message information transmission method
CN109412851B (en) Link layer path detection method, device and system
CN115412475A (en) Route control method, device, computer equipment and storage medium
US11784919B2 (en) Method for sending BIERv6 packet and first network device
CN111884827B (en) Method for synchronizing topological information in SFC network and routing network element
CN111600798B (en) Method and equipment for sending and obtaining assertion message

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination