PTN switch in-band management method and device, electronic equipment and storage medium
By filtering and labeling management messages in PTN switches and transmitting them using existing service links, the problems of high cost and low resource utilization in PTN switch management methods are solved, and efficient isolation transmission of management messages and service messages is achieved.
Patent Information
- Application Number
- CN202511183394.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-11-07
AI Technical Summary
Existing PTN switch management methods suffer from high out-of-band management costs and low in-band management resource utilization, and also have poor adaptability.
By filtering and labeling management messages at the source edge router, and using existing service transmission links for management message transmission, the core device can flexibly forward management messages based on labels and IP addresses, thus achieving logical separation between management messages and service messages.
It reduces additional dedicated network costs, achieves isolated transmission of management and service messages, is suitable for various network environments, and optimizes the in-band management method of PTN switches.
Smart Images

Figure CN120915749A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of switch technology, and in particular to a PTN switch in-band management method, apparatus, electronic device and storage medium. Background Technology
[0002] As communication networks evolve towards packetization and intelligence, PTN (Packet Transport Network) switches, as core devices carrying IP-based services, require flexible management and configuration, along with cost control, as key considerations for network deployment. Currently, PTN switch management is mainly divided into out-of-band and in-band management, but both have significant limitations in practical applications.
[0003] In out-of-band management, the terminal where the network management controller is located is connected to the switch via a physical connection to a dedicated switching network, forming a management channel independent of the service link. This requires additional deployment of dedicated switching network equipment (such as management switches and routers) and physical lines, resulting in high network connection costs and complexity.
[0004] In in-band management, a Virtual Local Area Network (VLAN) needs to be established between the network management controller and the switch for in-band communication configuration. The management VLAN is only used to carry network management traffic. Terminal devices connected to this VLAN (such as the network management controller) cannot handle other services at the same time, resulting in limited network resource utilization. In addition, when the managed objects or service requirements change, the VLAN parameters need to be reconfigured, resulting in poor adaptability.
[0005] Therefore, the current switch management methods have certain shortcomings. Summary of the Invention
[0006] This application provides a PTN switch in-band management method, apparatus, electronic device, and storage medium to address the shortcomings of existing switch management methods.
[0007] In a first aspect, this application provides an in-band management method for a PTN switch, the method comprising:
[0008] When the source edge router receives the original message sent by the user edge device, it filters out the management message by matching the message type. The management message and the service message in the original message are isolated from each other and share the service transmission link of the packet transport network.
[0009] If the source edge router determines that the target IP address of the management packet is not the self-device IP, the source edge router encapsulates a label for the management packet and sends the labeled management packet to a core device, wherein the label is used to indicate the transmission path and the virtual link of the management packet.
[0010] Based on the label and the target IP of the labeled management packet, the core device forwards the labeled management packet to a next-hop device or feeds a first reply packet generated by the core device back to the source edge router.
[0011] Optionally, encapsulating the label for the management packet comprises:
[0012] The source edge router determines the configuration information of a Layer 2 virtual private network in the self-device;
[0013] According to the configuration information, the source edge router acquires a forward transmission path label and a backhaul pseudo-wire label, wherein the forward transmission path label is used to indicate the transmission path from the source edge router to a next-hop device, and the backhaul pseudo-wire label is used to indicate the virtual link of the backhaul and the user edge device corresponding to the opposite edge router;
[0014] The source edge router encapsulates the management packet according to the forward transmission path label and the backhaul pseudo-wire label.
[0015] Optionally, based on the label and the target IP of the labeled management packet, the core device forwards the labeled management packet to a next-hop device or feeds a first reply packet generated by the core device back to the source edge router.
[0016] The core device receives an intermediate packet sent by a previous-hop device, wherein the intermediate packet is a packet exchanged between the core device and the edge router, and the intermediate packet includes the labeled management packet and the service packet;
[0017] The core device matches the labeled management packet with a protocol type of a management class in the intermediate packet through an access control list;
[0018] If the target IP address of the labeled management packet is the self-device IP of the core device or the destination media access control address is the media access control address of the self-device, the core device processes the labeled management packet and feeds a first reply packet generated by the core device back to the source edge router;
[0019] If the target IP address of the labeled management packet is not the self-device IP or the destination media access control address is not the media access control address of the self-device, the core device forwards the labeled management packet to the next-hop device.
[0020] Optionally, feeding back the generated first reply packet to the source edge router comprises:
[0021] extracting a forward transmission path label and a backhaul pseudo-wire label in the labeled management packet;
[0022] extracting a reverse transmission path label corresponding to the forward transmission path label based on a preset bidirectional label mapping relationship, wherein the reverse transmission path label is used to indicate a transmission path from the core device to a previous hop device;
[0023] encapsulating the first reply packet by using the reverse transmission path label and the backhaul pseudo-wire label;
[0024] sending the encapsulated first reply packet to the source edge router based on the reverse transmission path label.
[0025] Optionally, forwarding the labeled management packet to the next hop device comprises:
[0026] extracting a forward transmission path label in the labeled management packet by the core device;
[0027] replacing the forward transmission path label with a forward transmission path label of the next hop device;
[0028] forwarding the labeled management packet to the next hop device according to the forward transmission path label of the next hop device.
[0029] Optionally, after the management packet is screened out by matching the packet type, the method further comprises:
[0030] if the source edge router determines that a target IP address of the management packet is the device IP itself, analyzing the management packet to generate a second reply packet;
[0031] determining a media access control address of the user edge device by querying an address mapping table, wherein the address mapping table records a mapping relationship between each user edge device IP and media access control address;
[0032] feeding back the second reply packet to the user edge device based on the media access control address.
[0033] Optionally, after the labeled management packet is forwarded to the next hop device by the core device, the method further comprises:
[0034] in a case where a peer edge router receives a labeled management packet, determining a pseudo-wire label in the labeled management packet;
[0035] determine an interface of a target user edge device corresponding to the pseudo-wire label based on a preset pseudo-wire configuration table;
[0036] forward the labeled management packet to the target user edge device according to the interface.
[0037] In a second aspect, the present application provides a PTN switch in-band management device, the device comprising:
[0038] a screening module, configured to screen a management packet by matching a packet type in a case that a source edge router receives an original packet sent by a user edge device, wherein the management packet and a service packet in the original packet are isolated from each other and share a service transmission link of a packet transport network;
[0039] an encapsulating module, configured to encapsulate a label for the management packet and send a labeled management packet to a core device if the source edge router determines that a target IP address of the management packet is not an IP of the device itself, wherein the label is used to indicate a transmission path and a virtual link of the management packet;
[0040] a sending module, configured to forward the labeled management packet to a next-hop device through the core device or feed back a generated first reply packet to the source edge router based on the label and a target IP of the labeled management packet.
[0041] In a third aspect, the present application provides an electronic device, comprising: at least one communication interface; at least one bus connected with the at least one communication interface; at least one processor connected with the at least one bus; and at least one memory connected with the at least one bus.
[0042] In a fourth aspect, the present application further provides a computer storage medium, storing computer executable instructions, wherein the computer executable instructions are used to execute the PTN switch in-band management method of any one of the above aspects.
[0043] Compared with the prior art, the above technical solution provided by the embodiments of the present application has the following advantages: the source edge router first filters the management message, and since the service message and the management message multiplex the existing service link, the cost of building a dedicated network for out-of-band management is reduced. Then, the management message to be transmitted across devices is encapsulated with a label, and the label can accurately indicate the transmission path and the virtual link, so that the management message is independent of the service forwarding, and the logical separation of the management message and the service message is realized; the core device flexibly forwards the management message or the feedback reply message based on the label and the destination IP. In the whole data flow conversion process, the path is guided by the label, and the management message does not change with the change of the service configuration, and is suitable for various network environments. The present application saves the cost and realizes the isolated transmission of the service message and the management message, and optimizes the in-band management mode of the PTN switch. BRIEF DESCRIPTION OF DRAWINGS
[0044] The drawings incorporated into the specification and forming a part thereof illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced as follows. Obviously, those skilled in the art can obtain other drawings from these drawings without any creative effort.
[0046] One or more embodiments are exemplarily illustrated by the pictures in the drawings corresponding thereto, and these exemplary illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, unless otherwise specified. The drawings in the drawings do not constitute a proportional limitation.
[0047] Figure 1 The network management architecture schematic diagram provided for the embodiments of the present application;
[0048] Figure 2 The PTN switch in-band management method flowchart provided for the embodiments of the present application;
[0049] Figure 3 The transmission link architecture schematic diagram provided for the embodiments of the present application;
[0050] Figure 4 The working flowchart of the PE device provided for the embodiments of the present application;
[0051] Figure 5 The working flowchart of the P device provided for the embodiments of the present application;
[0052] Figure 6 The signaling diagram of the PTN switch in-band management provided for the embodiments of the present application;
[0053] Figure 7 A structural schematic diagram of a PTN switch in-band management device provided by an embodiment of the present application is shown in the figure.
[0054] Figure 8 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0055] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0056] The following disclosure provides many different embodiments, or examples, for implementing different structures of the present application. For the purpose of simplicity, the components and arrangements of the various examples are shown in the following description. These are, of course, merely examples and are not intended to limit the application. Moreover, the application can be practiced with different and even different independent examples not necessarily mentioned below. The repeated use of reference characters in the description and figures is intended to represent the same or similar elements or features.
[0057] First, some terms mentioned in the embodiments of the present application are explained, including the following contents.
[0058] PTN: Next Generation Transport Network based on packet switching technology, supporting multi-service bearing, with high reliability, QoS guarantee and statistical multiplexing characteristics, widely used in mobile communication backhaul network.
[0059] Edge Router (PE, Provider Edge): operator network edge device, connecting user side CE device and core network P device, responsible for user traffic access, label encapsulation, decapsulation and cross-domain forwarding.
[0060] Customer Edge (CE): user side network edge device (such as enterprise router, base station), directly connected to the operator PE device, which is the entry point of user traffic into the operator network.
[0061] Core device (P, Provider): backbone router in the operator core network, not directly connected to the user, only responsible for label-based forwarding traffic, not parsing IP address, realizing high-speed packet switching.
[0062] Management message: message used for network management and control, containing information required for configuring, monitoring, troubleshooting, etc. network devices.
[0063] Service message: user's productive traffic such as HTTP, VoIP, video streaming, etc., usually with the characteristics of large traffic and strong burstiness.
[0064] Figure 1 For the network management architecture of the embodiments of the present application, it can be seen that Figure 1 The double-plane network architecture is presented, with the service network and the management network working in cooperation. The service network manages user data transmission, and the management network manages device operation and control. The CE and PE are shared forwarding nodes of the two types of networks, and the terminal is both a service user and a management entry.
[0065] Service network: access terminals and servers through CEs (user edge devices), converge service traffic to PEs (edge routers), and then forward through the service cloud to realize terminal access to servers and other service interactions.
[0066] Management network: connect PEs and CEs through the management cloud by means of out-of-band or in-band management terminals. The out-of-band goes through independent links (service interruption can also be operated and maintained), and the in-band shares the service network link (logically isolated) for remote configuration and monitoring of devices.
[0067] Next, a PTN switch in-band management method provided by the embodiments of the present application will be described in detail in combination with specific embodiments, as shown in Figure 2 The specific steps are as follows:
[0068] Step 201: In the case that the source edge router receives the original message sent by the user edge device, the management message is filtered out by matching the message type, wherein the management message and the service message in the original message are isolated from each other and share the service transmission link of the packet transport network.
[0069] Step 202: If the source edge router determines that the target IP address of the management message is not the IP of the device itself, the management message is encapsulated with a label, and the labeled management message is sent to the core device, wherein the label is used to indicate the transmission path and the virtual link of the management message.
[0070] Step 203: Based on the label and the target IP of the labeled management message, the labeled management message is forwarded to the next hop device through the core device or the first reply message is generated and fed back to the source edge router.
[0071] In step 201, in an actual packet transmission network, a user edge device (such as a router of an enterprise branch) sends various messages to an edge router through an access link, and the messages include not only service data such as video and file transmission of an employee office, but also management instructions such as device state query and configuration update. After receiving the mixed original messages, the source edge router needs to match the management messages with an Ethernet message protocol type as a management type by using an ACL (Access Control List).
[0072] The management messages and the service messages share the same service transmission link, that is, a multiplexed MPLS (Multi-Protocol Label Switching) L2VPN service channel, without an additional dedicated management line, but the logical separation is achieved by an internal isolation mechanism (such as label isolation), the service messages are forwarded according to a conventional path, and the management messages enter a special processing flow. This co-link non-interference design not only saves the cost of separately deploying a management network, but also ensures that the management instructions are not affected by the service data.
[0073] In step 202, when the source edge router confirms that the filtered management message needs to be sent to other devices instead of being processed by the self device, the management message is encapsulated with a label and forwarded. The label indicates the transmission path of the management message from the source edge router to the next hop device, and marks the virtual link corresponding to the overall transmission path, so as to ensure that the management message is not mixed into other users or services.
[0074] After encapsulation, the labeled management message is sent to a core device. In a conventional packet network, IP address forwarding increases the device parsing burden, and the label as a simplified identifier can enable the core device to quickly identify the path and avoid the inefficient problem of hop-by-hop IP parsing.
[0075] In step 203, after receiving the labeled management message, the core device determines the next operation in combination with the label information and the destination IP address of the message: if the destination IP is the self device (for example, the management message is a query of the state of the core device), the core device processes the message content, generates a first reply message, and then encapsulates and sends the first reply message back to the source edge router according to the backhaul path information recorded in the label; if the destination IP is not the self device, the message is directly forwarded to the next hop device according to the path indicated by the label, and the next hop device can be another core device or a peer edge router.
[0076] The label runs through the whole data flow process, no matter forwarding or reply, the core device does not need to care about the specific service content of the message, only needs to pass through the message transmission path and the virtual link, which makes the management process completely irrelevant to the service configuration, even if the service link is adjusted, the management channel can remain stable.
[0077] In the present application, the source edge router first filters the management message, since the service message and the management message multiplex the existing service link, the cost of building a dedicated network for out-of-band management is reduced. Then the management message to be transmitted across devices is encapsulated with a label, the label can accurately indicate the transmission path and the virtual link, so that the management message is independent of the service forwarding, and the logical separation of the management message and the service message is realized; the core device flexibly forwards the management message or the feedback reply message based on the label and the destination IP. In the whole data flow process, the management message does not change with the change of the service configuration and is suitable for various network environments. The present application realizes cost saving and isolated transmission of the service message and the management message, and optimizes the in-band management mode of the PTN switch.
[0078] Figure 3 For the transmission link architecture, Figure 3 The left and right ends each have a CE, representing a user edge device of different sites; PE1 and PE2 are two edge nodes respectively, responsible for accessing the CE devices of different sites; devices such as P1 and P2 are nodes in the core network, mainly responsible for high-speed data forwarding based on labels. The service transmission process includes from the left CE to the right CE, and from the right CE to the left CE, and the following will take the service transmission process from the left CE to the right CE as an example to explain the service transmission process.
[0079] The left CE sends the original message (in the form of Ethernet frame, etc.) to PE1. PE1 receives the data and identifies the management message, encapsulates the outer LSP1 label and the inner PW1 label for the data according to the L2VPN configuration, wherein the LSP1 label indicates the transmission path from PE1 to P1; the PW1 label identifies the virtual link from the left CE to the right CE. The labeled management message is sent to P1, P1 modifies the LSP1 label to LSP2 label by looking up the label forwarding table, LSP2 label indicates the transmission path from P1 to P2, PW1 label remains unchanged, P1 forwards the labeled management message to P2. P2 also modifies the LSP2 label to LSP3 label, PW1 label remains unchanged, and forwards the message to PE2. PE2 receives the message, removes the LSP3 label, identifies the right side CE device corresponding to the data according to the PW1 label, and then removes the PW1 label, and forwards the original message to the right side CE.
[0080] As an optional implementation, the step 202 of encapsulating the label for the management message includes the following contents:
[0081] Step S11: Determine the configuration information of the Layer 2 virtual private network in the source edge router itself;
[0082] Step S12: Obtain the forward transmission path label and the backhaul pseudo-wire label according to the configuration information, wherein the forward transmission path label is used to indicate the transmission path from the source edge router to the next hop device, and the backhaul pseudo-wire label is used to indicate the virtual link of the backhaul and the corresponding user edge device of the opposite edge router;
[0083] Step S13: Encapsulate the management message according to the forward transmission path label and the backhaul pseudo-wire label.
[0084] In step S11, if the source edge router determines that the target IP address of the management message is not the IP of the itself device, it indicates that the management message needs to be transmitted across devices, and then the source edge router directly redirects or mirrors the management message to the CPU of the itself device for protocol analysis.
[0085] The CPU in the source edge router calls the locally stored Layer 2 virtual private network (L2VPN) configuration information. These configuration information are service rules pre-configured by the administrator or dynamically generated by the protocol, which specifically includes: LSP path strategy, virtual link association relationship (which PW corresponds to which user side CE device), label protocol parameters (label distribution rule, holding time, etc.).
[0086] In step S12, based on the configuration information obtained in step S11, the source edge router extracts two key labels.
[0087] The forward transmission path label (LSP1 label) indicates the transmission path from the source edge router (PE1) to the next hop device (P1).
[0088] The LSP (Label Switched Path) label indicates the complete physical path from the source edge router (PE1) to the opposite edge router (PE2), which decomposes the entire cross-network transmission process into multiple segment links, and allocates an independent LSP label to each segment link. For example, when the management message needs to be sent from PE1 to PE2, the actual path will pass through core devices P1, P2 and other nodes, forming a transmission link of PE1→P1→P2→PE2. At this time, the LSP label will be split into: LSP1 (PE1→P1), LSP2 (P1→P2), LSP3 (P2→PE2). These segmented LSP labels will be replaced hop by hop in the message forwarding process: PE1 encapsulates the message with LSP1, P1 receives it and pops LSP1 and encapsulates LSP2, core device P2 receives it and pops LSP2 and encapsulates LSP3, and finally the cross-network transmission of the message from the source PE to the opposite PE is realized through the relay of this series of segmented labels.
[0089] Backhaul pseudowire label (PW label): The PW label is used to identify a virtual connection between users, indicating a virtual link from a peer edge router to a source edge router, and ensuring that the peer edge router can correctly decapsulate and forward the message to the target user edge device after receiving the message. The backhaul PW label is relative to the source edge router, and for the peer edge router, it is a forward PW label, which together with the forward PW label defines a virtual private link.
[0090] The PW label indicates a virtual link connecting two PEs (such as PE1 and PE2), and in order to achieve bidirectional communication, both ends will allocate a PW label for each other, PE2 will allocate a label (assuming PW1) for PE1 for the forward direction of PE1→PE2, and therefore the message sent by PE1 to PE2 needs to carry the PW1 label. From the perspective of PE1, the PW1 label is called a backhaul pseudowire label, because it is associated with the backhaul link of PE2→PE1, and PE2 will reply through this link, and PE1 can identify it as a backhaul service through PW1. Similarly, PE1 will allocate a label (assuming PW2) for PE2 for the backhaul direction of PE2→PE1, and therefore the message sent by PE2 to PE1 needs to carry the PW2 label.
[0091] In step S13, the source edge router encapsulates the acquired forward LSP label and backhaul PW label into a management message in the following manner, and the encapsulation structure is: the outer layer is the LSP label (indicating the physical transmission path), and the inner layer is the PW label (indicating the virtual link). This double-layer structure enables the core device to only process the outer LSP label for fast forwarding when the message traverses the core network, and the peer edge router identifies the target user edge device by analyzing the inner PW label after terminating the LSP.
[0092] In this application, the forward and backhaul paths of the management message are strictly bound through the forward LSP label and the backhaul PW label, and the user-side service (CE1→CE2) is also accurately bound, thereby realizing the closed loop of cross-network management instructions.
[0093] The outer LSP label enables the core device to not need to analyze the message content, but only to replace the label (such as P1 replacing LSP1 with LSP2, pointing to P2) for high-speed forwarding, thereby avoiding the inefficiency of IP routing table lookup. The inner PW label ensures that the peer edge router can directly forward the message to the target user edge device (CE2) through local configuration after receiving the message, without confusing other user services (such as the service of CE3 using PW2).
[0094] As an optional implementation, in step 203, the core device is configured to forward the labeled management packet to a next-hop device or feed back a first reply packet to the source edge router based on the label and the target IP of the labeled management packet, and the feeding back of the first reply packet to the source edge router includes the following contents:
[0095] In step S21, the core device receives an intermediate packet sent by a previous-hop device, wherein the intermediate packet is a packet exchanged between the core device and the edge router, and the intermediate packet includes a labeled management packet and a service packet.
[0096] In step S22, the core device matches the labeled management packet with a protocol type of a management type in the intermediate packet by using an access control list.
[0097] In step S23, if the target IP address of the labeled management packet is a device IP of the core device itself or the destination media access control address is a media access control address of the core device itself, the core device processes the labeled management packet and feeds back a first reply packet to the source edge router.
[0098] In step S24, if the target IP address of the labeled management packet is a device IP other than the core device itself or the destination media access control address is a media access control address other than the core device itself, the core device forwards the labeled management packet to a next-hop device.
[0099] In step S21, in the PTN network, the core device (P) continuously receives intermediate packets from a previous-hop device (which can be a source edge router or another core device), and the intermediate packets include both user service traffic and management traffic. After receiving the mixed packets through a physical interface, the core device first performs basic analysis on the intermediate packets, identifies the encapsulation format, and then divides the packets into different processing queues according to the types, that is, the service packets enter a high-speed forwarding queue, and the management packets with labels enter a management traffic processing queue.
[0100] In step S22, the core device calls a pre-configured access control list (ACL) to deeply filter the labeled management packet, so as to match a packet with a protocol type of a management type in the MPLS Payload and a destination IP of a local IP or a destination MAC of a local MAC. The ACL rule is matched based on the protocol type of the packet, and the management packet is accurately identified. This step ensures that the management packet will not be submerged in a large amount of service traffic.
[0101] In step S23, if the target IP address or MAC address of the matched label management packet is the address of the core device itself, it indicates that the packet is used for management or query of the status of the core device. At this time, the core device uploads the label management packet to the CPU of the core device for processing, generates a first reply packet, and the first reply packet includes device status data and configuration confirmation information, etc. Then, the core device finds the reverse LSP label based on the forward LSP label, and then encapsulates the first reply packet by using the reverse LSP label + backhaul PW label, and makes the first reply packet return to the source edge router along the original path according to the reverse LSP label.
[0102] In step S24, if the target IP address of the management packet is not the IP of the device and the MAC address is not the address of the device itself, the core device sends the management packet to the next hop device through the specified interface according to the forward LSP label, and continues to transmit along the preset path. In this process, the core device only needs to process the outer LSP label, and does not need to parse the inner PW label, thereby realizing efficient forwarding of the management traffic.
[0103] After the label management packet is forwarded by the core device to the next hop device, the method further includes: in the case that the opposite edge router receives the label management packet, determining the pseudo-wire label in the label management packet; based on the preset pseudo-wire configuration table, determining the interface of the target user edge device corresponding to the pseudo-wire label; and forwarding the label management packet to the target user edge device according to the interface.
[0104] When the opposite edge router (such as PE2) receives the label management packet forwarded by the core device (such as P2), the outer LSP label is stripped and the inner PW label (such as PW1) is extracted. The opposite edge router maintains a pseudo-wire configuration table, which records the target user edge device information corresponding to each PW label, including the IP and interface of the target user edge device. By querying the table, the opposite edge router determines the corresponding target user edge device (such as CE2) according to the received PW label (such as PW1), and the physical interface for forwarding the service is (such as GE0 / 1). Finally, the encapsulated Ethernet frame is sent to CE2 through the physical interface, and the forwarding of the management packet from the core network to the user side is completed.
[0105] The core device accurately captures the management message through the access control list and logically isolates the service message, ensuring that the management instruction is not disturbed by the service data. For the management message with a non-local device as the target address, the core device quickly locates the forwarding path based on the positive label and forwards it to the next hop, maintaining the efficiency of cross-device management. For the management message directed to itself, the core device generates a reply message after decapsulation and returns it to the source edge router along the original path, forming a complete closed loop of sending-processing-feedback. This mechanism not only ensures the independence of the management control flow through traffic separation, but also realizes the determinacy of the path through the bidirectional guidance of the label, so that the management process is always stable and controllable in a complex service environment.
[0106] As an optional implementation, in step S23, the generated first reply message fed back to the source edge router includes the following contents:
[0107] Step S231: Extract the positive transmission path label and backhaul pseudo-wire label in the labeled management message;
[0108] Step S232: Based on the preset bidirectional label mapping relationship, extract the reverse transmission path label corresponding to the positive transmission path label, wherein the reverse transmission path label is used to indicate the transmission path from the core device to the previous hop device;
[0109] Step S233: Encapsulate the first reply message with the reverse transmission path label and the backhaul pseudo-wire label;
[0110] Step S234: Send the encapsulated first reply message to the source edge router based on the reverse transmission path label.
[0111] In step S231, after processing the local management message (such as self-state query, configuration instruction) and generating the first reply message, the core device first performs decapsulation operation on the labeled management message that triggers this processing, and accurately extracts two key labels, including the positive transmission path label and the backhaul pseudo-wire label, by analyzing the label stack structure.
[0112] Positive transmission path label: This label records the physical path information of the management message from the source edge router to the next hop device, for example, the message starts from PE1, reaches P1 through the core network segment path.
[0113] Backhaul pseudo-wire label: After stripping the outer transmission path label (LSP1), the core device identifies the inner pseudo-wire label (PW1). The core device does not participate in the user-side service logic, so it only needs to pass through the pseudo-wire label without analyzing its service association.
[0114] In step S232, the core device maintains a bidirectional label mapping table, in which each forward path label corresponds to a reverse path label, forming a symmetric relationship between the outgoing path and the return path. For example, the outgoing path (LSP1) from PE1 to P1 must correspond to the return path (LSP1_rev) from P1 to PE1. The reverse transmission path label (LSP1_rev) of the core device is used to indicate the transmission path from the core device to the previous hop device, for example, in the path from PE1 to PE2, the reverse transmission path label indicates the return path P1→PE1.
[0115] In step S233, when the core device encapsulates the generated first reply message with labels, it uses a double-layer label structure corresponding to the original management message. The outer layer encapsulates the reverse transmission path label (LSP1_rev), which serves as a physical path identifier to ensure that the first reply message can quickly locate the previous hop device when traversing the core network and be transmitted along the preset return path. The inner layer retains the return pseudo-wire label, which is the same as the return pseudo-wire label (PW1) in the original message, allowing the source edge router to directly identify the virtual link to which the reply message belongs when receiving the reply message, thereby avoiding confusion with reply messages of other users or services. After encapsulation, the label stack structure of the first reply message is mirror-symmetric with the original message, with only the outer layer transmission path label reversed and the inner layer pseudo-wire label remaining the same.
[0116] In step S234, the encapsulated first reply message is submitted to the forwarding engine of the core device, which queries the local label forwarding table by analyzing the outer reverse transmission path label (LSP1_rev) to directly determine the previous hop device (such as PE1) and the corresponding physical interface. The entire forwarding process does not require parsing of the IP address or service content of the reply message, but only requires matching of the label value LSP1_rev to complete the forwarding decision, which is consistent with the outgoing forwarding mechanism of the original management message. Finally, the reply message is forwarded layer by layer along the path P1→PE1 and accurately returned to the source edge router that sent the management message.
[0117] In this application, the core device locates the incoming path through the forward transmission path label and obtains the reverse transmission path label through bidirectional mapping to ensure that the first reply message can return to the source edge router along the original path. Through the binding of forward and reverse transmission path labels, the outgoing path of the management message and the return path of the reply message are completely symmetric, reducing the risk of packet loss or delay. The transparent transmission of the return pseudo-wire label ensures that the first reply message and the original management message are always associated with the same virtual link, allowing the source edge router to quickly match the corresponding management request after receiving the reply, thereby avoiding reply confusion in multi-user and multi-service scenarios.
[0118] In addition, the core device directly acquires the reverse path label through the preconfigured bidirectional label mapping table, without dynamically calculating the backhaul route, so that the time consumption of the forwarding decision is reduced and the efficiency of message forwarding is improved. Finally, the management message is sent from the source edge router to the core device to reply the message back to the source edge router, and the label mechanism is used throughout the whole process to form a complete management control flow closed loop.
[0119] As an optional implementation, the step S24 of forwarding the labeled management message to the next hop device comprises:
[0120] Step S241: extracting the forward transmission path label in the labeled management message by the core device;
[0121] Step S242: replacing the forward transmission path label with the forward transmission path label of the next hop device;
[0122] Step S243: forwarding the labeled management message to the next hop device according to the forward transmission path label of the next hop device.
[0123] In step S241, after the core device acquires the labeled management message, it is determined that the core device does not need to process it. Since the management message is encapsulated with double-layer labels (the outer layer is an LSP label and the inner layer is a PW label), the core device can quickly locate and extract the outer forward LSP label.
[0124] In step S242, the core device extracts the current outer forward transmission path label from the received labeled management message, and the label records the path information from the previous hop device to the current device. The core device queries the local label forwarding table to find the corresponding next hop device and the new forward transmission path label with the current forward transmission path label as the index, and then pops out the original forward transmission path label (LSP1) in the message and pushes in the new forward transmission path label (LSP2) found, while the inner PW label (such as PW1) remains unchanged to maintain the service association.
[0125] In step S243, the core device identifies the MAC address and the interface (such as GE0 / 2) of the next hop device (such as P2) according to the new forward transmission path label (LSP2), and forwards the management message with the replaced label to the next hop device (such as P2) through the interface. The whole process is completed by the hardware forwarding engine to ensure the efficiency of line-speed forwarding.
[0126] In the forwarding process of the core device, the core device only replaces the outer LSP label to guide the path, and keeps the inner PW label to associate the service, so that the path forwarding and the service identification are decoupled, the core device focuses on efficient forwarding, and does not interfere with the service logic.
[0127] As an optional implementation, after the management message is screened out by matching the message type, the method further comprises:
[0128] Step S31: If the source edge router determines that the target IP address of the management message is the device IP itself, parse the management message to generate a second reply message;
[0129] Step S32: Determine the media access control address of the user edge device by querying the address mapping table, wherein the address mapping table records the mapping relationship between each user edge device IP and media access control address;
[0130] Step S33: Based on the media access control address, feed back the second reply message to the user edge device.
[0131] In step S31, after the source edge router filters out the management message through message type matching, it first checks the target IP address. If the target IP is the device IP, the source edge router will send the management message to the local CPU for processing through redirection or mirroring. The CPU calls the local management module to parse the protocol and execute the corresponding processing logic. According to the processing result, a second reply message is generated, and the content of the second reply message includes state data (such as memory usage 80%) or operation confirmation (such as configuration has taken effect).
[0132] In step S32, after generating the second reply message, the source edge router needs to send it to the user edge device. At this time, the source edge router queries the address mapping table maintained locally, such as the ARP (Address Resolution Protocol) table, which records the corresponding relationship between the accessed user edge device IP and MAC address. The source edge router accurately matches the corresponding MAC address in the table according to the user edge device IP of the sending request, as the destination link layer address of the reply message.
[0133] For a statically configured network, the address mapping table can be manually entered in advance. For dynamic scenarios, the source edge router can automatically learn and update the mapping relationship through the ARP protocol to ensure the real-time nature of address matching.
[0134] In step S33, after determining the MAC address of the user edge device, the source edge router sets the destination MAC address as the user edge device address queried, encapsulates the Ethernet frame header according to the obtained MAC address, and then feeds back the second reply message to the user edge device through the AC (Alternating Current Interface) interface connected to the user edge device.
[0135] The source edge router directly processes the management message for itself, determines the link layer address of the user edge device through an ARP table, ensures that the reply message will not be sent to other devices due to IP address resolution error, and avoids reply confusion in a multi-user edge device access scenario. In addition, the second reply message is generated and fed back from the user edge device to the source edge router, and the whole process is limited to the access link, which does not occupy the core network resource, saves the backbone bandwidth, avoids the influence of core network failure on local management, and enhances the robustness of network management.
[0136] The working processes of the PE device and the P device are explained below respectively.
[0137] The working process of the PE device is shown in Figure 4 .
[0138] Step 401. The PE device continuously monitors all Ethernet messages through the AC interface, and screens out the management message through the access control list.
[0139] Step 402. The management message is separated from the normal service message by being sent to the CPU for processing through redirection or mirroring.
[0140] Step 403. It is judged whether the destination IP address of the management message is the IP of the device, if yes, step 404 is executed, if not, step 405 is executed.
[0141] Step 404. The second response message is generated after processing, the IP of the CE device is determined according to the APR table, and the second response message is fed back to the CE device.
[0142] Step 405. The management message is encapsulated according to the forward LSP label and the backhaul pw label, and then the labeled management message is forwarded to the next hop core device according to the forward LSP label.
[0143] The working process of the P device is shown in Figure 5 .
[0144] Step 501. The intermediate message sent from the previous hop device is received, including the labeled management message and the normal service message.
[0145] Step 502. The management message is separated from the normal service message by being sent to the CPU for processing through redirection or mirroring.
[0146] Step 503. It is judged whether the destination IP address of the management message is the IP of the device, if yes, step 504 is executed, if not, step 505 is executed.
[0147] Step 504. A first reply message is generated according to the reverse LSP label and the backhaul pw label, and then the first reply message is fed back to the source PE according to the reverse LSP label.
[0148] Step 505. The IP and interface of the corresponding next-hop device are found according to the forward LSP label, and the labeled management message is sent to the next-hop device through the interface.
[0149] Figure 6 For the signaling diagram of the in-band management of the PTN switch, the signaling interaction process is as shown below.
[0150] 1. The CE sends an original message: the user-side CE generates an original message and sends it to PE1 through an Eth link.
[0151] 2. PE1 processes the management message: PE1 receives the original message through an AC interface, filters out the management message by using an ACL, and redirects / or mirrors it to a CPU; the destination IP is judged, if it is the local IP, a second reply message is generated and fed back to the CE, if it is not the local IP, the message is encapsulated with LSP1 and PW1 labels, and forwarded to P1 according to the LSP1 label.
[0152] 3. P1 forwards the management message: P1 receives the labeled management message, judges whether the destination IP is the local IP, if yes, a first reply message is generated and fed back to PE1, if no, the LSP1 label is extracted and replaced with the LSP2 label, and forwarded to P2 along the LSP2 label.
[0153] 4. P2 processes the management message: P2 receives the message, extracts the label; judges that the destination IP is not the local IP, extracts the LSP2 label and replaces it with the LSP3 label, and sends it to PE2.
[0154] 5. PE2 processes the management message: PE2 strips the LSP3 label, and feeds back the management message to the CE through the Eth link according to the PW1 label.
[0155] Based on the same technical concept, the application provides a PTN switch in-band management device, as shown in the accompanying drawings, the device comprises: Figure 7
[0156] The filtering module 701 is configured to filter out a management message by matching a message type in a case that the source edge router receives an original message sent by a user edge device, wherein the management message and a service message in the original message are isolated from each other and share a service transmission link of a packet transport network;
[0157] The encapsulation module 702 is configured to encapsulate a label for the management packet if the source edge router determines that the target IP address of the management packet is not the self-device IP, and send the management packet with the label to the core device, where the label is used to indicate a transmission path and a virtual link of the management packet.
[0158] The sending module 703 is configured to forward the management packet with the label to a next-hop device through the core device or feed back a first reply packet generated by the core device to the source edge router based on the label and the target IP of the management packet with the label.
[0159] Optionally, the encapsulation module 702 is configured to:
[0160] determine configuration information of a Layer 2 virtual private network in the self-device through the source edge router;
[0161] obtain a forward transmission path label and a backhaul pseudo-wire label according to the configuration information, where the forward transmission path label is used to indicate a transmission path from the source edge router to a next-hop device, and the backhaul pseudo-wire label is used to indicate a virtual link of backhaul and a user edge device corresponding to a peer edge router;
[0162] encapsulate the management packet according to the forward transmission path label and the backhaul pseudo-wire label.
[0163] Optionally, the sending module 703 is configured to:
[0164] receive an intermediate packet sent by a previous-hop device through the core device, where the intermediate packet is a packet exchanged between the core device and the edge router, and the intermediate packet includes the management packet with the label and a service packet;
[0165] match the management packet with the label of the protocol type of the management class in the intermediate packet through an access control list;
[0166] if the target IP address of the management packet with the label is a self-device IP of the core device or a destination media access control address is a media access control address of the self-device, process the management packet with the label through the core device and feed back a first reply packet generated by the core device to the source edge router;
[0167] if the target IP address of the management packet with the label is a non-self-device IP or the destination media access control address is a non-self-device media access control address, forward the management packet with the label to a next-hop device through the core device.
[0168] Optionally, the sending module 703 is specifically configured to:
[0169] extract the forward transmission path label and the backhaul pseudo-wire label in the management packet with the label;
[0170] Based on the preset bidirectional label mapping relationship, a reverse transmission path label corresponding to the forward transmission path label is extracted, wherein the reverse transmission path label is used to indicate a transmission path from the core device to a previous hop device;
[0171] The reverse transmission path label and the backhaul pseudo-wire label are used to encapsulate the first reply message;
[0172] The encapsulated first reply message is sent to the source edge router based on the reverse transmission path label.
[0173] Optionally, the sending module 703 is specifically configured to:
[0174] The forward transmission path label in the labeled management message is extracted by the core device;
[0175] The forward transmission path label is replaced by a forward transmission path label of a next hop device;
[0176] The labeled management message is forwarded to the next hop device according to the forward transmission path label of the next hop device.
[0177] Optionally, the apparatus is further configured to:
[0178] If the source edge router determines that the target IP address of the management message is the device IP itself, the management message is parsed to generate a second reply message;
[0179] The media access control address of the user edge device is determined by querying the address mapping table, wherein the address mapping table records the mapping relationship between each user edge device IP and the media access control address;
[0180] The second reply message is fed back to the user edge device based on the media access control address.
[0181] Optionally, the apparatus is further configured to:
[0182] In a case where the opposite end edge router receives the labeled management message, the pseudo-wire label in the labeled management message is determined;
[0183] Based on the preset pseudo-wire configuration table, an interface of a target user edge device corresponding to the pseudo-wire label is determined;
[0184] The labeled management message is forwarded to the target user edge device according to the interface.
[0185] As shown in Figure 8 The embodiment of the present application provides an electronic device, which comprises a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802 and the memory 803 complete mutual communication through the communication bus 804.
[0186] a memory 803, configured to store a computer program.
[0187] In an embodiment of the present application, the processor 801 is configured to execute the program stored in the memory 803 to implement the PTN switch in-band management method provided by any one of the foregoing method embodiments.
[0188] The embodiment of the present application further provides a computer readable storage medium, which has a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the PTN switch in-band management method provided by any one of the foregoing method embodiments.
[0189] The apparatus embodiments described above are merely illustrative, wherein the units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.
[0190] Through the description of the foregoing embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, or an optical disk, and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0191] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises", "comprising", "includes", "including" and "has" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order in which they are described, unless specifically indicated as such. It is also to be understood that additional or alternative steps can be employed.
[0192] The foregoing detailed description of the application has been presented for purposes of illustration and description. Various modifications and changes can be made to these embodiments without departing from the spirit and scope of the application. It is intended that the scope of the application should not be limited by the particular representative embodiments described above.
Claims
1. A method for in-band management of a PTN switch, the method comprising: The method comprises: In the case that the source edge router receives the original message sent by the user edge device, the management message is screened out by matching the message type, wherein the management message and the service message in the original message are isolated from each other and share the service transmission link of the packet transmission network; If the source edge router determines that the target IP address of the management message is not the device IP of itself, the management message is encapsulated with a label, and the labeled management message is sent to the core device, wherein the label is used to indicate the transmission path and the virtual link of the management message; Based on the label and the target IP of the labeled management message, the core device forwards the labeled management message to the next hop device or feeds back the generated first reply message to the source edge router.
2. The method of claim 1, wherein, The label encapsulation of the management message comprises: The source edge router determines the configuration information of the layer 2 virtual private network in the device itself; According to the configuration information, the forward transmission path label and the backhaul pseudo-wire label are obtained, wherein the forward transmission path label is used to indicate the transmission path from the source edge router to the next hop device, and the backhaul pseudo-wire label is used to indicate the virtual link of the backhaul and the corresponding user edge device of the opposite edge router; The management message is encapsulated according to the forward transmission path label and the backhaul pseudo-wire label.
3. The method of claim 1, wherein, Based on the label and the target IP of the labeled management message, the core device forwards the labeled management message to the next hop device or feeds back the generated first reply message to the source edge router, which comprises: The core device receives the intermediate message sent by the previous hop device, wherein the intermediate message is the message exchanged between the core device and the edge router, and the labeled management message and the service message are included in the intermediate message; The labeled management message with the protocol type of management class in the intermediate message is matched out through the access control list; If the target IP address of the labeled management message is the device IP of the core device itself or the destination media access control address is the media access control address of the device itself, the core device processes the labeled management message and feeds back the generated first reply message to the source edge router; If the target IP address of the labeled management message is not the device IP of itself or the destination media access control address is not the media access control address of the device itself, the core device forwards the labeled management message to the next hop device.
4. The method of claim 3, wherein, Feeding back the generated first reply message to the source edge router comprises: Extracting the forward transmission path label and the backhaul pseudo-wire label in the labeled management message; Based on the preset bidirectional label mapping relationship, the reverse transmission path label corresponding to the forward transmission path label is extracted, wherein the reverse transmission path label is used to indicate the transmission path from the core device to the previous hop device; The first reply message is encapsulated with the reverse transmission path label and the backhaul pseudo-wire label; The encapsulated first reply message is sent to the source edge router based on the reverse transmission path label.
5. The method of claim 3, wherein, forwarding the labeled management packet to the next-hop device comprises: extracting, by the core device, a forward transmission path label in the labeled management packet; replacing the forward transmission path label with a forward transmission path label of the next-hop device; forwarding the labeled management packet to the next-hop device according to the forward transmission path label of the next-hop device.
6. The method of claim 1, wherein, After the management packet is filtered out by matching the packet type, the method further comprises: if the source edge router determines that the target IP address of the management packet is the device IP itself, parsing the management packet to generate a second reply packet; determining the media access control address of the user edge device by querying an address mapping table, wherein the address mapping table records the mapping relationship between each user edge device IP and media access control address; based on the media access control address, feeding back the second reply packet to the user edge device.
7. The method of claim 1, wherein, After the labeled management packet is forwarded to the next-hop device by the core device, the method further comprises: in the case that the opposite end edge router receives the labeled management packet, determining the pseudo-wire label in the labeled management packet; based on a preset pseudo-wire configuration table, determining the interface of the target user edge device corresponding to the pseudo-wire label; forwarding the labeled management packet to the target user edge device according to the interface.
8. A PTN switch in-band management device, characterized in that, The device comprises: a filtering module configured to filter out a management packet by matching a packet type in the case that a source edge router receives an original packet sent by a user edge device, wherein the management packet and a service packet in the original packet are isolated from each other and share a service transmission link of a packet transport network; an encapsulating module configured to encapsulate a label for the management packet and send the labeled management packet to a core device if the source edge router determines that a target IP address of the management packet is not a device IP itself, wherein the label is used to indicate a transmission path and a virtual link of the management packet; a sending module configured to forward the labeled management packet to a next-hop device or feed back a generated first reply packet to the source edge router by the core device based on the label and a target IP of the labeled management packet.
9. An electronic device, comprising: The device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; the memory is used to store a computer program; the processor is used to execute the program stored on the memory to implement the method in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-7. The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-7.