CN108900440A - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN108900440A
CN108900440A CN201810682139.7A CN201810682139A CN108900440A CN 108900440 A CN108900440 A CN 108900440A CN 201810682139 A CN201810682139 A CN 201810682139A CN 108900440 A CN108900440 A CN 108900440A
Authority
CN
China
Prior art keywords
port
source
message
eport
local
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
CN201810682139.7A
Other languages
Chinese (zh)
Other versions
CN108900440B (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 Technologies Co Ltd
Original Assignee
New 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201810682139.7A priority Critical patent/CN108900440B/en
Publication of CN108900440A publication Critical patent/CN108900440A/en
Application granted granted Critical
Publication of CN108900440B publication Critical patent/CN108900440B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/45Arrangements for providing or supporting expansion

Landscapes

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

Abstract

This application provides message forwarding methods and device.It is message matching source EPORT when the PE of annular stacking system receives message by up going port in the application, and determining with the associated source ID of source EPORT, source EPORT, source ID is carried and sent in annular stacking system by least one stacking opening in messages;And when PE receives message by stacking opening, if it was found that the source EPORT that message carries is identical as the assigned EPORT of local Single port, think that the port is the source port that message enters annular stacking system at this time, it can then force the source ID for carrying message to be revised as being used to indicate the source ID in source port and local all stacking opening Block message forwardings, source port filtering is finally realized in annular stacking system.

Description

Message forwarding method and device
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a method and an apparatus for forwarding a packet.
Background
802.1BR defines a switch with Port extension capability consisting of a (group) Control Bridge (CB) tree connecting a plurality of Port extension bridges (PE: Port extensions).
The PE provides expansion of Port number and Port access capability for the CB, and is connected with an upper PE or the CB through an Upstream Port (Upstream Port), and is connected with a lower PE through a Cascade Port (Cascade Port). The CBs can be cascaded, the CBs perform virtual Port (vPort) mapping management on ports on the PEs, and the PEs are connected through Cascade ports. Figure 1 shows an 802.1BR defined switch fabric.
Disclosure of Invention
The application provides a message forwarding method and a message forwarding device, which are used for realizing source port filtering of messages in an annular stacking system formed by PE annular stacking.
Specifically, the method is realized through the following technical scheme:
a message forwarding method is applied to a PE (provider edge) serving as a member device in a ring stack system, and comprises the following steps:
receiving a first message through a local uplink port, determining a first source EPORT matched with the first message according to Ingress ECID carried by the first message, determining a first source ID associated with the first source EPORT, searching port states of ports corresponding to the first source ID in a local source filter table, blocking forwarding of the first message at a port with a blocking Block state, forwarding the first message carrying the first source EPORT and the first source ID at a port with a forwarding Forward state, wherein the port with the forwarding state comprises at least one stacking port;
receiving a second message through a local stacking port, if a second source EPORT carried by the second message is the same as an EPORT distributed by the local first port, and the first port is a port except an uplink port and a stacking port, forcibly modifying a second source ID carried by the second message into a third source ID used for indicating the forwarding of the second message at the first port and all local stacking ports Block, and searching for the first port corresponding to the third source ID and the port states of all local stacking ports to be Block in a local source filter table, and then forwarding the Block second message at the first port and all local stacking ports.
A message forwarding device is applied to a port expansion bridge PE as a member device in a ring stack system, and comprises: the system comprises an uplink port, a stack port, at least one port except the uplink port and the stack port, and a forwarding control unit;
the forwarding control unit is used for determining a first source EPORT matched with a first message according to Ingress ECID carried by the first message received by a local uplink port, determining a first source ID associated with the first source EPORT, searching a port state of each port corresponding to the first source ID in a local source filter table, blocking forwarding of the first message by a Block-blocked port, forwarding the first message carrying the first EPORT and the first source ID by a Forward-port, wherein the Forward-port comprises at least one stacking port; and
and if the second source EPORT carried by the second message received at the local stacking port is the same as the EPORT distributed by the local first port, the first port is a port except the uplink port and the stacking port, the second source ID carried by the second message is forcibly modified into a third source ID used for indicating the forwarding of the second message at the first port and all local stacking ports Block, the first port corresponding to the third source ID and the port states of all local stacking ports are searched in a local source filter table and are all Block, and the Block second message is forwarded at the first port and all local stacking ports.
According to the technical scheme provided by the application, when a PE of the annular stacking system receives a message through an uplink port, a source EPORT is matched with the message, a source ID associated with the source EPORT is determined, and the source EPORT and the source ID are carried in the message and are transmitted in the annular stacking system through at least one stacking port; when a PE receives a message through a stacking port, if a source EPORT carried by the message is found to be the same as an EPORT distributed by a local port, the port is considered as a source port of the annular stacking system, a source ID carried by the message is forcibly modified into a source ID used for indicating Block message forwarding at the source port and all local stacking ports, and finally source port filtering is realized in the annular stacking system;
furthermore, in the application, the source ID carried by the message is forcibly modified into the source ID used for indicating the forwarding of the Block messages at the source port and all the local stacking ports, so that one source ID indicates the forwarding of the Block messages at the source port and indicates the forwarding of all the Block messages at the local stacking ports, and the quantity of the source IDs is saved.
Still further, in this application, once a PE forcibly modifies a source ID carried in a packet to a source ID used for indicating forwarding of a Block packet at a source port and all local stack ports, it means that other PEs in the same ring stack system cannot receive the packet.
Drawings
FIG. 1 is a diagram of a prior art 802.1 BR-defined switch fabric;
FIG. 2 is a schematic structural diagram of a ring stack system in 802.1BR provided in the present application;
FIG. 3 is a flow chart of a method provided herein;
FIG. 4 is a flowchart illustrating implementation of an embodiment provided herein;
fig. 5 is a diagram illustrating the structure of the apparatus according to the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
In 802.1BR networking, stacking between PEs is often required for link backup. Fig. 2 shows a structure of a ring stack between PEs. In fig. 2, 4 PEs are annularly stacked through the stack opening. It should be noted that, as an embodiment, in the present application, the CB and the PEs may be annularly stacked with each other, such as the CB shown in fig. 2.
Based on the premise of annular stacking between PEs, the present application proposes how to implement PE source port filtering on the premise of annular stacking between PEs. For convenience of description, a stacking system formed by annular stacking between PEs is referred to as an annular stacking system, and each PE participating in stacking is referred to as a member device of the annular stacking system.
How to implement the source port filtering of PE in the ring stack system provided in the present application is described as follows:
referring to fig. 3, fig. 3 is a flow chart of a method provided by the present application. The method is applied to PE in a ring stack system, as shown in fig. 3, and comprises the following steps:
step 301, when receiving the first message through the local uplink port, executing step 302, and when receiving the second message through the local stacking port, executing step 303.
In this application, the first packet and the second packet may be non-unicast packets, such as broadcast packets, multicast packets, unknown unicast or multicast packets, and the like. The first message and the second message are only named for convenience of description and are not intended to be limiting.
Step 302, determining a first source EPORT matched with the first message according to a source port (Ingress) Ethernet forwarding Channel Identifier (ECID) carried by the first message, determining a first source ID associated with the first source EPORT, searching a port state of each port corresponding to the first source ID in a local source filter table, blocking the forwarding of the first message at a port with a blocking (Block) state, forwarding the first message carrying the first source EPORT and the first source ID at a port with a forwarding (Forward) state, wherein the port with the forwarding state includes at least one stacking port.
This step 302 is performed on the premise that the local uplink port receives the first packet. The following description focuses on a specific implementation of step 302, and is not repeated here.
Step 303, receiving a second message through the local stacking port, if the second source EPORT carried by the second message is the same as the EPORT allocated to the local first port, forcibly modifying the second source ID carried by the second message to a third source ID for indicating forwarding of the second message at the first port and all local stacking ports Block, looking up that the port states of the first port corresponding to the third source ID and all local stacking ports are Block in the local source filter table, and forwarding the Block second message at the first port and all local stacking ports.
This step 303 is performed on the premise that the local stacking port receives the second packet. The following will focus on a specific implementation of step 303, which is not described herein again. Here, the first port is a port other than the upstream port, the stack port, such as a user-side port.
The flow shown in fig. 3 is completed. It should be noted that, in the above description, the first port, the first source EPORT, the first source ID, the second source EPORT, the second source ID, and the third source ID are only named for convenience of description, and are not intended to be limiting.
As can be seen from the flow shown in fig. 3, in the annular stacking system, when a PE receives a message (for example, the second message) through a stacking port, if it is found that a source EPORT carried by the message is the same as an EPORT allocated to a local port, and the port is considered as a source port through which the message enters the annular stacking system, a source ID carried by the message is forcibly modified to a source ID used for indicating forwarding of Block messages at the source port and all local stacking ports, so that source port filtering is finally implemented.
Furthermore, in the application, the source ID carried by the message is forcibly modified into the source ID used for indicating the forwarding of the Block messages at the source port and all the local stacking ports, so that one source ID indicates the forwarding of the Block messages at the source port and indicates the forwarding of all the Block messages at the local stacking ports, and the quantity of the source IDs is saved.
Further, in this application, once a PE forcibly modifies a source ID carried in a packet to a source ID used for indicating forwarding of a Block packet at a source port and all local stacking ports, it means that other PEs in the same ring stacking system cannot receive the packet. For example, taking the third source ID as an example, in this PE, the third source ID may indicate all local stacking ports Block and a first port, and in other PEs, the third source ID may indicate a non-local stacking port and all local stacking ports Block of other PEs.
In the step 302, there are two implementation manners for determining the first source EPORT matched with the first packet according to the Ingress ECID, which are described below:
mode 1:
the method 1 is applied to a scenario in which the Ingress ECID carried by the first message is an ECID allocated to the local second port. The second port is a port other than the upstream port, the stack port, such as a user-side port. The term second port is used herein for convenience of distinguishing from the first port and is not intended to be limiting.
In this embodiment 1, in the step 302, determining, according to the Ingress ECID, the first source EPORT to which the first packet is matched includes:
and determining the EPORT distributed by the local second port as a first source EPORT matched with the first message.
Based on the first source EPORT allocated in this manner 1, in step 302, determining the first source ID associated with the first source EPORT includes: and determining a fourth pre-designated source ID for indicating Block message forwarding at the second port as the first source ID associated with the first source EPORT. The fourth source ID is named for convenience of distinguishing and is not meant to be limiting.
In embodiment 1, the port having the port state Block corresponding to the first source ID in step 302 includes at least the second port.
This completes the description of mode 1.
Mode 2:
the method 2 is applied to a scene that the Ingress ECID carried by the first message is not the ECID allocated to any local port.
In this embodiment 2, in the step 302, determining, according to the Ingress ECID, the first source EPORT to which the first packet is matched includes:
if the Ingress ECID carried by the first message is not the ECID allocated to any local port, determining the port allocated with the Ingress ECID on other PEs according to the synchronous port information of other PEs, and determining the EPORT allocated to the determined port as the first source EPORT matched with the first message, wherein the synchronous port information at least comprises: ECID, EPORT, to which the port is assigned.
Based on the first source EPORT allocated in this manner 2, in the step 302, determining the first source ID associated with the first source EPORT includes: the method comprises the steps that pre-assigned identification IDs used for indicating that a PE receives a message and used for indicating that a destination PE where a source port of a Block message is located are used; the source port here refers to: and allocating ports with the same ECID as the Ingress ECID.
This completes the description of mode 2.
It should be noted that, when applied to the foregoing mode 1 or mode 2, the port state of each port corresponding to the first source ID in the local source filter table is set according to the principle that the PE sends a packet (broadcast or multicast) in the ring stack system based on the shortest path and does not cause a loop, where the port state of the port through which the packet passes on the premise that the loop is not caused is Forward, and vice versa is Block. The following description is given by way of example and will not be repeated here.
In the step 303, if it is checked that the second source EPORT carried in the second packet is different from the EPORT allocated to any local port, the method may further include:
looking up the port state of each port corresponding to the second source ID carried by the second message in the local source filtering table,
blocking the second message from forwarding at the port with the port state of Block, and forwarding the second message at the port with the port state of Forward; the port state of each port corresponding to the second source ID is set according to the principle that a source device of the second message sends a message in the annular stacking system based on the shortest path and does not cause a loop, wherein when the port on the PE is a port through which the message passes, the port state is forwarded, and otherwise, the port state is Block; the source device of the second packet is: and receiving the PE of the second message through the local uplink port.
Based on the above description, the present application is described below by one embodiment:
referring to fig. 4, fig. 4 is a diagram of an application networking of an embodiment provided in the present application. In fig. 4, the annular stacks of PEs 401 to 404 constitute an annular stacking system, and the CBs and the annular stacking system constitute a basic 802.1BR network.
In fig. 4, PEs 401 to 404 are four member devices in the ring stack system, respectively. In FIG. 4, the stacking ports on both sides of PE401 are Port1/1 and Port1/2, the stacking ports on both sides of PE402 are Port2/1 and Port2/2, the stacking ports on both sides of PE403 are Port3/1 and Port3/2, and the stacking ports on both sides of PE404 are Port4/1 and Port 4/2. Port501 is a user-side Port of PE401, Port502 is a user-side Port of PE402, Port503 is a user-side Port of PE403, and Port504 is a user-side Port of PE 404. In fig. 4, there may also be cascading ports and other ports per PE that handle similar user-side ports, which are not described here by way of example.
Taking PE401 in fig. 4 as an example:
when PE401 comes online, PE401 allocates a virtual Port (EPORT) to local user-side Port 501. for convenience of description, the EPORT allocated to Port501 is referred to as EPORT501_ a.
PE401 synchronizes EPORT501_ a assigned by Port501 to other PEs, i.e., PE402 through PE404, in the same ring stack system. Thus, PE 402-PE 404 locally save EPORT501_ a allocated by Port501 on PE 401.
When PE401 comes online, the CB will assign an ECID to PE401 local user side Port 501. For ease of description, the ECID assigned by Port501 will be referred to herein as ECID501_ b.
PE401 synchronizes the ECID501_ b assigned by Port501 to other PEs, i.e., PE402 to PE404, in the same ring stack system.
In summary, PE 402-PE 404 will eventually locally save EPORT501_ a and ECID501_ b allocated by Port501 on PE 401.
In the present application, PEs 402-404 also synchronize the EPORT and ECID assigned to the local user-side port to other PEs in the same ring stack system in a manner similar to that performed by PE 401.
After the ring stack system is composed, the local source filter tables are set for the PEs 401 to 404 based on the topological connection of the ring stack system. How to set the source filter table is described by taking the topological connection of the PE401 existing in the ring stack system as an example:
the PE401 has the following two topological connections in the ring stack system:
connection C1: PE401- > PE402- > PE403- > PE404- > PE 401;
connection C2: PE401- > PE404- > PE403- > PE402- > PE 401.
Based on the two topological connections, a forwarding path is calculated for each specified source ID: taking the source ID as S12 as an example, S12 is used to indicate that a packet is forwarded from the PE401, and a PE402 (whose principle is similar to that of other PEs) is located at a source Port (for example, Port 502) of the packet in the ring stack system, based on the above topological connection, taking PE401 as an example to send the packet in a broadcast manner in the ring stack system, and if the multicast principle is similar to that, the PE401 will broadcast the packet according to the following path selected according to the shortest path:
r1: port1/1 of PE401- > Port2/1 of PE 402;
r2: port1/2- > Port4/2- > Port4/1- > Port3/2 of PE404 of PE 401.
Based on the two paths, corresponding source filter entries are respectively set in the local source filter tables from PE401 to PE 404. The source filter table entry set in the local source filter table of the PE401 includes: based on the paths R1 and R2, the Port states of the ports corresponding to the source ID S12 and the source ID S12 are Forward, and the Port states of the ports 1/1 and Port1/2 corresponding to the source ID S12 are Forward, because the source Port502 of the Block packet is in the PE402, at this time, even if the PE401 sends a packet through other local ports, such as the user-side Port501 shown in fig. 4, a loop will not be caused, and in order to ensure that the packet is flooded, the Port states of other local ports, such as the user-side Port501 shown in fig. 4, of the PE401 are also Forward. And the source filter entries set in the PE404 local source filter table include: based on the paths R1 and R2, the Port state of each Port corresponding to the source ID S12 and the source ID S12 is forwarded, the Port state of the stack Port4/1 on the side corresponding to the source ID S12 in the source filter table entry set in the local source filter table of the PE404 is Block, and the Port state of the stack Port4/2 on the other side is Block (mainly to avoid the packet receiving Port from sending packets again and causing a loop), because the source Port502 of a Block packet is in the PE402, at this time, even if the PE404 sends packets through other local ports, such as the user-side Port504 shown in fig. 4, the loop will not be caused, and to ensure the packet flooding, the Port state of each other local Port of the PE404, such as the user-side Port504 shown in fig. 4, is also forwarded. The source filter table entries set in the PE403 local source filter table include: based on the paths R1 and R2, the Port states of the ports corresponding to the source ID, that is, S12, and the source ID, that is, S12, in the source filter table entry set in the local source filter table of the PE403, that is, the Port states of the two side stack ports 4/1 and Port4/2 corresponding to the source ID, that is, S12, are Block, because the source Port502 of a Block message is in the PE402, at this time, even if the PE403 sends a message through the local other ports, for example, the user-side Port503 shown in fig. 4, a loop will not be caused, and in order to ensure that the message is flooded, the Port states of the local other ports, for example, the user-side Port503 shown in fig. 4, of the PE403 are Forward. As for PE402, because the source Port502 of a Block packet is in the present PE402, based on the above description of step 303 in the flow shown in fig. 3, PE402 modifies the source ID, i.e. S12, for example, to S22, S22 is used to indicate that the user-side Port502 and all local stack ports 2/1, Port2/2Block packets are forwarded, and the source filter table entry set in the local source filter table includes: the Port states of the ports corresponding to S22 and S22 are Block, and here, the Port states of the user-side Port502 corresponding to S22 and all local stack ports 2/1 and Port2/2 are Block.
For example, the source ID is S12, the source ID is S13 (for indicating that the PE403 that is used to forward the packet from the PE401 and that is used to Block the source port of the packet in the ring stack system is located), and the source ID is S14 (for indicating that the PE404 that is used to forward the packet from the PE401 and that is used to Block the source port of the packet in the ring stack system is located), which have similar principles and are not described again.
Taking the source ID as S11 as an example, S11 is used to instruct local user-side Port501Block message forwarding. Once the source ID is S11, it means that the source Port501 of the packet is on the PE401, and to implement source Port filtering, S11 is set to instruct the local user-side Port501Block packet forwarding, and for how to forward the packet in the ring stack system, based on the two topology connections, the following shortest path is selected:
r3: port1/1- > Port2/1- > Port2/2- > Port3/1 of PE402 of PE 401;
r4: port1/2 of PE401- > Port4/2 of PE 404.
Based on the two paths, corresponding source filter entries are respectively set in the local source filter tables from PE401 to PE 404. The source filter table entry set in the local source filter table of the PE401 includes: based on the above S11, the Port state of each Port corresponding to the source ID S11 and the source ID S11 is used to instruct local user-side Port501Block packet forwarding, the Port state of the user-side Port501 corresponding to S11 is Block, and based on the above paths R3 and R4, the Port state of the stack ports 1/1 and Port1/2 corresponding to the source ID S11 is Forward. The source filter table entries set in the PE402 local source filter table include: based on the paths R3 and R4, the Port state of each Port corresponding to the source ID S11 and the source ID S11, the Port state of the stack Port2/1 on the side corresponding to the source ID S11 in the source filter table entry set in the local source filter table of the PE402 is Block (mainly to avoid the packet receiving Port from sending a packet again, which causes a loop), and the Port state of the stack Port2/2 on the other side is Forward, because the source Port501 of the Block packet is in the PE401, at this time, even if the PE402 sends a packet through other local ports, such as the user-side Port502 shown in fig. 4, the loop will not be caused, and to ensure the packet flooding, the Port state of each other local Port of the PE402, such as the user-side Port502 shown in fig. 4, is Forward. PE403 and PE404 are similar in principle to PE 402.
In the present application, the source filter table is also set based on the topology connections existing in the ring stack system from PE402 to PE404, and the principle is similar to that of PE401, and is not described again.
In summary, the PEs 401 to 404 set the local source filter table according to the above method.
After the PEs 401 to 404 set the local source filtering tables, how to perform source port filtering on the packet is described as follows:
taking the example that PE402 receives a broadcast message (denoted as message 601) through local Port 502:
PE402 receives the message 601 through the local Port502, encapsulating an Ethernet Tag (E-Tag) in the message 601. E-Tag includes Ingress ECID. Ingress ECID is the ECID assigned to Port502 (ECID502_ b). For convenience of description, the message 601 encapsulated with the E-Tag is referred to as a message 602.
PE402 sends message 602 up to the CB.
The CB forwards the message 602 to the PE 401.
PE401 receives message 602 via an upstream port (denoted as UP 1).
PE401 finds that Ingress ECID in E-Tag encapsulated by message 602 is ECID502_ b, and ECID502_ b is ECID allocated by Port502 on PE402, PE401 allocates EPORT502_ a to message 602 as source EPORT matched with message 602, and allocates source IDS12 as source ID associated with source EPORT. Here, PE401 allocates EPORT502_ a for packet 602 as the source EPORT matched with packet 602, and allocates source IDS12 as the source ID associated with the source EPORT, which can be implemented based on the Tunnel Termination and Interface (TTI) issued on uplink UP 1.
The PE401 searches a source filtering table entry containing S12 in the local source filtering table, and if the Port states of Port501, Port1/1 and Port1/2 in the found source filtering table entry are Forward, the PE401 forwards the packet 602 through Port501, Port1/1 and Port1/2 respectively. When forwarding the packet 602 through the Port501, the PE401 decapsulates the packet 602 (recovers the packet 601) and forwards the packet. PE401 will forward message 602 by carrying the source EPORT (EPORT502_ a) and the source ID (S12) with the message 602 when forwarding the message 602 through Port1/1 and Port 1/2.
When PE402 receives packet 602 through stacking Port2/1 and finds that the source EPORT carried by packet 602 (EPORT502_ a) is an EPORT to which local Port502 is assigned, it forces the source ID carried by packet 602 (S12) to be modified as above S22. PE402 searches the source filter table entry containing S22 in the local source filter table, and if the Port states of Port502, Port2/1, and Port2/2 in the found source filter table entry are Block, PE402 blocks packet 602 at Port502, Port2/1, and Port 2/2. Finally, the source port filtering performed by the PE402 to filter out the message 602 is performed, and the message 602 is also filtered out and forwarded in the whole ring stack system.
When the PE404 receives the packet 602 through the stacking Port4/2 and finds that the source EPORT (EPORT502_ a) carried by the packet 602 is not an EPORT to which a local Port is allocated, a source filter entry including a source ID (S12) carried by the packet 602 is searched in a local source filter table, and if the Port states of the ports 504 and 4/1 are Foward and the Port state of the Port4/2 is Block in the searched source filter entry, the packet 602 is forwarded through the ports 504 and 4/1. Where the PE404 decapsulates the packet 602 (recovers the packet 601) and forwards the packet 602 when forwarding the packet 602 through the Port 504.
When the PE403 receives the packet 602 through the stacking Port3/2 and finds that the source EPORT (EPORT502_ a) carried by the packet 602 is not an EPORT to which the local Port is allocated, a source filter entry including the source ID (S12) carried by the packet 602 is searched in the local source filter table, and in the found source filter entry, the Port503 has a Port state of Foward, and the ports of Port4/1 and Port4/2 have Port states of Block, then the packet 602 is forwarded through the ports 504 and Port 4/1. When forwarding the packet 602 through the Port503, the PE403 decapsulates the packet 602 (recovers the packet 601) and forwards the packet.
For example, the CB forwards the message 602 to the PE401, and the CB forwards the message 602 to the PE403, and the PE404 forwards the message to the PE401 in a similar manner, which is not described herein again.
Taking the example that PE401 receives the broadcast message (denoted as message 603) through the local Port501 as follows:
PE401 receives packet 603 through local Port501, and encapsulates the E-Tag in packet 603. The E-Tag includes IngresseCID. Ingress ECID is the ECID (ECID501_ b) assigned by Port 501. For convenience of description, the message 603 encapsulating the E-Tag is denoted as a message 604.
The PE401 sends the message 604 up to the CB.
The CB forwards the message 604 to the PE 401.
PE401 receives message 604 via upstream port UP 1.
PE401 finds that Ingress ECID in E-Tag encapsulated by message 604 is ECID501_ b, and ECID502_ b is ECID allocated by Port501 on PE401, PE401 allocates EPORT501_ a to message 602 as source EPORT matched with message 604, and allocates source IDS11 as source ID associated with source EPORT. Here, PE401 allocates EPORT501_ a for packet 604 as the source EPORT to which packet 602 matches, and allocates source IDS11 as the source ID associated with the source EPORT, which can be implemented based on the TTI issued on upstream UP 1.
PE401 searches the source filter table entry containing S11 in the local source filter table, and if the Port state of Port501 is Block, and the Port states of Port1/1 and Port1/2 are Forward, PE401 performs source Port filtering on Port501Block packet 604 (i.e. source Port filtering is realized). PE401 forwards the message 604 at Port1/1, Port 1/2. When forwarding the packet 604 through Port1/1 and Port1/2, the PE401 carries the source EPORT (EPORT501_ a) and the source ID (S11) with the packet 604 for forwarding.
When PE402 receives packet 604 through stack Port4/2 and finds that the source EPORT (EPORT501_ a) carried by packet 604 is not an EPORT to which the local Port is allocated, a source filter table entry containing the source ID (S11) carried by packet 604 is searched in the local source filter table, and in the found source filter table entry, the Port status of Port2/1 is Block, the Port status of Port2/2 and the Port502 is Forward, then PE402 forwards packet 604 through Port502 and Port 2/2. When forwarding the packet 604 through the Port502, the PE402 decapsulates the packet 604 (recovers the packet 603) and forwards the packet 604. PE403 and PE404 are similar in principle to PE 402.
Thus, the description of the embodiments is completed.
It should be noted that, in the above embodiment, the source IDs in the local source filter tables of PE401 to PE404 for indicating that the stack port Block messages on both sides of the user-side port may be the same, which may save the number of source IDs.
The method provided by the present application is described above, and the device provided by the present application is described below:
referring to fig. 5, fig. 5 is a diagram illustrating a structure of the apparatus according to the present invention. The device is applied to a port expansion bridge PE as member equipment in an annular stacking system, and comprises the following components: the system comprises an uplink port, a stack port, at least one port except the uplink port and the stack port, and a forwarding control unit;
the forwarding control unit is used for determining a first source EPORT matched with a first message according to Ingress ECID carried by the first message received by a local uplink port, determining a first source ID associated with the first source EPORT, searching a port state of each port corresponding to the first source ID in a local source filter table, blocking forwarding of the first message by a Block-blocked port, forwarding the first message carrying the first EPORT and the first source ID by a Forward-port, wherein the Forward-port comprises at least one stacking port; and
and if the second source EPORT carried by the second message received at the local stacking port is the same as the EPORT distributed by the local first port, the first port is a port except the uplink port and the stacking port, the second source ID carried by the second message is forcibly modified into a third source ID used for indicating the forwarding of the second message at the first port and all local stacking ports Block, the first port corresponding to the third source ID and the port states of all local stacking ports are searched in a local source filter table and are all Block, and the Block second message is forwarded at the first port and all local stacking ports.
As an embodiment, the determining, by the forwarding control unit according to the Ingress ECID, that the first source EPORT matched with the first packet includes:
and if the Ingress ECID carried by the first message is the ECID distributed by the local second port, determining the EPORT distributed by the local second port as a first source EPORT matched with the first message, wherein the second port is a port except an uplink port and a stack port.
The forwarding control unit determining that a first source ID associated with a first source EPORT includes: determining a fourth pre-designated source ID for indicating the forwarding of the Block message at the second port as a first source ID associated with a first source EPORT; the port with the port state of Block corresponding to the first source ID at least comprises the second port; or,
the method for determining the first source EPORT matched with the first message by the forwarding control unit according to the Ingress ECID comprises the following steps: if the Ingress ECID carried by the first message is not the ECID allocated to any local port, determining the port allocated with the Ingress ECID on other PEs according to the synchronous port information of other PEs, and determining the EPORT allocated to the determined port as the first source EPORT matched with the first message, wherein the synchronous port information at least comprises: ECID, EPORT, to which the port is assigned.
The forwarding control unit determining that a first source ID associated with a first source EPORT includes: the method comprises the steps that pre-assigned identification IDs used for indicating that a PE receives a message and a target PE where a source port of a Block is located are used;
the source port is as follows: and allocating ports with the same ECID as the Ingress ECID.
As an embodiment, the port state of each port corresponding to the first source ID is set according to a principle that the PE sends a packet in the ring stack system based on the shortest path and does not cause a loop, where the port state of the port through which the packet passes is forwarded on the premise that the loop is not caused, and is Block on the contrary.
As an embodiment, if the forwarding control unit checks that a second source EPORT carried by a second packet is different from an EPORT allocated to any local port, further searching a local source filter table for a port state of each port corresponding to a second source ID carried by the second packet, blocking forwarding of the second packet at a port with a port state of Block, and forwarding the second packet at a port with a port state of Forward; the port state of each port corresponding to the second source ID is set according to the principle that a source device of the second message sends a message in the annular stacking system based on the shortest path and does not cause a loop, wherein when the port on the PE is a port through which the message passes, the port state is forwarded, and otherwise, the port state is Block; the source device of the second packet is: and receiving the PE of the second message through the local uplink port.
Thus, the description of the device structure provided in the present application is completed.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (11)

1. A message forwarding method is applied to a port expansion bridge PE as a member device in a ring stack system, and comprises the following steps:
receiving a first message through a local uplink port, determining a first source EPORT matched with the first message according to Ingress ECID carried by the first message, determining a first source ID associated with the first source EPORT, searching port states of ports corresponding to the first source ID in a local source filter table, blocking forwarding of the first message at a port with a blocking Block state, forwarding the first message carrying the first source EPORT and the first source ID at a port with a forwarding Forward state, wherein the port with the forwarding state comprises at least one stacking port;
receiving a second message through a local stacking port, if a second source EPORT carried by the second message is the same as an EPORT distributed by the local first port, and the first port is a port except an uplink port and a stacking port, forcibly modifying a second source ID carried by the second message into a third source ID used for indicating the forwarding of the second message at the first port and all local stacking ports Block, and searching for the first port corresponding to the third source ID and the port states of all local stacking ports to be Block in a local source filter table, and then forwarding the Block second message at the first port and all local stacking ports.
2. The method of claim 1, wherein the determining, from the Ingress ECID, that the first packet matches the first source EPORT comprises:
and if the Ingress ECID carried by the first message is the ECID distributed by the local second port, determining the EPORT distributed by the local second port as a first source EPORT matched with the first message, wherein the second port is a port except an uplink port and a stack port.
3. The method of claim 2, wherein determining the first source ID associated with the first source EPORT comprises: determining a fourth pre-designated source ID for indicating the forwarding of the Block message at the second port as a first source ID associated with a first source EPORT;
the port with the port state of Block corresponding to the first source ID at least comprises the second port.
4. The method of claim 1, wherein the determining, from the Ingress ECID, that the first packet matches the first source EPORT comprises:
if the Ingress ECID carried by the first message is not the ECID allocated to any local port, determining the port allocated with the Ingress ECID on other PEs according to the synchronous port information of other PEs, and determining the EPORT allocated to the determined port as the first source EPORT matched with the first message, wherein the synchronous port information at least comprises: ECID, EPORT, to which the port is assigned.
5. The method of claim 4, wherein determining the first source ID associated with the first source EPORT comprises:
the method comprises the steps that pre-assigned identification IDs used for indicating that a PE receives a first message and a target PE where a source port of a Block is located are used;
the source port is as follows: and allocating ports with the same ECID as the Ingress ECID.
6. The method according to any one of claims 2 to 5, wherein the port state of each port corresponding to the first source ID is set according to a principle that the PE sends the packet in the ring stack system based on the shortest path without causing a loop, where the port state of the port through which the packet passes on the premise of not causing a loop is Forward, and vice versa is Block.
7. The method of claim 1, wherein if it is checked that the second source EPORT carried by the second packet is different from the EPORT allocated to any of the local ports, the method further comprises:
looking up the port state of each port corresponding to a second source ID carried by a second message in a local source filter table, blocking the forwarding of the second message at a port with a port state of Block, and forwarding the second message at a port with a port state of Forward; the port state of each port corresponding to the second source ID is set according to the principle that a source device of the second message sends a message in the ring stack system based on the shortest path and does not cause a loop, wherein when the port on the PE is a port through which the message passes, the port state is forwarded, and otherwise, the port state is Block; the source device of the second packet is: and receiving the PE of the second message through the local uplink port.
8. A message forwarding device is applied to a port expansion bridge PE as a member device in a ring stack system, and comprises: the system comprises an uplink port, a stack port, at least one port except the uplink port and the stack port, and a forwarding control unit;
the forwarding control unit is used for determining a first source EPORT matched with a first message according to Ingress ECID carried by the first message received by a local uplink port, determining a first source ID associated with the first source EPORT, searching a port state of each port corresponding to the first source ID in a local source filter table, blocking forwarding of the first message by a Block-blocked port, forwarding the first message carrying the first EPORT and the first source ID by a Forward-port, wherein the Forward-port comprises at least one stacking port; and
and if the second source EPORT carried by the second message received at the local stacking port is the same as the EPORT distributed by the local first port, the first port is a port except the uplink port and the stacking port, the second source ID carried by the second message is forcibly modified into a third source ID used for indicating the forwarding of the second message at the first port and all local stacking ports Block, the first port corresponding to the third source ID and the port states of all local stacking ports are searched in a local source filter table and are all Block, and the Block second message is forwarded at the first port and all local stacking ports.
9. The apparatus of claim 8, wherein the determining, by the forwarding control unit according to the Ingress ECID, that the first packet matches the first source EPORT comprises:
if the Ingress ECID carried by the first message is the ECID distributed by the local second port, determining the EPORT distributed by the local second port as a first source EPORT matched with the first message, wherein the second port is a port except an uplink port and a stack port;
the forwarding control unit determining that a first source ID associated with a first source EPORT includes: determining a fourth pre-designated source ID for indicating the forwarding of the Block message at the second port as a first source ID associated with a first source EPORT; the port with the port state of Block corresponding to the first source ID at least comprises the second port; or,
the method for determining the first source EPORT matched with the first message by the forwarding control unit according to the Ingress ECID comprises the following steps: if the Ingress ECID carried by the first message is not the ECID allocated to any local port, determining the port allocated with the Ingress ECID on other PEs according to the synchronous port information of other PEs, and determining the EPORT allocated to the determined port as the first source EPORT matched with the first message, wherein the synchronous port information at least comprises: ECID and EPORT with distributed ports;
the forwarding control unit determining that a first source ID associated with a first source EPORT includes: the method comprises the steps that pre-assigned identification IDs used for indicating that a PE receives a message and a target PE where a source port of a Block is located are used;
the source port is as follows: and allocating ports with the same ECID as the Ingress ECID.
10. The apparatus according to claim 8 or 9, wherein the port state of each port corresponding to the first source ID is set according to a principle that the PE sends the packet in the ring stack system based on the shortest path without causing a loop, where the port state of the port through which the packet passes without causing a loop is Forward, and vice versa is Block.
11. The method according to claim 8, wherein if the forwarding control unit checks that the second source EPORT carried by the second packet is different from the EPORT allocated to any local port, the forwarding control unit further searches a local source filter table for a port state of each port corresponding to the second source ID carried by the second packet, blocks the forwarding of the second packet at a port whose port state is Block, and forwards the second packet at a port whose port state is Forward; the port state of each port corresponding to the second source ID is set according to the principle that a source device of the second message sends a message in the annular stacking system based on the shortest path and does not cause a loop, wherein when the port on the PE is a port through which the message passes, the port state is forwarded, and otherwise, the port state is Block; the source device of the second packet is: and receiving the PE of the second message through the local uplink port.
CN201810682139.7A 2018-06-27 2018-06-27 Message forwarding method and device Active CN108900440B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810682139.7A CN108900440B (en) 2018-06-27 2018-06-27 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810682139.7A CN108900440B (en) 2018-06-27 2018-06-27 Message forwarding method and device

Publications (2)

Publication Number Publication Date
CN108900440A true CN108900440A (en) 2018-11-27
CN108900440B CN108900440B (en) 2021-02-26

Family

ID=64346422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810682139.7A Active CN108900440B (en) 2018-06-27 2018-06-27 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN108900440B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109639573A (en) * 2019-01-28 2019-04-16 新华三技术有限公司 One provenance filters detection method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1412980A (en) * 2002-11-08 2003-04-23 华为技术有限公司 Data transmission method between web bridge
CN101018180A (en) * 2007-03-12 2007-08-15 中兴通讯股份有限公司 A method for implementing the forward table in the stack system
CN101594304A (en) * 2009-07-02 2009-12-02 杭州华三通信技术有限公司 Prevent that pile system from producing the method for loop and the member device in the pile system
CN102075410A (en) * 2009-11-20 2011-05-25 杭州华三通信技术有限公司 Port mirroring method and device in stacking equipment
US8358651B1 (en) * 2009-09-21 2013-01-22 Marvell International Ltd. Switch device having a plurality of processing cores
CN103024089A (en) * 2011-09-20 2013-04-03 中国电信股份有限公司 Network address translation method and device
CN107547372A (en) * 2017-08-30 2018-01-05 新华三技术有限公司 One introduces a collection filters implementation method and device
CN108055215A (en) * 2017-12-26 2018-05-18 新华三技术有限公司 Message forwarding method and device
CN108259329A (en) * 2017-08-30 2018-07-06 新华三技术有限公司 A kind of message forwarding method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1412980A (en) * 2002-11-08 2003-04-23 华为技术有限公司 Data transmission method between web bridge
CN101018180A (en) * 2007-03-12 2007-08-15 中兴通讯股份有限公司 A method for implementing the forward table in the stack system
CN101594304A (en) * 2009-07-02 2009-12-02 杭州华三通信技术有限公司 Prevent that pile system from producing the method for loop and the member device in the pile system
CN101594304B (en) * 2009-07-02 2012-02-08 杭州华三通信技术有限公司 Method for preventing stack system from generating loop and member equipment in stack system
US8358651B1 (en) * 2009-09-21 2013-01-22 Marvell International Ltd. Switch device having a plurality of processing cores
CN102075410A (en) * 2009-11-20 2011-05-25 杭州华三通信技术有限公司 Port mirroring method and device in stacking equipment
CN103024089A (en) * 2011-09-20 2013-04-03 中国电信股份有限公司 Network address translation method and device
CN107547372A (en) * 2017-08-30 2018-01-05 新华三技术有限公司 One introduces a collection filters implementation method and device
CN108259329A (en) * 2017-08-30 2018-07-06 新华三技术有限公司 A kind of message forwarding method and device
CN108055215A (en) * 2017-12-26 2018-05-18 新华三技术有限公司 Message forwarding method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109639573A (en) * 2019-01-28 2019-04-16 新华三技术有限公司 One provenance filters detection method and device
CN109639573B (en) * 2019-01-28 2021-05-25 新华三技术有限公司 Source filtering detection method and device

Also Published As

Publication number Publication date
CN108900440B (en) 2021-02-26

Similar Documents

Publication Publication Date Title
EP3429143B1 (en) Packet forwarding method and apparatus
EP2544409B1 (en) Generic monitoring packet handling mechanism for OpenFlow 1.1
CN110830371B (en) Message redirection method and device, electronic equipment and readable storage medium
EP3402130B1 (en) Information transmission method and device
CN108964940B (en) Message sending method and device and storage medium
CN107566237B (en) Data message processing method and device
CN112671642A (en) Message forwarding method and device
US8331266B2 (en) LAN topology detection and assignment of addresses
US20190215264A1 (en) Automatic alignment of roles of routers in networks
CN106330783B (en) A kind of method and device of OpenFlow interchanger capability reporting
CN112822097A (en) Message forwarding method, first network device and first device group
CN108900440B (en) Message forwarding method and device
US20110222541A1 (en) Network System, Edge Node, and Relay Node
EP3694158A1 (en) Active-active access to transparent interconnection of lots of links (trill) edges
CN108632176B (en) Stacking system, PE (provider edge) equipment and message forwarding method
CN113973020A (en) Method, device and system for sending multicast message
CN108183851B (en) Message forwarding method and forwarding equipment
KR20060090219A (en) Method of switching packets in a transmission medium comprising multiple stations which are connected using different links
CN112242925B (en) Safety management method and equipment
CN112866143A (en) Device and chip for realizing 802.1CB protocol
Cisco Transparent Bridging Commands
Cisco Transparent Bridging Commands
CN108881015B (en) Message broadcasting method and device
CN111447131B (en) Message de-encapsulation method and device and message encapsulation method and device
CN105743762A (en) Message forwarding method and equipment in VPLS network

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