CN113422730A - Flow forwarding method and device, PE (provider edge) equipment and storage medium - Google Patents

Flow forwarding method and device, PE (provider edge) equipment and storage medium Download PDF

Info

Publication number
CN113422730A
CN113422730A CN202110697537.8A CN202110697537A CN113422730A CN 113422730 A CN113422730 A CN 113422730A CN 202110697537 A CN202110697537 A CN 202110697537A CN 113422730 A CN113422730 A CN 113422730A
Authority
CN
China
Prior art keywords
interface
traffic
target
forwarding table
forwarding
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.)
Granted
Application number
CN202110697537.8A
Other languages
Chinese (zh)
Other versions
CN113422730B (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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202110697537.8A priority Critical patent/CN113422730B/en
Publication of CN113422730A publication Critical patent/CN113422730A/en
Application granted granted Critical
Publication of CN113422730B publication Critical patent/CN113422730B/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
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • 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/38Flow based routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Landscapes

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

Abstract

The embodiment of the invention provides a traffic forwarding method and device, PE (provider edge) equipment and a storage medium. The method is applied to PE equipment and comprises the following steps: receiving a target flow sent to a CE device accessed to the PE device; determining an incoming interface receiving the target traffic; determining an outgoing interface corresponding to the target traffic according to the incoming interface, wherein when the incoming interface is an Access Circuit (AC), the outgoing interface corresponding to the target traffic is an inlet of a preset tunnel, and when the incoming interface is a Pseudo Wire (PW), the outgoing interface corresponding to the target traffic is an AC connected with the CE device, and a starting point and an end point of the preset tunnel are the PE devices and pass through a P device; and forwarding the target flow through an output interface corresponding to the target flow. The traffic bypassing of non-local exchange can be avoided, and the network utilization rate is further improved.

Description

Flow forwarding method and device, PE (provider edge) equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a traffic forwarding method and apparatus, a PE device, and a storage medium.
Background
In order to supervise traffic in networking in an Internet Exchange Point (IXP) networking of a Virtual Private LAN Service (Virtual Private LAN Service) technology, traffic sent by a Customer Edge (CE) device to a backbone network may be split to an analysis device in a splitting manner, so as to supervise the traffic. In the related art, light splitting is often performed on a service Provider network (Provider, P) device or on an interface where a service Provider network Edge (PE) device is connected to the P device. Therefore, traffic that is transmitted by the CE device to the backbone network needs to be routed through the P device.
However, when two CE devices accessing the same PE device perform local exchange with each other, local exchange traffic generated does not pass through the P device, for example, as shown in fig. 1, when a second CE device performs local exchange with a third CE device, a path through which the local exchange traffic passes is the second CE device, the second PE device, and the third CE device, so that the local exchange traffic cannot be supervised, and the local exchange traffic needs to be bypassed to the P device.
In the related art, when one PE device is connected to multiple CE devices and local exchange requirements of the multiple CE devices exist, an Access Circuit (AC) that the multiple CE devices access to the PE device may be set as a Leaf (Leaf) role, and an AC that another CE device accesses to the PE device may be set as a root (root) role. The control plane, when routing down, can cause traffic sent by either Leaf role to another Leaf role to have to go via the Root role. Taking fig. 1 as an example, the AC in which the first CE device and the fourth CE device access the first PE device and the AC in which the second CE device and the third CE device access the second PE device are Leaf roles, and the AC in which the fifth CE device accesses the third PE device and the AC in which the sixth CE device accesses the fourth PE device are Root roles, so that the local exchange traffic sent by the second CE device to the third CE device will pass through the sixth CE device, thereby implementing bypassing P device.
But this solution will cause the non-local switching traffic that otherwise does not have to be bypassed to bypass, so that the network devices passed by the non-local switching traffic are more, and the path through which the non-local switching traffic passes is longer, resulting in low network utilization. Illustratively, even if this scheme is not used, traffic sent by the first CE device to the second CE device will be via the first P device, and thus the traffic would not otherwise have to be bypassed. But with this scheme, traffic sent by the first CE device to the second CE device will be via the fifth CE device.
Disclosure of Invention
Embodiments of the present invention provide a traffic forwarding method and apparatus, a PE device, and a storage medium, so as to avoid traffic that does not need to detour from detouring, thereby improving network utilization. The specific technical scheme is as follows:
in a first aspect of the present invention, a traffic forwarding method is provided, where the method is applied to a service provider network edge PE device, and the method includes:
receiving a target flow sent to a user network edge (CE) device accessed to the PE device;
determining an incoming interface receiving the target traffic;
determining an outgoing interface corresponding to the target traffic according to the incoming interface, wherein when the incoming interface is an Access Circuit (AC), the outgoing interface corresponding to the target traffic is an inlet of a preset tunnel, and when the incoming interface is a Pseudo Wire (PW), the outgoing interface corresponding to the target traffic is an AC connected with the CE device, and a starting point and an end point of the preset tunnel are the PE devices and pass through a service provider network (P) device;
and forwarding the target flow through an output interface corresponding to the target flow.
In a possible embodiment, a second forwarding table entry whose output interface is an AC and a third forwarding table entry whose output interface is an entrance of the preset tunnel are pre-stored in the PE device;
determining an output interface corresponding to the target flow according to the input interface includes:
if the incoming interface is the AC, determining an outgoing interface with the same destination address as the target flow in the third forwarding table entry as an outgoing interface corresponding to the target flow;
and if the ingress interface is the PW, determining an egress interface with the same destination address as the target flow in the second forwarding table entry as an egress interface corresponding to the target flow.
In a possible embodiment, the method further comprises:
receiving a first forwarding table item sent by a control plane;
and when the output interface of the first forwarding table entry is an AC, generating a second forwarding table entry of which the destination address is the same as the first forwarding table entry and the output interface is the AC, and a third forwarding table entry of which the destination address is the same as the first forwarding table entry and the output interface is the entrance of the preset tunnel.
In a possible embodiment, the PE device is connected to a plurality of P devices, and the method further includes:
determining target P equipment from the plurality of P equipment according to a preset load balancing strategy;
and setting the P device through which the preset tunnel passes as the target P device.
In a possible embodiment, the preset tunnel is a tunnel constructed based on a segment routing SR technique, and the path of the preset tunnel is: the PE device-the P device-the PE device.
In a second aspect of the embodiments of the present invention, a traffic forwarding apparatus is provided, where the apparatus is applied to a service provider network edge PE device, and the apparatus includes:
a traffic receiving module, configured to receive a target traffic sent to a CE device on a user network edge accessing the PE device;
an incoming interface determining module, configured to determine an incoming interface that receives the target traffic;
an egress interface determining module, configured to determine an egress interface corresponding to the target traffic according to the ingress interface, where when the ingress interface is an access circuit AC, the egress interface corresponding to the target traffic is an entry of a preset tunnel, and when the ingress interface is a pseudo wire PW, the egress interface corresponding to the target traffic is an AC connected to the CE device, a starting point and an end point of the preset tunnel are the PE device, and are connected through a service provider network P device;
and the flow sending module is used for forwarding the target flow through the outlet interface corresponding to the target flow.
In a possible embodiment, a second forwarding table entry whose output interface is an AC and a third forwarding table entry whose output interface is an entrance of the preset tunnel are pre-stored in the PE device;
the determining module of the output interface determines the output interface corresponding to the target flow according to the input interface, and includes:
if the incoming interface is the AC, determining an outgoing interface with the same destination address as the target flow in the third forwarding table entry as an outgoing interface corresponding to the target flow;
and if the ingress interface is the PW, determining an egress interface with the same destination address as the target flow in the second forwarding table entry as an egress interface corresponding to the target flow.
In a possible embodiment, the apparatus further includes a forwarding table entry generating module, configured to receive a first forwarding table entry sent by a control plane;
and when the output interface of the first forwarding table entry is an AC, generating a second forwarding table entry of which the destination address is the same as the first forwarding table entry and the output interface is the AC, and a third forwarding table entry of which the destination address is the same as the first forwarding table entry and the output interface is the entrance of the preset tunnel.
In a possible embodiment, the PE device is connected to a plurality of P devices, and the apparatus further includes a node selection module, configured to determine a target P device from the plurality of P devices according to a preset load balancing policy; and setting the P device through which the preset tunnel passes as the target P device.
In a possible embodiment, the preset tunnel is a tunnel constructed based on a segment routing SR technique, and the path of the preset tunnel is: the PE device-the P device-the PE device.
In a third aspect of the embodiments of the present invention, a service provider network edge PE device is provided, including:
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect of embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, which, when being executed by a processor, carries out the method steps of any one of the above-mentioned first aspects.
The embodiment of the invention has the following beneficial effects:
according to the traffic forwarding method and apparatus, the PE device, and the storage medium provided in the embodiments of the present invention, the PE device can determine an egress interface used for forwarding the target traffic according to an ingress interface that receives the target traffic, and since for the PE device, the local exchange traffic that needs to be bypassed is received through the AC, and the non-local exchange traffic that does not need to be bypassed is received through the PW, different egress interfaces are determined according to differences of ingress interfaces, so that the PE device can forward the local exchange traffic and the non-local exchange traffic by using different egress interfaces. Meanwhile, because the outgoing interface used for forwarding the target traffic is the AC connected to the CE device when the incoming interface is the PW, the non-local exchange traffic that does not need to detour can be directly sent to the CE device, thereby avoiding the occurrence of detour. Moreover, since the egress interface used for forwarding the target traffic is the ingress of the preset tunnel when the ingress interface is the AC, the local exchange traffic can be bypassed to the P device through the preset tunnel, thereby implementing the bypass of the local exchange traffic. That is, with the embodiment, the non-local exchange traffic can be prevented from bypassing on the premise of realizing the bypassing of the local exchange traffic, so that the reduction of the network utilization rate caused by the bypassing of the non-local exchange traffic can be effectively avoided, that is, the network utilization rate can be improved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by referring to these drawings.
Fig. 1 is a schematic structural diagram of an IXP networking provided in an embodiment of the present invention;
fig. 2 is a schematic flow chart of a traffic forwarding method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a forwarding table entry generating method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a traffic forwarding apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a PE device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived from the embodiments given herein by one of ordinary skill in the art, are within the scope of the invention.
Referring to fig. 2, fig. 2 is a schematic flow chart of a traffic forwarding method according to an embodiment of the present invention, where the schematic flow chart may include:
s201, receiving a target traffic sent to a CE device accessing a PE device.
S202, determining an incoming interface receiving the target flow.
And S203, determining an output interface corresponding to the target flow according to the input interface, wherein when the input interface is AC, the output interface corresponding to the target flow is an inlet of a preset tunnel, and when the input interface is PW, the output interface corresponding to the target flow is AC connected with the CE equipment.
And S204, forwarding the target flow through the outlet interface corresponding to the target flow.
By selecting the embodiment, the PE device can determine the egress interface used for forwarding the target traffic according to the ingress interface that receives the target traffic, and since the local exchange traffic that needs to be bypassed for the PE device is received through the AC and the non-local exchange traffic that does not need to be bypassed is received through the PW, different egress interfaces are determined according to the difference of the ingress interfaces, so that the PE device can forward the local exchange traffic and the non-local exchange traffic by using different egress interfaces. Meanwhile, because the outgoing interface used for forwarding the target traffic is the AC connected to the CE device when the incoming interface is the PW, the non-local exchange traffic that does not need to detour can be directly sent to the CE device, thereby avoiding the occurrence of detour. Moreover, since the egress interface used for forwarding the target traffic is the ingress of the preset tunnel when the ingress interface is the AC, the local exchange traffic can be bypassed to the P device through the preset tunnel, thereby implementing the bypass of the local exchange traffic. That is, with the embodiment, the non-local exchange traffic can be prevented from bypassing on the premise of realizing the bypassing of the local exchange traffic, so that the reduction of the network utilization rate caused by the bypassing of the non-local exchange traffic can be effectively avoided, that is, the network utilization rate can be improved.
For convenience of description, the networking structure shown in fig. 1 is still used as an example for description, the same networking principle for other structures may be obtained, and details are not described herein, and it is assumed that the execution main body of the traffic forwarding method provided in the embodiment of the present invention is the second PE device, in other possible embodiments, the execution main body may also be the first PE device, and the principle that the execution main body is the first PE device is the same as that of the execution main body being the second PE device, and therefore details are not described herein.
In S201, the CE device accessing the second PE device includes the second CE device and a third CE device, and for convenience of description, it is assumed that the target traffic is sent to the third CE device, and the target traffic may be sent to the second PE device by the P device through a Pseudo Wire (PW), or sent to the second PE device by the second CE device accessing the second PE device through an AC.
In S202, as analyzed above, if the determined ingress interface is PW, the target traffic is sent by the P device to the third CE device, and if the determined ingress interface is AC, the target traffic is sent by the second CE device to the third CE device.
It will be appreciated that traffic sent by the P device to the third CE device is obviously already passing through the P device and therefore need not be bypassed, whereas traffic sent by the second CE device to the third CE device is locally switched traffic and therefore needs to be bypassed to the P device. That is, by determining the ingress interface, it can be distinguished whether the target traffic needs to be bypassed.
In S203, the start point and the end point of the tunnel are preset as PE devices, and via a P device. That is, taking fig. 1 as an example, the starting point and the ending point of the preset tunnel are both the second PE device, and the P device that is passed through the preset tunnel may be any P device that establishes a communication connection with the second PE device.
The preset tunnel may be constructed based on a Segment Routing (SR) technology, for example, the preset tunnel may be SRv6(Segment Routing IPv6, Segment Routing based on IPv6 forwarding plane) tunnel. The nodes through which the preset tunnel passes can be arranged according to actual requirements, but the starting point and the ending point of the preset tunnel should be satisfied as the second PE device, and at least pass through one P device.
In a possible embodiment, the path of the preset tunnel may be only via one node except the starting point and the end point, that is, the path of the preset tunnel is: for example, in fig. 1, the path of the preset tunnel may be: second PE device-second P device-second PE device.
By selecting the embodiment, the length of the preset tunnel can be shortened as much as possible, so that the path through which the local exchange traffic bypasses the P equipment is shortened, the network equipment through which the local exchange traffic passes is reduced, and the network utilization rate is further improved.
And when the PE device is connected to a plurality of P devices, for example, the second PE device in fig. 1 is connected to a first P device and a second P device, the P device through which the tunnel is preset may be selected according to an actual requirement or according to a preset rule. For example, in one possible embodiment, the target P device may be determined from a plurality of P devices according to a preset load balancing policy, and the P device via which the preset tunnel passes is set as the target P device.
The preset load balancing policy may be selected according to actual needs or user experience, for example, the preset load balancing policy may be to preferentially select the P device with the lowest load, and for example, the preset load balancing policy may be to randomly select from P devices with loads lower than a preset load threshold, or may be other load balancing policies, which is not limited in this embodiment.
Still taking fig. 1 as an example, assuming that the preset load balancing policy is to preferentially select the P device with the lowest load, and assuming that the load of the first P device is lower than the load of the second P device, the first P device may be selected as the target device, and the P device through which the preset tunnel passes is set as the first P device, where the path of the preset tunnel may be: second PE device-first P device-second PE device.
By selecting the embodiment, a proper target P device can be selected according to a load balancing strategy, and the local exchange traffic needing to be bypassed is bypassed to the target P device by setting the P device through which the preset tunnel passes, so that the load balancing among the P devices is realized, and the phenomenon that part of the P devices are excessively high due to bypassing is avoided.
In order to enable the P device via which the preset tunnel is passed to be set as a target P device, an anycast (anycast) node tag may be used instead of the node tag of the P device via which the preset tunnel is passed when the preset tunnel is constructed, so that the second PE device can bypass the local exchange traffic to the first P device or the second P device according to actual needs.
In S204, when the ingress interface is an AC, it may be considered that the target traffic needs to be bypassed, and when the ingress interface is an AC, the egress interface corresponding to the target traffic is an entry of the preset tunnel, that is, the target traffic is forwarded through the entry of the preset tunnel, so that the target traffic is forwarded to the second P device, and is forwarded to the second PE device by the second P device, that is, the target traffic is bypassed to the P device, which means that the local exchange traffic needing to be bypassed in this scheme will be bypassed.
When the ingress interface is PW, two cases can be distinguished:
the first condition is as follows: the target flow is non-local exchange flow;
case two: the target traffic is local exchange traffic which bypasses the P device and is forwarded by the P device to the second PE device.
In either case one or case two, the target flow does not need to be bypassed. And when the ingress interface is the PW, the egress interface corresponding to the target traffic is the AC connected to the third CE device, so that the second PE device sends the target traffic to the third CE device through the AC connected to the third CE device, and it is seen that the target traffic is not bypassed at this time, and it is seen that the traffic that is not to be bypassed is not bypassed.
As can be seen from the second situation, in the solution of the present application, after bypassing the P device, the local exchange traffic sent by the second CE device to the third CE device is sent to the third CE device, that is, the path through which the local exchange traffic passes in the solution is: second CE device-second PE device-second P device-second PE device-third CE device.
In order to more clearly describe the traffic forwarding method provided in the embodiment of the present invention, how to determine the interface is described below:
in a possible embodiment, a second forwarding table entry whose output interface is an AC and a third forwarding table entry whose output interface is an entry of the preset tunnel may be stored in advance in the PE device. When the interface is determined according to the incoming interface, if the incoming interface is AC, the outgoing interface with the same destination address and the same target flow is determined in the third forwarding table entry to be used as the outgoing interface corresponding to the target flow, and if the incoming interface is PW, the outgoing interface with the same destination address and the same target flow is determined in the second forwarding table entry to be used as the outgoing interface corresponding to the target flow.
How the second forwarding entry and the third forwarding entry are obtained will be described in detail hereinafter, and will not be described herein again. In order to distinguish the second forwarding entry from the third forwarding entry, one or more identification bits may be added to the index of the forwarding entry, where the identification bits are used to indicate that the forwarding entry is the second forwarding entry or the third forwarding entry. For example, an identification bit may be added to the index, and when the identification bit is 1, it indicates that the forwarding table entry is the third forwarding table entry, and when the identification bit is 0, it indicates that the forwarding table entry is the second forwarding table entry.
Correspondingly, when searching for the forwarding table entry, if the ingress interface is AC, the index with the identification bit of 1 is used for searching when searching for the forwarding table entry, and if the ingress interface is PW, the index with the identification bit of 0 is used for searching when searching for the forwarding table entry.
For example, still taking the IXP networking shown in fig. 1 as an example, assuming that a destination VSI (Virtual Switch Instance) of the target traffic, that is, a VSI to which the third CE device belongs, is VSI1, a destination MAC (that is, a MAC of the third CE device) is MAC1, and the flag bit is AcFlag, when the ingress interface is AC, forwarding entries of VSI1, MAC1, and AcFlag 1 may be searched in the forwarding entry, and an egress interface of the forwarding entry is used as an egress interface corresponding to the target traffic. Similarly, when the ingress interface is the PW, the forwarding table entry of VSI1, MAC1, or AcFlag 0 may be searched in the forwarding table entry, and the egress interface of the forwarding table entry is used as the egress interface corresponding to the target traffic.
As described in the foregoing background, in order to implement bypassing of local exchange traffic in the related art, when a control plane issues a route, it is necessary for traffic sent from any Leaf role to another Leaf role to pass through a Root role, so that in the related art, a logic of the control plane issuing the route needs to be changed, that is, the control plane needs to be adaptively adjusted to enable bypassing of the local exchange traffic, which results in higher cost and lower efficiency for implementing bypassing of the local exchange traffic.
Based on this, in a possible embodiment, the second forwarding entry and the third forwarding entry may be obtained by the method shown in fig. 3, and fig. 3 is a flowchart of a forwarding entry generating method provided in the embodiment of the present invention, and the flowchart may include:
s301, receiving a first forwarding table entry sent by a control plane.
S302, when the outgoing interface of the first forwarding table entry is an AC, generating a second forwarding table entry whose destination address is the same as the first forwarding table entry and whose outgoing interface is the AC, and a third forwarding table entry whose destination address is the same as the first forwarding table entry and whose outgoing interface is an entry of the preset tunnel.
For example, still taking the IXP networking shown in fig. 1 as an example, assuming that the control plane provides a first forwarding table entry for the second PE device, and the first forwarding table entry is used to indicate a route when the second PE device sends traffic to the third CE device, at this time, the first forwarding table entry is: VSI-VSI 1, MAC-MAC 1, and egress interface-AC 1. Wherein the AC1 is an AC of the second PE device connected to the third CE device. Since the egress interface is AC at this time, after receiving the first forwarding entry, the second PE device may generate a second forwarding entry and a third forwarding entry as shown below:
a second forwarding table entry: VSI-VSI 1, MAC-MAC 1, and egress interface-AC 1
A third forwarding table entry: VSI-VSI 1, MAC-1, egress interface tunnel-p
If the forwarding table entry contains the identification bit AcFlag, a second forwarding table entry and a third forwarding table entry may be generated as follows:
a second forwarding table entry: VSI-VSI 1, MAC-MAC 1, egress interface-AC 1, and AcFlag-0
A third forwarding table entry: VSI-VSI 1, MAC-1, egress interface tunnel-p, AcFlag-1
Wherein, tunnel-p represents the entrance of the preset tunnel. The second PE device may issue the generated second forwarding table entry and the third forwarding table entry to the forwarding engine, so that when the second PE device receives the target traffic sent to the third CE device, the second PE device forwards the target traffic according to the second forwarding table entry and the third forwarding table entry in the forwarding engine.
Assuming that the second PE device receives the target traffic through the AC, as described above, the second PE device searches for the third forwarding table, and since the destination VSI of the target traffic is VSI1 and the destination MAC is MAC1, the search for the third forwarding table may determine that the output interface corresponding to the target traffic is tunnel-p, and then forwards the target traffic through the tunnel-p.
Assuming that the second PE device receives the target traffic through the PW, as described above, the second PE device searches for the second forwarding table, and since the destination VSI of the target traffic is VSI1 and the destination MAC is MAC1, the second forwarding table is searched to determine that the output interface corresponding to the target traffic is AC1, and then forwards the target traffic through AC1, that is, the target traffic is sent to the third CE device.
By adopting the embodiment, the control plane can issue the forwarding table according to the original logic, and after the PE equipment receives the forwarding table issued by the control plane, the PE equipment correspondingly generates the second forwarding table and the third forwarding table based on the forwarding table issued by the control plane, so that the target flow can be forwarded according to the flow forwarding method provided by the embodiment of the invention, namely, the logic of the control plane issuing route does not need to be changed, the cost of realizing flow bypassing can be effectively reduced, and the efficiency of realizing flow bypassing can be improved.
For a first forwarding entry sent by the control plane and having an output interface that is a PW, the PE device may also generate a second forwarding entry and a third forwarding entry correspondingly.
Still taking the IXP networking shown in fig. 1 as an example, assuming that the control plane issues the first forwarding table entry to the second PE device, and the first forwarding table entry is used to represent a route when the second PE device sends traffic to the sixth CE device, the first forwarding table entry at this time is: VSI-VSI 1, MAC-MAC 2, and egress interface PW 1. The PW1 is a PW between the second PE device and the fourth PE device, the VSI1 is a VSI to which the sixth CE device belongs, and the MAC2 is a MAC of the sixth CE device. Since the egress interface is the PW at this time, after receiving the first forwarding entry, the second PE device may generate a second forwarding entry and a third forwarding entry as shown below.
A second forwarding table entry: VSI-VSI 1, MAC-MAC 2, PW1, and AcFlag-0
A third forwarding table entry: VSI-VSI 1, MAC-MAC 2, PW1, and AcFlag-1
In conjunction with the foregoing description about the case where the outgoing interface of the first forwarding entry is AC, it can be understood that the following forwarding entries are included in the second PE device in this embodiment:
forwarding table entry 1: VSI-VSI 1, MAC-MAC 1, egress interface-AC 1, and AcFlag-0
Forwarding table entry 2: VSI-VSI 1, MAC-1, egress interface tunnel-p, AcFlag-1
Forwarding table entry 3: VSI-VSI 1, MAC-MAC 2, PW1, and AcFlag-0
Forwarding table entry 4: VSI-VSI 1, MAC-MAC 2, PW1, and AcFlag-1
Based on the forwarding table entries 1 to 4, three cases of sending traffic from the second CE device to the third CE device, sending traffic from the first CE device to the third CE device, and sending traffic from the second CE device to the sixth CE device will be described below, and the same principle can be obtained for other cases, and will not be described again:
for the case where the second CE device sends traffic to the third CE device, the second CE device sends the traffic to the second PE device through the AC, where the destination VSI of the traffic is VSI1 and the destination MAC is MAC 1. Since the second PE device receives the traffic through the AC, the second PE device searches for a forwarding entry of VSI1, MAC1, and AcFlag 1, and hits the forwarding entry 2, so that the second PE device forwards the traffic through tunnel-P, the traffic passes through the second P device along a path of the preset tunnel and is forwarded to the second PE device by the second P device again, and since the second P device forwards the traffic to the second PE device through the PW, the second PE device searches for VSI1, MAC1, and forwards the forwarding entry of AcFlag 0, and hits the forwarding entry 1, so that the second PE device forwards the target traffic to the third CE device through the AC 1. It can be seen that traffic sent by the second CE device to the third CE device will bypass to the second P device.
For the case that the first CE device transmits traffic to the third CE device, the traffic transmitted by the first CE device is forwarded to the second PE device via the first PE device and the first P device, the destination VSI of the traffic is VSI1, and the destination MAC is MAC 1. Since the first P device forwards the traffic to the second PE device through the PW, the second PE device searches for a forwarding entry with VSI of VSI1, MAC of MAC1, and AcFlag of 0, and hits on the forwarding entry 1, so that the second PE device forwards the target traffic to the third CE device through AC 1. It can be seen that the traffic sent by the first CE device to the third CE device is not bypassed.
For the case where the second CE device sends traffic to the sixth CE device, the second CE device sends the traffic to the second PE device through the AC, where the destination VSI of the traffic is VSI1 and the destination MAC is MAC 2. After the target traffic is forwarded to the second PE device, since the second PE device receives the traffic through the AC, the second PE device searches for a forwarding entry with VSI of VSI1, MAC of MAC2, and AcFlag of 1, and hits on the forwarding entry 4, so that the second PE device forwards the target traffic to the second P device through PW1, and forwards the target traffic to the sixth CE device through the second P device and the fourth PE device. It can be seen that the traffic sent by the second CE device to the sixth CE device does not detour.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a traffic forwarding device according to an embodiment of the present invention, where the structural diagram may include:
a traffic receiving module 401, configured to receive a target traffic sent to a CE device on a user network edge accessing the PE device;
an ingress interface determining module 402, configured to determine an ingress interface that receives the target traffic;
an egress interface determining module 403, configured to determine an egress interface corresponding to the target traffic according to the ingress interface, where when the ingress interface is an access circuit AC, the egress interface corresponding to the target traffic is an entry of a preset tunnel, and when the ingress interface is a pseudo wire PW, the egress interface corresponding to the target traffic is an AC connected to the CE device, a starting point and an end point of the preset tunnel are the PE device, and are through a service provider network P device;
a traffic sending module 404, configured to forward the target traffic through an egress interface corresponding to the target traffic.
In a possible embodiment, a second forwarding table entry whose output interface is an AC and a third forwarding table entry whose output interface is an entrance of the preset tunnel are pre-stored in the PE device;
the outgoing interface determining module 403 determines, according to the incoming interface, an outgoing interface corresponding to the target traffic, including:
if the incoming interface is the AC, determining an outgoing interface with the same destination address as the target flow in the third forwarding table entry as an outgoing interface corresponding to the target flow;
and if the ingress interface is the PW, determining an egress interface with the same destination address as the target flow in the second forwarding table entry as an egress interface corresponding to the target flow.
In a possible embodiment, the apparatus further includes a forwarding table entry generating module, configured to receive a first forwarding table entry sent by a control plane;
and when the output interface of the first forwarding table entry is an AC, generating a second forwarding table entry of which the destination address is the same as the first forwarding table entry and the output interface is the AC, and a third forwarding table entry of which the destination address is the same as the first forwarding table entry and the output interface is the entrance of the preset tunnel.
In a possible implementation, the PE device is connected to a plurality of P devices, and the apparatus further includes a node selection module, configured to determine a target P device from the plurality of P devices according to a preset load balancing policy; and setting the P device through which the preset tunnel passes as the target P device.
In a possible embodiment, the preset tunnel is a tunnel constructed based on a segment routing SR technique, and the path of the preset tunnel is: the PE device-the P device-the PE device.
An embodiment of the present invention further provides a PE device, as shown in fig. 5, including:
a memory 501 for storing a computer program;
the processor 502 is configured to implement the following steps when executing the program stored in the memory 501:
receiving a target flow sent to a user network edge (CE) device accessed to the PE device;
determining an incoming interface receiving the target traffic;
determining an outgoing interface corresponding to the target traffic according to the incoming interface, wherein when the incoming interface is an Access Circuit (AC), the outgoing interface corresponding to the target traffic is an inlet of a preset tunnel, and when the incoming interface is a Pseudo Wire (PW), the outgoing interface corresponding to the target traffic is an AC connected with the CE device, and a starting point and an end point of the preset tunnel are the PE devices and pass through a service provider network (P) device;
and forwarding the target flow through an output interface corresponding to the target flow.
The communication bus mentioned in the above PE device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the traffic forwarding methods described above.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer, causes the computer to perform any of the traffic forwarding methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the PE device, the computer-readable storage medium, and the computer program product, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A traffic forwarding method is applied to a service provider network edge (PE) device, and the method comprises the following steps:
receiving a target flow sent to a user network edge (CE) device accessed to the PE device;
determining an incoming interface receiving the target traffic;
determining an outgoing interface corresponding to the target traffic according to the incoming interface, wherein when the incoming interface is an Access Circuit (AC), the outgoing interface corresponding to the target traffic is an inlet of a preset tunnel, and when the incoming interface is a Pseudo Wire (PW), the outgoing interface corresponding to the target traffic is an AC connected with the CE device, and a starting point and an end point of the preset tunnel are the PE devices and pass through a service provider network (P) device;
and forwarding the target flow through an output interface corresponding to the target flow.
2. The method according to claim 1, wherein a second forwarding entry with an outgoing interface as AC and a third forwarding entry with an outgoing interface as an entry of the preset tunnel are pre-selected and stored in the PE device;
determining an output interface corresponding to the target flow according to the input interface includes:
if the incoming interface is the AC, determining an outgoing interface with the same destination address as the target flow in the third forwarding table entry as an outgoing interface corresponding to the target flow;
and if the ingress interface is the PW, determining an egress interface with the same destination address as the target flow in the second forwarding table entry as an egress interface corresponding to the target flow.
3. The method of claim 2, further comprising:
receiving a first forwarding table item sent by a control plane;
and when the output interface of the first forwarding table entry is an AC, generating a second forwarding table entry of which the destination address is the same as the first forwarding table entry and the output interface is the AC, and a third forwarding table entry of which the destination address is the same as the first forwarding table entry and the output interface is the entrance of the preset tunnel.
4. The method of claim 1, wherein the PE device is connected to a plurality of P devices, and wherein the method further comprises:
determining target P equipment from the plurality of P equipment according to a preset load balancing strategy;
and setting the P device through which the preset tunnel passes as the target P device.
5. The method according to any one of claims 1 to 4, wherein the preset tunnel is a tunnel constructed based on a segment routing SR technique, and the path of the preset tunnel is: the PE device-the P device-the PE device.
6. A traffic forwarding apparatus applied to a service provider network edge (PE) device, the apparatus comprising:
a traffic receiving module, configured to receive a target traffic sent to a CE device on a user network edge accessing the PE device;
an incoming interface determining module, configured to determine an incoming interface that receives the target traffic;
an egress interface determining module, configured to determine an egress interface corresponding to the target traffic according to the ingress interface, where when the ingress interface is an access circuit AC, the egress interface corresponding to the target traffic is an entry of a preset tunnel, and when the ingress interface is a pseudo wire PW, the egress interface corresponding to the target traffic is an AC connected to the CE device, a starting point and an end point of the preset tunnel are the PE device, and are connected through a service provider network P device;
and the flow sending module is used for forwarding the target flow through the outlet interface corresponding to the target flow.
7. The apparatus according to claim 6, wherein a second forwarding entry whose output interface is AC and a third forwarding entry whose output interface is an entry of the pre-determined tunnel are pre-selected and stored in the PE device;
the determining module of the output interface determines the output interface corresponding to the target flow according to the input interface, and includes:
if the incoming interface is the AC, determining an outgoing interface with the same destination address as the target flow in the third forwarding table entry as an outgoing interface corresponding to the target flow;
and if the ingress interface is the PW, determining an egress interface with the same destination address as the target flow in the second forwarding table entry as an egress interface corresponding to the target flow.
8. The apparatus according to claim 7, wherein the apparatus further comprises a forwarding table entry generating module, configured to receive a first forwarding table entry sent by a control plane;
and when the output interface of the first forwarding table entry is an AC, generating a second forwarding table entry of which the destination address is the same as the first forwarding table entry and the output interface is the AC, and a third forwarding table entry of which the destination address is the same as the first forwarding table entry and the output interface is the entrance of the preset tunnel.
9. The apparatus according to claim 6, wherein the PE device is connected to a plurality of P devices, and the apparatus further comprises a node selection module, configured to determine a target P device from the plurality of P devices according to a preset load balancing policy; and setting the P device through which the preset tunnel passes as the target P device.
10. The apparatus according to any one of claims 6 to 9, wherein the preset tunnel is a tunnel constructed based on a segment routing SR technique, and the path of the preset tunnel is: the PE device-the P device-the PE device.
11. A service provider network edge, PE, device, comprising:
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-5 when executing a program stored in the memory.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
CN202110697537.8A 2021-06-23 2021-06-23 Flow forwarding method and device, PE (provider edge) equipment and storage medium Active CN113422730B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110697537.8A CN113422730B (en) 2021-06-23 2021-06-23 Flow forwarding method and device, PE (provider edge) equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110697537.8A CN113422730B (en) 2021-06-23 2021-06-23 Flow forwarding method and device, PE (provider edge) equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113422730A true CN113422730A (en) 2021-09-21
CN113422730B CN113422730B (en) 2022-04-22

Family

ID=77716239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110697537.8A Active CN113422730B (en) 2021-06-23 2021-06-23 Flow forwarding method and device, PE (provider edge) equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113422730B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102045250A (en) * 2009-10-26 2011-05-04 杭州华三通信技术有限公司 Forwarding method for multicast message in VPLS, and service provider edge equipment
CN102238040A (en) * 2010-04-22 2011-11-09 杭州华三通信技术有限公司 Method for monitoring CE (Customer Edge router) and routing device
US20130148657A1 (en) * 2011-12-07 2013-06-13 Cisco Technology, Inc. Mechanism for e-vpn interoperability with vpls
CN103685022A (en) * 2012-09-17 2014-03-26 杭州华三通信技术有限公司 Message forwarding method and service provider network edge equipment
CN105591800A (en) * 2015-07-29 2016-05-18 杭州华三通信技术有限公司 Traffic protection method and device
CN105591868A (en) * 2015-07-15 2016-05-18 杭州华三通信技术有限公司 Virtual private network VPN access method and device
CN108141392A (en) * 2016-09-30 2018-06-08 华为技术有限公司 The method and apparatus that pseudowire load is shared
CN110784407A (en) * 2019-10-31 2020-02-11 迈普通信技术股份有限公司 Interface configuration method, data transmission method and device and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102045250A (en) * 2009-10-26 2011-05-04 杭州华三通信技术有限公司 Forwarding method for multicast message in VPLS, and service provider edge equipment
CN102238040A (en) * 2010-04-22 2011-11-09 杭州华三通信技术有限公司 Method for monitoring CE (Customer Edge router) and routing device
US20130148657A1 (en) * 2011-12-07 2013-06-13 Cisco Technology, Inc. Mechanism for e-vpn interoperability with vpls
CN103685022A (en) * 2012-09-17 2014-03-26 杭州华三通信技术有限公司 Message forwarding method and service provider network edge equipment
CN105591868A (en) * 2015-07-15 2016-05-18 杭州华三通信技术有限公司 Virtual private network VPN access method and device
CN105591800A (en) * 2015-07-29 2016-05-18 杭州华三通信技术有限公司 Traffic protection method and device
CN108141392A (en) * 2016-09-30 2018-06-08 华为技术有限公司 The method and apparatus that pseudowire load is shared
CN110784407A (en) * 2019-10-31 2020-02-11 迈普通信技术股份有限公司 Interface configuration method, data transmission method and device and electronic equipment

Also Published As

Publication number Publication date
CN113422730B (en) 2022-04-22

Similar Documents

Publication Publication Date Title
US9860180B2 (en) Multi-level flow table search method and apparatus
US11102173B2 (en) Systems and methods for routing data using software-defined networks
CN109831390B (en) Message forwarding control method and device
US9515985B2 (en) Platform for private internet protocol (IP) cloud services
US9009782B2 (en) Steering traffic among multiple network services using a centralized dispatcher
CN115190062B (en) Service processing method and device, electronic equipment and computer readable storage medium
US10181031B2 (en) Control device, control system, control method, and control program
CN114500467A (en) Address conflict detection method, address conflict detection device and electronic equipment
CN112565045B (en) Method, device, equipment and storage medium for forwarding message in EVPN
CN110213365B (en) User access request processing method based on user partition and electronic equipment
CN110311861B (en) Method and device for guiding data flow
CN113422730B (en) Flow forwarding method and device, PE (provider edge) equipment and storage medium
CN110855784A (en) Proxy server node selection method, electronic device, system and medium
CN114760108A (en) Message matching method and device
CN113542099A (en) Data transmission method, device, electronic equipment, medium and product
US11411998B2 (en) Reputation-based policy in enterprise fabric architectures
CN114006868B (en) Flow screening method and device
CN115022333B (en) Message forwarding method and device of load balancing equipment and electronic equipment
CN113472667B (en) Message forwarding method, device, node equipment and storage medium
CN114221834A (en) Message forwarding method and device
CN115529270A (en) Physical and virtual network fusion method and device, computer equipment and storage medium
CN112165428B (en) Traffic cleaning method and device and first boundary routing equipment
CN109714262B (en) Data transmission method and related equipment
CN113918504A (en) Method and device for realizing isolation group
CN109218199B (en) Message processing 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