Method for identifying master-slave relationship of FTTR gateway and master gateway

By using the netfilter hook function in the master gateway to intercept and parse TCP packets, the master-slave relationship is increased, and the problem of the management platform losing control capabilities of the slave gateway is solved, the reliability and performance of network access is improved, and the CPU resource usage is reduced. , and enhanced safety protection.

CN118827386BActive Publication Date: 2024-11-22四川长虹新网科技有限责任公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411299164.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-11-22
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

In the prior art, when the main gateway management channel is abnormal or problems arise during the acquisition of slave gateway device information, the management platform will lose control over the slave gateway network access, limiting network flexibility and increasing management complexity. Gateway CPU resources consume a lot, affecting network performance and response speed.

Method used

By using the netfilter hook function in the master gateway to intercept the TCP packet forwarded by the gateway, and parse and determine whether it is a SYN packet. If so, add the master-slave relationship to the OPTION of the SYN packet, including the master-slave MAC address and slave The gateway MAC address is sent to the management platform, so that the management platform can learn from the gateway's MAC address through the OPTION of the SYN message for control.

Benefits of technology

Solve the problem that the management platform may lose control capabilities for network access from gateway, improves the reliability and flexibility of network access, reduces the use of gateway CPU resources, significantly improves processing performance, and enhances network security protection. ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118827386B_ABST
    Figure CN118827386B_ABST
Patent Text Reader

Abstract

The present invention provides a method for identifying the master-slave relationship of an FTTR gateway and a master gateway, and relates to the technical field of communication. A TCP message forwarded by a slave gateway is intercepted by a netfilter hook function, and the TCP message is analyzed to determine whether it is a SYN message. If it is a SYN message, a master-slave relationship is added to the OPTION of the SYN message, and then sent to a management platform. The master-slave relationship includes a master gateway MAC address, a split flag and a slave gateway MAC address. Based on this, the management platform can learn the MAC address of the slave gateway through the OPTION of the SYN message, so as to control the slave gateway accordingly, thereby solving the problem that the management platform may lose the control ability of the slave gateway network access. The present invention is suitable for network management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method for identifying a master-slave relationship of an FTTR gateway and a master gateway. Background Art

[0002] Various terminals within the home network access the home network through the slave gateway and the user-side interface of the main gateway. The main gateway forwards, controls and manages the data and applications of the slave gateway. The network-side interface of the main gateway interacts with management platforms such as the digital life platform, and connects to the server through the management platform to achieve communication between the home network and the external network.

[0003] In actual networking, there are multiple management platforms. These management platforms identify the master gateway and the slave gateway through pre-configured information, device registration, etc., and then manage the terminal devices. In terms of the management and control of fine data flow, it is mainly through sending data traffic copies to the data security platform for management and control analysis.

[0004] In the existing technical framework, the slave gateway transmits device information (such as MAC address, serial number, etc.) to the master gateway through management and maintenance protocols such as OMCI. Subsequently, the master gateway synchronizes this information to the management platform using internal management plug-ins or standard configuration management protocols (such as CWMP). The management platform controls key operations such as network access permissions of the master and slave gateways based on this information.

[0005] However, when an exception occurs in the main gateway management channel or a problem occurs in the process of obtaining information from the slave gateway device, the management platform will lose the ability to control the slave gateway network access, which not only limits the flexibility of the network but also increases the complexity of management. In terms of fine-grained traffic management, the existing technology requires the gateway to redirect and copy the traffic, which consumes a lot of gateway CPU resources. At the same time, the management platform also faces challenges in quickly confirming the source of the data flow, affecting network performance and response speed. Summary of the invention

[0006] Technical problem solved by the present invention: The present invention provides a method for identifying the master-slave relationship of FTTR gateways and a master gateway, which solves the problem that the management platform may lose the ability to control the network access of the slave gateway.

[0007] The present invention solves the above technical problems by adopting a technical solution: a method for identifying the master-slave relationship of FTTR gateways, which is applied to a management platform to manage a network through a FTTR gateway, wherein the FTTR gateway includes a master gateway and a slave gateway, and the method includes the following steps:

[0008] S1. The terminal device sends a TCP message to the slave gateway;

[0009] S2, receiving the TCP message from the gateway and forwarding it to the main gateway;

[0010] S3. The master gateway intercepts the TCP message through the netfilter hook function, and parses and determines whether the TCP message is a SYN message. If it is a SYN message, a master-slave relationship is added to the OPTION of the SYN message, and then sent to the management platform. The master-slave relationship includes the master gateway MAC address, the split flag and the slave gateway MAC address.

[0011] Furthermore, the method also includes: S4, the management platform obtains the MAC address of the slave gateway according to the master-slave relationship in the OPTION, and manages the slave gateway according to the management policy.

[0012] Further, in S3, adding the master-slave relationship in the OPTION of the SYN message includes adding the master-slave relationship in the head or tail of the OPTION of the SYN message.

[0013] Furthermore, the netfilter hook function is mounted through the nf_register_net_hook interface and adopts the highest priority.

[0014] Further, the master gateway MAC address in the master-slave relationship is the MAC address of the master gateway BR0.

[0015] Furthermore, the MAC address segmentation flag in the master-slave relationship is 0XFFFF.

[0016] The present invention also provides a master gateway for identifying the master-slave relationship of an FTTR gateway, which is applied to the above-mentioned method for identifying the master-slave relationship of an FTTR gateway, and comprises a TCP message interception module, a SYN message judgment module, a master-slave relationship construction module and an OPTION reconstruction module; the TCP message interception module is used to intercept a TCP message through a netfilter hook function; the SYN message judgment module is used to judge whether a TCP message is a SYN message; the master-slave relationship construction module is used to create a master-slave relationship, and the master-slave relationship includes a master gateway MAC address, a split flag and a slave gateway MAC address; the OPTION reconstruction module is used to add the master-slave relationship created by the master-slave relationship construction module in the OPTION.

[0017] Beneficial effects of the present invention: The present invention provides a method for identifying the master-slave relationship of an FTTR gateway and a master gateway, wherein a TCP message forwarded by a slave gateway is intercepted by a netfilter hook function, and the TCP message is analyzed to determine whether it is a SYN message. If it is a SYN message, a master-slave relationship is added to the OPTION of the SYN message, and then sent to a management platform. The master-slave relationship includes a master gateway MAC address, a split flag and a slave gateway MAC address. Based on this, the management platform can obtain the MAC address of the slave gateway through the OPTION of the SYN message, thereby controlling the slave gateway accordingly, thereby solving the problem that the management platform may lose the ability to control the network access of the slave gateway. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a flow chart of a method for identifying the master-slave relationship of FTTR gateways provided by the present invention;

[0019] Figure 2 It is a schematic diagram of a master gateway structure for identifying the master-slave relationship of FTTR gateways provided by the present invention. DETAILED DESCRIPTION

[0020] When an abnormality occurs in the management channel of the master gateway or a problem occurs in the process of obtaining the device information of the slave gateway, the management platform will lose the ability to control the network access of the slave gateway. The present invention provides a method for identifying the master-slave relationship of the FTTR gateway, such as Figure 1 As shown, the following steps are included:

[0021] S1. The terminal device sends a TCP message to the slave gateway;

[0022] S2, receiving the TCP message from the gateway and forwarding it to the main gateway;

[0023] S3. The master gateway intercepts the TCP message through the netfilter hook function, and parses and determines whether the TCP message is a SYN message. If it is a SYN message, a master-slave relationship is added to the OPTION of the SYN message, and then sent to the management platform. The master-slave relationship includes the master gateway MAC address, the split flag and the slave gateway MAC address.

[0024] In this way, the management platform can obtain the MAC address of the slave gateway through the OPTION of the SYN message, and thus control the slave gateway accordingly, solving the problem that the management platform may lose control over the network access of the slave gateway. In particular, even if an abnormality occurs in the management channel, the management platform can still use the MAC address information contained in the business process to accurately determine whether the data flow has network access rights, thereby improving the reliability and flexibility of network access; in real business traffic, the master-slave relationship is only added to the SYN message in the TCP session establishment phase, avoiding the intervention of additional plug-ins or applications, reducing the occupation of the gateway's CPU resources, and thus significantly improving the gateway's processing performance.

[0025] Furthermore, the method also includes: S4, the management platform obtains the MAC address of the slave gateway according to the master-slave relationship in the OPTION, and manages the slave gateway according to the management strategy. The specific management strategy includes whether the slave gateway has network access rights, locating the slave gateway when data is abnormal, issuing firewall rules to the slave gateway, etc., thereby enhancing network security protection capabilities.

[0026] Specifically, in S3, adding a master-slave relationship in the OPTION of the SYN message includes adding a master-slave relationship in the header or tail of the OPTION of the SYN message; the netfilter hook function is mounted through the nf_register_net_hook interface and adopts the highest priority; the master gateway MAC address in the master-slave relationship is the MAC address of the master gateway BR0; the MAC address segmentation flag in the master-slave relationship is 0XFFFF.

[0027] For example, after adding the master-slave relationship in the header, the OPTION structure is: Option-Kind+Option-Length+master gateway MAC address+0XFFFF+slave gateway MAC address.

[0028] The present invention also provides a master gateway for identifying the master-slave relationship of FTTR gateways, which is applied to the above method for identifying the master-slave relationship of FTTR gateways, such as Figure 2 As shown, it includes a TCP message interception module, a SYN message judgment module, a master-slave relationship construction module and an OPTION reconstruction module; the TCP message interception module is used to intercept TCP messages through the netfilter hook function; the SYN message judgment module is used to judge whether the TCP message is a SYN message; the master-slave relationship construction module is used to create a master-slave relationship, and the master-slave relationship includes a master gateway MAC address, a split flag and a slave gateway MAC address; the OPTION reconstruction module is used to add the master-slave relationship created by the master-slave relationship construction module in OPTION.

Claims

1. A method for identifying the master-slave relationship of FTTR gateways, applied to a management platform managing a network through FTTR gateways, wherein the FTTR gateways include a master gateway and a slave gateway, and characterized in that: The method comprises the following steps: S1. The terminal device sends a TCP message to the slave gateway; S2, receiving the TCP message from the gateway and forwarding it to the main gateway; S3. The master gateway intercepts the TCP message through the netfilter hook function, and parses and determines whether the TCP message is a SYN message. If it is a SYN message, a master-slave relationship is added to the OPTION of the SYN message, and then sent to the management platform. The master-slave relationship includes the master gateway MAC address, the split flag and the slave gateway MAC address.

2. The method for identifying the master-slave relationship of FTTR gateways according to claim 1, characterized in that: Also includes: S4. The management platform obtains the MAC address of the slave gateway according to the master-slave relationship in OPTION, and manages the slave gateway according to the management policy.

3. The method for identifying the master-slave relationship of FTTR gateways according to claim 1, characterized in that: In S3, adding the master-slave relationship in the OPTION of the SYN message includes adding the master-slave relationship in the head or tail of the OPTION of the SYN message.

4. The method for identifying the master-slave relationship of FTTR gateways according to any one of claims 1 to 3, characterized in that: The netfilter hook function is mounted through the nf_register_net_hook interface and uses the highest priority.

5. The method for identifying the master-slave relationship of FTTR gateways according to any one of claims 1 to 3, characterized in that: The MAC address of the master gateway in the master-slave relationship is the MAC address of the master gateway BR0.

6. The method for identifying the master-slave relationship of FTTR gateways according to any one of claims 1 to 3, characterized in that: The MAC address split flag in the master-slave relationship is 0XFFFF.

7. A master gateway for identifying a master-slave relationship of FTTR gateways, implementing the method for identifying a master-slave relationship of FTTR gateways as claimed in claim 1, characterized in that: It includes a TCP message interception module, a SYN message judgment module, a master-slave relationship construction module and an OPTION reconstruction module; the TCP message interception module is used to intercept the TCP message through the netfilter hook function; the SYN message judgment module is used to judge whether the TCP message is a SYN message; The master-slave relationship construction module is used to create a master-slave relationship, which includes a master gateway MAC address, a split flag and a slave gateway MAC address; the OPTION reconstruction module is used to add the master-slave relationship created by the master-slave relationship construction module to the OPTION of the SYN message.