CN108600109B - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN108600109B
CN108600109B CN201810224008.4A CN201810224008A CN108600109B CN 108600109 B CN108600109 B CN 108600109B CN 201810224008 A CN201810224008 A CN 201810224008A CN 108600109 B CN108600109 B CN 108600109B
Authority
CN
China
Prior art keywords
edge device
forwarding table
message
table entry
route
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.)
Active
Application number
CN201810224008.4A
Other languages
Chinese (zh)
Other versions
CN108600109A (en
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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201810224008.4A priority Critical patent/CN108600109B/en
Publication of CN108600109A publication Critical patent/CN108600109A/en
Application granted granted Critical
Publication of CN108600109B publication Critical patent/CN108600109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/74Address processing for 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/02Topology update or discovery

Landscapes

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

Abstract

The application provides a message forwarding method and a device, and the method comprises the following steps: receiving a first route notification message sent by the second edge device, where the first route notification message carries address information and ESI of the host; if the ESI is the same as the ESI configured by the first edge device for the host, generating a first static forwarding table entry according to the address information; receiving a first route revocation message sent by a second edge device, wherein the first route revocation message carries address information of the host, and determining a first static forwarding table entry corresponding to the address information; if a message matched with a first static forwarding table item is received in a preset time window, and ESI carried by a first route revocation message is the same as ESI configured for the host by a first edge device, the first static forwarding table item is adjusted to be a first dynamic forwarding table item, and the message is forwarded according to the first dynamic forwarding table item. Through the technical scheme, the reliability is improved, and the safety is improved.

Description

Message forwarding method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for forwarding a packet.
Background
An EVPN (Ethernet Virtual Private Network) is a two-layer VPN (Virtual Private Network) technology, where a control plane uses MP-BGP (Multi Protocol-Border Gateway Protocol) to announce routing information, and a data plane uses VXLAN (Virtual eXtensible Local Area Network) encapsulation to forward a packet. VXLAN is a two-layer VPN technology based on an IP network and adopting a "MAC (Media Access Control) in UDP (User Datagram Protocol)" encapsulation form, and VXLAN may provide two-layer interconnection for distributed sites and may provide service isolation for different tenants based on an existing service provider or an existing enterprise IP network.
In the EVPN network, in order to improve reliability, a multi-homing access networking may be adopted, that is, a host accesses a plurality of VTEP (VXLAN Tunnel End Point) devices through a switch, assuming access to VTEP1 and VTEP 2. Under the networking, after the host computer is online, a gratuitous Address Resolution Protocol (ARP) message is sent, and if the switch forwards the gratuitous ARP message to the VTEP1, the VTEP1 generates a forwarding table entry 1, and the outgoing interface points to the host computer. Furthermore, VTEP1 synchronizes address information to VTEP2 through a route advertisement message, VTEP2 generates a forwarding table entry 2, and the outgoing interface points to the host.
However, when forwarding table entry 1 generated by VTEP1 is aged, a route withdrawal message is sent to VTEP2, so that VTEP2 withdraws forwarding table entry 2. Then, if VTEP2 receives a data packet destined for the host, the data packet cannot be correctly transmitted because there is no forwarding table entry matching the data packet.
Disclosure of Invention
The application provides a message forwarding method, a first edge device and a second edge device are used for providing multi-homing access service for a host, the method is applied to the first edge device, and the method comprises the following steps:
receiving a first route notification message sent by the second edge device, where the first route notification message carries address information of the host and an ethernet segment identifier ESI; if the ESI is the same as the ESI configured by the first edge device for the host, generating a first static forwarding table entry according to the address information;
receiving a first route revocation message sent by the second edge device, wherein the first route revocation message carries address information of the host, and determining a first static forwarding table entry corresponding to the address information;
if a message matched with the first static forwarding table entry is received in a preset time window, and the ESI carried by the first route cancellation message is the same as the ESI configured by the first edge device for the host, the first static forwarding table entry is adjusted to be a first dynamic forwarding table entry, and the message is forwarded according to the first dynamic forwarding table entry.
The application provides a message forwarding apparatus, first edge device and second edge device are used for providing multi-homing access service for the host computer, the apparatus is applied to first edge device, the apparatus includes:
a receiving module, configured to receive a first route advertisement message sent by the second edge device; wherein, the first route notification message carries the address information of the host and the Ethernet segment identification ESI;
a generating module, configured to generate a first static forwarding table entry according to the address information when the ESI is the same as the ESI configured by the first edge device for the host;
the receiving module is further configured to receive a first route withdrawal message sent by the second edge device; wherein the first route revocation message carries address information of the host;
a determining module, configured to determine a first static forwarding entry corresponding to the address information;
a processing module, configured to adjust the first static forwarding entry to a first dynamic forwarding entry when a message matching the first static forwarding entry is received within a preset time window and an ESI carried in the first route cancellation message is the same as an ESI configured by the first edge device for the host;
and the sending module is used for forwarding the message according to the first dynamic forwarding table entry.
As can be seen from the above technical solutions, in the embodiments of the present application, after receiving a route advertisement message sent by a second edge device, a first edge device may generate a static forwarding table entry according to address information of a host; after receiving the route revocation message sent by the second edge device, if the first edge device receives the message matched with the static forwarding table item within the preset time window, the first edge device does not directly delete the static forwarding table item, but adjusts the static forwarding table item into a dynamic forwarding table item, and forwards the message according to the dynamic forwarding table item, that is, after receiving the message which is targeted to the host, the first edge device locally has the dynamic forwarding table item matched with the message, and correctly transmits the message according to the dynamic forwarding table item, so that the reliability and the safety are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present application;
fig. 2 is a flowchart of a message forwarding method according to an embodiment of the present application;
fig. 3 is a block diagram of a message forwarding apparatus according to an embodiment of the present application;
fig. 4 is a hardware configuration diagram of an edge device according to an embodiment of the present application.
Detailed Description
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The embodiment of the application provides a message forwarding method, which can be applied to an EVPN network adopting a multi-homing access networking. In an EVPN network, in order to improve reliability, a multi-homing access service may be provided to hosts (e.g., VMs (Virtual machines), physical servers, etc.) through at least two edge devices (e.g., VTEP devices, etc.). Referring to fig. 1, a schematic view of an application scenario of the embodiment of the present application is shown, taking an example that two edge devices provide a multi-homed access service for a host, in an actual application, more edge devices may also provide a multi-homed access service for a host, which is not limited to this.
Referring to fig. 1, the edge device 131 and the edge device 132 are configured to provide a multi-home access service for the host 111, and a link between the edge device 131 and the host 111 and a link between the edge device 132 and the host 111 may be referred to as an ES (Ethernet Segment), and the ES may be identified by an ESI (Ethernet Segment Identifier). The link between the edge device 131 and the host 111 and the link between the edge device 132 and the host 111 correspond to the same ESI, and it is assumed that the ESI of the link between the edge device 131 and the host 111 is 1 and the ESI of the link between the edge device 132 and the host 111 is 1.
Referring to fig. 1, VXLAN services and AC (access Circuit) 1311 may be configured on edge device 131 and VXLAN services and AC1321 may be configured on edge device 132.
The VXLAN service configured on the edge device 131 may include: the VSI (Virtual Switch Instance) is vpnb and VXLAN identifies VXLAN 100. Further, the VXLAN services configured on edge device 132 are the same as the VXLAN services on edge device 131.
Among them, the AC1311 configured on the edge device 131 may include: the physical port is ten1/0/1, the service instance is 10, the VSI is vpnb, the significance of this AC1311 is: if the VLAN carried in the data packet entering from the physical port ten1/0/1 is tag 10, the data packet will enter vpnb for forwarding, and since the VXLAN identifier corresponding to vpnb is VXLAN 100, the mapping from VLAN tag 10 to VXLAN 100 can be completed. Further, AC1321 configured on edge device 132 may be the same as AC 1311.
Wherein, the AC1311 further includes ESI 1, which means that the link corresponding to the AC1311 is a link whose ESI is 1, that is, a link between the edge device 131 and the host 111. In addition, the AC1321 also includes ESI 1, meaning that the link to which the AC1321 corresponds is an ESI-1 link, i.e., a link between the edge device 132 and the host 111.
Referring to fig. 1, VXLAN tunnel a is also established between edge device 133 and edge device 131, and VXLAN tunnel B is also established between edge device 133 and edge device 132. Here, the establishing manner of the VXLAN tunnel a and the VXLAN tunnel B is not described in this embodiment again.
In the application scenario, the message forwarding method in the embodiment of the present application may include the following steps:
in step 311, after the host 111 is online, a gratuitous ARP message may be sent, where the gratuitous ARP message may carry address information of the host 111, such as the IP address 111 and the MAC address 111 of the host 111.
In step 312, the switch 121 sends the gratuitous ARP message to the edge device 131 or the edge device 132 after receiving the gratuitous ARP message, and then sends the gratuitous ARP message to the edge device 131 as an example.
The switch 121 may select one edge device from the edge devices 131 and 132, for example, randomly select or select by using a hash algorithm, and the selection method is not limited. Assuming edge device 131 is selected, switch 121 may send the gratuitous ARP message to edge device 131.
In step 313, after receiving the gratuitous ARP message, the edge device 131 may parse the address information of the host 111 from the gratuitous ARP message and generate a dynamic forwarding table according to the address information.
In an example, the forwarding table entry in the embodiment of the present application may be classified into a dynamic forwarding table entry and a static forwarding table entry, and both the dynamic forwarding table entry and the static forwarding table entry may be ARP forwarding table entries or MAC forwarding table entries. However, the dynamic forwarding entry and the static forwarding entry may be different in that: the dynamic forwarding entry includes an aging timer, and thus the dynamic forwarding entry may be deleted due to aging, while the static forwarding entry does not include an aging timer, and thus the static forwarding entry is not deleted due to aging.
In this step, it is assumed that the gratuitous ARP message is received through the AC1311, and the IP address 111 and the MAC address 111 of the host 111 are resolved from the gratuitous ARP message, so that the dynamic forwarding table entry shown in table 1 may be generated. Of course, table 1 is only an example, and other contents may be included, which is not limited thereto.
TABLE 1
IP address MAC address Outlet interface Aging timer
IP address 111 MAC address 111 AC1311 50 milliseconds
In step 314, edge device 131 sends a route advertisement message (e.g., BGP route advertisement message) to edge device 132 and edge device 133, where the route advertisement message may carry IP address 111 and MAC address 111 of host 111, and the route advertisement message may also carry ESI 1 corresponding to AC 1311.
In step 315, after receiving the route advertisement message, edge device 132 may parse the address information of host 111 from the route advertisement message, and generate a static forwarding table according to the address information.
In one example, the edge device 132 generates a static forwarding table entry according to the address information, which may include: if the route advertisement message carries ESI, and the ESI carried by the route advertisement message is the same as the ESI configured by the edge device 132 for the host 111, a static forwarding table entry may be generated according to the address information, and an output interface of the static forwarding table entry is an AC corresponding to the ESI. In addition, if the route advertisement message does not carry ESI, or the ESI carried by the route advertisement message is different from the ESI configured by the edge device 132 for the host 111, a dynamic forwarding table entry may be generated according to the address information, and an outgoing interface of the dynamic forwarding table entry may be a VXLAN tunnel between the edge device 132 and the edge device 131, which is not described in detail again.
In this step, it is assumed that the edge device 132 parses the IP address 111 and the MAC address 111 of the host 111 from the route advertisement message, and parses ESI 1 from the route advertisement message, because ESI configured for the host 111 by the edge device 132 is also ESI 1, the edge device 132 may generate the static forwarding table entry shown in table 2. Of course, table 2 is only an example, and other contents may be included, which is not limited thereto. As can be seen from table 2, the outgoing interface of the static forwarding table entry may be AC1321 corresponding to ESI 1.
TABLE 2
IP address MAC address Outlet interface
IP address 111 MAC address 111 AC1321
In step 316, after receiving the route advertisement message, the edge device 133 may parse the address information of the host 111 from the route advertisement message, and generate a host forwarding table according to the address information.
The host forwarding table entry may be a dynamic forwarding table entry or a static forwarding table entry, which is not limited to this, and for convenience of description, the host forwarding table entry is taken as an example in the following.
After receiving the route advertisement message, the edge device 133 may further analyze ESI 1 from the route advertisement message, because the edge device 131 and the edge device 132 are both next hops corresponding to ESI 1, when the edge device 133 generates a host forwarding table entry according to the address information, an equivalent table entry is formed, and the egress interfaces are the VXLAN tunnel a between the edge device 133 and the edge device 131, and the VXLAN tunnel B between the edge device 133 and the edge device 132, respectively. Referring to table 3, an example of a host forwarding table entry is shown, and of course, table 3 is only an example, and may include other contents, which is not limited in this respect.
TABLE 3
Figure BDA0001600770380000061
Figure BDA0001600770380000071
In step 317, when the host 112 sends a data packet to the host 111, the edge device 133 receives the data packet, and uses the destination address (such as the destination IP address and/or the destination MAC address) of the data packet to query the host forwarding table entry shown in table 3, so as to obtain the egress interfaces of VXLAN tunnel a and VXLAN tunnel B.
In step 318, the edge device 133 selects a VXLAN tunnel from VXLAN tunnel a and VXLAN tunnel B, for example VXLAN tunnel B, and sends the data packet through VXLAN tunnel B.
The edge device 133 may select one VXLAN tunnel from the VXLAN tunnel a and the VXLAN tunnel B by using a random algorithm or a hash algorithm, and the selection method is not limited, and if the VXLAN tunnel B is selected, the data packet is sent to the edge device 132 through the VXLAN tunnel B.
In step 319, after receiving the data packet, the edge device 132 uses the destination address of the data packet to query the static forwarding table entry shown in table 2, to obtain that the output interface is AC1321, and sends the data packet to the host 111 through AC 1321. To this end, the data packet of the host 112 is successfully sent to the host 111.
When the edge device 133 sends the data packet, it may also encapsulate the VXLAN tunnel header for the data packet, and send the data packet encapsulated with the VXLAN tunnel header to the edge device 132. After receiving the data packet encapsulated with the VXLAN tunnel header, the edge device 132 decapsulates the VXLAN tunnel header, and queries the static forwarding table entry shown in table 2 by using the destination address of the decapsulated data packet.
In the above process, the data packet sent by the host 112 to the host 111 is sent to the host 111 through the edge device 132, and is not sent to the host 111 through the edge device 131, so the dynamic forwarding table entry (see table 1) generated by the edge device 131 is deleted due to aging. After the dynamic forwarding table entry shown in table 1 is deleted by the edge device 131, the method for forwarding a packet may further include:
in step 320, edge device 131 sends a route withdraw message (e.g., BGP route withdraw message) to edge device 132 and edge device 133, respectively, where the route withdraw message may carry IP address 111 and MAC address 111 of host 111, and the route withdraw message may also carry ESI 1 corresponding to AC 1311.
In step 321, after receiving the route withdraw message, the edge device 132 may parse the address information of the host 111 from the route withdraw message, and determine a static forwarding table entry corresponding to the address information.
In step 322, if the edge device 132 receives the message matching the static forwarding table entry within a preset time (which may be configured according to experience), the static forwarding table entry may be adjusted to a dynamic forwarding table entry, and the message is forwarded according to the dynamic forwarding table entry. In addition, if the edge device 132 does not receive the packet matching the static forwarding entry within the preset time window, the static forwarding entry may be deleted.
In one example, adjusting the static forwarding entry to a dynamic forwarding entry may include: if the route withdrawal message carries the ESI, and the ESI carried by the route withdrawal message is the same as the ESI configured by the edge device 132 for the host 111, the static forwarding table entry may be adjusted to be a dynamic forwarding table entry, and an output interface of the dynamic forwarding table entry is an AC corresponding to the ESI. In addition, if the route withdrawal message does not carry the ESI, or the ESI carried by the route withdrawal message is different from the ESI configured by the edge device 132 for the host 111, the static forwarding table entry is rejected from being adjusted to the dynamic forwarding table entry, and the static forwarding table entry is deleted.
In this step, it is assumed that the edge device 132 parses the IP address 111 and the MAC address 111 of the host 111 from the route withdrawal message and parses the ESI 1 from the route withdrawal message, because the ESI configured by the edge device 132 for the host 111 is also ESI 1, the edge device 132 may determine a static forwarding table entry corresponding to the IP address 111 and the MAC address 111, as shown in table 2, and adjust the static forwarding table entry to a dynamic forwarding table entry, as shown in table 4. Of course, table 4 is only an example, and other contents may be included, which is not limited thereto. As can be seen from table 4, the outgoing interface of the dynamic forwarding table entry may be AC1321 corresponding to ESI 1. In addition, the dynamic forwarding table entry may include an aging timer, and an aging time of the aging timer may be configured empirically, for example, 50 milliseconds, and the aging time is not limited.
TABLE 4
IP address MAC address Outlet interface Aging timer
IP address 111 MAC address 111 AC1321 50 milliseconds
Comparing table 4 and table 2, it can be seen that the dynamic forwarding table entry has more aging timers than the static forwarding table entry. In summary, the process of adjusting the static forwarding table entry to the dynamic forwarding table entry may include: deleting the static forwarding table entry, and generating a dynamic forwarding table entry according to address information (such as an IP address and an MAC address of the host 111) carried by the route revocation message, where the dynamic forwarding table entry may include an aging timer; or, adding an aging timer in the static forwarding table entry to obtain a dynamic forwarding table entry.
In the above embodiment, after receiving the route revocation message, if the edge device 132 receives the message matching with the static forwarding table entry within the preset time window, the static forwarding table entry is adjusted to the dynamic forwarding table entry instead of deleting the static forwarding table entry, which can avoid error processing of the data message.
For example, after the edge device 132 receives the route withdraw message, if the static forwarding table entry is directly deleted, the data packet sent to the host 111 by the host 112 is discarded or the data packet is broadcasted because the edge device 132 does not have a static forwarding table entry matching the data packet, if the edge device 133 sends the data packet to the edge device 132. For the scheme of discarding the data packet, the data packet is lost, and the user experience is affected. In the scheme of broadcasting the data message, the data message is broadcasted to a plurality of hosts, so that the security cannot be guaranteed, and a large amount of bandwidth is consumed.
Different from the foregoing manner, in this embodiment, after receiving the route revocation message, if the edge device 132 adjusts the static forwarding table to the dynamic forwarding table, the data packet sent to the host 111 by the host 112 is directed to the data packet sent to the host 111 by the edge device 132, and if the edge device 133 sends the data packet to the edge device 132, because the edge device 132 has the dynamic forwarding table matched with the data packet, the data packet is forwarded according to the dynamic forwarding table, so as to forward the data packet to the host 111.
In step 323, after the edge device 132 adjusts the static forwarding table entry to the dynamic forwarding table entry, a route advertisement message is sent to the edge device 131 and the edge device 133, where the route advertisement message may carry the IP address 111 and the MAC address 111 of the host 111, and the route advertisement message also carries ESI 1 corresponding to the AC 1321.
After the edge device 132 adjusts the static forwarding table entry to the dynamic forwarding table entry, after the dynamic forwarding table entry is aged, the edge device 132 may further delete the dynamic forwarding table entry, and send a route revocation message to the edge device 131 and the edge device 133, where the process of the route revocation message refers to step 320 and subsequent steps, and details are not repeated.
In step 324, after receiving the route advertisement message, edge device 131 may parse the address information of host 111 from the route advertisement message, and may generate a static forwarding table entry according to the address information.
In one example, the generating, by the edge device 131, a static forwarding table entry according to the address information may include: if the route advertisement message carries ESI, and the ESI carried by the route advertisement message is the same as the ESI configured by the edge device 131 for the host 111, a static forwarding table entry may be generated according to the address information, and an output interface of the static forwarding table entry is an AC corresponding to the ESI. In addition, if the route advertisement message does not carry ESI, or the ESI carried by the route advertisement message is different from the ESI configured by the edge device 131 for the host 111, a dynamic forwarding table entry may be generated according to the address information, and an outgoing interface of the dynamic forwarding table entry may be a VXLAN tunnel between the edge device 131 and the edge device 132, which is not described in detail again.
In this step, it is assumed that the edge device 131 parses the IP address 111 and the MAC address 111 of the host 111 from the route advertisement message and parses the ESI 1 from the route advertisement message, and since the ESI configured for the host 111 by the edge device 131 is ESI 1, the edge device 131 generates a static forwarding table entry shown in table 5.
TABLE 5
IP address MAC address Outlet interface
IP address 111 MAC address 111 AC1311
In step 325, after receiving the route advertisement message, the edge device 133 may parse the address information of the host 111 from the route advertisement message, and maintain a host forwarding table according to the address information.
After receiving the route advertisement message, the edge device 133 may analyze ESI 1 from the route advertisement message, because the edge device 131 and the edge device 132 are both next hops corresponding to ESI 1, when the edge device 133 maintains the host forwarding table according to the address information, there exists an equivalent table, and the outgoing interfaces are the VXLAN tunnel a between the edge device 133 and the edge device 131 and the VXLAN tunnel B between the edge device 133 and the edge device 132, respectively, see table 3, which is an example of the host forwarding table.
In step 320, edge device 131 sends a route withdraw message to edge device 133, in step 323, edge device 132 sends a route advertisement message to edge device 133, and step 325 is described below with reference to three cases for the receipt of the route withdraw message and the route advertisement message.
In case one, the edge device 133 receives the route withdraw message first and then receives the route advertisement message later.
In one example, edge device 133 may locally delete the host forwarding entry shown in table 3 upon receiving the route withdraw message. After deleting the host forwarding table entry, the edge device 133 may regenerate the host forwarding table entry shown in table 3 according to the route advertisement message after receiving the route advertisement message.
In case two, the edge device 133 receives the route advertisement message and the route withdrawal message at the same time.
In one example, when edge device 131 sends a route withdraw message to edge device 132 and edge device 133, the route withdraw message may also carry a sequence number, such as sequence number 100. Edge device 132 may record a sequence number 100 of the route withdraw message, and when edge device 132 sends the route advertisement message to edge device 131 and edge device 133, the route advertisement message may also carry a sequence number, and the sequence number carried in the route advertisement message is greater than the sequence number carried in the route withdraw message, such as sequence number 101.
Further, after receiving the route advertisement message and the route withdraw message at the same time, the edge device 133 discards the route withdraw message and processes the route withdraw message according to the route advertisement message because the sequence number carried in the route advertisement message is greater than the sequence number carried in the route withdraw message. Since the host forwarding table entry corresponding to the address information carried in the route advertisement message already exists locally, the edge device 133 retains the host forwarding table entry shown in table 3, that is, the host forwarding table entry shown in table 3 is continuously maintained locally.
In case three, the edge device 133 receives the route advertisement message first and then receives the route withdrawal message.
In an example, after receiving the route notification message, because the edge device 133 already locally has a host forwarding table entry corresponding to the address information carried in the route notification message, the edge device 133 keeps the host forwarding table entry shown in table 3, that is, continuously maintains the host forwarding table entry shown in table 3 locally. Then, after receiving the route withdraw message, because the sequence number carried in the route advertisement message is greater than the sequence number carried in the route withdraw message (see case two), the edge device 133 discards the route withdraw message without deleting the host forwarding table according to the route withdraw message.
In order to carry the sequence number in the route advertisement message or the route withdrawal message, the sequence number may be carried in the route advertisement message or the route withdrawal message extended community migration attribute, which is not limited to this.
As can be seen from the above technical solutions, in the embodiment of the present application, after receiving the route advertisement message sent by the edge device 131, the edge device 132 may generate a static forwarding table entry according to the address information of the host 111; after receiving the route revocation message sent by the edge device 131, if the edge device 132 receives the message matching the static forwarding table entry within the preset time window, the static forwarding table entry is not directly deleted, but the static forwarding table entry is adjusted to a dynamic forwarding table entry, and the message is forwarded according to the dynamic forwarding table entry, that is, after receiving the message destined for the host, the edge device 132 locally has the dynamic forwarding table entry matching the message, and correctly transmits the message according to the dynamic forwarding table entry, thereby improving reliability and security.
Based on the same application concept as the method, the embodiment of the present application further provides a message forwarding method, which may be applied to an EVPN network using a multi-homing access network, and a first edge device and a second edge device of the EVPN network are used to provide a multi-homing access service for a host. Referring to fig. 1, the first edge device is edge device 131 and the second edge device is edge device 132, or the first edge device is edge device 132 and the second edge device is edge device 131. For convenience of description, in the present embodiment, the first edge device is taken as the edge device 132, and the second edge device is taken as the edge device 131 for example.
Referring to fig. 2, a flowchart of the above message forwarding method is shown, where the method may include the following steps:
step 201, a first edge device receives a first route notification message sent by a second edge device, where the first route notification message carries address information and ESI of a host, and if the ESI carried by the first route notification message is the same as the ESI configured for the host by the first edge device, a first static forwarding table entry is generated according to the address information, and an output interface of the first static forwarding table entry is an AC corresponding to the ESI. In addition, if the first route advertisement message does not carry ESI, or the ESI carried by the first route advertisement message is different from the ESI configured by the first edge device for the host, a dynamic forwarding table entry may be generated according to the address information, and an outgoing interface of the dynamic forwarding table entry may be a VXLAN tunnel between the first edge device and the second edge device.
As shown in steps 311-315, the second edge device may send a route advertisement message to the first edge device (for convenience of distinguishing, the route advertisement message may be referred to as a first route advertisement message), and the first edge device may generate a static forwarding table entry according to the address information carried in the first route advertisement message (for convenience of distinguishing, the static forwarding table entry may be referred to as a first static forwarding table entry).
Step 202, the first edge device receives a first route withdrawal message sent by the second edge device, where the first route withdrawal message carries address information of the host, and determines a first static forwarding table entry corresponding to the address information.
Step 203, if the first edge device receives the message matched with the first static forwarding table in the preset time window, and the ESI carried by the first route cancellation message is the same as the ESI configured by the first edge device for the host, the first edge device adjusts the first static forwarding table to be a first dynamic forwarding table, and forwards the message according to the first dynamic forwarding table, and the output interface of the first dynamic forwarding table is the AC corresponding to the ESI. In addition, if the first edge device does not receive the packet matching with the first static forwarding entry within the preset time window, the first static forwarding entry may be directly deleted.
In addition, if the first route revocation message does not carry the ESI, or the ESI carried by the first route revocation message is different from the ESI configured by the first edge device for the host, the static forwarding table entry may be deleted.
The adjusting, by the first edge device, the first static forwarding entry to the first dynamic forwarding entry may include: the first edge device deletes the first static forwarding table entry and generates a first dynamic forwarding table entry according to the address information carried by the first route revocation message, wherein the first dynamic forwarding table entry comprises an aging timer; or, adding an aging timer in the first static forwarding table entry to obtain a first dynamic forwarding table entry.
As shown in steps 320-322, the second edge device may send a route withdraw message to the first edge device (for convenience of distinguishing, the route withdraw message may be referred to as a first route withdraw message), and the first edge device may adjust a static forwarding table entry corresponding to the first route withdraw message to a dynamic forwarding table entry (for convenience of distinguishing, the dynamic forwarding table entry may be referred to as a first dynamic forwarding table entry).
After the first edge device adjusts the first static forwarding table entry into the first dynamic forwarding table entry, the first edge device may also send a second route notification message to the second edge device, where the second route notification message carries address information of the host, so that the second edge device generates a second static forwarding table entry according to the address information. And/or sending a third route notification message to the third edge device, where the third route notification message carries address information of the host, so that the third edge device maintains a host forwarding table according to the address information, and an output interface of the host forwarding table includes: a tunnel between the third edge device and the first edge device, and a tunnel between the third edge device and the second edge device. The first route revocation message also carries a sequence number, the third route notification message also carries a sequence number, and the sequence number carried by the third route notification message is greater than the sequence number carried by the first route revocation message.
As shown in steps 323 to 325, the first edge device may send a route advertisement message to the second edge device (for convenience of differentiation, the route advertisement message may be referred to as a second route advertisement message), and the second edge device may generate a static forwarding table entry according to the address information carried in the second route advertisement message (for convenience of differentiation, the static forwarding table entry may be referred to as a second static forwarding table entry).
In addition, the first edge device may send a route advertisement message (which may be referred to as a third route advertisement message for ease of differentiation) to a third edge device (e.g., edge device 133), and the third edge device may maintain a host forwarding table entry based on address information carried in the third route advertisement message.
In an example, if the first edge device receives an ARP message sent by the host, and the ARP message carries address information of the host, a second dynamic forwarding table entry may be generated according to the address information, and a fourth route advertisement message carrying the address information is sent to the second edge device; in addition, after the second dynamic forwarding table entry is aged, the first edge device may further delete the second dynamic forwarding table entry, and send a second route cancellation message carrying the address information to the second edge device, which is not described in detail again.
As can be seen from the above technical solutions, in the embodiments of the present application, after receiving a route advertisement message sent by a second edge device, a first edge device may generate a static forwarding table entry according to address information of a host; after receiving the route revocation message sent by the second edge device, if the first edge device receives the message matched with the static forwarding table item within the preset time window, the first edge device does not directly delete the static forwarding table item, but adjusts the static forwarding table item into a dynamic forwarding table item, and forwards the message according to the dynamic forwarding table item, that is, after receiving the message which is targeted to the host, the first edge device locally has the dynamic forwarding table item matched with the message, and correctly transmits the message according to the dynamic forwarding table item, so that the reliability and the safety are improved.
Based on the same application concept as the method described above, an embodiment of the present application further provides a packet forwarding apparatus, where a first edge device and a second edge device are used to provide a multi-homing access service for a host, and the apparatus is applied to the first edge device, and is shown in fig. 3 as a structural diagram of the apparatus, and the apparatus includes:
a receiving module 301, configured to receive a first route advertisement message sent by the second edge device; wherein, the first route notification message carries the address information of the host and the Ethernet segment identification ESI;
a generating module 302, configured to generate a first static forwarding table entry according to the address information when the ESI is the same as the ESI configured by the first edge device for the host;
the receiving module 301 is further configured to receive a first route withdrawal message sent by the second edge device; wherein the first route revocation message carries address information of the host;
a determining module 303, configured to determine a first static forwarding entry corresponding to the address information;
a processing module 304, configured to adjust the first static forwarding entry to a first dynamic forwarding entry when a message matched with the first static forwarding entry is received within a preset time window and an ESI carried in the first route cancellation message is the same as an ESI configured by the first edge device for the host;
a sending module 305, configured to forward a packet according to the first dynamic forwarding table entry.
The processing module 304, when adjusting the first static forwarding entry to the first dynamic forwarding entry, is specifically configured to: deleting the first static forwarding table entry, and generating a first dynamic forwarding table entry according to the address information carried by the first route revocation message, wherein the first dynamic forwarding table entry comprises an aging timer; or, adding an aging timer in the first static forwarding table entry to obtain a first dynamic forwarding table entry.
After the sending module 305 adjusts the first static forwarding entry to the first dynamic forwarding entry, the sending module is further configured to: sending a second route notification message to a second edge device, wherein the second route notification message carries address information of the host, so that the second edge device generates a second static forwarding table entry according to the address information; and/or sending a third route notification message to a third edge device, where the third route notification message carries address information of the host, so that the third edge device maintains a host forwarding table according to the address information; wherein, the output interface of the host forwarding table entry comprises: a tunnel between the third edge device and the first edge device, a tunnel between the third edge device and the second edge device.
In an example, the first route withdraw message further carries a sequence number, the third route advertisement message further carries a sequence number, and the sequence number carried in the third route advertisement message is greater than the sequence number carried in the first route withdraw message.
For an edge device (e.g., a first edge device) provided in the embodiment of the present application, from a hardware level, a schematic diagram of a hardware architecture may be as shown in fig. 4. The method comprises the following steps: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: and communicating with a machine-readable storage medium, reading and executing the instruction codes stored in the machine-readable storage medium, so as to realize the message forwarding operation disclosed by the above example of the application.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (11)

1. A message forwarding method is characterized in that a first edge device and a second edge device are used for providing multi-homing access service for a host, and the method is applied to the first edge device and comprises the following steps:
receiving a first route notification message sent by the second edge device, where the first route notification message carries address information of the host and an ethernet segment identifier ESI; if the ESI is the same as the ESI configured by the first edge device for the host, generating a first static forwarding table entry according to the address information;
receiving a first route withdrawal message sent by the second edge device, wherein the first route withdrawal message carries address information and ESI of the host, and determining a first static forwarding table entry corresponding to the address information;
if a message matched with the first static forwarding table entry is received in a preset time window, and the ESI carried by the first route cancellation message is the same as the ESI configured by the first edge device for the host, the first static forwarding table entry is adjusted to be a first dynamic forwarding table entry, and the message is forwarded according to the first dynamic forwarding table entry.
2. The method of claim 1,
an output interface of the first static forwarding table entry is an access circuit AC corresponding to the ESI;
and the output interface of the first dynamic forwarding table entry is the AC corresponding to the ESI.
3. The method of claim 1,
the adjusting the first static forwarding table entry to a first dynamic forwarding table entry includes:
deleting the first static forwarding table entry, and generating a first dynamic forwarding table entry according to the address information carried by the first route revocation message, wherein the first dynamic forwarding table entry comprises an aging timer; alternatively, the first and second electrodes may be,
and adding an aging timer in the first static forwarding table entry to obtain a first dynamic forwarding table entry.
4. The method of claim 1,
after the adjusting the first static forwarding table entry to the first dynamic forwarding table entry, the method further includes:
and sending a second route notification message to a second edge device, wherein the second route notification message carries the address information of the host, so that the second edge device generates a second static forwarding table entry according to the address information.
5. The method of claim 1,
after the adjusting the first static forwarding table entry to the first dynamic forwarding table entry, the method further includes:
sending a third route notification message to a third edge device, where the third route notification message carries address information of the host, so that the third edge device maintains a host forwarding table according to the address information; wherein, the output interface of the host forwarding table entry comprises: a tunnel between the third edge device and the first edge device, a tunnel between the third edge device and the second edge device.
6. The method of claim 5, wherein the first route withdraw message further carries a sequence number, wherein the third route advertisement message further carries a sequence number, and wherein the sequence number carried in the third route advertisement message is greater than the sequence number carried in the first route withdraw message.
7. The method of claim 1, further comprising:
if an Address Resolution Protocol (ARP) message sent by the host is received and the ARP message carries address information of the host, generating a second dynamic forwarding table according to the address information, and sending a fourth route notification message carrying the address information to the second edge device;
and deleting the second dynamic forwarding table entry after the second dynamic forwarding table entry is aged, and sending a second route canceling message carrying the address information to the second edge device.
8. A message forwarding apparatus, wherein a first edge device and a second edge device are configured to provide a multi-homing access service for a host, and the apparatus is applied to the first edge device, and the apparatus comprises:
a receiving module, configured to receive a first route advertisement message sent by the second edge device; wherein, the first route notification message carries the address information of the host and the Ethernet segment identification ESI;
a generating module, configured to generate a first static forwarding table entry according to the address information when the ESI is the same as the ESI configured by the first edge device for the host;
the receiving module is further configured to receive a first route withdrawal message sent by the second edge device; wherein, the first route canceling message carries address information and ESI of the host;
a determining module, configured to determine a first static forwarding entry corresponding to the address information;
a processing module, configured to adjust the first static forwarding entry to a first dynamic forwarding entry when a message matching the first static forwarding entry is received within a preset time window and an ESI carried in the first route cancellation message is the same as an ESI configured by the first edge device for the host;
and the sending module is used for forwarding the message according to the first dynamic forwarding table entry.
9. The apparatus of claim 8,
the processing module, when adjusting the first static forwarding entry to the first dynamic forwarding entry, is specifically configured to: deleting the first static forwarding table entry, and generating a first dynamic forwarding table entry according to the address information carried by the first route revocation message, wherein the first dynamic forwarding table entry comprises an aging timer; or, adding an aging timer in the first static forwarding table entry to obtain a first dynamic forwarding table entry.
10. The apparatus of claim 8,
after the sending module adjusts the first static forwarding entry to the first dynamic forwarding entry, the sending module is further configured to: sending a second route notification message to a second edge device, wherein the second route notification message carries address information of the host, so that the second edge device generates a second static forwarding table entry according to the address information; and/or sending a third route notification message to a third edge device, where the third route notification message carries address information of the host, so that the third edge device maintains a host forwarding table according to the address information; wherein, the output interface of the host forwarding table entry comprises: a tunnel between the third edge device and the first edge device, a tunnel between the third edge device and the second edge device.
11. The apparatus of claim 10, wherein the first route withdraw message further carries a sequence number, wherein the third route advertisement message further carries a sequence number, and wherein the sequence number carried in the third route advertisement message is greater than the sequence number carried in the first route withdraw message.
CN201810224008.4A 2018-03-19 2018-03-19 Message forwarding method and device Active CN108600109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810224008.4A CN108600109B (en) 2018-03-19 2018-03-19 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810224008.4A CN108600109B (en) 2018-03-19 2018-03-19 Message forwarding method and device

Publications (2)

Publication Number Publication Date
CN108600109A CN108600109A (en) 2018-09-28
CN108600109B true CN108600109B (en) 2020-12-04

Family

ID=63626853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810224008.4A Active CN108600109B (en) 2018-03-19 2018-03-19 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN108600109B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067635B (en) * 2018-09-29 2021-04-02 新华三技术有限公司 Information processing method and device
CN109412926B (en) * 2018-11-16 2021-04-27 新华三技术有限公司 Tunnel establishment method and device
CN111447131B (en) 2019-01-16 2022-11-08 中兴通讯股份有限公司 Message de-encapsulation method and device and message encapsulation method and device
CN110113260B (en) * 2019-04-28 2021-07-06 新华三技术有限公司 Forwarding table updating method and device
CN111277482B (en) * 2020-01-13 2022-01-18 新华三大数据技术有限公司 Message processing method and device
CN113765783B (en) * 2021-08-05 2022-11-18 新华三大数据技术有限公司 Communication method and device
CN115941587A (en) * 2022-11-11 2023-04-07 迈普通信技术股份有限公司 Multi-homing routing method, device, edge device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616093A (en) * 2009-07-17 2009-12-30 福建星网锐捷网络有限公司 A kind of user access multi-homing network implementation approach, device and the network equipment
CN102333024A (en) * 2010-07-12 2012-01-25 华为技术有限公司 Forwarding method, equipment and system for data frame of virtual private local area network service (VPLS)
CN105939261A (en) * 2015-09-16 2016-09-14 杭州迪普科技有限公司 Method and device for statically configuring VPN routing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9634893B2 (en) * 2015-07-21 2017-04-25 Cisco Technology, Inc. Auto-provisioning edge devices in a communication network using control plane communications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616093A (en) * 2009-07-17 2009-12-30 福建星网锐捷网络有限公司 A kind of user access multi-homing network implementation approach, device and the network equipment
CN102333024A (en) * 2010-07-12 2012-01-25 华为技术有限公司 Forwarding method, equipment and system for data frame of virtual private local area network service (VPLS)
CN105939261A (en) * 2015-09-16 2016-09-14 杭州迪普科技有限公司 Method and device for statically configuring VPN routing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于Hose虚拟专用网络模型的网络资源优化与路由方法研究》;王东;《中国优秀硕士学位论文全文数据库 信息科技辑》;20110430;全文 *

Also Published As

Publication number Publication date
CN108600109A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
CN108600109B (en) Message forwarding method and device
US11082342B2 (en) System and method to facilitate content forwarding using Bit Index Explicit Replication (BIER) in an Information-Centric Networking (ICN) environment
EP3451612B1 (en) Network access control
CN108259299B (en) Forwarding table item generating method and device and machine-readable storage medium
US9992106B2 (en) Generating a host route
US10148573B2 (en) Packet processing method, node, and system
US9979711B2 (en) Authentication for VLAN tunnel endpoint (VTEP)
CN106878194B (en) Message processing method and device
CN108259347B (en) Message transmission method and device
CN109104364B (en) Designated forwarder election method and device
CN108718278B (en) Message transmission method and device
CN107612809B (en) Multicast table item synchronization method and equipment
US20150326524A1 (en) Address resolution in software-defined networks
US20150033321A1 (en) Construct large-scale dvpn
CN106878199B (en) Configuration method and device of access information
US10122548B2 (en) Services execution
CN106921578B (en) Method and device for generating forwarding table item
CN108965092B (en) Data message transmission method and device
CN106878184B (en) Data message transmission method and device
CN108600074B (en) Method and device for forwarding multicast data message
CN108718276B (en) Message forwarding method and device
CN109412926B (en) Tunnel establishment method and device
CN109379241B (en) Path information determination method and device
CN109412949B (en) Data message transmission method and device
CN108390954B (en) Message transmission method and device

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
GR01 Patent grant
GR01 Patent grant