WO2018050120A1 - 主备伪线pw切换 - Google Patents

主备伪线pw切换 Download PDF

Info

Publication number
WO2018050120A1
WO2018050120A1 PCT/CN2017/102208 CN2017102208W WO2018050120A1 WO 2018050120 A1 WO2018050120 A1 WO 2018050120A1 CN 2017102208 W CN2017102208 W CN 2017102208W WO 2018050120 A1 WO2018050120 A1 WO 2018050120A1
Authority
WO
WIPO (PCT)
Prior art keywords
entry
value
primary
handover
standby
Prior art date
Application number
PCT/CN2017/102208
Other languages
English (en)
French (fr)
Inventor
郭道荣
Original Assignee
新华三技术有限公司
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 新华三技术有限公司 filed Critical 新华三技术有限公司
Priority to EP17850321.5A priority Critical patent/EP3493489B1/en
Priority to US16/334,321 priority patent/US10708184B2/en
Priority to JP2019515413A priority patent/JP6792701B2/ja
Publication of WO2018050120A1 publication Critical patent/WO2018050120A1/zh

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/68Pseudowire emulation, e.g. IETF WG PWE3
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • H04L41/064Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis involving time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection

Definitions

  • PW Pseudowire
  • PE Provider Edge
  • CE Customer Edge
  • PW redundancy function the active PW can be forwarded to the standby PW.
  • the standby PW continues to forward packets.
  • a Bidirectional Forwarding Detection (BFD) session can be established based on the endpoint of each PW.
  • the PE device sends the BFD control packet asynchronously to the peer device in a certain period. When several consecutive packets are not received by the peer device, the device considers that the line is faulty.
  • the PE device (or the peer device) applies to the PW.
  • the session fault (DOWN) event is reported, and the PW application can perform fault processing according to the DOWN event.
  • FIG. 1 is a flowchart of a method for fast switching between active and standby PWs according to the present disclosure
  • FIG. 2 is a block diagram of an internal system of a PE based on BFD to implement active/standby PW switching according to the present disclosure
  • FIG. 3 is a flowchart of a fast switching between an active and standby PW according to the present disclosure
  • FIG. 4 is a flowchart of a fast switching between an active and standby PW according to the present disclosure
  • FIG. 5 is a flowchart of a fast switching between an active and standby PW according to the present disclosure
  • FIG. 6 is a flowchart of a fast switching between an active and standby PW according to the present disclosure
  • Figure 7 is a schematic structural view of a device provided by the present disclosure.
  • FIG. 8 is a schematic diagram showing the hardware structure of the apparatus shown in FIG. 7 provided by the present disclosure.
  • a primary PW (main PW) and a standby PW (Backup PW) can be established between two CEs.
  • the two CEs can communicate through the primary PW.
  • the standby PW can be enabled, and the PW is used to forward the packets between the two CEs.
  • the PE enables the standby PW forwarding packet to be executed based on the updated hardware protection switching entry and the updated hardware receiving entry.
  • the updated hardware protection switch entry indicates that the PE enables the standby PW to forward packets.
  • Each module in the PW active/standby switchover system needs to perform a series of operations before updating the hardware protection switch entries and hardware receive entries.
  • the present disclosure can update the hardware protection switching entry and the hardware receiving entry, and then perform the process in the internal structure of the active/standby PW switching system (referred to as the active/standby PW switching process).
  • the present disclosure can implement priority active and standby PW switching, and minimize message loss.
  • FIG. 1 is a flowchart of a method provided by the present disclosure.
  • the process is applied to the PE.
  • the PE and the peer establish the active and standby PWs (that is, the primary PW and the standby PW).
  • the corresponding BFD sessions are run on the active and standby PWs.
  • the BFD session corresponding to the primary PW is referred to as the first BFD session, which is used to detect the link of the primary PW;
  • the BFD session corresponding to the standby PW is referred to as the second BFD session, which is used to detect the link of the standby PW.
  • the first BFD session and the second BFD session are only for the purpose of distinguishing the BFD session corresponding to the active and standby PWs.
  • the process may include the following steps:
  • Step 101 Find a handover information entry that matches the first BFD session.
  • the switch information entry can provide a basis for updating hardware protection switch entries and hardware receive entries when the primary PW changes to the Down state.
  • the structure of the switch information entry will be described below, and will not be described here.
  • Step 102 When the sending handover flag (bFS) in the handover information entry is the first transmission handover value for indicating that the handover is supported, and the switchover Failover value in the handover information entry is currently used to indicate that the standby PW is available.
  • the value of the switchover (Failover) in the hardware protection switch entry associated with the primary PW is updated to the Failover value in the switch information entry.
  • the reception switching flag (bRX) in the handover information entry is used to indicate the first reception handover value that supports the reception handover
  • the Drop identifier in the hardware reception entry associated with the standby PW is updated to be used for Indicates the received value received.
  • the bFS is updated to indicate that the second transmission switching value that does not support the transmission handover is reported to the primary PW. Down event.
  • first transmission switching value and the second transmission switching value herein are only for the purpose of distinguishing whether to support the transmission switching, and are not specifically limited to specific values.
  • first reception switching value, and the second reception switching value hereinafter are only for convenience in distinguishing whether or not reception switching is supported, and are not specifically limited to specific values.
  • the hardware protection switch entry is used to indicate the forwarding path of the packet.
  • the Failover value in the hardware protection switch entry is updated to indicate the value of the packet forwarded by the standby PW, this means that when the primary PW changes to the Down state, the active and standby PWs can be quickly switched. The text can be forwarded through the standby PW.
  • the hardware receiving entry is used to guide the receiving of the packet.
  • step 102 when the Drop identifier in the hardware receiving entry associated with the standby PW is updated to the received value, this means that even if the PE does not enable the bidirectional receiving function (that is, the PE does not enable the primary and backup PWs to receive the packet) If only the primary PW receives the packet, the receiving function of the standby PW is enabled to enable the standby PW to start receiving the packet when the primary PW is in the Down state.
  • the hardware protection switch associated with the primary PW is switched.
  • the Failover value in the entry is updated to the Failover value in the switch information entry to switch from the primary PW to the standby PW.
  • the bFS in the handover information entry is the first transmission handover value, which is the premise that the primary PW is switched to the standby PW.
  • the bFS in the handover information entry should be updated to The second transmission switching value avoids switching the primary PW to the wrong switching of the standby PW.
  • the bFS in the handover information entry is finally updated to the second transmission handover value, the purpose of which is to avoid the wrong handover of the primary PW to the standby PW.
  • step 102 the Down event of the primary PW is reported after the hardware protection switch entry and the hardware receive entry are updated, which means that the update of the hardware protection switch entry and the hardware receive entry in this step 102 is not dependent.
  • the bFS in the switchover information entry is used. This makes it easier for the active and standby PWs to switch and then perform the active/standby switchover process when the primary PW becomes Down.
  • the update of the hardware protection switching entry and the hardware receiving entry is performed in advance compared to the active/standby switching procedure.
  • the existing active/standby PW switching process when the primary PW becomes Down, the Down event of the primary PW is reported, the Down event of the primary PW is processed, and the hardware protection switching entries and hardware receiving entries are updated.
  • the hardware protection switching entry and the hardware receiving entry may be updated in advance when the primary PW changes to the Down state.
  • the Down event of the primary PW in the foregoing step 102 is specifically: the first basic information entry that matches the first BFD session is found; and the delay parameter of the first basic information entry is the first Delay.
  • the Down event of the primary PW is reported after the set delay time T, wherein the first Delay value is used to indicate the value of the delayed report Down event; when the Delay parameter of the first basic information entry is the second Delay The value is reported to the Down event of the primary PW, where the second Delay value is used to indicate that the delay reporting of the Down event is not supported.
  • the first Delay value and the second Delay value are only for the purpose of distinguishing whether to delay reporting a Down event, and are not specifically limited to a specific value.
  • each of the primary PW and the standby PW has a corresponding BFD session, and each has a matching basic information entry.
  • the basic information of the BFD session is established in the initial stage of the BFD session. It contains the data related to the BFD session.
  • the structure of the basic information table is described below.
  • Hardware protection switch table Contains hardware protection switch entries.
  • the hardware protection switch entry is mainly composed of the hardware protection switch entry index (EgrID) and the Failover value.
  • the Failover value is used to indicate the path to forward the packet.
  • the value of the Failover is used to indicate the value of the packet forwarded by the primary PW
  • the packet is forwarded through the primary PW.
  • the outgoing label of the primary PW is encapsulated in the packet, and the public network tunnel header information of the primary PW is also encapsulated.
  • the value of the Failover is used to indicate the value of the packet forwarded by the standby PW, the packet is forwarded through the standby PW.
  • the outgoing PW label is encapsulated in the packet, and the public network tunnel header information of the standby PW is also encapsulated. For example, if the Failover value is 0, the packet is forwarded through the primary PW. If the Failover value is 1, the packet is forwarded through the standby PW.
  • Hardware Receive Table Contains hardware receive entries. For the active and standby PWs, the active and standby PWs correspond to different hardware receiving entries.
  • the hardware receiving entry is mainly composed of a hardware receiving entry index (IngID), an incoming tag value, and a Drop identifier.
  • the Drop flag is a discard value, for example, it indicates that the received packet is discarded, and when the Drop flag is a received value such as 0, it indicates that the packet is received.
  • the hardware protection switching table is similar to the hardware protection switching table in the existing active/standby PW redundancy scheme.
  • the hardware receiving table is similar to the hardware receiving table in the existing active/standby PW redundancy scheme, and will not be described in detail herein.
  • Basic information table Contains basic information items. The basic information entry matches the BFD session.
  • Sid BFD session ID
  • BFD session has a unique identifier. As described above, the BFD session corresponding to the primary PW or the BFD session corresponding to the standby PW has a matching basic information entry.
  • the Sid can be the identifier of the BFD session corresponding to the PW, or the ID of the BFD session corresponding to the standby PW.
  • Valid The valid identifier of the entry. When Valid is a valid value, it indicates that the basic information entry is valid. Otherwise, when Valid is invalid, the basic information entry is invalid. For example, the Valid is 1 The time indicates that the basic information entry is valid. If the Valid is 0, the basic information entry is invalid.
  • P-Sid Partner session ID.
  • the BFD session corresponding to the active and standby PWs is a partner session, that is, the partner session of the BFD session corresponding to the primary PW is the BFD session corresponding to the standby PW, and the partner session of the BFD session corresponding to the standby PW.
  • M/B The primary and backup PW attribute identifiers.
  • the primary and backup PW attribute identifiers are the values of the primary PW, such as M, which are used to indicate the corresponding primary PW.
  • the value of the active and standby PW attributes is the value of the standby PW, such as B, when the BW session is identified by the PW.
  • Status the session state of the BFD, which may include states of operation (UP), failure (Down), initialization (Init), and the like;
  • Delay parameter Whether to support the delay reporting of the Down event.
  • the basic report supports the delay reporting of the Down event.
  • the special PW cannot be delayed. (For example, if there is no active/standby at the same time, it needs to be reported in time).
  • the Delay parameter is the first Delay value such as 1, it indicates that the delay report is supported, and when the Delay parameter is the second Delay value such as 0, it indicates that the delay report is not supported.
  • Table 1 shows an example of a basic information table.
  • the first basic information entry matching the first BFD session is found as follows: the identifier of the first BFD session is used as a key, and the basic information of the matching is found in the local basic information table.
  • the entry is the basic information table entry that the primary BFD session matches.
  • Switch information table Contains the switch information table entry.
  • the switch information entry mainly includes:
  • Sid BFD session identifier
  • bFS sends a handover flag, when bFS is used to indicate that the first transmission handover value supporting the transmission handover is 1, for example, Indicates that the transmission handover is supported.
  • the bFS is a second transmission handover value, such as 0, indicating that the handover is not supported, it indicates that the transmission handover is not supported.
  • bRX Receive a handover flag, when bRX is a first reception handover value for indicating support for reception handover, such as 1, indicating support for reception handover, and bRX is a second reception handover value for indicating that reception handover is not supported, such as 0. When it is indicated, it does not support receiving switching;
  • EgrID an index of the hardware protection switching entry associated with the primary PW, which facilitates finding a hardware protection switching entry
  • Failover value The switch value is switched. It can be the initial value at the beginning and will be updated later. However, in the present disclosure, when the primary PW is working normally, the Failover value in the switching information entry matching the BFD session of the primary PW is different from the Failover value in the hardware protection switching entry associated with the primary PW, that is, The Failover value in the switch information table matching the BFD session of the primary PW is the value of the packet forwarded by the standby PW, and the Failover value in the hardware protection switch entry is used to indicate the value of the packet forwarded by the primary PW. The Failover value in the switchover entry is different from the Failover value in the switchover entry. Therefore, when the primary PW is faulty, the Failover value in the hardware protection switch entry needs to be updated to the Failover value in the switchover entry. The switch is directly switched from the primary PW to the standby PW to forward subsequent packets.
  • IngID an index of the hardware receiving entry associated with the standby PW corresponding to the primary PW, so that it is easy to find the hardware receiving entry;
  • BInLabel Prepare the PW into the label.
  • Table 2 exemplifies the switching information table. In Table 2, "-" indicates no concern.
  • the handover information entry matching the first BFD session is found as follows: the identifier of the first BFD session is used as a key, and the matching is found in the local handover information table.
  • the switch information entry is used as the switch information entry matching the first BFD session.
  • the present disclosure proposes an active/standby PW switch internal. structure.
  • the internal and standby PW switching internal structure includes bottom to top L0: hardware layer, Ll: driver layer, L2: platform software kernel, L3: platform software user mode, and routing protocol family.
  • the hardware layer includes a FIRMWARE/FPGA 201 and a switching hardware 202 for interacting data
  • the driver layer includes a BFD driver module 211 and a switching platform driver module 212.
  • the platform software kernel includes a BFD kernel state module 221 and an MPLS kernel state module 222 for interacting data.
  • the platform software user mode includes a BFD user mode module 231 and an MPLS user mode module 232 for interacting data.
  • the DOWN event of the main PW is reported to the BFD driving module 201 and the BFD driving module 201 to report the DOWN event of the main PW to the BFD kernel state module 221, and the BFD kernel state module 221 performs various protocol adaptations and notifies the MPLS kernel state.
  • the module 222 performs corresponding processing (such as updating the public network tunnel information of the PW, notifying the switching platform driver module 212 to update the underlying PW, etc.), and the switching platform driver module 212 performs the following processes: updating the outbound interface information of the switching platform, and updating the switching platform PW.
  • the data structure, the final switching platform driver module 212 updates the hardware protection switching entry, the hardware receiving entry, and sends it to the switching hardware.
  • a processing module 213 is newly added at the driver layer, and the newly added processing module 213 is connected between the BFD driving module 211 and the switching platform driving module 212. It should be noted that even if the present disclosure newly adds the processing module 213 to the driver layer, the present disclosure does not change the original master/slave switching process, and at the same time ensures that the execution of the original modules of each layer is not affected.
  • FIG. 3 is a flowchart of an embodiment provided by the present disclosure. The flow of this embodiment is performed by the processing module 213 shown in FIG. 2. As shown in FIG. 3, the process may include the following steps:
  • step 301 the firmware event is monitored.
  • Step 302 Parsing the BFD session identifier carried in the firmware event when the firmware event is detected.
  • the firmware event is used as an example.
  • the firmware event may be triggered by the BFD session being in the Up state, or may be triggered by the BFD session becoming Down state, and so on.
  • the Firmware event carries at least the BFD session identifier and the event type identifier.
  • the firmware event is triggered by the BFD session being in the Up state.
  • the BFD session ID carried in the Firmware event is the ID of the BFD session in the UP state.
  • the event type identifier is the identifier of the UP event.
  • the BFD session identifier carried in the Firmware event is recorded as the BFD session identifier 1 in this embodiment.
  • the BFD session ID 1 can be the ID of the BFD session corresponding to the PW, or the ID of the BFD session corresponding to the PW.
  • step 303 the basic information table matching the BFD session identifier 1 is found in the local basic information table.
  • step 304 is performed.
  • the basic information entry that matches the BFD session identifier 1 in the local basic information table is specifically: the BFD session identifier 1 is used as a key, and the matching basic information entry is found in the local basic information table. ,turn up The basic information entry is the basic information entry that matches the BFD session ID 1.
  • the firmware event is directly reported to the BFD driving module 211, and the BFD driving module 211 processes according to the existing active/standby PW switching process. Let me repeat.
  • Step 304 In the local feature table, find the event type that matches the event type identifier carried in the firmware event, and determine whether the session state in the basic information entry matching the BFD session identifier 1 is UP or Down. When the flow shown in 4 is the Down state, the flow shown in FIG. 5 is executed.
  • session state in the basic information table item described above further includes Init or the like, in the present disclosure, only the case where the session state is UP or Down is described in detail, and other cases are not described in detail.
  • a feature table is used to store user customization information, and includes the following feature table items:
  • the first entry timer value for example, can be set to 1000ms. Here is just an example. Of course, it can also be set to other values, which will be used below. It is not described here.
  • the second entry timer value for example, can be set to 10000ms. Here is just an example. Of course, it can also be set to other values. It will be used below. It is not described here.
  • BFDDownTimer Delay reporting the timer value, which is the above T.
  • T can be set to 15ms;
  • MaxSessions The maximum number of sessions supported by the PE device. For example, a PE device can support 512 BFD sessions.
  • Admin Down Event Manages the Down event. When a user deletes a BFD session actively, it means an Admin Down event.
  • UP Event An event in which the BFD session becomes UP.
  • PW Type The type of media that carries the PW.
  • the present disclosure supports Vlan and Ethernet by default.
  • Table 3 exemplifies a feature table.
  • step 304 is specifically: finding an event type corresponding to the event type identifier carried by the firmware event in the local feature table. For example, if the event type identifier is 0, the matching event type is Admin Down Event, the event type identifier is 2, the matching event type is Down Event, and the event type identifier is 3, the matching event type is matched. Is the UP Event.
  • FIG. 4 is a flowchart of an embodiment provided by the present disclosure. As shown in FIG. 4, the process may include:
  • Step 401 Determine whether the event type is Down Event or Admin Down Event. If the event is Down Event, go to step 402 and go to Admin Down Event.
  • Step 401 is performed when it is determined in step 304 that the session state in the basic information entry matching the BFD session identifier 1 is UP.
  • the event type of the event such as the Down Event and the Admin Down Event, such as the UP Event, is directly reported to the BFD driver module 211, and may be processed according to the existing reporting process. No longer.
  • Step 402 Determine whether the primary and secondary PW attribute identifiers in the basic information entry matching the BFD session identifier 1 are the value indicating the primary PW or the value indicating the standby PW.
  • step 403 is performed.
  • Step 404 is performed when the value of PW is prepared.
  • this step 402 when the primary and backup PW attribute identifiers indicate the value of the primary PW, it is determined that the primary PW changes to the Down state.
  • this step 402 when the primary and backup PW attribute identifiers indicate the value of the standby PW, it is determined that the standby PW changes to the Down state.
  • the matching switching information entry is determined in the local switching information table by using the BFD session identifier 1 as a key.
  • the index is found in the local hardware protection switching table.
  • the hardware protection switch entry of the EgrID in the switch information entry is updated, and the Failover value in the found hardware protection switch entry is updated to the Failover value in the switch information entry, and the bRX in the switch information entry is the first receive switch.
  • the hardware receiving entry indexed as the IngID in the switching information entry is found in the local hardware receiving table, and the Drop identifier in the found hardware receiving entry is updated to the received value, and then the bFS is updated to the second sending switching value. Updates the session state in the basic information table matching the BFD session ID 1 to Down. Then step 405 is performed.
  • the step 403 is performed on the premise that the primary and secondary PW attribute identifiers are determined to represent the value of the primary PW, and the BFD session identifier 1 indicates the identifier of the BFD session corresponding to the primary PW. Based on this, in this step 403, the matching handover information entry may be determined in the local handover information table by using the BFD session identifier 1 as a key.
  • the EgrID in the handover information entry is specifically the index of the hardware protection switch entry associated with the primary PW. Therefore, based on the EgrID in the handover information entry, the hardware associated with the primary PW can be found. Protect the switch entry.
  • the IngID in the handover information entry is specifically the index of the hardware receiving entry associated with the standby PW of the primary PW. Therefore, based on the IngID in the handover information entry, the hardware receiving entry of the standby PW can be found.
  • the existing active/standby PW handover procedure is performed. ,No longer.
  • Step 404 The partner session identifier P-Sid in the basic information entry matching the BFD session identifier 1 is used as a key, and the matching handover information entry is determined in the local handover information table, and the matching handover information entry is matched.
  • the bFS is updated to the second transmission switching value, and the session state in the basic information entry matching the BFD session identifier 1 is updated to be Down.
  • step 405 is performed.
  • This step 404 is performed on the premise that the active/standby PW attribute identifier is determined to represent the value of the standby PW in the above step 402.
  • the BFD session identifier 1 indicates the BFD session identifier of the standby PW.
  • the partner session identifier P-Sid in the basic information entry matching the BFD session identifier 1 is the key. The word determines the matching handover information entry in the local handover information table, and finally finds the handover information entry of the primary PW match.
  • Step 405 Determine whether the Delay identifier in the basic information entry matching the BFD session identifier 1 is the first Delay value or the second Delay value. If the value is the first Delay value, the main PW is reported after the time delay is reported. The Down event is reported to the Down event of the primary PW if it is the second Delay value.
  • the first Delay value indicates that delayed reporting is supported
  • the second Delay value indicates that delayed reporting is not supported.
  • a timer table is also involved.
  • the timer table contains timer event entries.
  • the timer event entry is associated with the BFD session, and includes at least:
  • Valid The valid entry of the entry. When Valid is a valid value such as 1, the entry is valid. Otherwise, when Valid is invalid, such as 0, the entry is invalid, and the initial value of Valid is a valid value.
  • Sid ID of the BFD session associated with the timer event entry.
  • Type identifier specifically, when the Type is the first identifier value, for example, 1 is used to indicate that the switching information entry is updated because the BFD session is in the Up state, and when the Type is the second identifier value, such as 2, it is used to indicate The switching information entry is updated due to the change of the PW parameter.
  • the Type is the third identifier value, such as 3, it is used to indicate the delay report.
  • the PW parameter changes are described below.
  • Timer The timer value of the timer event entry.
  • the Timer is the UPDelayTimer in the feature table.
  • the Timer is the PWUpdateTimer in the feature table.
  • the value is the third identity, the Timer is the BFDDownTimer in the above feature table.
  • the timer of the timer event entry is reduced by a set value, for example, 1 ms.
  • a threshold such as 0, it means that the timer event entry expires.
  • the Down event reported to the primary PW after the time delay T is reported to include the step O1 and the step O2:
  • timer event entry 1 a timer event entry (referred to as timer event entry 1) associated with the BFD session identifier 1 is set in the local timer event table.
  • Valid in the timer event entry 1 is a valid value
  • Sid is a BFD session identifier
  • Type is a third identifier value
  • Timer is a BFDDownTimer in the feature table.
  • step O2 when the timer event entry 1 expires, the Firmware event is reported to the BFD driver module 211.
  • Step 406 When the primary and secondary PW attribute identifiers in the basic information entry matching the BFD session identifier 1 are the values indicating the primary PW, the matching switching information table is found in the local switching information table by using the BFD session identifier 1 as a key. If the primary and secondary PW attribute identifiers in the basic information entry matching the BFD session ID 1 are the values of the standby PW, the P-Sid in the basic information entry matching the BFD session ID 1 is used as the keyword. The matching switching information entry is found in the switching information table; the bFS in the found switching information entry is updated to the second sending switching value, and the session state in the basic information entry matching the BFD session identifier 1 is updated to be Down and reported. The firmware event is sent to the BFD driver module 211.
  • the process performed after the BFD driver module 211 receives the firmware event is similar to the existing active/standby PW switching process, and is not described here.
  • the bFS in the handover information entry is the first transmission handover value, which is a prerequisite for switching from the primary PW to the standby PW, and when the primary PW cannot be switched to the standby PW, the handover information entry should be timely
  • the bFS is updated to the second sending switch value to prevent the active and standby PWs from being miscut.
  • the purpose of updating the bFS to the second transmission switching value in step 403, step 404, and step 406 is to avoid mis-cutting of the active and standby PWs.
  • FIG. 5 is a flowchart of an embodiment provided by the present disclosure. As shown in FIG. 5, the process may include:
  • step 501 when the event type is UP Event, the session state in the basic information entry matching the BFD session identifier 1 is updated to be UP.
  • This step 501 is performed when it is determined in step 304 that the session state in the basic information entry matching the BFD session identifier 1 is Down.
  • the event type is UP Event
  • the BFD session corresponding to the BFD session ID 1 is in the Up state. Therefore, the session state in the basic information entry matching the BFD session ID 1 is UP.
  • the firmware event is directly reported to the BFD driving module 211, and the BFD driving module 211 performs the switching process according to the existing active/standby PW switching process. .
  • the step 501 further includes: directly reporting the firmware event to the BFD driving module 211, and the BFD driving module 211 performs the current active/standby PW switching process, and details are not described herein.
  • Step 502 After the set first item update time, the switching information entry is updated.
  • step 502 specifically includes:
  • a timer event entry (referred to as timer event entry 2) associated with the BFD session identifier 1 is set in the local timer event table.
  • the Validity of the timer event entry 2 is a valid value
  • the Sid is the BFD session identifier 1
  • the Type is the first identity value
  • the Timer is the UPDelayTimer in the local feature table, step a1
  • the first entry update time in the first entry is the first entry timer value indicated by the UPDelayTimer, for example, 1000 ms.
  • step a2 when the timer event entry 2 expires, the switching information entry is updated.
  • FIG. 6 is a flowchart of an embodiment of the present disclosure. As shown in FIG. 6, the process may include:
  • step 601 when the timer event entry 2 expires, it is determined whether the Valid in the basic information entry matching the BFD session identifier 1 is a valid value or an invalid value. When the value is a valid value, step 602 is performed, and when the value is an invalid value, the step is performed. 608.
  • Step 602 Acquire current information of the primary PW, and determine whether the following conditions are met according to the current information: the primary PW is currently working normally, and the primary PW currently has a standby PW in the backup state. If yes, step 803 is performed, and if no, step 808 is performed. .
  • the BFD session ID 1 indicates the BFD session corresponding to the primary PW
  • the current information of the primary PW corresponding to the BFD session identifier 1 is obtained.
  • the Sid is the current information of the PW corresponding to the P-Sid in the basic information entry of the BFD session identifier 1.
  • the information about the active and standby PWs may be recorded in the BFD session ID 1 matching basic information table.
  • the basic information is generated when the BFD session is created. The change, so this step 602 will re-acquire the current information of the main PW.
  • the current information of the primary PW can be obtained from the switching platform driving module 212.
  • the current information includes at least: the main PW Whether it is in normal operation, the index of the hardware protection switching entry currently associated with the primary PW, whether the primary PW currently has the standby PW in the standby state, the index of the hardware receiving entry associated with the standby PW, and the incoming label of the standby PW.
  • Step 603 When the primary and secondary PW attribute identifiers in the basic information entry matching the BFD session identifier 1 are the values indicating the primary PW, the matching switching information table is found in the local switching information table by using the BFD session identifier 1 as a key. If the primary and secondary PW attribute identifiers in the basic information entry matching the BFD session ID 1 are the values of the standby PW, the P-Sid in the basic information entry matching the BFD session ID 1 is used as the keyword. A matching switch information entry is found in the switch information table.
  • Step 604 The bFS in the handover information entry found in the update step 603 is the first transmission handover value, and the Failover value in the handover information entry found in the update step 603 is used to indicate the value of forwarding the packet through the standby PW. Then step 605 is performed.
  • step 604 when the bFS in the handover information entry found in the update step 603 is the first transmission handover value, it means that the primary and backup PW handover can be performed when the subsequent primary PW fails.
  • the EgrID in the handover information entry found in step 603 may be different from the index of the hardware protection switching entry included in the current information of the obtained primary PW. If not, in step 604, the The EgrID in the handover information entry found in step 603 is updated to the index of the hardware protection switching entry included in the current information of the obtained primary PW.
  • Step 605 Determine whether the PE supports the bidirectional receiving function. If yes, go to step 606. If no, go to step 607.
  • the function of the bidirectional receiving function is that the PE can receive packets through the active and standby PWs at the same time. It can be configured on the PE according to actual requirements.
  • Step 606 Update bRX in the handover information entry found in step 603 to be a second reception handover value. End the current process.
  • This step 606 is performed on the premise that the PE supports the bidirectional receiving function. Because the PE itself supports the two-way receiving function, it will open the active and standby PW receiving messages at the same time. Therefore, it is not necessary to perform the receiving switching. Therefore, the step 606 directly updates the bRX in the switching information entry found in step 603 to be used for indicating. The second receive switch value of the receive switch is not supported.
  • Step 607 The bRX in the handover information entry found in the update step 603 is the first reception handover value.
  • This step 607 is performed on the premise that the PE does not support the bidirectional receiving function. Because the PE does not support the two-way receiving function, it will not open the standby PW to receive the packet. When the primary PW is switched to the standby PW, the packet will be lost due to the backup PW not receiving the packet. If the packet is lost after the primary PW is switched to the standby PW, it is necessary to open the standby PW to receive the packet. Therefore, in step 607, the bRX in the handover information entry found in step 603 is used to indicate Supports receiving the first received handover value of the handover.
  • the IngID in the handover information entry found in step 603 may be different from the index of the hardware reception entry included in the current information of the obtained primary PW. If not, in step 607, the step may be further performed. The IngID in the handover information entry found by 603 is updated to the index of the hardware reception entry included in the current information of the obtained primary PW. Similarly, when the BInLabe in the handover information entry found in step 603 is different from the inbound label included in the current information of the obtained primary PW, in step 607, the handover information entry found in step 603 may be further BInLabe is updated to the inbound label contained in the current information of the primary PW obtained above.
  • Step 608 When the primary and secondary PW attribute identifiers in the basic information entry matching the BFD session identifier 1 are the values indicating the primary PW, the matching switching information table is found in the local switching information table by using the BFD session identifier 1 as a key. If the primary and secondary PW attribute identifiers in the basic information entry matching the BFD session ID 1 are the values of the standby PW, the P-Sid in the basic information entry matching the BFD session ID 1 is used as the keyword. A matching handover information entry is found in the handover information table; bFS in the found handover information entry is the second transmission handover value. End the current process.
  • the bFS in the switching information entry matched by the BFD session corresponding to the primary PW is directly updated to the second sending switching value. To indicate that the switchover from the primary PW to the standby PW cannot be implemented, and the active and standby PWs are incorrectly cut.
  • the switching platform driver module 212 when it is learned from the switching platform driver module 212 that the standby PW is deleted, the basic information entry matching the BFD session corresponding to the standby PW is found, and the matching is found by using the P-Sid in the found basic information entry as a keyword.
  • the switch information entry, the bFS in the matching switch information entry is updated to the second transmit switch value, to indicate that the switch from the primary PW to the standby PW cannot be implemented, and the active and standby PWs are incorrectly cut.
  • the transmission parameter of the primary PW when the transmission parameter of the primary PW changes, the transmission parameter includes at least an egress port and an egress label, and a timer event entry (referred to as timer entry 3) associated with the BFD session corresponding to the primary PW is added, based on The structure of the timer event entry described above, the Validity in the timer event entry 3 is a valid value, the Sid is the BFD session corresponding to the PW, the Type is the second identification value, and the Timer is the PWUpdateTimer in the local feature table; The switch information item matching the BFD session corresponding to the primary PW is updated when the timer event entry 3 expires; the update process is similar to the process described in FIG. 6 and will not be described again.
  • timer entry 3 a timer event entry
  • the receiving parameter of the standby PW When the receiving parameter of the standby PW is changed, the receiving parameter includes at least the receiving port and the inbound label, and the timer event entry 4 associated with the BFD session corresponding to the standby PW is added, based on the structure of the timer event entry described above.
  • the value of the timer event table entry 4 is valid, the Sid is the BFD session corresponding to the standby PW, the Type is the second identity value, and the Timer is the PWUpdateTimer in the local feature table.
  • the basic information table matching the BFD session corresponding to the standby PW is found in the basic information table, and the matching switching information entry is found in the local switching information table by using the P-Sid in the matching basic information entry as a key. In essence, it is a switching letter matching the BFD session corresponding to the primary PW.
  • the content of the information table item is updated, and the update process is similar to the process described in FIG. 6 and will not be described again.
  • FIG. 7 is a structural diagram of a device provided by the present application.
  • the device is applied to the PE, and specifically may be the processing module 213 shown in FIG. 2.
  • the device can include:
  • the entry matching unit 701 is configured to: when the first BFD session corresponding to the primary PW detects that the primary PW is in the Down state, find the handover information entry that matches the first BFD session;
  • An entry update unit 702 configured to: when a handover handover flag (bFS) in the handover information entry indicates a first transmission handover value that supports transmission handover, and a switch switch (Failover) value indication in the handover information entry
  • a handover handover flag (bFS) in the handover information entry indicates a first transmission handover value that supports transmission handover
  • a switch switch (Failover) value indication in the handover information entry When forwarding the packet by the standby PW, the Failover value in the hardware protection switching entry associated with the primary PW is updated to the Failover value in the handover information entry, and the receiving switching flag (bRX) in the handover information entry
  • the drop identifier in the hardware receiving entry associated with the standby PW is updated to be used to indicate the received value of the received message, and the bFS is updated to be used. Indicates that the second transmission switching value of the transmission handover is not supported;
  • the event reporting unit 703 is configured to report the Down event of the primary PW after the entry update unit 702 completes the entry update.
  • the event reporting unit 703 may report the main PW Down event as:
  • the first basic information entry that matches the first BFD session is found.
  • the Delay parameter of the first basic information entry is used to indicate the first Delay value that supports the delay reporting Down event
  • the report is reported after the set delay time T.
  • the Down event of the primary PW is reported to the Down event of the primary PW when the Delay parameter of the first basic information entry is used to indicate that the second Delay value of the Down event is not supported.
  • the entry update unit 702 further updates the bFS to a second transmit handover value when the primary PW is deleted or when the first BFD session is deleted.
  • the entry matching unit 701 further finds that the second BFD session corresponding to the standby PW matches.
  • the second basic information entry includes at least the partner session identifier P-Sid, where the P-Sid is the identifier of the partner session of the second BFD session, and the partner of the second BFD session
  • the session is the first PFD session, and the P-Sid matching handover information entry in the second basic information entry is found;
  • the entry update unit 702 is further configured to update the bFS in the matched handover information entry to the second transmit handover value.
  • the entry update unit 702 further adds the first timer event entry associated with the first BFD session to the local timer table when the transmission parameter of the primary PW changes. First certain Updating the switch information entry when the timer event entry expires; and,
  • the timer value of the entry is different.
  • the switch information entry is updated.
  • Updating the handover information table item by the entry update unit 702 includes:
  • the current information of the primary PW is obtained, and the current information includes at least: whether the primary PW is working normally, and whether the primary PW currently has a standby PW in the standby state. According to the current information, it is determined whether the following conditions are met: the primary PW is currently Normally, the primary PW currently has a standby PW in the backup state. If not, the bFS is updated to the second transmission switching value. If yes, the bFS is updated to the first transmission switching value and the switching information table is updated. The Failover value in the entry is used to indicate the value of the packet forwarded by the standby PW, and the bRX is updated to be the first receive handover value when the local PE does not support the function of receiving the packet simultaneously.
  • the entry update unit 702 further includes, when the receiving parameter of the standby PW changes, the receiving parameter includes at least a receiving port and an inbound label, and adding a third timer event entry associated with the second BFD session to the local timer table, and Adding a fourth timer event entry associated with the second BFD session to the local timer table when the second BFD session is in the Up state; wherein the third timer event entry and the fourth timer event entry The timer value is different, and when the third timer event entry or the fourth timer event entry expires, the second basic information entry matched by the second BFD session is found, and the local and P are updated. -Sid matching switching information entry;
  • the second basic information entry includes at least the buddy session identifier P-Sid, where the P-Sid is the identifier of the buddy session of the second BFD session, and the buddy session of the second BFD session is the first BFD session. .
  • the entry update unit 702 updates the handover information entry that matches the P-Sid, including:
  • the bFS in the handover information entry that matches the local P-Sid is updated to be the second transmission handover value
  • the current information of the primary PW is obtained, and the current information includes at least: whether the primary PW is working normally, and whether the primary PW currently has a standby PW in the standby state. According to the current information, it is determined whether the following conditions are met: the primary PW is currently Normally, the primary PW currently has a standby PW in the backup state. If not, the bFS in the local switching information table matching the P-Sid is updated to be the second transmission switching value. If yes, the local and local The bFS in the P-Sid matching handover information entry is the first transmission handover value, and updates the local handover information entry that matches the P-Sid.
  • the Failover value is used to indicate the value of the packet forwarded by the standby PW, and the bRX in the handover information entry matching the local P-Sid is updated when the local PE does not support the function of receiving the packet simultaneously. Receive a switch value.
  • FIG. 8 is a schematic structural diagram of hardware of the apparatus shown in FIG. 7 according to the present disclosure.
  • the apparatus includes a processor 801, a machine readable storage medium 802 that stores machine executable instructions.
  • Processor 801 and machine readable storage medium 802 can communicate via a system bus. Also, by reading and executing machine executable instructions in machine readable storage medium 802, processor 801 can perform the methods described above.
  • the hardware structure can also include a power component 803 configured to perform power management of the switching device, a wired or wireless network interface 804 configured to connect the device to the network, and an input/output (I/O) ) interface 805
  • the machine-readable storage medium 802 referred to herein can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like.
  • the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid state drive, any type of storage disk. (such as a disc, dvd, etc.), or a similar storage medium, or a combination thereof.
  • the machine readable storage medium 802 is configured to store program instructions run by the entry matching unit 701, program instructions run by the entry update unit 702, and program instructions run by the event reporting unit 703.
  • the processor 801 is configured to execute a program instruction that is executed by the entry matching unit 701, a program instruction for executing the execution of the entry update unit 702, and a program instruction for executing the operation of the event reporting unit 703.
  • the processor 801 implements the method as described above by executing program instructions executed by the respective units as described above.
  • a service provider network edge (PE) device including:
  • a machine readable storage medium storing machine executable instructions by which the processor is caused to:
  • the transmission switching flag (bFS) in the handover information entry indicates a first transmission handover value that supports the transmission handover, and the switchover value in the handover information entry indicates that the packet is forwarded through the standby PW. Updating the Failover value in the hardware protection switching entry associated with the primary PW to the Failover value in the handover information entry,
  • reception switching flag (bRX) in the handover information entry indicates that the first reception switching value of the reception handover is supported
  • the processor when reporting the Down event of the primary PW, the processor is further caused to:
  • the delay parameter of the first basic information item is used to indicate the first Delay value for supporting the delay reporting Down event
  • the Down event of the primary PW is reported after the set delay time T
  • the Down event of the primary PW is reported.
  • the processor is also caused to:
  • the bFS is updated to the second transmission handover value.
  • the processor is also caused to:
  • the processor is also caused to:
  • the sending parameter of the primary PW When the sending parameter of the primary PW is changed, the sending parameter includes at least an egress port and an egress label, and the first timer event entry associated with the first BFD session is added to the local timer table.
  • the timer value of the entry is different.
  • the handover information entry is updated.
  • the processor when updating the handover information entry, the processor is further caused to:
  • the current information of the primary PW is obtained, and the current information includes: whether the primary PW is working normally, and whether the primary PW currently has a standby PW in the standby state.
  • the bFS is updated to the first transmission switching value, and the Failover value in the handover information entry is updated to indicate the value of the packet forwarded by the standby PW, and the primary and secondary PWs are not supported by the local PE.
  • the bRX is updated to the first reception switching value when receiving the function of the message.
  • the processor is also caused to:
  • the receiving parameter When the receiving parameter of the standby PW is changed, the receiving parameter includes at least a receiving port and an inbound label, and adding a third timer event entry associated with the second BFD session to the local timer table;
  • the fourth timer event entry associated with the second BFD session is added to the local timer table, where the third timer event entry and the fourth timer event entry are The timer value Timer is different;
  • the second basic information entry matching the second BFD session is found, where the second basic information entry includes at least the second The partner session identifier (P-Sid) of the partner session of the BFD session is updated, and the local switch information entry matching the P-Sid is updated.
  • P-Sid partner session identifier
  • the processor when updating the local switching information entry matching the P-Sid, the processor is further caused to:
  • the bFS in the handover information entry that is locally matched with the P-Sid is updated to be the second transmit handover value
  • the current information of the primary PW is obtained, and the current information includes: whether the primary PW is working normally, and whether the primary PW currently has a standby PW in the standby state.
  • the primary PW is working normally, and the primary PW currently has a standby PW in the backup state.
  • the bFS in the handover information entry that matches the local P-Sid is the first transmission handover value, and the Failover value in the handover information entry matching the local P-Sid is updated.
  • the value of the bRX in the handover information entry matching the local P-Sid is updated to be the first value when the local PW does not support the function of the primary PW to receive the packet. Receive the switch value.
  • the device embodiment since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art are not creative In the case of labor, it can be understood and implemented.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本公开提供了主备伪线PW快速切换方法及装置。PE设备在当主PW对应的第一BFD会话检测到主PW变为Down状态时,找到第一BFD会话匹配的切换信息表项。当所述切换信息表项中的发送切换标志(bFS)表示支持发送切换的第一发送切换值,并且所述切换信息表项中的切换开关(Failover)值指示通过备PW转发报文时,所述PE将主PW关联的硬件保护切换表项中的Failover值更新为所述切换信息表项中的Failover值;在所述切换信息表项中的接收切换标志(bRX)表示支持接收切换的第一接收切换值时,所述PE将所述备PW关联的硬件接收表项中的丢弃(Drop)标识更新为用于表示接收报文的接收值,将所述bFS更新为用于表示不支持发送切换的第二发送切换值;所述PE上报主PW的Down事件。

Description

主备伪线PW切换
相关申请的交叉引用
本公开要求2016年9月19日提交的、申请号为201610831302.2、发明名称为“主备伪线PW快速切换方法和装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本文中。
背景技术
伪线(PW:Pseudowire)是两个服务提供商网络边缘设备(PE:Provider Edge)之间的虚拟双向连接。两个用户网络边缘设备(CE:Customer Edge)可通过PE实现通信。如果两个CE之间只存在一条PW,则当这两个CE之间的PE、PE与CE之间的链路、或PE之间的PW出现故障时,这两个CE将无法通信。PW冗余保护功能通过部署主备PW,能够实现当主PW故障时,主PW切换至备PW,由备PW继续转发报文。
为了快速检测两个PE之间承载的PW的公网线路故障,可基于每一个PW的端点建立一个双向转发检测(BFD:Bidirectional Forwarding Detection)会话。PE设备向对端设备以一定周期异步地发送BFD控制报文,当连续若干个报文没有被对端设备收到时,就认为线路出现了故障,PE设备(或者对端设备)向PW应用报告会话故障(DOWN)事件,PW应用可根据这个DOWN事件进行故障处理。
附图说明
图1为本公开提供的一种主备PW快速切换的方法流程图;
图2为本公开提供的PE基于BFD实现主备PW切换的内部系统框图;
图3为本公开提供的一种主备PW快速切换的流程图;
图4为本公开提供的一种主备PW快速切换的流程图;
图5为本公开提供的一种主备PW快速切换的流程图;
图6为本公开提供的一种主备PW快速切换的流程图;
图7为本公开提供的装置结构示意图;
图8为本公开提供的图7所示装置的硬件结构示意图。
具体实施方式
为了使本公开的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本公开进行详细描述。
在此,首先对主备PW的切换情况进行介绍。例如,两个CE之间可建立主PW(main PW)和备PW(Backup PW)。在正常情况下,这两个CE可通过主PW通信。然而,当这两个CE之间的PE检测到主PW链路故障(Down)时,备PW可被启用,通过备PW来进行这两个CE之间的报文转发。
例如,PE启用备PW转发报文是基于更新的硬件保护切换表项和更新的硬件接收表项执行的。更新后的硬件保护切换表项指示了PE启用备PW转发报文。但是,从检测到主PW故障到更新硬件保护切换表项和硬件接收表项是需要比较长的流程的。PW主备切换系统中的各个模块需要在执行一系列操作后才能更新硬件保护切换表项和硬件接收表项。然而,本公开能够先更新硬件保护切换表项和硬件接收表项,然后执行主备PW切换系统的内部结构中的流程(简称主备PW切换流程)。本公开能够实现优先主备PW切换,最大限度地减少了报文丢失。
下面先对本公开提供的方法进行描述:
参见图1,图1为本公开提供的方法流程图。该流程应用于PE,PE和对端建立了主备PW(即,主PW和备PW),主备PW上分别运行对应的BFD会话。为便于描述,这里将主PW对应的BFD会话简称第一BFD会话,其用于检测主PW的链路;将备PW对应的BFD会话简称第二BFD会话,其用于检测备PW的链路。需要说明的是,这里的第一BFD会话、第二BFD会话只是为了便于区分主备PW对应的BFD会话,并非特指限定BFD会话。
当通过第一BFD会话检测到主PW变为Down状态时,如图1所示,该流程可包括以下步骤:
步骤101,找到第一BFD会话匹配的切换信息表项。
在本公开中,只有主PW对应的BFD会话才有匹配的切换信息表项。切换信息表项可以在主PW变为Down状态时为更新硬件保护切换表项、硬件接收表项提供依据。下文会重点描述切换信息表项的结构,这里暂不赘述。
步骤102,当切换信息表项中的发送切换标志(bFS)为用于表示支持发送切换的第一发送切换值时,并且切换信息表项中的切换开关Failover值当前为用于指示通过备PW转发的值时,将主PW关联的硬件保护切换表项中的切换开关(Failover)值更新为切换信息表项中的Failover值。在切换信息表项中的接收切换标志(bRX)为用于表示支持接收切换的第一接收切换值时,将所述备PW关联的硬件接收表项中的丢弃(Drop)标识更新为用于表示接收的接收值。之后将所述bFS更新为用于表示不支持发送切换的第二发送切换值,上报主PW 的Down事件。
需要说明的是,这里的第一发送切换值、第二发送切换值只是为了便于区分是否支持发送切换,并非特指限定具体的值。类似地,第一接收切换值、以及下文的第二接收切换值只是为了便于区分是否支持接收切换,并非特指限定具体的值。
硬件保护切换表项用于指示报文的转发路径。在步骤102中,将硬件保护切换表项中的Failover值更新为用于指示通过备PW转发报文的值时,这意味着当主PW变为Down状态时,主备PW可快速切换,以后报文可以通过备PW继续转发。
硬件接收表项用于指导报文的接收。在步骤102中,将备PW关联的硬件接收表项中的Drop标识更新为接收值时,这意味着即使PE未使能双向接收功能(即PE未使能主、备PW都接收报文),仅有主PW接收报文,则通过步骤102能够在主PW变为Down状态时,打开备PW的接收功能,以使备PW开始接收报文。
如步骤102的描述,在切换信息表项中,当bFS为第一发送切换值时,并且切换开关Failover值当前为用于指示通过备PW转发的值时,则将主PW关联的硬件保护切换表项中的Failover值更新为切换信息表项中的Failover值,以实现从主PW切换为备PW。换言之,切换信息表项中的bFS为第一发送切换值是实现主PW切换为备PW的前提,而从主PW切换为备PW不能实现时,要及时将切换信息表项中的bFS更新为第二发送切换值,避免将主PW切换为备PW的错误切换。基于此,步骤102中,最后描述的将切换信息表项中的bFS更新为第二发送切换值,其目的是避免将主PW切换为备PW的错误切换。
如步骤102的描述可知,主PW的Down事件是在硬件保护切换表项和硬件接收表项更新之后上报的,这意味着本步骤102中硬件保护切换表项和硬件接收表项的更新不依赖于现有的主备切换流程,而是依赖于切换信息表项中的bFS,这更好地实现了主PW变为Down状态时,主备PW先切换,然后执行主备切换流程的目的。
换言之,在本公开中,硬件保护切换表项和硬件接收表项的更新相比于主备切换流程是提前执行的。按照现有主备PW切换流程,当主PW变为Down状态时,需要上报主PW的Down事件,处理主PW的Down事件,最后更新硬件保护切换表项、硬件接收表项。根据本公开,在主PW变为Down状态时可提前更新硬件保护切换表项、硬件接收表项。
作为一个实施例,上述步骤102中上报主PW的Down事件具体为:找到第一BFD会话匹配的第一基本信息表项;当第一基本信息表项的延时(Delay)参数为第一Delay值时,在经过设定延时时间T之后上报主PW的Down事件,其中,第一Delay值为用于表示延迟上报Down事件的值;当第一基本信息表项的Delay参数为第二Delay值时,上报主PW的Down事件,其中,第二Delay值为用于表示不支持延时上报Down事件的值。需要说明的是,这 里的第一Delay值、第二Delay值只是为了便于区分是否延迟上报Down事件,并非特指限定具体的值。
在本公开中,主PW和备PW各自均有相应的BFD会话,并且各自均有一个匹配的基本信息表项。其中,BFD会话匹配的基本信息表项建立在BFD会话创建初期,其包含了BFD会话相关的数据信息,下文会描述基本信息表项的结构,这里暂不赘述。
至此,完成图1所示的流程。
下面对本公开涉及的几个表项进行描述:
硬件保护切换表:包含硬件保护切换表项。硬件保护切换表项主要由硬件保护切换表项索引(EgrID)、Failover值组成。其中,Failover值用于指示转发报文的路径。当Failover值为用于指示通过主PW转发报文的值时,通过主PW转发报文。其中在通过主PW转发报文时,会为报文封装上主PW的出标签,同时还会封装上主PW的公网隧道头部信息。当Failover值为用于指示通过备PW转发报文的值时,通过备PW转发报文。其中在通过备PW转发报文时,会为报文封装上备PW的出标签,同时还会封装上备PW的公网隧道头部信息。举例来说,可以在Failover值为0时表示通过主PW转发报文,Failover值为1是表示通过备PW转发报文。
硬件接收表:包含硬件接收表项。对于主备PW,主备PW分别对应不同的硬件接收表项。硬件接收表项主要由硬件接收表项索引(IngID)、入标签值、Drop标识组成。当Drop标识为丢弃值比如1时,表示丢弃接收的报文,而当Drop标识为接收值比如0时,表示接收报文。
在本公开中,硬件保护切换表类似现有主备PW冗余方案中的硬件保护切换表,硬件接收表类似现有主备PW冗余方案中的硬件接收表,这里不再详细描述。
基本信息表:包含了基本信息表项。基本信息表项与BFD会话匹配。
BFD会话匹配的基本信息表项主要包含:
1)Sid:BFD会话标识,BFD会话有唯一的标识,如上描述,不管是主PW对应的BFD会话,还是备PW对应的BFD会话,都有一个匹配的基本信息表项,基于此,这里的Sid可为主PW对应的BFD会话的标识,也可为备PW对应的BFD会话的标识;
2)Valid:表项有效标识,当Valid为有效值时,表示此基本信息表项有效,反之,当Valid为无效值时,表示此基本信息表项无效,举例来说,可以在Valid为1时表示基本信息表项有效,Valid为为0是表示基本信息表项无效;
3)P-Sid:伙伴会话标识。主备PW对应的BFD会话相互为伙伴会话关系,也即,主PW对应的BFD会话的伙伴会话为备PW对应的BFD会话,备PW对应的BFD会话的伙伴会话 为主PW对应的BFD会话;
4)M/B:主备PW属性标识,当Sid为主PW对应的BFD会话的标识时,主备PW属性标识为表示主PW的值比如M,用于表示对应主PW,当Sid为备PW对应的BFD会话的标识时,主备PW属性标识为表示备PW的值比如B;
5)In Label:PW输入标签;
6)Out Label:PW输出标签;
7)Status:BFD的会话状态,其可包含运行(UP)、故障(Down)、初始化(Init)等状态;
8)Delay参数:是否支持延迟上报Down事件,对于主备PW,基本都支持延迟上报Down事件,但有的特殊PW,不能延迟上报(比如没有主备同时存在时,需要及时上报)。这里,当Delay参数为第一Delay值比如1时,表示支持延迟上报,当Delay参数为第二Delay值比如0时,表示不支持延迟上报。
表1举例示出了基本信息表。
Figure PCTCN2017102208-appb-000001
表1
基于上述描述的基本信息表项的结构,则找到第一BFD会话匹配的第一基本信息表项具体为:以第一BFD会话的标识为关键字,在本地基本信息表中查找匹配的基本信息表项,将找到的基本信息表项作为第一BFD会话匹配的基本信息表项。
切换信息表:包含了切换信息表项。在本公开中,只有主PW的BFD会话才有匹配的切换信息表项。切换信息表项主要包含:
1)Sid:BFD会话标识;
2)bFS:发送切换标志,当bFS为用于表示支持发送切换的第一发送切换值比如1时, 表示支持发送切换,当bFS为用于表示不支持发送切换的第二发送切换值比如0时,表示不支持发送切换;
3)bRX:接收切换标志,当bRX为用于表示支持接收切换的第一接收切换值比如1时,表示支持接收切换,当bRX为用于表示不支持接收切换的第二接收切换值比如0时,表示不支持接收切换;
4)EgrID:主PW关联的硬件保护切换表项的索引,便于找到硬件保护切换表项;
5)Failover值:切换开关值,在初始可为初始值,后续会被更新。但不管怎样更新,在本公开中,当主PW正常工作时,主PW的BFD会话匹配的切换信息表项中的Failover值与主PW所关联的硬件保护切换表项中的Failover值不同,即:主PW的BFD会话匹配的切换信息表项中的Failover值为通过备PW转发报文的值,而硬件保护切换表项中的Failover值用于指示通过主PW转发报文的值。由于切换信息表项中的Failover值与硬件保护切换表项中的Failover值不同,因而当主PW故障时,需要将硬件保护切换表项中的Failover值更新为切换信息表项中的Failover值,从而使得直接从主PW切换至备PW以转发后续报文。
6)IngID:主PW对应的备PW所关联的硬件接收表项的索引,便于找到硬件接收表项;
7)BInLabel:备PW入标签。
表2举例示出了切换信息表。在表2中,“-”表示不关注。
Figure PCTCN2017102208-appb-000002
表2
基于这里描述的切换信息表项的结构,则在步骤101中,找到第一BFD会话匹配的切换信息表项具体为:以第一BFD会话的标识为关键字,在本地切换信息表中查找匹配的切换信息表项,将找到的切换信息表项作为第一BFD会话匹配的切换信息表项。
基于上面描述的各表项,下面通过一个实施例对图1所示流程进行描述:
作为一个实施例,在本公开中,为实现先更新硬件保护切换表项和硬件接收表项,之后再执行主备PW切换流程,如图2所示,本公开提出一种主备PW切换内部结构。主备PW切换内部结构包括从下到上的L0:硬件层、Ll:驱动层、L2:平台软件内核、L3:平台软件用户态、以及路由协议族。其中,硬件层包括交互数据的FIRMWARE/FPGA 201和交换硬件202,驱动层包括BFD驱动模块211以及交换平台驱动模块212,平台软件内核包括交互数据的BFD内核态模块221和MPLS内核态模块222,平台软件用户态包括交互数据的BFD用户态模块231和MPLS用户态模块232。其中,硬件层上报主PW的DOWN事件给BFD驱动模块201、BFD驱动模块201向BFD内核态模块221上报主PW的DOWN事件、BFD内核态模块221进行各种协议适配并通知给MPLS内核态模块222进行相应的处理(比如更新PW的公网隧道信息、通知交换平台驱动模块212进行底层PW的更新等)、交换平台驱动模块212执行如下处理:更新交换平台出接口信息、更新交换平台PW数据结构、最终交换平台驱动模块212更新硬件保护切换表项、硬件接收表项并下发给交换硬件。在本公开中,在驱动层新增加处理模块213,该新增加的处理模块213连接在BFD驱动模块211和交换平台驱动模块212之间。需要说明的是,即使本公开在驱动层新增加处理模块213,但本公开并不改变原有主备切换流程,并同时保证不影响各层原有模块的执行。
参见图3,图3为本公开提供的一实施例流程图。该实施例流程是由图2所示的处理模块213执行。如图3所示,该流程可包括以下步骤:
步骤301,监听Firmware事件。
步骤302,当监听到Firmware事件时,解析Firmware事件携带的BFD会话标识。
在本实施例是以Firmware事件为例,该Firmware事件可能是因为BFD会话变为运行(UP)状态触发的,也可能是因为BFD会话变为Down状态触发的,等等,下文会具体描述。在本公开中,Firmware事件至少携带了BFD会话标识、事件类型标识。比如,Firmware事件是因为BFD会话变为UP状态触发的,则Firmware事件携带的BFD会话标识就为该UP状态的BFD会话的标识,事件类型标识为UP事件(Event)的标识。
为便于描述,在本实施例中将Firmware事件携带的BFD会话标识记为BFD会话标识1。其中,BFD会话标识1可为主PW对应的BFD会话的标识,也可为备PW对应的BFD会话的标识,下文会逐一分析。
步骤303,在本地基本信息表中找到BFD会话标识1匹配的基本信息表项,当匹配出的基本信息表项中的Valid为有效值时,执行步骤304。
具体的,在步骤303中,在本地基本信息表中找到BFD会话标识1匹配的基本信息表项具体为:以BFD会话标识1为关键字,在本地基本信息表中找到匹配的基本信息表项,找到 的基本信息表项为BFD会话标识1匹配的基本信息表项。
作为一个实施例,当匹配出的基本信息表项中的Valid为无效值时,直接将Firmware事件上报给BFD驱动模块211,BFD驱动模块211就按照现有的主备PW切换流程处理,这里不再赘述。
步骤304,在本地特征表中找到Firmware事件携带的事件类型标识匹配的事件类型,并判断BFD会话标识1匹配的基本信息表项中的会话状态为UP还是Down,为UP状态时,执行如图4所示的流程,为Down状态时,执行如图5所示的流程。
虽然如上描述的基本信息表项中的会话状态还包含Init等,但在本公开中,仅对会话状态为UP、Down时进行详细描述,其他情况不作详细描述。
在本公开中,特征表,用于存放用户定制信息,包含以下几个特征表项:
UPDelayTimer:第一表项定时器值,例如,可以设置为1000ms,这里只是一个示例,当然也可以设置为其他数值,下文会用到,这里不详加描述;
PWUpdateTimer:第二表项定时器值,例如可以设置为10000ms,这里只是一个示例,当然也可以设置为其他数值,下文会用到,这里不详加描述;
BFDDownTimer:延时上报定时器值,即为上述的T。例如,T可以设为15ms;
MaxSessions:PE设备支持的最大会话数,例如,PE设备可以支持512个BFD会话;
Admin Down Event:管理(Admin)Down事件,当用户主动删除BFD会话时,意味着Admin Down事件(Event);
Down Event:BFD会话的故障事件;
UP Event:BFD会话变为UP状态的事件;
PW Type:承载PW的媒体类型,本公开默认为支持Vlan和以太网。
表3举例示出了特征表。
Name Value 备注
UPDelayTimer 1000(ms) Type=1
PWUpdateTimer 10000(ms) Type=2
BFDDownTimer 15(ms) Type=3
MaxSessions 512  
Admin Down Event 0  
Down Event 2  
UP Event 3  
PWType 4-Vlan,5-Ethernet  
表3
基于上面描述的特征表,则步骤304具体为:在本地特征表中找到Firmware事件携带的事件类型标识对应的事件类型。以表3为例,比如,事件类型标识为0,则匹配的事件类型为Admin Down Event,事件类型标识为2,则匹配的事件类型为Down Event,事件类型标识为3,则匹配的事件类型为UP Event。
至此,完成图3所示的流程。
参见图4,图4为本公开提供的一实施例的流程图。如图4所示,该流程可包括:
步骤401,判断事件类型为Down Event还是为Admin Down Event,为Down Event时,执行步骤402,为Admin Down Event时,执行步骤406。
其中,步骤401是在步骤304判断出BFD会话标识1匹配的基本信息表项中的会话状态为UP时执行的。
需要说明的是,在本实施例中,对于上述事件类型为除Down Event、Admin Down Event之外的其他事件类型比如UP Event,则直接上报BFD驱动模块211,按照现有上报流程处理即可,不再赘述。
步骤402,判断BFD会话标识1匹配的基本信息表项中的主备PW属性标识为表示主PW的值还是为表示备PW的值,当为表示主PW的值时执行步骤403,当为表示备PW的值时执行步骤404。
具体的,本步骤402中,当主备PW属性标识为表示主PW的值时,确定主PW变为Down状态。
具体的,本步骤402中,当主备PW属性标识为表示备PW的值时,确定备PW变为Down状态。
步骤403,以BFD会话标识1为关键字在本地切换信息表中确定匹配的切换信息表项,当切换信息表项中的bFS为第一发送切换值,在本地硬件保护切换表中找到索引为切换信息表项中EgrID的硬件保护切换表项,将找到的硬件保护切换表项中的Failover值更新为切换信息表项中的Failover值,并在切换信息表项中的bRX为第一接收切换值时,在本地硬件接收表中找到索引为切换信息表项中IngID的硬件接收表项,将找到的硬件接收表项中的Drop标识更新为接收值,之后将bFS更新为第二发送切换值,更新BFD会话标识1匹配的基本信息表项中的会话状态为Down。之后执行步骤405。
本步骤403是在上述步骤402确定出主备PW属性标识为表示主PW的值的前提下执行的,在此前提下,上述BFD会话标识1表示主PW对应的BFD会话的标识。基于此,本步骤403中就可以以BFD会话标识1为关键字在本地切换信息表中确定匹配的切换信息表项。
如上描述的切换信息表项的结构,切换信息表项中的EgrID具体为主PW关联的硬件保护切换表项的索引,因此,基于切换信息表项中的EgrID,就可以找到主PW关联的硬件保护切换表项。类似地,切换信息表项中的IngID具体为主PW的备PW所关联的硬件接收表项的索引,因此,基于切换信息表项中的IngID,就可以找到备PW的硬件接收表项。
作为一个实施例,当切换信息表项中的bFS为上述的第二发送切换值,或者当切换信息表项中的bRX为上述的第二接收切换值时,按照现有主备PW切换流程执行,不再赘述。
步骤404,以BFD会话标识1匹配的基本信息表项中的伙伴会话标识P-Sid为关键字,在本地切换信息表中确定匹配的切换信息表项,将匹配出的切换信息表项中的bFS更新为第二发送切换值,并更新BFD会话标识1匹配的基本信息表项中的会话状态为Down。之后执行步骤405。
本步骤404是在上述步骤402确定出主备PW属性标识为表示备PW的值的前提下执行的。在此前提下,也就意味着上述的BFD会话标识1表示备PW的BFD会话标识,基于此,本步骤404以BFD会话标识1匹配的基本信息表项中的伙伴会话标识P-Sid为关键字在本地切换信息表中确定匹配的切换信息表项,最终找到主PW匹配的切换信息表项。
步骤405,判断BFD会话标识1匹配的基本信息表项中的Delay标识为第一Delay值还是为第二Delay值,如果是第一Delay值,在经过设定延时上报时间T之后上报主PW的Down事件,如果是第二Delay值,上报主PW的Down事件。
如上描述,第一Delay值表示支持延迟上报,第二Delay值表示不支持延迟上报。
作为本公开的一个实施例,在本公开中,还涉及到定时器表。定时器表中包含定时器事件表项。在本公开中,定时器事件表项与BFD会话相关联,至少包括:
Valid:表项有效标识,当Valid为有效值比如1时,表项有效,反之,当Valid为无效值比如0时,表项无效,Valid的初始值为有效值;
Sid:定时器事件表项相关联的BFD会话标识;
Type:类型标识,具体地,当Type为第一标识值比如1时,用于指示因BFD会话变为UP状态而更新切换信息表项,当Type为第二标识值比如2时,用于指示因PW参数变化而更新切换信息表项,当Type为第三标识值比如3时,用于指示延迟上报。PW参数变化会在下文描述。
Timer:定时器事件表项的定时器值,当Type为第一标识值时,Timer为上述特征表中的UPDelayTimer,当Type为第二标识值时,Timer为上述特征表中的PWUpdateTimer,当Type为第三标识值时,Timer为上述特征表中的BFDDownTimer。
在本公开中,周期遍历定时器事件表中的各定时器事件表项,对遍历到的Valid为有效 值的定时器事件表项,将该定时器事件表项的Timer减少设定值比如1ms,当定时器事件表项的Timer减到阈值比如0时,意味该定时器事件表项到期,同时设置该定时器事件表项的Valid为无效值。
基于上面描述的定时器事件表项的结构,则在本步骤405中,上述在设定延时上报时间T之后上报主PW的Down事件具体包括步骤O1和步骤O2:
步骤O1,在本地定时器事件表中设置与上述BFD会话标识1相关联的定时器事件表项(记为定时器事件表项1)。
这里,定时器事件表项1中的Valid为有效值、Sid为BFD会话标识1、Type为第三标识值、Timer为上述特征表中的BFDDownTimer。
步骤O2,定时器事件表项1到期时,上报Firmware事件给BFD驱动模块211。
当定时器事件表项1的Timer减到上述阈值比如0时,意味着定时器事件表项1到期。上报Firmware事件给BFD驱动模块211之后执行的流程类似现有主备PW切换流程,不再赘述。
步骤406,当BFD会话标识1匹配的基本信息表项中的主备PW属性标识为表示主PW的值时,以BFD会话标识1为关键字,在本地切换信息表中找到匹配的切换信息表项;当BFD会话标识1匹配的基本信息表项中的主备PW属性标识为表示备PW的值时,以BFD会话标识1匹配的基本信息表项中的P-Sid为关键字,在本地切换信息表中找到匹配的切换信息表项;将找到的切换信息表项中的bFS更新为第二发送切换值,并更新BFD会话标识1匹配的基本信息表项中的会话状态为Down,上报Firmware事件给BFD驱动模块211。
BFD驱动模块211收到Firmware事件后执行的流程类似现有主备PW切换流程,不再赘述。
至此,完成图4所示的流程。
如上描述,切换信息表项中的bFS为第一发送切换值是实现从主PW切换为备PW的前提,而在不能实现从主PW切换为备PW时,要及时将切换信息表项中的bFS更新为第二发送切换值,避免主备PW误切。步骤403、步骤404、步骤406中将bFS更新为第二发送切换值的目的就是为了避免主备PW误切。
参见图5,图5为本公开提供的一实施例的流程图。如图5所示,该流程可包括:
步骤501,在事件类型为UP Event时,更新BFD会话标识1匹配的基本信息表项中的会话状态为UP。
本步骤501是在步骤304判断出上述BFD会话标识1匹配的基本信息表项中的会话状态为Down时执行的。
当事件类型为UP Event,则意味着BFD会话标识1对应的BFD会话变为UP状态,因此,更新BFD会话标识1匹配的基本信息表项中的会话状态为UP。
在本实施例中,当事件类型为除UP Event之外的其他事件类型,则直接将Firmware事件上报给BFD驱动模块211,由BFD驱动模块211按照现有主备PW切换流程执行,不再赘述。
在一个示例中,步骤501进一步包括:直接将Firmware事件上报给BFD驱动模块211,由BFD驱动模块211按照现有主备PW切换流程执行,不再赘述。
步骤502,在经过设定的第一表项更新时间后,更新切换信息表项。
参见上述对定时器事件表项到期的描述,相应的,步骤502具体包括:
步骤a1,在本地定时器事件表中设置与BFD会话标识1相关联的定时器事件表项(记为定时器事件表项2)。
基于上面描述的定时器事件表项的结构,则定时器事件表项2的Valid为有效值、Sid为BFD会话标识1、Type为第一标识值、Timer为本地特征表中的UPDelayTimer,步骤a1中的第一表项更新时间为UPDelayTimer指示的第一表项定时器值,比如为1000ms。
步骤a2,在定时器事件表项2到期时,更新切换信息表项。
当定时器事件表项2的Timer减到上述阈值比如0时,意味着定时器事件表项2到期。
至于如何在定时器表项2到期时更新切换信息表项,可参见图6所示的流程。
参见图6,图6为本公开提供的一实施例的流程图。如图6所示,该流程可包括:
步骤601,定时器事件表项2到期时,判断BFD会话标识1匹配的基本信息表项中的Valid为有效值还是无效值,当为有效值时执行步骤602,当为无效值时执行步骤608。
步骤602,获取主PW的当前信息,依据当前信息判断以下条件是否满足:主PW当前正常工作且主PW当前还存在处于备份状态的备PW,如果是,执行步骤803,如果否,执行步骤808。
在BFD会话标识1表示主PW对应的BFD会话时,获取BFD会话标识1对应的主PW的当前信息;
在BFD会话标识1表示备PW对应的BFD会话时,获取该Sid为BFD会话标识1的基本信息表项中P-Sid对应的主PW的当前信息。
尽管BFD会话标识1匹配的基本信息表项中会记录主备PW的信息,但因为基本信息表项是在BFD会话标识1对应的BFD会话创建时建立的,其记录的主备PW信息可能发生了变化,所以本步骤602会重新获取主PW的当前信息。基于图2所示的主备PW切换内部结构,这里可从交换平台驱动模块212获取主PW的当前信息。该当前信息至少包含:主PW 是否在正常工作、主PW当前所关联的硬件保护切换表项的索引、主PW当前是否有处于备用状态的备PW、备PW所关联的硬件接收表项的索引、备PW的入标签等。
步骤603,当BFD会话标识1匹配的基本信息表项中的主备PW属性标识为表示主PW的值时,以BFD会话标识1为关键字,在本地切换信息表中找到匹配的切换信息表项,当BFD会话标识1匹配的基本信息表项中的主备PW属性标识为表示备PW的值时,以BFD会话标识1匹配的基本信息表项中的P-Sid为关键字,在本地切换信息表中找到匹配的切换信息表项。
步骤604,更新步骤603找到的切换信息表项中的bFS为第一发送切换值,以及更新步骤603找到的切换信息表项中的Failover值为用于指示通过备PW转发报文的值。之后执行步骤605。
在步骤604中,当更新步骤603找到的切换信息表项中的bFS为第一发送切换值时,则意味着后续主PW故障时可以进行主备PW切换。
需要说明的是,步骤603找到的切换信息表项中的EgrID可能与上述获取的主PW的当前信息所包含的硬件保护切换表项的索引不同,当不同时,在步骤604中,可进一步将步骤603找到的切换信息表项中的EgrID更新为上述获取的主PW的当前信息所包含的硬件保护切换表项的索引。
步骤605,判断PE是否支持双向接收功能,如果是,执行步骤606,如果否,执行步骤607。
这里的双向接收功能是指PE同时通过主备PW接收报文的功能,其可根据实际需求预先在PE上配置。
步骤606,更新步骤603找到的切换信息表项中的bRX为第二接收切换值。结束当前流程。
本步骤606是在PE支持双向接收功能的前提下执行的。因为PE本身支持双向接收功能,其肯定会同时打开主备PW接收报文,因此,就没有必要执行接收切换,所以本步骤606直接更新步骤603找到的切换信息表项中的bRX为用于表示不支持接收切换的第二接收切换值。
步骤607,更新步骤603找到的切换信息表项中的bRX为第一接收切换值。
本步骤607是在PE不支持双向接收功能的前提下执行的。因为PE不支持双向接收功能,其肯定不会打开备PW接收报文,当主PW切换至备PW时,就会出现因备PW不接收报文而导致的报文丢失,针对此种情况,为避免主PW切换至备PW后报文丢失,有必要打开备PW接收报文,所以本步骤607更新步骤603找到的切换信息表项中的bRX为用于表示 支持接收切换的第一接收切换值。
需要说明的是,步骤603找到的切换信息表项中的IngID可能与上述获取的主PW的当前信息所包含的硬件接收表项的索引不同,当不同时,在步骤607中,可进一步将步骤603找到的切换信息表项中的IngID更新为上述获取的主PW的当前信息所包含的硬件接收表项的索引。同理,当步骤603找到的切换信息表项中的BInLabe与上述获取的主PW的当前信息所包含的入标签不同时,在步骤607中,可进一步将步骤603找到的切换信息表项中的BInLabe更新为上述获取的主PW的当前信息所包含的入标签。
步骤608,当BFD会话标识1匹配的基本信息表项中的主备PW属性标识为表示主PW的值时,以BFD会话标识1为关键字,在本地切换信息表中找到匹配的切换信息表项;当BFD会话标识1匹配的基本信息表项中的主备PW属性标识为表示备PW的值时,以BFD会话标识1匹配的基本信息表项中的P-Sid为关键字,在本地切换信息表中找到匹配的切换信息表项;更新找到的切换信息表项中的bFS为第二发送切换值。结束当前流程。
至此,完成图6所示的流程。
需要说明的是,在本公开中,当从交换平台驱动模块212获知主PW被删除时,则直接将主PW对应的BFD会话所匹配的切换信息表项中的bFS更新为第二发送切换值,以指示不能实现从主PW切换为备PW,避免主备PW误切。
还有,当从交换平台驱动模块212获知备PW被删除时,则找到备PW对应的BFD会话所匹配的基本信息表项,以找到的基本信息表项中的P-Sid为关键字找到匹配的切换信息表项,将匹配的切换信息表项中的bFS更新为第二发送切换值,以指示不能实现从主PW切换为备PW,避免主备PW误切。在本公开中,当主PW的发送参数发生变化时,发送参数至少包含出端口、出标签,添加主PW对应的BFD会话所关联的定时器事件表项(记为定时器表项3),基于上面描述的定时器事件表项的结构,则定时器事件表项3中的Valid为有效值、Sid为主PW对应的BFD会话、Type为第二标识值、Timer为本地特征表中的PWUpdateTimer;在定时器事件表项3到期时更新与主PW对应的BFD会话匹配的切换信息表项;该更新过程类似图6描述的过程,不再赘述。
当备PW的接收参数发生变化时,接收参数至少包含接收端口、入标签,添加备PW对应的BFD会话所关联的定时器事件表项4,基于上面描述的定时器事件表项的结构,则定时器事件表项4中的Valid为有效值、Sid为备PW对应的BFD会话、Type为第二标识值、Timer为本地特征表中的PWUpdateTimer;并在定时器事件表项4到期时,在基本信息表中找到备PW对应的BFD会话所匹配的基本信息表项,以该匹配的基本信息表项中的P-Sid为关键字,在本地切换信息表中找到匹配的切换信息表项,实质是主PW对应的BFD会话匹配的切换信 息表项,更新找到的切换信息表项,该更新过程类似图6描述的过程,不再赘述。
以上对本公开提供的方法进行了描述。下面对本公开提供的装置进行描述:
参见图7,图7为本申请提供的装置结构图。该装置应用于PE,具体可为图2所示的处理模块213。
如图7所示,该装置可包括:
表项匹配单元701,用于当主PW对应的第一BFD会话检测到主PW变为故障(Down)状态时,找到第一BFD会话匹配的切换信息表项;
表项更新单元702,用于当所述切换信息表项中的发送切换标志(bFS)表示支持发送切换的第一发送切换值,并且所述切换信息表项中的切换开关(Failover)值指示通过备PW转发报文时,将主PW关联的硬件保护切换表项中的Failover值更新为所述切换信息表项中的Failover值,并在所述切换信息表项中的接收切换标志(bRX)表示支持接收切换的第一接收切换值时,将所述备PW关联的硬件接收表项中的丢弃(Drop)标识更新为用于表示接收报文的接收值,将所述bFS更新为用于表示不支持发送切换的第二发送切换值;
事件上报单元703,用于在所述表项更新单元702完成表项更新后,上报主PW的Down事件。
作为一个实施例,事件上报单元703上报主PW Down事件具体可为:
找到第一BFD会话匹配的第一基本信息表项,当第一基本信息表项的Delay参数为用于表示支持延迟上报Down事件的第一Delay值时,在经过设定延时时间T之后上报主PW的Down事件,当第一基本信息表项的Delay参数为用于表示不支持延迟上报Down事件的第二Delay值时,上报主PW的Down事件。
所述表项更新单元702进一步在主PW被删除、或者在第一BFD会话被删除时,将所述bFS更新为第二发送切换值。
所述表项匹配单元701在所述备PW被删除、或者所述备PW对应的第二BFD会话检测到备PW变为Down状态时,进一步找到所述备PW对应的第二BFD会话所匹配的第二基本信息表项,第二基本信息表项中至少包含伙伴会话标识P-Sid,其中,P-Sid为所述第二BFD会话的伙伴会话的标识,所述第二BFD会话的伙伴会话为所述第一PFD会话,找到第二基本信息表项中的P-Sid匹配的切换信息表项;
所述表项更新单元702进一步用于将匹配的切换信息表项中的bFS更新为所述第二发送切换值。
所述表项更新单元702进一步在主PW的发送参数发生变化时,发送参数至少包含出端口、出标签,在本地定时器表中添加第一BFD会话关联的第一定时器事件表项,在第一定 时器事件表项到期时,更新所述切换信息表项;以及,
在第一BFD会话变为运行(UP)状态时,在本地定时器表中添加第一BFD会话关联的第二定时器事件表项;其中,第一定时器事件表项与第二定时器事件表项的定时器值(Timer)不同,在第二定时器事件表项到期时,更新所述切换信息表项。
所述表项更新单元702更新切换信息表项包括:
判断第一BFD会话匹配的第一基本信息表项的表项有效标识为用于表示表项有效的有效值还是为用于表示表项无效的无效值;
若为无效值,更新所述切换信息表项中的bFS为所述第二发送切换值;
若为有效值,获取所述主PW的当前信息,当前信息至少包括:主PW是否在正常工作、主PW当前是否有处于备用状态的备PW,依据当前信息判断以下条件是否满足:主PW当前正常工作、且主PW当前还存在处于备份状态的备PW,如果否,更新所述bFS为第二发送切换值,如果是,更新所述bFS为第一发送切换值并更新所述切换信息表项中的Failover值为用于指示通过备PW转发报文的值,且在本PE不支持主备PW同时接收报文的功能时更新所述bRX为第一接收切换值。
所述表项更新单元702进一步在备PW的接收参数发生变化时,接收参数至少包含接收端口、入标签,在本地定时器表中添加第二BFD会话关联的第三定时器事件表项,以及,在第二BFD会话变为UP状态时,在本地定时器表中添加第二BFD会话关联的第四定时器事件表项;其中,第三定时器事件表项与第四定时器事件表项的定时器值(Timer)不同,以及,在第三定时器事件表项或者第四定时器事件表项到期时,找到第二BFD会话所匹配的第二基本信息表项,更新本地与P-Sid匹配的切换信息表项;
其中,第二基本信息表项中至少包含伙伴会话标识P-Sid,P-Sid为所述第二BFD会话的伙伴会话的标识,所述第二BFD会话的伙伴会话为所述第一BFD会话。
所述表项更新单元702更新与P-Sid匹配的切换信息表项包括:
判断第二基本信息表项的表项有效标识为用于表示表项有效的有效值还是为用于表示表项无效的无效值;
若为无效值,更新本地与所述P-Sid匹配的切换信息表项中的bFS为第二发送切换值;
若为有效值,获取所述主PW的当前信息,当前信息至少包括:主PW是否在正常工作、主PW当前是否有处于备用状态的备PW,依据当前信息判断以下条件是否满足:主PW当前正常工作、且主PW当前还存在处于备份状态的备PW,如果否,更新本地与所述P-Sid匹配的切换信息表项中的bFS为第二发送切换值,如果是,更新本地与所述P-Sid匹配的切换信息表项中的bFS为第一发送切换值,并更新本地与所述P-Sid匹配的切换信息表项中的 Failover值为用于指示通过备PW转发报文的值,且在本PE不支持主备PW同时接收报文的功能时更新本地与所述P-Sid匹配的切换信息表项中的bRX为第一接收切换值。
至此,完成图7所示的装置结构描述。
本公开还提供了图7所示装置的硬件结构。参见图8,图8为本公开提供的图7所示装置的硬件结构示意图。该装置包含:处理器801、存储有机器可执行指令的机器可读存储介质802。处理器801与机器可读存储介质802可经由系统总线通信。并且,通过读取并执行机器可读存储介质802中的机器可执行指令,处理器801可执行上文描述的方法。如图8所示,该硬件结构还可以包括一个电源组件803配置为执行该交换设备的电源管理,一个有线或无线网络接口804配置为将该装置连接到网络,和一个输入输出(I/O)接口805
本文中提到的机器可读存储介质802可以是任何电子、磁性、光学或其它物理存储装置,可以包含或存储信息,如可执行指令、数据,等等。例如,机器可读存储介质可以是:RAM(Radom Access Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、dvd等),或者类似的存储介质,或者它们的组合。
所述机器可读存储介质802,用于存放表项匹配单元701运行的程序指令、表项更新单元702运行的程序指令、事件上报单元703运行的程序指令。
处理器801,用于执行表项匹配单元701运行的程序指令、用于执行表项更新单元702运行的程序指令、用于执行事件上报单元703运行的程序指令。其中,处理器801通过执行如上各个单元所运行的程序指令,来实现如上所述的方法。
至此,完成图8所示的硬件结构描述。
根据本公开的示例,提供一种服务提供商网络边缘(PE)设备,包括:
处理器;以及
存储有机器可执行指令的机器可读存储介质,通过执行所述机器可执行指令,所述处理器被使得:
在主伪线(PW)对应的第一双向转发检测(BFD)会话检测到主PW变为故障(Down)状态时,找到第一BFD会话匹配的切换信息表项;
在所述切换信息表项中的发送切换标志(bFS)表示支持发送切换的第一发送切换值,并且所述切换信息表项中的切换开关(Failover)值指示通过备PW转发报文时,将主PW关联的硬件保护切换表项中的Failover值更新为所述切换信息表项中的Failover值,
在所述切换信息表项中的接收切换标志(bRX)表示支持接收切换的第一接收切换值时, 将所述备PW关联的硬件接收表项中的丢弃(Drop)标识更新为用于表示接收报文的接收值,将所述bFS更新为用于表示不支持发送切换的第二发送切换值;
上报主PW的Down事件。
其中,在上报主PW的Down事件时,所述处理器还被使得:
找到第一BFD会话匹配的第一基本信息表项,
当所述第一基本信息表项的延时(Delay)参数为用于表示支持延迟上报Down事件的第一Delay值时,在经过设定延时时间T之后上报主PW的Down事件,
当所述第一基本信息表项的Delay参数为用于表示不支持延迟上报Down事件的第二Delay值时,上报主PW的Down事件。
所述处理器还被使得:
当主PW被删除、或者当第一BFD会话被删除时,将所述bFS更新为所述第二发送切换值。
所述处理器还被使得:
当所述备PW被删除、或者所述备PW对应的第二BFD会话检测到所述备PW变为Down状态时,
找到所述备PW对应的第二BFD会话所匹配的第二基本信息表项,第二基本信息表项中至少包含表示所述第二BFD会话的伙伴会话的伙伴会话标识(P-Sid);
找到与所述第二基本信息表项中的所述P-Sid匹配的切换信息表项,将匹配的切换信息表项中的bFS更新为所述第二发送切换值。
所述处理器还被使得:
当主PW的发送参数发生变化时,发送参数至少包含出端口、出标签,在本地定时器表中添加第一BFD会话关联的第一定时器事件表项;
当第一BFD会话变为运行(UP)状态时,在本地定时器表中添加第一BFD会话关联的第二定时器事件表项;其中,第一定时器事件表项与第二定时器事件表项的定时器值不同;
当第一定时器事件表项或者第二定时器事件表项到期时,更新所述切换信息表项。
其中,在更新所述切换信息表项时,所述处理器还被使得:
在第一BFD会话匹配的第一基本信息表项的表项有效标识表示表项无效时,更新所述切换信息表项中的bFS为所述第二发送切换值;
在所述表项有效标识表示表项有效时,获取所述主PW的当前信息,所述当前信息至少包括:主PW是否在正常工作、主PW当前是否有处于备用状态的备PW,
依据所述当前信息判断以下条件是否满足:主PW当前正常工作且主PW当前还存在处 于备份状态的备PW,
如果不满足条件,更新所述bFS为所述第二发送切换值,
如果满足条件,更新所述bFS为所述第一发送切换值并更新所述切换信息表项中的Failover值为用于指示通过备PW转发报文的值,且在本PE不支持主备PW同时接收报文的功能时更新所述bRX为所述第一接收切换值。
所述处理器还被使得:
当备PW的接收参数发生变化时,所述接收参数至少包含接收端口、入标签,在本地定时器表中添加第二BFD会话关联的第三定时器事件表项;
当第二BFD会话变为UP状态时,在本地定时器表中添加第二BFD会话关联的第四定时器事件表项;其中,第三定时器事件表项与第四定时器事件表项的定时器值Timer不同;
当第三定时器事件表项或者第四定时器事件表项到期时,找到第二BFD会话匹配的第二基本信息表项,所述第二基本信息表项中至少包含表示所述第二BFD会话的伙伴会话的标识的伙伴会话标识(P-Sid),并更新本地与P-Sid匹配的切换信息表项。
其中,在更新本地与P-Sid匹配的切换信息表项时,所述处理器还被使得:
在所述第二基本信息表项的表项有效标识表示表项无效时,更新本地与所述P-Sid匹配的切换信息表项中的bFS为所述第二发送切换值;
在所述表项有效标识表示表项有效时,获取所述主PW的当前信息,所述当前信息至少包括:主PW是否在正常工作、主PW当前是否有处于备用状态的备PW,
依据当前信息判断以下条件是否满足:主PW当前正常工作、且主PW当前还存在处于备份状态的备PW,
如果不满足条件,更新本地与所述P-Sid匹配的切换信息表项中的bFS为所述第二发送切换值,
如果满足条件,更新本地与所述P-Sid匹配的切换信息表项中的bFS为所述第一发送切换值,并更新本地与所述P-Sid匹配的切换信息表项中的Failover值为用于指示通过备PW转发报文的值,且在本PE不支持主备PW同时接收报文的功能时更新本地与所述P-Sid匹配的切换信息表项中的bRX为所述第一接收切换值。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性 劳动的情况下,即可以理解并实施。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上对本公开实施例所提供的方法和装置进行了详细介绍,本文中应用了具体个例对本公开的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本公开的方法及其核心思想;同时,对于本领域的一般技术人员,依据本公开的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本公开的限制。

Claims (16)

  1. 一种主备伪线(PW)快速切换方法,包括:
    服务提供商网络边缘(PE)设备在当主PW对应的第一双向转发检测(BFD)会话检测到所述主PW变为故障(Down)状态时,找到所述第一BFD会话匹配的切换信息表项;
    当所述切换信息表项中的发送切换标志(bFS)为用于表示支持发送切换的第一发送切换值,并且所述切换信息表项中的切换开关(Failover)值为用于指示通过备PW转发报文的值时,所述PE设备将所述主PW关联的硬件保护切换表项中的Failover值更新为所述切换信息表项中的Failover值,
    在所述切换信息表项中的接收切换标志(bRX)为用于表示支持接收切换的第一接收切换值时,所述PE设备将所述备PW关联的硬件接收表项中的丢弃(Drop)标识更新为用于表示接收报文的接收值,
    所述PE设备将所述bFS更新为用于表示不支持发送切换的第二发送切换值;
    所述PE设备上报所述主PW的Down事件。
  2. 根据权利要求1所述的方法,其中,上报所述主PW的Down事件包括:
    所述PE设备找到所述第一BFD会话匹配的第一基本信息表项,
    当所述第一基本信息表项的延时(Delay)参数为用于表示支持延迟上报Down事件的第一Delay值时,所述PE设备在经过设定延时时间T之后上报所述主PW的Down事件,
    当所述第一基本信息表项的Delay参数为用于表示不支持延迟上报Down事件的第二Delay值时,所述PE设备上报所述主PW的Down事件。
  3. 根据权利要求1所述的方法,还包括:
    当所述主PW被删除、或者当所述第一BFD会话被删除时,所述PE设备将所述bFS更新为所述第二发送切换值。
  4. 根据权利要求1所述的方法,还包括:
    当所述备PW被删除、或者所述备PW对应的第二BFD会话检测到所述备PW变为Down状态时,
    所述PE设备找到所述备PW对应的第二BFD会话所匹配的第二基本信息表项,所述第二基本信息表项中至少包含表示所述第二BFD会话的伙伴会话的伙伴会话标识(P-Sid);
    所述PE设备找到与所述第二基本信息表项中的所述P-Sid匹配的切换信息表项,
    所述PE设备将所述匹配的切换信息表项中的bFS更新为所述第二发送切换值。
  5. 根据权利要求1所述的方法,还包括:
    当所述主PW的发送参数发生变化时,所述发送参数至少包含出端口、出标签,所述PE设备在本地定时器表中添加所述第一BFD会话关联的第一定时器事件表项;
    当所述第一BFD会话变为运行(UP)状态时,所述PE设备在所述本地定时器表中添加所述第一BFD会话关联的第二定时器事件表项;其中,所述第一定时器事件表项与所述第二定时器事件表项的定时器值不同;
    当所述第一定时器事件表项或者所述第二定时器事件表项到期时,所述PE设备更新所述切换信息表项。
  6. 根据权利要求5所述的方法,其中,更新所述切换信息表项包括:
    在所述第一BFD会话匹配的第一基本信息表项的表项有效标识表示表项无效时,所述PE设备更新所述切换信息表项中的bFS为所述第二发送切换值;
    在所述表项有效标识表示表项有效时,所述PE设备获取所述主PW的当前信息,所述当前信息至少包括:所述主PW是否在正常工作、所述主PW当前是否有处于备用状态的备PW,
    所述PE设备依据所述当前信息判断以下条件是否满足:所述主PW当前正常工作,且所述主PW当前还存在处于备份状态的备PW,
    如果不满足所述条件,所述PE设备更新所述bFS为所述第二发送切换值,
    如果满足所述条件,所述PE设备
    更新所述bFS为所述第一发送切换值;
    更新所述切换信息表项中的Failover值为用于指示通过备PW转发报文的值,且
    在本PE设备不支持主备PW同时接收报文的功能时更新所述bRX为所述第一接收切换值。
  7. 根据权利要求1所述的方法,还包括:
    当所述备PW的接收参数发生变化时,所述接收参数至少包含接收端口、入标签,所述PE设备在本地定时器表中添加第二BFD会话关联的第三定时器事件表项;
    当所述第二BFD会话变为UP状态时,所述PE设备在所述本地定时器表中添加所述第二BFD会话关联的第四定时器事件表项;其中,所述第三定时器事件表项与所述第四定时器事件表项的定时器值不同;
    当所述第三定时器事件表项或者所述第四定时器事件表项到期时,所述PE设备找到所述第二BFD会话匹配的第二基本信息表项,所述第二基本信息表项中至少包含表示所述第二BFD会话的伙伴会话的标识的伙伴会话标识(P-Sid),并更新与所述P-Sid匹配的切换信息表 项。
  8. 根据权利要求7所述的方法,其中,更新与所述P-Sid匹配的切换信息表项包括:
    在所述第二基本信息表项的表项有效标识表示表项无效时,所述PE设备更新与所述P-Sid匹配的切换信息表项中的bFS为所述第二发送切换值;
    在所述表项有效标识表示表项有效时,所述PE设备获取所述主PW的当前信息,所述当前信息至少包括:所述主PW是否在正常工作、所述主PW当前是否有处于备用状态的备PW,
    所述PE设备依据所述当前信息判断以下条件是否满足:主PW当前正常工作、且主PW当前还存在处于备份状态的备PW,
    如果不满足所述条件,所述PE设备更新与所述P-Sid匹配的切换信息表项中的bFS为所述第二发送切换值,
    如果满足所述条件,所述PE设备
    更新与所述P-Sid匹配的切换信息表项中的bFS为所述第一发送切换值,
    更新与所述P-Sid匹配的切换信息表项中的Failover值为用于指示通过备PW转发报文的值,且
    在本PE不支持主备PW同时接收报文的功能时更新与所述P-Sid匹配的切换信息表项中的bRX为所述第一接收切换值。
  9. 一种服务提供商网络边缘(PE)设备,包括:
    处理器;以及
    存储有机器可执行指令的机器可读存储介质,通过执行所述机器可执行指令,所述处理器被使得:
    在主伪线(PW)对应的第一双向转发检测(BFD)会话检测到所述主PW变为故障(Down)状态时,找到第一BFD会话匹配的切换信息表项;
    在所述切换信息表项中的发送切换标志(bFS)表示支持发送切换的第一发送切换值,并且所述切换信息表项中的切换开关(Failover)值指示通过备PW转发报文时,将所述主PW关联的硬件保护切换表项中的Failover值更新为所述切换信息表项中的Failover值,
    在所述切换信息表项中的接收切换标志(bRX)表示支持接收切换的第一接收切换值时,
    将所述备PW关联的硬件接收表项中的丢弃(Drop)标识更新为用于表示接收报文的接收值,
    将所述bFS更新为用于表示不支持发送切换的第二发送切换值;
    上报所述主PW的Down事件。
  10. 根据权利要求9所述的设备,其中,在上报所述主PW的Down事件时,所述处理器还被使得:
    找到第一BFD会话匹配的第一基本信息表项,
    当所述第一基本信息表项的延时(Delay)参数为用于表示支持延迟上报Down事件的第一Delay值时,在经过设定延时时间T之后上报所述主PW的Down事件,
    当所述第一基本信息表项的Delay参数为用于表示不支持延迟上报Down事件的第二Delay值时,上报所述主PW的Down事件。
  11. 根据权利要求9所述的设备,所述处理器还被使得:
    当所述主PW被删除、或者当所述第一BFD会话被删除时,将所述bFS更新为所述第二发送切换值。
  12. 根据权利要求9所述的设备,所述处理器还被使得:
    当所述备PW被删除、或者所述备PW对应的第二BFD会话检测到所述备PW变为Down状态时,
    找到所述备PW对应的第二BFD会话所匹配的第二基本信息表项,第二基本信息表项中至少包含表示所述第二BFD会话的伙伴会话的伙伴会话标识(P-Sid);
    找到与所述第二基本信息表项中的所述P-Sid匹配的切换信息表项,将所述匹配的切换信息表项中的bFS更新为所述第二发送切换值。
  13. 根据权利要求9所述的设备,所述处理器还被使得:
    当所述主PW的发送参数发生变化时,发送参数至少包含出端口、出标签,在本地定时器表中添加所述第一BFD会话关联的第一定时器事件表项;
    当所述第一BFD会话变为运行(UP)状态时,在本地定时器表中添加所述第一BFD会话关联的第二定时器事件表项;其中,第一定时器事件表项与第二定时器事件表项的定时器值不同;
    当第一定时器事件表项或者第二定时器事件表项到期时,更新所述切换信息表项。
  14. 根据权利要求13所述的设备,其中,在更新所述切换信息表项时,所述处理器还被使得:
    在所述第一BFD会话匹配的第一基本信息表项的表项有效标识表示表项无效时,更新所述切换信息表项中的bFS为所述第二发送切换值;
    在所述表项有效标识表示表项有效时,获取所述主PW的当前信息,所述当前信息至少 包括:所述主PW是否在正常工作、所述主PW当前是否有处于备用状态的备PW,
    依据所述当前信息判断以下条件是否满足:所述主PW当前正常工作且所述主PW当前还存在处于备份状态的备PW,
    如果不满足所述条件,更新所述bFS为所述第二发送切换值,
    如果满足所述条件,更新所述bFS为所述第一发送切换值并更新所述切换信息表项中的Failover值为用于指示通过备PW转发报文的值,且在本PE不支持主备PW同时接收报文的功能时更新所述bRX为所述第一接收切换值。
  15. 根据权利要求9所述的设备,所述处理器还被使得:
    当所述备PW的接收参数发生变化时,所述接收参数至少包含接收端口、入标签,在本地定时器表中添加第二BFD会话关联的第三定时器事件表项;
    当所述第二BFD会话变为UP状态时,在本地定时器表中添加所述第二BFD会话关联的第四定时器事件表项;其中,第三定时器事件表项与第四定时器事件表项的定时器值不同;
    当第三定时器事件表项或者第四定时器事件表项到期时,找到所述第二BFD会话匹配的第二基本信息表项,所述第二基本信息表项中至少包含表示所述第二BFD会话的伙伴会话的标识的伙伴会话标识(P-Sid),并更新与P-Sid匹配的切换信息表项。
  16. 根据权利要求15所述的设备,其中,在更新与P-Sid匹配的切换信息表项时,所述处理器还被使得:
    在所述第二基本信息表项的表项有效标识表示表项无效时,更新与所述P-Sid匹配的切换信息表项中的bFS为所述第二发送切换值;
    在所述表项有效标识表示表项有效时,获取所述主PW的当前信息,所述当前信息至少包括:所述主PW是否在正常工作、所述主PW当前是否有处于备用状态的备PW,
    依据当前信息判断以下条件是否满足:所述主PW当前正常工作、且所述主PW当前还存在处于备份状态的备PW,
    如果不满足所述条件,更新与所述P-Sid匹配的切换信息表项中的bFS为所述第二发送切换值,
    如果满足所述条件,更新与所述P-Sid匹配的切换信息表项中的bFS为所述第一发送切换值,并更新与所述P-Sid匹配的切换信息表项中的Failover值为用于指示通过备PW转发报文的值,且在本PE不支持主备PW同时接收报文的功能时更新与所述P-Sid匹配的切换信息表项中的bRX为所述第一接收切换值。
PCT/CN2017/102208 2016-09-19 2017-09-19 主备伪线pw切换 WO2018050120A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP17850321.5A EP3493489B1 (en) 2016-09-19 2017-09-19 Failover between active pseudo wire and standby pseudo wire
US16/334,321 US10708184B2 (en) 2016-09-19 2017-09-19 Switching primary/backup pseudowire
JP2019515413A JP6792701B2 (ja) 2016-09-19 2017-09-19 プライマリ・バックアップ疑似回線pw切替

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610831302.2A CN107846356B (zh) 2016-09-19 2016-09-19 主备伪线pw快速切换方法和装置
CN201610831302.2 2016-09-19

Publications (1)

Publication Number Publication Date
WO2018050120A1 true WO2018050120A1 (zh) 2018-03-22

Family

ID=61619334

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/102208 WO2018050120A1 (zh) 2016-09-19 2017-09-19 主备伪线pw切换

Country Status (5)

Country Link
US (1) US10708184B2 (zh)
EP (1) EP3493489B1 (zh)
JP (1) JP6792701B2 (zh)
CN (1) CN107846356B (zh)
WO (1) WO2018050120A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107846292B (zh) 2016-09-19 2020-12-04 新华三技术有限公司 防止故障处理延迟的方法和装置
CN109246011B (zh) * 2018-10-25 2021-05-25 新华三技术有限公司 一种报文转发方法及装置
CN109698781B (zh) * 2018-12-20 2021-10-29 新华三技术有限公司 报文转发路径的管理方法和pe设备
CN110430131B (zh) * 2019-07-25 2021-12-24 新华三技术有限公司合肥分公司 一种报文转发方法及装置
CN111726291B (zh) * 2019-08-30 2022-03-01 新华三技术有限公司 一种路径切换方法及网络设备
CN111447095B (zh) * 2020-03-31 2022-05-24 新华三信息安全技术有限公司 双向转发检测切换方法、双向转发检测模块及边缘设备
US11418582B1 (en) * 2021-07-06 2022-08-16 Citrix Systems, Inc. Priority-based transport connection control

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080285466A1 (en) * 2007-05-19 2008-11-20 Cisco Technology, Inc. Interworking between MPLS/IP and Ethernet OAM mechanisms
CN101645810A (zh) * 2009-09-02 2010-02-10 杭州华三通信技术有限公司 Pw的检测方法和设备
CN102006227A (zh) * 2010-11-23 2011-04-06 中兴通讯股份有限公司 一种pw双归保护场景中确定转发路径的方法及装置
CN102611577A (zh) * 2012-03-02 2012-07-25 中兴通讯股份有限公司 一种基于ldp会话的pw保护方法、装置及系统
CN102857362A (zh) * 2012-04-20 2013-01-02 福建星网锐捷网络有限公司 故障处理方法、装置和系统

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002353988A (ja) 2001-05-28 2002-12-06 Mitsubishi Electric Corp 光リングネットワークプロテクションシステム
US7940652B1 (en) * 2005-02-14 2011-05-10 Brixham Solutions Ltd. Pseudowire protection using a standby pseudowire
US8107386B2 (en) 2008-02-07 2012-01-31 Cisco Technology, Inc. VPLS N-PE redundancy using pseudo wire fast failover
CN101572666B (zh) * 2009-06-05 2012-01-04 杭州华三通信技术有限公司 虚拟专用局域网服务网络中流量切换的方法和装置
CN102025646B (zh) 2011-01-05 2013-08-28 杭州华三通信技术有限公司 链路倒换方法及其装置
CN102594651A (zh) * 2011-01-07 2012-07-18 华为数字技术有限公司 一种pbb h-vpls网络中的业务保护方法
CN102333028B (zh) 2011-06-22 2013-02-13 杭州华三通信技术有限公司 一种分层式二层虚拟专用网发送报文的方法及通信设备
US20150334006A1 (en) 2012-04-20 2015-11-19 Telefonaktiebolaget L M Ericsson (Publ) Method to do fast traffic switchover based on server layer status
CN102769561B (zh) * 2012-06-28 2015-05-27 华为技术有限公司 在业务保护方案中减少丢包的方法和系统
US10771383B2 (en) * 2018-06-26 2020-09-08 Juniper Networks, Inc. Coordinating pseudowire connection characteristics and multi-homed provider edge device capabilities

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080285466A1 (en) * 2007-05-19 2008-11-20 Cisco Technology, Inc. Interworking between MPLS/IP and Ethernet OAM mechanisms
CN101645810A (zh) * 2009-09-02 2010-02-10 杭州华三通信技术有限公司 Pw的检测方法和设备
CN102006227A (zh) * 2010-11-23 2011-04-06 中兴通讯股份有限公司 一种pw双归保护场景中确定转发路径的方法及装置
CN102611577A (zh) * 2012-03-02 2012-07-25 中兴通讯股份有限公司 一种基于ldp会话的pw保护方法、装置及系统
CN102857362A (zh) * 2012-04-20 2013-01-02 福建星网锐捷网络有限公司 故障处理方法、装置和系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3493489A4 *

Also Published As

Publication number Publication date
US20190207848A1 (en) 2019-07-04
EP3493489A1 (en) 2019-06-05
US10708184B2 (en) 2020-07-07
CN107846356B (zh) 2020-02-11
JP2019530341A (ja) 2019-10-17
CN107846356A (zh) 2018-03-27
JP6792701B2 (ja) 2020-11-25
EP3493489A4 (en) 2019-07-31
EP3493489B1 (en) 2023-03-29

Similar Documents

Publication Publication Date Title
WO2018050120A1 (zh) 主备伪线pw切换
US9667537B2 (en) Transport system, packet transport apparatus, and packet transport method
US9019814B1 (en) Fast failover in multi-homed ethernet virtual private networks
US9001644B2 (en) Ethernet virtual private network system for providing fast protection for access rings
US9143396B2 (en) VPLS fast rerouting method and device
US11611509B2 (en) Communication method, communications device, and communications system
EP2725743B1 (en) Methods and device for processing location information about fault point
US12034631B2 (en) Loop avoidance communications method, device, and system
WO2012028029A1 (zh) 一种切换方法及系统
WO2018121284A1 (zh) 一种处理路由的方法及网络设备
US9960993B2 (en) Packet network linear protection systems and methods in a dual home or multi-home configuration
US9497104B2 (en) Dynamic update of routing metric for use in routing return traffic in FHRP environment
US8670299B1 (en) Enhanced service status detection and fault isolation within layer two networks
US8854949B2 (en) Network relay device and network relay method
WO2017054535A1 (zh) 流量转发方法及装置
US11570073B1 (en) Service status notification
WO2015117465A1 (zh) 环形网络中fdb刷新方法、装置、节点及系统
WO2018050122A1 (zh) 防止故障处理延迟
WO2016074529A1 (zh) 一种介质访问控制转发链路切换方法及装置
WO2018006711A1 (zh) 业务处理方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17850321

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017850321

Country of ref document: EP

Effective date: 20190301

ENP Entry into the national phase

Ref document number: 2019515413

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE