CN102333011B - One way link detection method and device - Google Patents
One way link detection method and device Download PDFInfo
- Publication number
- CN102333011B CN102333011B CN201110314264.0A CN201110314264A CN102333011B CN 102333011 B CN102333011 B CN 102333011B CN 201110314264 A CN201110314264 A CN 201110314264A CN 102333011 B CN102333011 B CN 102333011B
- Authority
- CN
- China
- Prior art keywords
- interface
- udld
- message
- information
- local terminal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 55
- 230000004044 response Effects 0.000 claims abstract description 45
- 238000000034 method Methods 0.000 claims abstract description 29
- 230000005540 biological transmission Effects 0.000 claims abstract description 9
- 230000032683 aging Effects 0.000 claims description 11
- 230000002457 bidirectional effect Effects 0.000 claims description 10
- 238000004891 communication Methods 0.000 claims description 9
- 230000001360 synchronised effect Effects 0.000 claims description 7
- 238000005516 engineering process Methods 0.000 claims description 5
- 230000003287 optical effect Effects 0.000 claims description 5
- 238000004806 packaging method and process Methods 0.000 claims description 3
- 230000006870 function Effects 0.000 abstract description 26
- 230000000694 effects Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 16
- 238000012545 processing Methods 0.000 description 8
- 230000006855 networking Effects 0.000 description 7
- 238000012217 deletion Methods 0.000 description 3
- 230000037430 deletion Effects 0.000 description 3
- 238000005538 encapsulation Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- DWSYCUKCNSVBRA-UHFFFAOYSA-N 4-(5-methylsulfonyltetrazol-1-yl)phenol Chemical compound CS(=O)(=O)C1=NN=NN1C1=CC=C(C=C1)O DWSYCUKCNSVBRA-UHFFFAOYSA-N 0.000 description 1
- 101710167643 Serine/threonine protein phosphatase PstP Proteins 0.000 description 1
- OYYYPYWQLRODNN-UHFFFAOYSA-N [hydroxy(3-methylbut-3-enoxy)phosphoryl]methylphosphonic acid Chemical compound CC(=C)CCOP(O)(=O)CP(O)(O)=O OYYYPYWQLRODNN-UHFFFAOYSA-N 0.000 description 1
- RTZKZFJDLAIYFH-UHFFFAOYSA-N ether Substances CCOCC RTZKZFJDLAIYFH-UHFFFAOYSA-N 0.000 description 1
- 125000001033 ether group Chemical group 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000002431 foraging effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 239000000523 sample Substances 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Small-Scale Networks (AREA)
Abstract
The invention discloses a kind of one way link detection method and device, this method includes local terminal and detects the Wide Area Network interface of UDLD functions to end interface transmission one way link detection UDLD messages by enabling one way link;According to whether the neighbor information for the response message and/or response message that can receive UDLD messages determines the Link State of Wide Area Network interface, wherein, neighbor information includes the information of local terminal and receives the information of the opposite end of UDLD messages, pass through the present invention, solve to exist in the prior art and the technical problem of one way link detection can not be carried out on Wide Area Network interface, and then reached and can carry out one way link detection to Wide Area Network interface well, and wide area network link is demonstrated well in physical layer and the integrality of logic link layer and connective effect.
Description
Technical Field
The invention relates to the field of communication, in particular to a unidirectional link detection method and a unidirectional link detection device.
Background
A transmission technology (Packet Over SONET/SDH, abbreviated as POS) for carrying IP and other data packets Over an Optical Synchronous digital transport Network (Synchronous Optical Network/Synchronous digital hierarchy, abbreviated as SON ET/SDH) is a technology applied in metropolitan area networks and wide area networks that has the advantage of supporting Packet data, such as IP data packets. The POS interface technology can map length-variable packets directly into Synchronous Optical Network (SONET) Synchronous payload, and provides a high-speed, reliable, point-to-point data connection using SONET physical layer transport standards.
The POS interface may use PPP (Point to Point Protocol), frame relay, and HDLC Protocol at the data link layer, and IP Protocol at the network layer. The interface transfer rate may vary from device to device, for example STM-1, STM-4 and STM-16, each level being 4 times the lower level. Before configuring a link protocol, a network protocol and the like, the configuration of the physical parameters of the POS interface needs to be performed according to the configuration or application of the opposite-end device. In addition, if the interface is used as a backup interface, interface backup working parameters need to be configured; if a firewall is to be built on an interface, packet filtering rules need to be configured. The wan interface includes, in addition to the POS interface, a Frame Relay (FR), an advanced Data Link Control (HDLC), an Asynchronous Transfer Mode (ATM), and the like.
In the prior art, a unidirectional Link Detection (UDLD) protocol only specifies that a function of a UDLD is enabled on an ethernet Link of an ethernet switching device, and therefore, the prior art has a problem that unidirectional Link Detection cannot be performed on a wide area network interface.
Disclosure of Invention
The invention provides a unidirectional link detection method and a unidirectional link detection device, aiming at the technical problem that unidirectional link detection cannot be performed on a wide area network interface in the prior art, and at least solving the problem.
According to an aspect of the present invention, there is provided a unidirectional link detection method, including: the local terminal sends the UDLD message to an opposite terminal interface through a wide area network interface which enables a unidirectional link detection UDLD function; and determining the state of the wide area network interface according to whether a response message of the UDLD message and/or neighbor information of the response message can be received, wherein the neighbor information comprises the information of the local terminal and the information of the opposite terminal for receiving the UDLD message.
Preferably, the local terminal sends the UDLD packet to the opposite terminal interface through the wide area network interface which enables the UDLD function by at least one of the following ways: binding the wide area network interface with a Universal Logic Ethernet Interface (ULEI), and sending the UDLD message to an opposite terminal interface through the ULEI; or, packaging the UDLD message, and sending the UDLD message to an opposite terminal interface through the packaged message.
Preferably, sending the UDLD packet includes: and encapsulating the UDLD message into a Bridge Control Protocol (BCP) message and sending the UDLD message.
Preferably, the method further comprises the following steps: and setting a timer, and driving the local terminal to send the UDLD message within a preset time interval.
Preferably, determining the link status of the wan interface according to whether the response packet and/or the neighbor information in the response packet can be received includes: judging whether the local terminal can receive a response message of the UDLD message; acquiring the neighbor information in the response message under the condition that the response message can be received; judging whether the neighbor information comprises the information of the local terminal, and determining that the wide area network interface is unidirectional link communication under the condition that the neighbor information does not comprise the information of the local terminal; and determining that the WAN interface is bidirectional link communication under the condition that the neighbor information comprises the local terminal information.
Preferably, the method further includes updating the neighbor information stored in the local terminal according to neighbor information in the response message when the wide area network interface is determined to be bi-directional link.
Preferably, the method further comprises the following steps: and setting aging time, and deleting the neighbor information which is stored in the local terminal and is not updated after the aging time is exceeded.
Preferably, the wide area network interface is at least one of: a transmission technology interface POS interface, a frame relay interface FR interface, a high level data link control protocol interface HDLC interface and an asynchronous transmission mode interface ATM interface for bearing IP and other data packets on the optical synchronous digital transmission network.
According to another aspect of the present invention, there is provided a unidirectional link detecting apparatus, comprising: a sending module, configured to send, by a local terminal, the UDLD packet to an opposite terminal interface through a wide area network interface that enables a unidirectional link detection UDLD function; a determining module, configured to determine a link state of the wan interface according to whether a response packet of the UDLD packet and/or neighbor information of the response packet can be received, where the neighbor information includes information of the local terminal and information of the opposite terminal that receives the UDLD packet.
Preferably, the determining module comprises: the first judging module is used for judging whether the local terminal can receive the response message of the UDLD message; an obtaining module, configured to obtain the neighbor information in the response message when the response message can be received; the second judging module is used for judging whether the neighbor information comprises the information of the local terminal or not, and determining that the wide area network interface is unidirectional link communication under the condition that the neighbor information does not comprise the information of the local terminal; and determining that the WAN interface is bidirectional link communication under the condition that the neighbor information comprises the local terminal information.
According to the invention, the home terminal is adopted to send a unidirectional link detection UDLD message to the opposite terminal through a universal logic Ethernet interface ULEI bound with a wide area network interface; and determining the state of the WAN interface according to whether the response message of the UDLD message and/or the neighbor information of the response message can be received, wherein the neighbor information comprises the information of the local terminal and the information of the opposite terminal for receiving the UDLD message, so that the technical problem that unidirectional link detection cannot be performed on the WAN interface in the prior art is solved, unidirectional link detection can be performed on the WAN interface well, and the integrality and connectivity effects of the WAN link on a physical layer and a logic link layer are verified well.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of a unidirectional link detection method according to an embodiment of the present invention;
fig. 2 is a block diagram of a unidirectional link detection apparatus according to an embodiment of the present invention;
fig. 3 is a block diagram of a structure of a determination module in the unidirectional link detecting apparatus according to the embodiment of the present invention;
FIG. 4 is a schematic diagram of a network configuration of a method for detecting a one-way link of a POS interface according to the preferred embodiment of the present invention;
FIG. 5A is a networking diagram 1 of a POS interface unidirectional link detection mischain according to an embodiment of the present invention;
FIG. 5B is a networking diagram of a POS interface unidirectional link detection mischain, according to an embodiment of the invention, FIG. 2;
FIG. 5C is a networking diagram 3 of a POS interface unidirectional link detection mischain according to an embodiment of the present invention;
FIG. 5D is a networking diagram 4 of a POS interface unidirectional link detection mischain according to an embodiment of the present invention;
FIG. 6 is a block diagram of a device for detecting a one-way link to a POS interface according to an embodiment of the present invention;
FIG. 7 is a flow chart of a method for packet forwarding for a method for unidirectional link detection of a POS interface according to an embodiment of the present invention;
FIG. 8 is a flow chart of a packet reception method for detecting a unidirectional link of a POS interface according to an embodiment of the present invention;
fig. 9 is a message format diagram of a BCP packet encapsulation UDLD according to a method for detecting a unidirectional link of a POS interface in an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The UDLD protocol is a two-layer protocol operating on Logical Link Control (LLC for short), and is used to detect an ethernet Link single-pass fault, and avoid problems such as ethernet loopback and route black hole caused by the ethernet Link single-pass.
The UDLD detects whether the Ethernet interface has a single-pass problem by establishing a neighbor and detecting the two-layer logic intercommunity between the neighbor and the UDLD. The UDLD protocol operates in conjunction with a port detection protocol (e.g., auto-negotiation) operating at the physical layer to verify the integrity of an ethernet link at the physical and logical link layers. In addition, because the UDLD performs logical detection, the physical layer port detection protocol does not have some functions, and can detect some faults caused by artificial configuration and connection errors in addition to verifying physical connectivity.
UDLDs are detected based on neighbors, and first tier devices are transparent to UDLDs. The UDLD detection is first to establish a neighbor relationship with an adjacent two-tier device. When an Ethernet interface in a state UP opens a UDLD function, the interface sends a Hello message added by a neighbor to inform the neighbor related equipment. And the interface for opening the UDLD function of the adjacent related equipment receives the Hello message and returns an Echo message. After receiving the Echo message, the home terminal device establishes a neighbor relation with the opposite terminal device.
After the neighbor relation between the two parties is established, the detection of the unidirectional link is started. And opening an Ethernet interface of the UDLD to send a Hello message at regular time, and waiting for the neighbor equipment to respond to the Echo message. If a normal Echo message is received, the Ethernet link on the interface is indicated to be bidirectional clear. If the Echo message can not be received or the link is considered to be single-pass according to the received message, the UDLD can carry out different processing according to the working mode.
A Universal Logical Ethernet Interface (ULEI) is a logical Interface with ethernet properties, has the attribute of a physical ethernet Interface, and basically supports all ethernet services, including a sub-Interface, a VLAN (virtual local area network), a QINQ, an L2VPN, an L3VPN, a router, a BFD (bidirectional forwarding detection), an MSTP (multiple spanning Tree Protocol, multiple spanning Tree SDH-based multi-service transport platform), and the like, and the main purposes of implementation are as follows: (1) two and three layers of VPN bridging: namely, the two-layer VPN is terminated to the three-layer VPN on one device; (2) and the non-Ethernet interface realizes ETH (Ethernet, abbreviated as Ethernet) service: the universal logic Ethernet interface designed for supporting bridging ETH services such as FR, ATM and the like is expanded to shield the difference of various interfaces, so that the physical interface can not be sensed when the services are developed. In addition, the bridging ULEI interface is configured on an ETH interface board; the heterogeneous ULEI interface is configured on a POS interface board; the ULEI interface with the binding bridge relation must be configured on the same line card.
In this embodiment, the UDLD extension is applied to a non-ethernet link interface such as a wide area network POS interface of a router, so as to solve the problem that unidirectional link detection cannot be performed on a wide area network in the prior art. In this embodiment, a unidirectional link detection method is provided, and fig. 1 is a flowchart of a unidirectional link detection method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, the local terminal sends a unidirectional link detection UDLD message to the opposite terminal interface through a wide area network interface which enables the unidirectional link detection UDLD function, for example, the wide area network interface can be at least one of a POS interface, an FR interface, an HDLC interface and an ATM interface;
step S104, determining a link state of the wan interface according to whether the response packet of the UDLD packet and/or neighbor information of the response packet can be received, where the neighbor information includes information of the local terminal and information of the opposite terminal receiving the UDLD packet, for example, the local terminal information may be a device and a port number of the local terminal itself, and the opposite terminal information may also be a device and a port number of the opposite terminal.
Through the steps, the wide area network interface with the function of detecting the UDLD through the unidirectional link is enabled, so that the wide area network interface has the capability of detecting the unidirectional link as same as the Ethernet link, the UDLD message can be smoothly sent and received, the problem that the UDLD protocol only specifies the function of detecting the unidirectional link on the Ethernet link of the Ethernet switching equipment and is not fused with the wide area network interface is solved, the unidirectional link can be detected on the wide area network interface, and the integrity and the connectivity of the wide area network link on a physical layer and a logic link layer are well verified.
When the local terminal sends the UDLD message to the opposite terminal interface through the wan interface enabling the UDLD function, many implementation manners may be used, for example, the wan interface may be bound to the ULEI, and then the ULEI bound to the wan interface sends the UDLD message to the opposite terminal interface, and a virtual wan interface incapable of performing unidirectional link detection is used as the ethernet interface capable of performing UDLD. For example, the UDLD packet may also be encapsulated, the encapsulated packet may satisfy the condition for detecting the unidirectional link in the ethernet link, and then the encapsulated packet is used to send the UDLD packet to the opposite-end interface.
The UDLD message may be selectively encapsulated into different message forms when being sent, for example, the UDLD message may be encapsulated into a PPP Bridging Control Protocol (BCP) message to send the UDLD message, and the encapsulated BCP message is sent to the opposite-end interface through a Microcode, where the Microcode is an instruction sequence of a section of program, and the Microcode is also called a microprogram, which is a sequence of Microcode instructions (microinstructions) that is an instruction set of a CPU, and each of the Microcode instructions typically includes many bit fields and an address for executing a next microinstruction. Microcode is the translation layer between machine instructions and the elementary transformations of a computer.
Preferably, a timer may be further set, the local terminal is driven to send the UDLD packet within a predetermined time interval, the set predetermined time may be determined according to specific situations, or the UDLD packet may be sent within the time period according to a specific time at which a detection result needs to be obtained, and the detection of the unidirectional link of the wan interface is triggered by sending the packet.
Preferably, determining the link status of the wan interface according to whether the response packet and/or the neighbor information in the response packet can be received includes: and judging whether the local terminal can receive the response message of the UDLD message, wherein the local terminal is processed by a state machine with six states of each port during actual processing, and the state machine runs on the port and drives state transition by a timer and the message. The method comprises the steps that a timer is used for timing, a message triggering mode is used for working, if a response message of the UDLD message cannot be received, namely whether the link of a wide area network interface is single-pass or not cannot be determined, the wide area network interface is not operated at all, an alarm needs to be printed, and the neighbor information in the response message is obtained under the condition that the response message can be received; when receiving the response message, the encapsulated Ethernet message is stripped by microcode, then the neighbor information in the Ethernet message is obtained by the UDLD Ethernet message sent by the microcode, whether the neighbor information comprises the information of the local terminal is judged, and under the condition that the neighbor information does not comprise the information of the local terminal, the WAN interface needs to be marked as single-pass, and the WAN interface is determined to be one-way link; and under the condition that the neighbor information comprises the information of the local terminal, determining that the wide area network interface is in bidirectional link, and updating the neighbor information stored in the local terminal according to the neighbor information in the response message, namely adding, modifying and deleting the neighbor information in the stored UDLD neighbor entry.
It should be noted that the set timer may also be used to set an aging time for deleting the neighbor information that is stored in the local end and is not updated after the aging time is exceeded.
In this embodiment, a unidirectional link detection apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated. Fig. 2 is a block diagram of a unidirectional link detection apparatus according to an embodiment of the present invention, and as shown in fig. 2, the apparatus includes a transmission module 22 and a determination module 24. The apparatus will be explained below.
A sending module 22, configured to send, by the local terminal, the UDLD packet to the opposite terminal through the wan interface that enables the unidirectional link detection UDLD function;
a determining module 24, configured to determine a link state of the wan interface according to whether a response packet of the UDLD packet and/or neighbor information of the response packet can be received, where the neighbor information includes information of the local terminal and information of the opposite terminal that receives the UDLD packet.
Fig. 3 is a block diagram of a determining module in the unidirectional link detecting apparatus according to an embodiment of the present invention, and as shown in fig. 3, the determining module includes a first determining module 32, an obtaining module 34, and a second determining module 36.
A first determining module 32, configured to determine whether the local end can receive a response packet of the UDLD packet; an obtaining module 34, configured to obtain the neighbor information in the response message when the response message can be received; a second determining module 36, configured to determine whether the neighbor information includes the information of the local terminal, and determine that the wan interface is unidirectional link when the neighbor information does not include the information of the local terminal; and under the condition that the neighbor information comprises the information of the local terminal, determining that the wide area network interface is bidirectional link.
In view of the problem that unidirectional link detection cannot be performed on a wide area network in the prior art, in this embodiment, a method for performing unidirectional link detection on a wide area network interface is provided to verify integrity and connectivity of a wide area network link in a physical layer and a logical link layer, which is described in this embodiment by taking a POS interface as an example.
In this embodiment, the UDLD extension is applied to a non-ethernet link interface such as a wide area network POS interface of a router, which solves the problem that the wide area network in the prior art cannot perform the function of detecting the UDLD unidirectional link to the wide area network interface. Not only is the physical connectivity of the wide area network verified, but also the logical connectivity of the wide area network links is improved.
The method for detecting the one-way link of the POS interface comprises the following steps:
s1, connecting the POS interface of the local terminal network device and the POS interface of the opposite terminal network device physically through optical fiber;
s2, configuring the POS interface of the local terminal network device and the POS interface of the opposite terminal network device;
s3, after negotiation is successful, making POS interface protocol up;
s4, binding a ULEI interface for each of the POS interface of the local terminal network device and the POS interface of the opposite terminal network device;
s5, respectively starting UDLD function enable on the local terminal network device and the opposite terminal network device; specifically, the function enabling of the UDLD interface is respectively opened on the POS interface of the home terminal network device and on the POS interface of the opposite terminal network device.
S6, assembling a UDLD Probe message at each POS port of the local terminal and the opposite terminal when the POS interfaces of the network equipment reach the MessageInterval set by each timer;
s7, the message is sent to the opposite terminal device through the receiving and sending packet, the driver and the microcode;
s8, the opposite terminal equipment receives the message and sends the message to the UDLD module for processing through the microcode receiving and sending packet;
s9, the UDLD module analyzes and processes the received message;
s10, if the POS port receives the normal Echo message and the analyzed information is correct, it indicates that the link on the POS port is bidirectional smooth, and generates or updates the corresponding neighbor information;
s11, if the link is single-pass after the Echo message received by the POS port is analyzed, the POS port Down is dropped;
s12, in the normal mode, if the POS port can not receive Echo message, it will not operate the POS port, but will print alarm; in the aggressive mode, if the POS port cannot receive the Echo message, the POS port is dropped after 7 seconds, and an alarm is printed.
S13, when the POS interface Down of the local device or other conditions cause the POS interface to be unusable occur, the local device needs to send a flush message to notify the adjacent two-layer device to delete the information of the device.
In order to make the objects, technical solutions and advantages of the present invention more apparent, preferred embodiments of the present invention are described in further detail below with reference to the accompanying drawings. It should be noted that, in the following preferred embodiment, the POS interface is taken as an example for description, but other interfaces of the wan interface may be processed by the following embodiments and preferred embodiments, and features in the embodiments and preferred embodiments in the present application may be combined with each other without conflict.
Fig. 4 is a schematic networking diagram of a method for detecting a unidirectional link of a POS interface according to a preferred embodiment of the present invention, as shown in fig. 4: pos192-0/1/0/1 on device A is connected to pos192-0/2/0/1 on device B. For convenience of description, the device a is taken as a router 1 and the device B is taken as a router 2, for example, messages are received and sent between the router 1 and the router 2 through optical fibers, and the router 1 and the router 2 respectively generate their own neighbor table entries.
Fig. 5A, 5B, 5C, and 5D are schematic diagrams illustrating a networking of several error chains for POS interface unidirectional link detection according to an embodiment of the present invention, and as shown in fig. 5A, 5B, 5C, and 5D, a POS interface unidirectional link detection method according to an embodiment and a preferred embodiment of the present invention may detect an error chain in fig. 5A, 5B, 5C, and 5D, and may perform corresponding one-pass processing according to the detected error chain.
Fig. 6 is a block diagram of a device for detecting a unidirectional link of a POS interface according to an embodiment of the present invention, as shown in fig. 6, the device includes:
the configuration module 61 is configured to configure necessary configuration parameters according to a networking Operation, Administration and maintenance (OAM), Simple Network Management Protocol (SNMP), Management Information Base (MIB), or DataBase (DB), and can display the configuration parameters, for example, the configuration completed by the configuration module includes: starting a function configuration module CML mode of the UDLD on the POS port; starting a function configuration module SNMP mode of the UDLD on the POS port; configuring an enable (enable) or a disable (disable) function of the POS port; configuring a UDLD packet sending interval of a POS port; the above commands are consistent with the format of the Ethernet physical real interface function and can be multiplexed, so that any command and parameter configuration is not required to be added for the function;
the timer module 62 is configured to drive a port to send a state machine to assemble a UDLD packet according to a set Message Interval time, and is further configured to be responsible for notifying the aging module at regular time;
a sending and receiving processing module 63, configured to encapsulate and analyze a data portion of the UDLD Packet protocol, and interact with a Local Packet Processing (LPP) module of a Packet receiving and sending module;
and the aging module 64 is used for aging the non-updated UDLD neighbor entries at the timed overtime according to the set timer time, and performing traversal scanning on the UDLD neighbor entries in a polling mode after the aging time timer is overtime.
And deleting the overtime UDLD neighbor entry after the aging time of the UDLD neighbor entry is overtime. And after the new update message of the UDLD is not received, the UDLD can perform corresponding processing according to different working modes. (ii) a
And the interface management module 65 is used for notifying the UDLD interface addition/deletion/up/down events, processing the received interface events by the UDLD module, and realizing the interaction between the interface management module, the UDLD module and other modules, wherein the interface management module notifies the registered UDLD service module by using a callback function mechanism with good function expansibility and immediacy. The UDLD module is used for notifying the UDLD interface addition/deletion/up/down events, and the UDLD module processes and receives the interface events;
and a neighbor entry management module 66, configured to provide management of UDLD neighbor entry generation, update, deletion, query, migration, and the like.
Fig. 7 is a packet sending flow chart of a method for detecting a unidirectional link of a POS interface according to an embodiment of the present invention, where the flow includes the following steps:
step S702, the timer reaches the set Message Interval time;
step S704, driving a POS interface TX state machine which enables the UDLD function to assemble a UDLD message and send the message;
step S706, the UDLD message is assembled, and because the port needs to be appointed for sending, before sending, whether the type of the port is an Ethernet physical real interface or a non-Ethernet interface such as a wide area network POS interface needs to be judged;
step 708, if the POS interface is the ULEI interface bound with the POS interface, inquiring the ULEI interface bound with the POS interface;
step S710, if the ULEI interface bound with the POS interface is found, replacing the POS interface with the ULEI interface;
step S712, sending the packet through the interface of the packet sending module;
step S714, if the ULEI interface bound with the POS interface is not found, discarding the release message;
step S716, end;
step S718, the packet receiving and transmitting module receives the Ethernet message of the UDLD, if the Ethernet message needs to be encapsulated into a BCP message of IEEE 802.3/Ethernet (the encapsulation mode is shown in FIG. 9) by a wide area network interface such as a POS interface and the like;
step S720, the packet receiving and transmitting module sends the encapsulated message to the microcode to be sent to the opposite terminal rack.
Fig. 8 is a packet receiving flow chart of a method for detecting a unidirectional link of a POS interface according to an embodiment of the present invention, where the flow includes the following steps:
step S802, the microcode of the local rack receives the UDLD message of the opposite rack, judges if the message is BCP message of IEEE 802.3/Ethernet, and judges if the message is UDLD message according to the destination MAC in the message, the microcode directly peels off the BCP package, and sends and receives packet LPP module on ULEI port, the message format is Ether. For the original heterogeneous process, if the interface BCP negotiation state is concerned, special skipping is needed, the UDLD report does not concern the BCP state when being uploaded, the report is uploaded as long as the interface protocol UP is UP, the protocol UP is possible to be IPCP negotiation success, not necessarily BCP negotiation success, any negotiation success can be achieved, and switching is not needed;
step S804, after receiving the UDLD Ethernet message sent by the microcode, the LPP with the ULEI port distributes the message to the platform UDLD module;
step S806, judging whether the type of the physical real interface of the received message is a physical real interface, or an ULEI interface;
step S808, if the interface is an ULEI interface, the ULEI interface bound with the POS interface needs to be inquired;
step S810, if finding the ULEI interface bound with the POS interface, replacing the ULEI interface with the POS interface;
step S812, the UDLD module analyzes the received UDLD message and judges whether the message is correct;
step S814, if the POS interface bound with the ULEI interface is not found, or the received message is analyzed to have errors, discarding the release message;
step S816, judge the neighbour' S information in UDLD Echo message that POS interface receives;
step S818, if the neighbor information in the UDLD Echo message is incorrect, the UDLD needs to set a POS interface one-way mark;
step S820, issuing the POS interface single-pass mark of the UDLD to the project driver through the MUX, and setting the POS interface down;
step S822, if the neighbor information in the UDLD Echo message is correct, adding, updating or deleting the UDLD neighbor;
step S824, driving neighbor aging scanning of the UDLD by a timer;
step S826, deleting updated neighbor entries which exceed the Holdtime but are not obtained in the UDLD neighbors;
step S828, in a normal mode, the interface Down is only dropped when the Echo message is received to confirm the link single pass, and the interface is not operated when the Echo message is not received or the link single pass cannot be confirmed; in aggressive mode, the interface Down is dropped as long as it cannot be confirmed that the link is bidirectional clear. The common point of the two modes is that under any condition, as long as the normal work of the link cannot be confirmed, an alarm needs to be printed;
and step S830, ending.
Fig. 9 is a message format diagram of a BCP packet encapsulation UDLD according to a method for detecting a POS interface unidirectional link according to an embodiment of the present invention, which multiplexes 802.3Frame format in RFC 2878, and a middle ramp portion is a UDLD protocol message, where the options that need to be specially specified are as follows:
address and Control, which field is filled with 0XFF 03; PPP Protocol, this field is padded with 0x 0031; if the local area network segment is not configured, filling 0 in the field of the F bit in the Flags; z bit in Flags, this field is filled with 0; pads, this field is filled with 0; MAC Type, which should be IEEE 802.3/Ethernet, this field is filled with 1; optional Data Link LayerPadding, which is omitted from the field message.
In summary, on the basis of the draft of the UDLD protocol, a method for performing unidirectional link detection on a wan POS interface is proposed, which expands and improves the physical real interface range supported by the UDLD, and solves the problem of performing unidirectional link detection on the wan interface by supporting the UDLD protocol on interfaces such as the POS. The purpose of using the function of UDLD unidirectional link detection on non-Ethernet links is achieved. The method can also enable other Ethernet protocol extensions to be applied to the non-Ethernet fields such as wide area networks.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or they may be separately fabricated into various integrated circuit modules, or multiple modules or steps thereof may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (9)
1. A method for unidirectional link detection, comprising:
the local terminal sends the UDLD message to an opposite terminal interface through a wide area network interface which enables a unidirectional link detection UDLD function;
determining a link state of the WAN interface according to whether a response message of the UDLD message and/or neighbor information of the response message can be received, wherein the neighbor information comprises information of the local terminal and information of the opposite terminal receiving the UDLD message;
wherein, the local terminal sends the UDLD message to the opposite terminal interface through the wide area network interface which enables the UDLD function by at least one of the following modes:
binding the wide area network interface with a Universal Logic Ethernet Interface (ULEI), and sending the UDLD message to an opposite terminal interface through the ULEI; or,
and packaging the UDLD message, and sending the UDLD message to an opposite terminal interface through the packaged message.
2. The method of claim 1, wherein sending the UDLD message comprises: and encapsulating the UDLD message into a Bridge Control Protocol (BCP) message and sending the UDLD message.
3. The method of claim 1, further comprising: and setting a timer, and driving the local terminal to send the UDLD message within a preset time interval.
4. The method of claim 1, wherein determining the link status of the wan interface according to whether the response packet and/or the neighbor information in the response packet can be received comprises:
judging whether the local terminal can receive a response message of the UDLD message;
acquiring the neighbor information in the response message under the condition that the response message can be received;
judging whether the neighbor information comprises the information of the local terminal, and determining that the wide area network interface is unidirectional link communication under the condition that the neighbor information does not comprise the information of the local terminal; and determining that the WAN interface is bidirectional link communication under the condition that the neighbor information comprises the local terminal information.
5. The method of claim 4, further comprising updating the neighbor information stored in the local terminal according to neighbor information in the response message if the WAN interface is determined to be bi-directional link.
6. The method of claim 5, further comprising: and setting aging time, and deleting the neighbor information which is stored in the local terminal and is not updated after the aging time is exceeded.
7. The method of any of claims 1-6, wherein the wide area network interface is at least one of:
a transmission technology interface POS interface, a frame relay interface FR interface, a high level data link control protocol interface HDLC interface and an asynchronous transmission mode interface ATM interface for bearing IP and other data packets on the optical synchronous digital transmission network.
8. A unidirectional link detection apparatus, comprising:
a sending module, configured to send, by a local terminal, the UDLD packet to an opposite terminal interface through a wide area network interface that enables a unidirectional link detection UDLD function;
a determining module, configured to determine a link state of the wan interface according to whether a response packet of the UDLD packet and/or neighbor information of the response packet can be received, where the neighbor information includes information of the local terminal and information of the opposite terminal that receives the UDLD packet;
wherein, the unidirectional link detection device realizes that the local terminal sends the UDLD packet to the opposite terminal interface through the wide area network interface which enables the UDLD function by at least one of the following ways:
binding the wide area network interface with a Universal Logic Ethernet Interface (ULEI), and sending the UDLD message to an opposite terminal interface through the ULEI; or, packaging the UDLD message, and sending the UDLD message to an opposite terminal interface through the packaged message.
9. The apparatus of claim 8, wherein the determining module comprises:
the first judging module is used for judging whether the local terminal can receive the response message of the UDLD message;
an obtaining module, configured to obtain the neighbor information in the response message when the response message can be received;
the second judging module is used for judging whether the neighbor information comprises the information of the local terminal or not, and determining that the wide area network interface is unidirectional link communication under the condition that the neighbor information does not comprise the information of the local terminal; and determining that the WAN interface is bidirectional link communication under the condition that the neighbor information comprises the local terminal information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110314264.0A CN102333011B (en) | 2011-10-17 | 2011-10-17 | One way link detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110314264.0A CN102333011B (en) | 2011-10-17 | 2011-10-17 | One way link detection method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102333011A CN102333011A (en) | 2012-01-25 |
CN102333011B true CN102333011B (en) | 2017-11-03 |
Family
ID=45484621
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110314264.0A Active CN102333011B (en) | 2011-10-17 | 2011-10-17 | One way link detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102333011B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102694697A (en) * | 2012-05-28 | 2012-09-26 | 合肥华云通信技术有限公司 | Method for quickly detecting one-way link |
CN103701703B (en) * | 2013-12-31 | 2017-05-10 | 新华三技术有限公司 | Neighbourhood management method and device |
CN105553854B (en) * | 2015-12-21 | 2019-04-30 | 华南师范大学 | A kind of system and its multicast route method based on mobile ad-hoc network |
CN105939209B (en) * | 2015-12-30 | 2019-08-06 | 杭州迪普科技股份有限公司 | Handle the method and device of neighbor entry |
CN107356284A (en) * | 2016-05-10 | 2017-11-17 | 中兴通讯股份有限公司 | A kind of detection method, apparatus and system |
CN106330606B (en) * | 2016-08-23 | 2019-09-06 | 杭州迪普科技股份有限公司 | A kind of method and apparatus detecting link single-pass |
CN107846299B (en) * | 2016-09-21 | 2022-04-12 | 中兴通讯股份有限公司 | Method and device for realizing two-layer and three-layer service bridging and PTN (packet transport network) equipment |
CN108881328B (en) * | 2018-09-29 | 2021-02-23 | 北京东土军悦科技有限公司 | Data packet filtering method and device, gateway equipment and storage medium |
CN109561012B (en) * | 2018-12-21 | 2021-05-28 | 安徽皖兴通信息技术有限公司 | Communication method for SDH network and packet network |
US11616694B2 (en) * | 2020-04-23 | 2023-03-28 | Hewlett Packard Enterprise Development Lp | Unidirectional link detection misconfiguration auto-detection |
CN112532526B (en) * | 2020-11-30 | 2022-05-17 | 迈普通信技术股份有限公司 | Data forwarding method and device and network equipment |
CN115865742A (en) * | 2022-11-16 | 2023-03-28 | 天翼云科技有限公司 | Method and system for detecting unidirectional link fault of white box switch |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1859104A (en) * | 2005-09-28 | 2006-11-08 | 华为技术有限公司 | Service isolation transfer method |
CN101534327A (en) * | 2009-04-17 | 2009-09-16 | 华为技术有限公司 | Method for realizing logic Internet Protocol address and device and communication system thereof |
CN201398200Y (en) * | 2009-04-30 | 2010-02-03 | 成都美年科威信息技术有限公司 | Distributed one-way transmission system for network information security |
CN101908986A (en) * | 2010-08-12 | 2010-12-08 | 杭州华三通信技术有限公司 | Method and equipment for detecting link fault |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7983173B2 (en) * | 2004-05-10 | 2011-07-19 | Cisco Technology, Inc. | System and method for detecting link failures |
US8961683B2 (en) * | 2008-03-07 | 2015-02-24 | Toda Kogyo Corporation | Infrared reflecting blue pigment, infrared reflecting green pigment, paint and resin composition using the infrared reflecting blue pigment, and paint and resin composition using the infrared reflecting green pigment |
-
2011
- 2011-10-17 CN CN201110314264.0A patent/CN102333011B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1859104A (en) * | 2005-09-28 | 2006-11-08 | 华为技术有限公司 | Service isolation transfer method |
CN101534327A (en) * | 2009-04-17 | 2009-09-16 | 华为技术有限公司 | Method for realizing logic Internet Protocol address and device and communication system thereof |
CN201398200Y (en) * | 2009-04-30 | 2010-02-03 | 成都美年科威信息技术有限公司 | Distributed one-way transmission system for network information security |
CN101908986A (en) * | 2010-08-12 | 2010-12-08 | 杭州华三通信技术有限公司 | Method and equipment for detecting link fault |
Also Published As
Publication number | Publication date |
---|---|
CN102333011A (en) | 2012-01-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102333011B (en) | One way link detection method and device | |
EP2704371B1 (en) | A realization method and system of enabling lldp function on non-ethernet link | |
JP6388675B2 (en) | Method and system for synchronization with neighbors in a distributed resilient network interconnection (DRNI) link aggregation group | |
US8140654B2 (en) | Verifying management virtual local area network identifier provisioning consistency | |
KR102342286B1 (en) | DCN message processing method, network device, and network system | |
CN1625176B (en) | Realization method of edge to edge pseudo-line simulation protocol | |
US20080259786A1 (en) | System and method for supporting sdh/sonet aps on ethernet | |
Ryoo et al. | Ethernet ring protection for carrier ethernet networks | |
CN105790988B (en) | Method and device for realizing operation maintenance management function | |
WO2010007603A2 (en) | Establishing pseudowires in packet switching networks | |
WO2015184740A1 (en) | Method and device for processing detection hierarchy information | |
EP4293982A1 (en) | Packet processing method, network device, and controller | |
CN105634935A (en) | Device and method for detecting service layer signal failure | |
CN101043433B (en) | Method for aging MAC address learning list of bridge mode resilient packet ring | |
CN106161065B (en) | Path protection switching processing method, device and system and forwarding equipment | |
CN110224916B (en) | Message processing method and device and message packaging method, device and system | |
CN105790984B (en) | Configuration and implementation method of operation maintenance management function and forwarding equipment | |
WO2008131680A1 (en) | Verifying management virtual local area network identifier provisioning consistency | |
US20090180389A1 (en) | Value-Adoption and Value-Translation for Automatic Provisioning of Port Parameters | |
CN113660104A (en) | Communication method, UP device and CP device | |
CN105721269A (en) | Protection method and device for Ethernet ring network | |
CN102624629B (en) | A kind of wide area network message transmitting method and device | |
CN101176280A (en) | Automatic discovering method for automatic exchange optical network controlling entity topological | |
US20060146810A1 (en) | Multiple subscriber port architecture and methods of operation | |
CN117061052A (en) | Service path control method and device, storage medium and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |