WO2022267949A1 - 设备角色自动确定方法、装置、设备和存储介质 - Google Patents

设备角色自动确定方法、装置、设备和存储介质 Download PDF

Info

Publication number
WO2022267949A1
WO2022267949A1 PCT/CN2022/098901 CN2022098901W WO2022267949A1 WO 2022267949 A1 WO2022267949 A1 WO 2022267949A1 CN 2022098901 W CN2022098901 W CN 2022098901W WO 2022267949 A1 WO2022267949 A1 WO 2022267949A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
dhcp
network
role
detection
Prior art date
Application number
PCT/CN2022/098901
Other languages
English (en)
French (fr)
Inventor
王志东
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2022267949A1 publication Critical patent/WO2022267949A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/042Network management architectures or arrangements comprising distributed management centres cooperatively managing the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/12Communication route or path selection, e.g. power-based or shortest path routing based on transmission quality or channel quality

Definitions

  • the present application relates to the field of distributed network technology, for example, to a method, device, device and storage medium for automatically determining a device role.
  • a multi-access point (Multi-Access Point, Multi-AP) network consists of a controller (Controller) and multiple agents (Agent).
  • Controller and Agent are defined in the following ways : The first is the factory pre-configuration, that is, the role of each device is directly defined at the factory; the second is the definition of the mobile application (Application, APP), which needs to be defined by the user through the auxiliary role of the mobile application; the third is on the device page. Manual selection, the role definition is completed by the user through the Web Graphical User Interface (WEB GUI).
  • WEB GUI Web Graphical User Interface
  • the first method requires the manufacturer to add additional processes during production to pre-define and identify different roles, which will increase production costs.
  • the two roles must be strictly distinguished before device installation, which may cause user network failure due to role confusion.
  • Both the second and third methods require the user to manually participate in judging the role of the device, which requires high professional knowledge of the user, resulting in poor user experience, and is likely to affect the availability of the entire network due to wrong role definitions.
  • This application proposes a method, device, device, and storage medium for automatically determining equipment roles, aiming to automatically complete equipment role determination and conversion without human intervention or additional procedures, improve wireless transmission efficiency, and reduce resource consumption .
  • This application provides a method for automatically determining a device role, which is applied to a multi-AP network device, and the method includes:
  • DHCP Dynamic Host Configuration Protocol
  • the present application provides an automatic role determination device, which includes:
  • the detection module is configured to send a DHCP request in the network; the judgment module is configured to determine the role of the device according to the response result of the request; wherein, the DHCP request carries an extended field Option field, and the response result includes whether the DHCP message is received or not received. DHCP message.
  • the present application provides a network device, which includes a memory, a processor, and a computer program stored in the memory.
  • a network device which includes a memory, a processor, and a computer program stored in the memory.
  • the present application provides a readable and writable storage medium, which is used for computer storage.
  • the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to realize the above-mentioned method for automatically determining device roles .
  • FIG. 1 is a schematic diagram of a network topology of a Multi-AP device provided in an embodiment of the present application
  • FIG. 2 is a flowchart of a method for automatically determining a device role provided by an embodiment of the present application
  • Fig. 3 is a schematic structural diagram of an automatic role determination device provided by an embodiment of the present application.
  • Fig. 4 is a schematic structural diagram of another automatic role determination device provided by the embodiment of the present application.
  • Fig. 5 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • the embodiment of the present application can be applied to the networking process of multi-AP (Multi-AP) network equipment.
  • Multi-AP multi-AP
  • it can intelligently detect the network environment and dynamically switch
  • the Multi-AP function completes device roles and switching, reduces bandwidth occupation of wireless networks, improves wireless transmission efficiency, and reduces resource consumption.
  • Figure 1 is a schematic diagram of a network topology of a Multi-AP device provided in the embodiment of the present application, which can be connected to multiple terminals such as a printer (Printer), a mobile phone (Mobile), and a personal computer (Personal Computer, PC) devices for networking and interaction.
  • Printer printer
  • Mobile mobile phone
  • PC Personal Computer
  • Fig. 2 is a flow chart of a method for automatically determining a device role provided in an embodiment of the present application. The method may be applied to the Multi-AP device shown in Fig. 1. As shown in Fig. 2, the method may include:
  • the default Multi-AP device is automatic mode + compatibility mode, and the role of the device is not fixedly set.
  • the Multi-AP device can also support manual configuration mode and Multi-AP function, automatic mode, compatibility mode, manual configuration mode and Multi-AP function operate independently, and various interfaces can be reserved in the software to control Different mode switches, users can choose to set the corresponding mode according to actual needs.
  • the device sends a DHCP request in the connected network.
  • the DHCP protocol request can carry an extended field Option field (for example, it can be the Option224 field). Based on this extended field, it can be determined whether the receiving device is the same model as the current sending device. , so as to quickly complete the judgment of the device type without the need for a private protocol and without increasing network overhead.
  • the response result in the embodiment of the present application may include one of the following two situations: one is that a DHCP message is received, and the other is that a DHCP message is not received, and the Multi-AP device responds based on these two different messages. As a result, the device role of itself can be determined.
  • An embodiment of the present application provides a method for automatically determining a device role.
  • the method includes: sending a DHCP request in the network, and determining the device role according to the response result of the request; wherein, the DHCP request carries an Option field, and the response result includes receiving a DHCP request. message or no DHCP message was received. In this way, it is possible to automatically complete device role determination and conversion without human intervention or additional procedures, improve wireless transmission efficiency, and reduce resource consumption.
  • the working modes of the aforementioned devices accessing the network mainly include DHCP mode, Point-to-Point Protocol over Ethernet (PPPoE), or bridge mode. Since the device usually only supports any one of the bridge mode or the DHCP mode, and the access judgment method of the DHCP mode and the bridge mode is the same, the embodiment of the present application uses the DHCP mode as an example to describe the implementation process of the device accessing the network.
  • the device can send a DHCP request in a wired or wireless network. If the device receives a response message about the DHCP request, for example, a DHCP offer message, the Multi-AP device can use it through the upstream gateway. Connect to the Internet in DHCP mode.
  • a Multi-AP device can send DHCP requests, and can also receive DHCP requests sent by other Multi-AP devices.
  • the DHCP request containing the Option field will not be responded to. Only when the role of the device is determined, the DHCP request containing the Option field will be responded to, and the DHCP message will be replied, that is, the above-mentioned DHCP offer message.
  • the Multi-AP device may initiate a PPPoE request. If the Multi-AP device detects that it has completed all processes normally during the PPPoE discovery phase, it will judge itself as an access gateway and use PPPoE to access the network. If the PPPoE waiting time exceeds, the Multi-AP device judges that the uplink is abnormal, and can push link abnormality prompt information to the user through the human-computer interaction interface on the device, waiting for the user to check the network link.
  • a preset time for example, 30s
  • the implementation of the Multi-AP device determining its own device role according to the response result of the DHCP request may include:
  • the Multi-AP device When the Multi-AP device receives the DHCP message (that is, the above-mentioned DHCP offer message), the Multi-AP device can determine its own device role according to whether the Option field is carried in the DHCP message. If the Multi-AP device does not receive the DHCP message and judges itself as an access gateway when the PPPoE discovery phase is completed normally, then the Multi-AP device determines that it is a controller, that is, the Controller, and the Multi-AP device can drive the hardware Switch itself to Controller.
  • the Multi-AP device determines that it is a controller, that is, the Controller, and the Multi-AP device can drive the hardware Switch itself to Controller.
  • the implementation of the above-mentioned Multi-AP device determining its own device role according to whether the Option field is carried in the DHCP message may include: when the DHCP message carries the Option field, indicating that the connected device for communication is with the current If the Multi-AP device sending the request is of the same type as the device, the Multi-AP device determines itself to be an agent role, that is, Agent.
  • the Multi-AP device can send a detection message to detect the Controller in the network, and determine the role of the device according to the detection result of the detection message. For example, in the case of receiving the reply of the detection message, it can determine itself as the role of Agent, and switch itself as Agent by driving the hardware. In the case of not receiving the reply of the detection message, it can send a self-election message to the network, and determine its own role according to the response result of the self-election message.
  • the detection message and the self-election message in the embodiment of this application can be group broadcast type packets, that is, the device sends multicast type detection packets and multicast type self-election packets.
  • the Multi-AP device determines that it is an Agent, and switches itself to be an Agent by driving hardware. Conversely, if the Multi-AP device does not receive a reply about the self-election message, then the Multi-AP device determines that it is a controller, and switches itself to be a controller by driving hardware.
  • the foregoing method for judging that the Multi-AP device is an Agent role can be applied to wired network and wireless network scenarios at the same time. That is, there are several judgment methods as follows, one is to determine itself as the Agent role when the DHCP message carries the Option field; the other is to send a detection message when the DHCP message does not carry the Option field, and After receiving the reply about the detection message, determine yourself as the proxy role; there is another way to send the self-election message without receiving the reply of the detection message, and receive the reply about the self-election message, then determine yourself as the proxy role. Agent role. In both the wireless network scenario and the wired network scenario, the above three methods can be used to determine itself as an Agent role.
  • the Multi-AP device can initiate a PPPoE request.
  • PPPoE discovery phase it detects that it has completed all processes normally, and then judges itself as an access gateway. Then it can determine its own The role is Controller; if a DHCP message is received, and the DHCP message does not carry the Option field, it can send a detection message to detect the Controller. If no reply to the detection message is received, it can send a self-election message. If it receives a reply about the self-election message, it determines itself as the Controller.
  • the compatibility mode of the Multi-AP device In the wireless network scenario, set the compatibility mode of the Multi-AP device to off. Under this premise, if the DHCP packet received by the Multi-AP device does not carry the Option field, it can send a detection packet to detect the Controller. After receiving a reply about the detection message, you can send a self-election message. If you do not receive a reply about the self-election message, you will determine that you are a Controller. That is, in a wireless network scenario, you need to turn off the compatibility mode before you can pass the message detection judgment. Whether the device is a Controller.
  • the compatibility mode when the compatibility mode is turned on, it is also possible to determine that the device is an Agent role through message detection, that is, when the compatibility mode is turned off or turned on, the above-mentioned Agent role can be used to Judgment method Determines that the device is an Agent role.
  • the device can send an alarm or prompt message to remind technicians Carry out maintenance.
  • the embodiment of the present application also provides an implementation manner in which the above-mentioned Multi-AP device can determine whether to disable the Multi-AP function according to the received DHCP message.
  • the compatibility mode of the Multi-AP device is enabled by default. If the DHCP message received by the Multi-AP device does not carry the Option field, the Multi-AP device can send a detection message, and if it does not receive a response to the detection message, the Multi-AP device can send a self-election message. If no reply about the self-election message is received, it is determined to close the Multi-AP function and enter the wireless extension function, that is, only when the above conditions are satisfied, it is determined to close the Multi-AP function. During packet detection, if a DHCP packet carrying an Option field is received, or a response to a detection packet or a self-election packet is received, the Multi-AP function will not be disabled.
  • the Multi-AP device when the Multi-AP device is networking with a device that does not support the Multi-AP function, it can automatically turn off the Multi-AP function and enter the wireless extension mode to realize networking with devices that do not support the Multi-AP function in the network, ensuring that the Net success rate.
  • the above process of determining the role of the device in response to the reply of the network message and the process of determining whether to disable the Multi-AP function can be performed simultaneously.
  • the above-mentioned Multi-AP device may also store a role determination result, so that the previously determined device role can continue to be used after the device is restarted.
  • Fig. 3 is a schematic structural diagram of a device for automatically determining roles provided by an embodiment of the present application.
  • the device may include: a detection module 301 and a judgment module 302; wherein the detection module 301 is configured to send DHCP request; the judging module 302 is configured to determine the device role according to the response result of the request; wherein, the DHCP request carries an extended field Option field, and the response result includes receiving a DHCP message or not receiving a DHCP message.
  • the judging module 302 determines the device role according to whether the DHCP message carries an Option field; or, when the detecting module 301 does not receive a DHCP In the case of a message, if the above-mentioned device completes the PPPoE link discovery phase, the judging module 302 judges that the above-mentioned device is an access gateway, and determines that the device is a controller role.
  • the judging module 302 determines that the above-mentioned device is an agent role; or, when the DHCP message does not carry the Option field, the detection module 301 sends a detection message in the network, and the judging module 302 determines according to The detection result of the detection message determines the role of the above-mentioned device.
  • the judging module 302 determines that the above-mentioned device is an agent role; or, in the case that the detection module 301 does not receive the reply of the detection message, the detection module 301 The self-election message is sent, and the judging module 302 determines the role of the device according to the response result of the self-election message.
  • the judgment module 302 determines that the above-mentioned device is an agent role; or, when the detection module 301 does not receive a reply from the election message, the judgment module 302 determines that the above-mentioned The device is in the controller role.
  • the detecting module 301 when the compatibility mode is turned off, the detecting module 301 sends a DHCP request in the network; when the DHCP message carries an Option field, the judging module 302 determines that the above-mentioned device is a proxy role or, in the case that the DHCP message does not carry the Option field, the detection module 301 sends a detection message in the network, and the judging module 302 determines the role of the device according to the detection result of the detection message.
  • the judging module 302 determines that the above-mentioned device is an agent role; or, in the case that the detection module 301 does not receive the reply of the detection message, the detection module 301 The self-election message is sent, and the judging module 302 determines the role of the device according to the response result of the self-election message.
  • the judgment module 302 determines that the above-mentioned device is an agent role; or, when the detection module 301 does not receive a reply from the election message, the judgment module 302 determines that the above-mentioned The device is in the controller role.
  • the detecting module 301 sends a DHCP request in the network, and the judging module 302 determines whether to close the multi-AP network according to the DHCP message received by the detecting module 301 function; for example, under the situation that DHCP message carries Option field, judging module 302 determines not to close multi-AP network function; The detection result of the message determines whether the above device disables the multi-AP network function.
  • the judging module 302 determines not to close the multi-AP network function; If the detection module 301 does not receive a reply about the self-election message, the judging module 302 determines to disable the multi-AP network function. If the detecting module 301 receives a reply about the self-election message, the judging module 302 determines not to close the multi-AP network function.
  • the apparatus for automatically determining a role provided in this embodiment is used to implement the method for automatically determining a device role in the embodiment shown in FIG. 2 , and its implementation principle and technical effect are similar, and will not be repeated here.
  • the above apparatus may further include an execution module 303 ; the execution module 303 is configured to drive the device to perform relevant role switching according to the determination result of the determination module 302 .
  • the execution module 303 switches the device to a controller mode.
  • the executing module 303 switches the device to an agent mode.
  • the execution module 303 disables the device's multi-AP network function.
  • Fig. 5 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • the device includes a processor 501 and a memory 502; the number of processors 501 in the device may be one or more, and Take a processor 501 as an example; the processor 501 and the memory 502 in the device may be connected through a bus or in other ways. In FIG. 5 , the connection through a bus is taken as an example.
  • the memory 502 can be used to store software programs, computer-executable programs and modules, such as program instructions/modules corresponding to the method for automatically determining device roles in the embodiment of FIG. detection module 301 and judgment module 302 in the device).
  • the processor 501 implements the above-mentioned method for automatically determining a device role by running software programs, instructions and modules stored in the memory 502 .
  • the memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required by a function; the data storage area may store data created according to the use of the set-top box, and the like.
  • the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices.
  • the processor in the above-mentioned device may also implement the above-mentioned method for automatically determining a device role through its internal logic circuits, gate circuits and other hardware circuits.
  • the embodiment of the present application also provides a readable and writable storage medium, configured as computer storage, the storage medium stores one or more programs, and one or more programs can be executed by one or more processors to perform the above implementation A method for automatic determination of device roles in the example.
  • the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of multiple The physical components cooperate to perform.
  • Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit.
  • a processor such as a central processing unit, digital signal processor or microprocessor
  • Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
  • computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media.
  • Computer storage media include but not limited to Random Access Memory (Random Access Memory, RAM), Read-Only Memory (Read-Only Memory, ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM) , flash memory or other memory technology, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), digital versatile disc (Digital Versatile Disc, DVD) or other optical disc storage, magnetic cartridge, tape, magnetic disk storage or other magnetic storage device, or any other medium that can be configured to store desired information and can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本文公开一种设备角色自动确定方法、装置、设备和存储介质。该设备角色自动确定方法包括:在网络中发送DHCP请求,根据请求的回应结果确定设备角色;其中,DHCP请求中携带有Option字段,回应结果包括接收到DHCP报文或未接收到DHCP报文。

Description

设备角色自动确定方法、装置、设备和存储介质 技术领域
本申请涉及分布式网络技术领域,例如涉及一种设备角色自动确定方法、装置、设备和存储介质。
背景技术
一个多接入点(Multi-Access Point,Multi-AP)网络由一个控制器(Controller)和多个代理(Agent)组成,在当前的组网过程中Controller和Agent角色的定义有如下几种方式:第一种是出厂预配置,即出厂直接定义每台设备的角色;第二种是手机应用(Application,APP)定义,需要由用户通过手机应用辅助角色定义;第三种是在设备页面进行手工选择,由用户通过网页图形用户界面(Web Graphical User Interface,WEB GUI)完成角色定义。
在上述定义角色的方法中,第一种方法需要厂家在生产时增加额外工序,预先定义和标识不同的角色,这样会增加生产成本。并且,设备安装前要严格区分两种角色,容易因角色混淆造成用户组网失败。第二种和第三种方法均需要用户人工参与判断设备的角色,对用户专业知识有较高要求,导致用户体验不佳,并且也容易造成因角色定义错误而影响整个网络的可用性。
发明内容
本申请提出一种设备角色自动确定方法、装置、设备和存储介质,旨在在无需人为干预,不需要额外增加工序的情况下,自动完成设备角色判定和转换,提高无线传输效率,减少资源消耗。
本申请提供了一种设备角色自动确定方法,应用于多AP网络设备,该方法包括:
在网络中发送动态主机配置协议(Dynamic Host Configuration Protocol,DHCP)请求;根据请求的回应结果确定设备角色;其中,DHCP请求中携带有扩展字段Option字段,回应结果包括接收到DHCP报文或未接收到DHCP报文。
本申请提供了一种角色自动确定装置,该装置包括:
探测模块,设置为在网络中发送DHCP请求;判断模块,设置为根据请求的回应结果确定装置角色;其中,DHCP请求中携带有扩展字段Option字段,回应结果包括接收到DHCP报文或未接收到DHCP报文。
本申请提供了一种网络设备,该设备包括存储器、处理器及存储在存储器上的计算机程序,处理器执行存储器上存储的计算机程序时,实现上述的设备角色自动确定方法。
本申请提供了可读写存储介质,用于计算机存储,存储介质存储有一个或者多个程序,该一个或者多个程序可被一个或者多个处理器执行,以实现上述的设备角色自动确定方法。
附图说明
图1是本申请实施例提供的一种Multi-AP设备的网络拓扑示意图;
图2是本申请实施例提供的一种设备角色自动确定方法的流程图;
图3是本申请实施例提供的一种角色自动确定装置的结构示意图;
图4是本申请实施例提供的另一种角色自动确定装置的结构示意图;
图5是本申请实施例提供的一种网络设备的结构示意图。
具体实施方式
下文中将结合附图对本申请的实施例进行说明。
另外,在本申请实施例中,“示例性地”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”等词旨在以具体方式呈现相关概念。
本申请实施例可以应用于多AP(Multi-AP)网络设备组网过程中,在有线组网、无线组网,或者,有线/无线混合组网的场景下,能够智能探测网络环境,动态开关Multi-AP功能,完成设备角色和转换,减少无线网络的带宽占用,提高无线传输效率,减少资源消耗。如图1所示,图1是本申请实施例提供的一种Multi-AP设备的网络拓扑示意图,其可以与打印机(Printer)、手机(Mobile)、个人电脑(Personal Computer,PC)端等多个设备进行联网、交互。
图2是本申请实施例提供的一种设备角色自动确定方法的流程图,该方法可以应用于如图1所示的Multi-AP设备中,如图2所示,该方法可以包括:
S201、在网络中发送DHCP协议请求。
本申请实施例中,默认Multi-AP设备为自动模式+兼容模式,并不固定设置该设备的角色。在一实施方式中,该Multi-AP设备也可以支持手工配置模式和Multi-AP功能,自动模式、兼容模式、手工配置模式和Multi-AP功能独立运行, 软件中可以预留多种接口来控制不同模式开关,用户可以根据实际需求自行选择设定相应的模式。
设备在接入的网络中发送DHCP请求,该DHCP协议请求中可以携带有扩展字段Option字段(例如,可以为Option224字段),基于该扩展字段可以判断接收设备是否是与当前发送设备相同型号的设备,从而在不需要私有协议和不增加网络开销的情况下快速完成对设备类型的判断。
S202、根据请求的回应结果确定设备角色。
本申请实施例中的回应结果可以包括以下两种情况之一:一种是接收到DHCP报文,另一种是未接收到DHCP报文,Multi-AP设备基于这两种不同的报文回应结果可以确定自身的设备角色。
本申请实施例提供了一种设备角色自动确定方法,该方法包括:在网络中发送DHCP请求,根据请求的回应结果确定设备角色;其中,DHCP请求中携带有Option字段,回应结果包括接收到DHCP报文或未接收到DHCP报文。通过这种方式能够在无需人为干预,不需要额外增加工序的情况下,自动完成设备角色判定和转换,提高无线传输效率,减少资源消耗。
上述设备接入网络的工作模式主要包括DHCP模式、以太网上的点对点协议(Point-to-Point Protocol over Ethernet,PPPoE),或者桥模式。由于设备通常仅支持桥模式或DHCP模式中的任意一种,且DHCP模式与桥模式的接入判断方式相同,因此,本申请实施例以DHCP模式为例,描述设备接入网络的实现流程。示例性地,设备可以在以有线或无线方式接入的网络中发送DHCP请求,若设备接收到关于DHCP请求的回应报文,例如,DHCP offer报文,则Multi-AP设备可以通过上游网关使用DHCP方式连接Internet网络。如图1所示,当前网络环境中可以存在多个Multi-AP设备,即Multi-AP设备可以发送DHCP请求,也可以接收其他Multi-AP设备发送的DHCP请求,在Multi-AP设备不确定自身角色的情况下,接收到包含Option字段的DHCP请求不予响应,只有在确定自身设备角色的情况下,才响应包含Option字段的DHCP请求,回复DHCP报文,即上述DHCP offer报文。
若预设时间(例如,30s)之后,Multi-AP设备未接收到针对DHCP请求回应的DHCP报文,则可以发起PPPoE请求。若Multi-AP设备在PPPoE发现阶段检测自己正常完成所有流程,则判断自身为接入网关,使用PPPoE方式接入网络。若PPPoE等待时间超时,则Multi-AP设备判断上行链路异常,可以通过设备上的人机交互界面向用户推送链路异常提示信息,等待用户检查网络链路。
在一种示例中,上述S201中,Multi-AP设备根据DHCP请求的回应结果确 定自身设备角色的实现方式可以包括:
在Multi-AP设备接收到DHCP报文(也即上述DHCP offer报文)的情况下,Multi-AP设备可以根据DHCP报文中是否携带有Option字段确定自身的设备角色。若Multi-AP设备在未接收到DHCP报文,并在PPPoE发现阶段正常完成时判断自身为接入网关,那么Multi-AP设备确定自身为控制器,即Controller,则Multi-AP设备可以驱动硬件将自身切换为Controller。
示例性地,上述Multi-AP设备根据DHCP报文中是否携带有Option字段确定自身的设备角色的实现方式可以包括:在DHCP报文携带有Option字段的情况下,表示通信的对接设备是与当前发送请求的Multi-AP设备相同类型的设备,则Multi-AP设备确定自身为代理角色,即Agent。
若DHCP报文未携带有Option字段,那么Multi-AP设备可以在网络中发送探测报文探测Controller,并根据探测报文的探测结果确定设备角色。例如,在接收到探测报文的回复的情况下,可以确定自身为Agent角色,通过驱动硬件将自身切换确定为Agent。在未接收到探测报文的回复的情况下,可以向网络中发送自选举报文,并根据自选举报文的回应结果确定自身角色,本申请实施例中的探测报文和自选举报文可以为组播类型的报文,即设备发送组播类型的探测报文和组播类型的自选举报文。
示例性地,若Multi-AP设备接收到关于自选举报文的回复,那么Multi-AP设备确定自身为Agent,并通过驱动硬件将自身切换为Agent。反之,若Multi-AP设备未接收到关于自选举报文的回复,那么Multi-AP设备确定自身为控制器,通过驱动硬件将自身切换为控制器。
上述对Multi-AP设备为Agent角色的判断方式可以同时应用于有线网络和无线网络场景下。即有如下几种判断方式,一种是在DHCP报文携带Option字段的情况下,确定自身为Agent角色;另一种是在DHCP报文未携带Option字段的情况下,发送探测报文,并接收到关于探测报文的回复,确定自身为代理角色;还有一种是在未接收到探测报文回复的情况下,发送自选举报文,并接收到关于自选举报文的回复,那么确定自身为Agent角色。在无线网络场景和有线网络场景下,均可以采用上述三种方式确定自身为Agent角色。
对于Multi-AP设备为Controller角色的判断方式可以在不同场景下采用不同的判断方式。例如,在有线网络场景下,若Multi-AP设备接收不到DHCP报文,则可以发起PPPoE请求,在PPPoE发现阶段检测自己正常完成所有流程,则判断自身为接入网关,那么可以确定自身的角色为Controller;若接收到DHCP报文,且该DHCP报文未携带Option字段,则可以发送探测报文探测Controller,若未收到关于探测报文的回复,可以发送自选举报文,若未收到关于自选举报 文的回复,则确定自身为Controller。
在无线网络场景下,设置Multi-AP设备的兼容模式关闭,在这一前提下,若Multi-AP设备接收到的DHCP报文未携带有Option字段,则可以发送探测报文探测Controller,若未收到关于探测报文的回复,可以发送自选举报文,若未收到关于自选举报文的回复,则确定自身为Controller,即在无线网络场景下,需要关闭兼容模式才可以通过报文探测判断设备是否为Controller。
在一实施方式中,在无线网络场景中,在兼容模式开启的情况下,还可以通过报文探测判断设备为Agent角色,即在兼容模式关闭和开启的情况下,均可以通过上述Agent角色的判断方式判断设备为Agent角色。
在无线网络场景下,进行设备角色判断时,若接收不到DHCP报文,说明网络通信链路存在故障,无法正常通信,这种情况下,设备可以发送报警或提示消息,提醒技术人员对设备进行检修。
另外,在家庭无线网络中,仍然存在大量不支持Multi-AP功能的设备,这些设备在无线网络扩展过程中,会由于支持Multi-AP功能的设备的干扰而造成组网失败,因此需要手动关闭Multi-AP功能来完成组网。
针对这一问题,示例性地,本申请实施例还提供了一种实现方式为,上述Multi-AP设备可以根据接收到的DHCP报文确定是否关闭Multi-AP功能。
例如,在无线网络场景下,默认Multi-AP设备的兼容模式开启。若Multi-AP设备接收到的DHCP报文中未携带Option字段,Multi-AP设备可以发送探测报文,在未接收到关于探测报文回复的情况下,Multi-AP设备可以发送自选举报文,若未接收到关于自选举报文的回复,则确定关闭Multi-AP功能,进入无线扩展功能,即只有在上述条件均满足的情况下,才确定关闭Multi-AP功能。在报文探测过程中,若接收到DHCP报文携带有Option字段,或者,接收到关于探测报文或自选举报文的回复的情况下,均不关闭Multi-AP功能。
这样在Multi-AP设备与不支持Multi-AP功能设备进行组网时,可以自动关闭Multi-AP功能,进入无线扩展模式,实现与网络中不支持Multi-AP功能的设备进行组网,保证组网成功率。
上述针对网络报文的回复确定设备角色的过程与确定是否关闭Multi-AP功能的过程可以同时执行。
在一种示例中,上述Multi-AP设备还可以存储角色判断结果,以在设备重启后能够继续使用之前判定的设备角色。
图3是本申请实施例提供的一种角色自动确定装置的结构示意图,如图3所示,该装置可以包括:探测模块301、判断模块302;其中,探测模块301, 设置为在网络中发送DHCP请求;判断模块302,设置为根据请求的回应结果确定装置角色;其中,DHCP请求中携带有扩展字段Option字段,回应结果包括接收到DHCP报文或未接收到DHCP报文。
在一种示例中,在有线网络场景下,在探测模块301接收到DHCP报文的情况下,判断模块302根据DHCP报文是否携带Option字段确定装置角色;或者,在探测模块301未接收到DHCP报文的情况下,若上述装置完成PPPoE链路发现阶段,则判断模块302判断上述装置为接入网关,确定装置为控制器角色。
在DHCP报文携带Option字段的情况下,判断模块302确定上述装置为代理角色;或者,在DHCP报文未携带Option字段的情况下,探测模块301在网络中发送探测报文,判断模块302根据探测报文的探测结果确定上述装置的角色。
示例性地,在探测模块301接收到探测报文的回复的情况下,判断模块302确定上述装置为代理角色;或者,在探测模块301未接收到探测报文的回复的情况下,探测模块301发送自选举报文,判断模块302根据自选举报文的回应结果确定上述装置的角色。
例如,在探测模块301接收到自选举报文的回复的情况下,判断模块302确定上述装置为代理角色;或者,在探测模块301未接收到自选举报文的回复的情况下,判断模块302确定上述装置为控制器角色。
在一种示例中,在无线网络场景下,在兼容模式关闭的情况下,探测模块301在网络中发送DHCP请求;在DHCP报文携带Option字段的情况下,判断模块302确定上述装置为代理角色;或者,在DHCP报文未携带Option字段的情况下,探测模块301在网络中发送探测报文,判断模块302根据探测报文的探测结果确定上述装置的角色。
示例性地,在探测模块301接收到探测报文的回复的情况下,判断模块302确定上述装置为代理角色;或者,在探测模块301未接收到探测报文的回复的情况下,探测模块301发送自选举报文,判断模块302根据自选举报文的回应结果确定上述装置的角色。
例如,在探测模块301接收到自选举报文的回复的情况下,判断模块302确定上述装置为代理角色;或者,在探测模块301未接收到自选举报文的回复的情况下,判断模块302确定上述装置为控制器角色。
在一种示例中,在Multi-AP设备的兼容模式开启的无线网络场景下,探测模块301在网络中发送DHCP请求,判断模块302根据探测模块301接收到的 DHCP报文确定是否关闭多AP网络功能;例如,在DHCP报文携带Option字段的情况下,判断模块302确定不关闭多AP网络功能;在DHCP报文携带Option字段的情况下,探测模块301发送探测报文,判断模块302根据探测报文的探测结果确定上述装置是否关闭多AP网络功能。
在探测模块301接收到关于探测报文的回复的情况下,判断模块302确定不关闭多AP网络功能;在探测模块301未接收到关于探测报文的回复的情况下,探测模块302发送自选举报文,若探测模块301未接收到关于自选举报文的回复,判断模块302确定关闭多AP网络功能。若探测模块301接收到关于自选举报文的回复,判断模块302确定不关闭多AP网络功能。
本实施例提供的角色自动确定装置用于实现图2所示实施例的设备角色自动确定方法,其实现原理和技术效果类似,此处不再赘述。
如图4所示,上述装置还可以包括执行模块303;执行模块303,设置为根据判断模块302的判断结果驱动设备执行相关角色切换。
例如,在判断模块302确定上述装置为控制器(Controller)后,执行模块303将装置切换为控制器模式。
或者,在判断模块302确定上述装置为代理(Agent)后,执行模块303将装置切换为代理模式。
或者,在判断模块302确定上述装置关闭多AP网络功能后,执行模块303将装置多AP网络功能关闭。
图5是本申请实施例提供的一种网络设备的结构示意图,如图5所示,该设备包括处理器501和存储器502;设备中处理器501的数量可以是一个或多个,图5中以一个处理器501为例;设备中的处理器501和存储器502可以通过总线或其他方式连接,图5中以通过总线连接为例。
存储器502作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本申请图2实施例中的设备角色自动确定方法对应的程序指令/模块(例如,角色自动确定装置中的探测模块301、判断模块302)。处理器501通过运行存储在存储器502中的软件程序、指令以及模块实现上述的设备角色自动确定方法。
存储器502可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据机顶盒的使用所创建的数据等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。
在一种示例中,在可能的情况下,上述设备中的处理器也可以通过其内部的逻辑电路、门电路等硬件电路实现上述的设备角色自动确定方法。
本申请实施例还提供了一种可读写存储介质,设置为计算机存储,该存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以执行上述实施例中的一种设备角色自动确定方法。
上文中所公开方法中的全部或一些步骤、设备中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。
在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由多个物理组件合作执行。一些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于随机存取存储器(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、带电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、闪存或其他存储器技术、光盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Versatile Disc,DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以设置为存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。

Claims (13)

  1. 一种设备角色自动确定方法,应用于多接入点AP网络设备,包括:
    在网络中发送动态主机配置协议DHCP请求;
    根据所述请求的回应结果确定设备角色;
    其中,所述DHCP请求中携带有扩展字段Option字段,所述回应结果包括接收到DHCP报文或未接收到DHCP报文。
  2. 根据权利要求1所述的方法,其中,在有线网络场景下,所述根据所述请求的回应结果确定设备角色,包括:
    在接收到DHCP报文的情况下,根据所述DHCP报文是否携带Option字段确定设备角色;
    在未接收到DHCP报文,且所述设备接入网络时判断自身为接入网关的情况下,确定自身为控制器。
  3. 根据权利要求2所述的方法,其中,所述根据所述DHCP报文是否携带扩展字段Option字段确定设备角色,包括:
    在所述DHCP报文携带Option字段的情况下,确定自身为代理角色;
    在所述DHCP报文未携带Option字段的情况下,在网络中发送探测报文,并根据所述探测报文的探测结果确定设备角色。
  4. 根据权利要求1所述的方法,其中,在无线网络场景下,所述在网络中发送DHCP请求,包括:
    在兼容模式关闭的情况下,在网络中发送DHCP请求;
    所述根据所述请求的回应结果确定设备角色,包括:
    在接收到DHCP报文且所述DHCP报文携带Option字段的情况下,确定自身为代理角色;
    在接收到DHCP报文且所述DHCP报文未携带Option字段的情况下,在网络中发送探测报文,并根据所述探测报文的探测结果确定设备角色。
  5. 根据权利要求3或4所述的方法,其中,所述根据所述探测报文的探测结果确定设备角色,包括:
    在接收到所述探测报文的回复的情况下,确定自身为代理角色;
    在未接收到所述探测报文的回复的情况下,发送自选举报文,并根据所述自选举报文的回应结果确定设备角色。
  6. 根据权利要求5所述的方法,其中,所述根据所述自选举报文的回应结 果确定设备角色,包括:
    在接收到所述自选举报文的回复的情况下,确定自身为代理角色;
    在未接收到所述自选举报文的回复的情况下,确定自身为控制器。
  7. 根据权利要求1所述的方法,其中,在无线网络场景下,所述在网络中发送DHCP请求,包括:
    在兼容模式开启的情况下,在网络中发送DHCP请求;
    所述方法还包括:
    根据接收到的DHCP报文确定是否关闭多AP网络功能。
  8. 根据权利要求7所述的方法,其中,所述根据接收到的DHCP报文确定是否关闭多AP网络功能,包括:
    在所述DHCP报文携带Option字段的情况下,确定不关闭多AP网络功能;
    在所述DHCP报文未携带Option字段的情况下,发送探测报文,并根据探测报文的探测结果确定是否关闭多AP网络功能。
  9. 根据权利要求8所述的方法,其中,所述根据探测报文的探测结果确定是否关闭多AP网络功能,包括:
    在接收到关于所述探测报文的回复的情况下,确定不关闭多AP网络功能;
    在未接收到关于所述探测报文的回复的情况下,发送自选举报文,根据所述自选举报的回应结果确定是否关闭多AP网络功能。
  10. 根据权利要求9所述的方法,其中,所述根据所述自选举报文的回应结果确定是否关闭多AP网络功能,包括:
    在接收到关于所述自选举报文的回复的情况下,确定不关闭多AP网络功能;
    在未接收到关于所述自选举报文的回复的情况下,确定关闭多AP网络功能。
  11. 一种角色自动确定装置,包括:
    探测模块,设置为在网络中发送动态主机配置协议DHCP请求;
    判断模块,设置为根据所述请求的回应结果确定装置角色;
    其中,所述DHCP请求中携带有扩展字段Option字段,所述回应结果包括接收到DHCP报文或未接收到DHCP报文。
  12. 一种网络设备,包括:存储器、处理器及存储在所述存储器上的计算机程序,所述处理器执行所述存储器上存储的计算机程序时,实现如权利要求 1-10任一项所述的设备角色自动确定方法。
  13. 一种可读写存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-10任一项所述的设备角色自动确定方法。
PCT/CN2022/098901 2021-06-25 2022-06-15 设备角色自动确定方法、装置、设备和存储介质 WO2022267949A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110711350.9A CN115529233A (zh) 2021-06-25 2021-06-25 设备角色自动确定方法、装置、设备和存储介质
CN202110711350.9 2021-06-25

Publications (1)

Publication Number Publication Date
WO2022267949A1 true WO2022267949A1 (zh) 2022-12-29

Family

ID=84544916

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/098901 WO2022267949A1 (zh) 2021-06-25 2022-06-15 设备角色自动确定方法、装置、设备和存储介质

Country Status (2)

Country Link
CN (1) CN115529233A (zh)
WO (1) WO2022267949A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878083A (zh) * 2017-02-28 2017-06-20 新华三技术有限公司 一种节点选举方法及装置
US20190334858A1 (en) * 2018-04-30 2019-10-31 Microsoft Technology Licensing, Llc On-node dhcp implementation for virtual machines
US20210068032A1 (en) * 2019-08-29 2021-03-04 Sagemcom Broadband Sas Method for configuring a wireless communication coverage extension system and a wireless communication coverage extension system implementing said method
CN112543466A (zh) * 2019-09-23 2021-03-23 中兴通讯股份有限公司 一种角色自选举的方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878083A (zh) * 2017-02-28 2017-06-20 新华三技术有限公司 一种节点选举方法及装置
US20190334858A1 (en) * 2018-04-30 2019-10-31 Microsoft Technology Licensing, Llc On-node dhcp implementation for virtual machines
US20210068032A1 (en) * 2019-08-29 2021-03-04 Sagemcom Broadband Sas Method for configuring a wireless communication coverage extension system and a wireless communication coverage extension system implementing said method
CN112543466A (zh) * 2019-09-23 2021-03-23 中兴通讯股份有限公司 一种角色自选举的方法及装置

Also Published As

Publication number Publication date
CN115529233A (zh) 2022-12-27

Similar Documents

Publication Publication Date Title
US10917262B2 (en) VXLAN packet forwarding method, device, and system
RU2370916C1 (ru) Посредник в локальной сети для удаленно подключенного мобильного устройства, работающего в режиме пониженного энергопотребления
JP5331163B2 (ja) Ipアドレス割り当てシステム、dhcpサーバ及びipアドレス割り当て方法
US9401874B2 (en) Minimizing coverage holes in a communication network
WO2021043086A1 (zh) 一种sbfd会话的建立方法、设备及系统
WO2014056135A1 (zh) 端口设置方法、路由设备及电脑程序产品
EP4027593B1 (en) Tunnel configuration method, system, device and storage medium
WO2012163007A1 (zh) 解决网际协议地址分配冲突的方法及相关设备和系统
US20140050092A1 (en) Load sharing method and apparatus
JP7389091B2 (ja) トラフィックフォワーディングを制御するための方法、装置及びシステム
WO2014183726A1 (zh) 一种实现网络管理的方法、网元设备及系统
US20220361103A1 (en) Data sending and receiving method and apparatus and storage medium
US9820310B2 (en) Network connection method and system
CN106453011B (zh) 智能家居设备的网络连接方法及智能家居网关
WO2016086544A1 (zh) 网络设备的网口配置方法、装置及存储介质
EP2392187B1 (en) Service flow retention in a wireless communication system
WO2013104279A1 (zh) Trill网络中设置cvlan的方法和装置
CN112995027B (zh) 路由发布方法及vtep节点
US20210194999A1 (en) Packet sending method, network device, and computer storage medium
WO2022267949A1 (zh) 设备角色自动确定方法、装置、设备和存储介质
CN107528788B (zh) 实现网络设备之间自动堆叠的方法和装置
CN110830598B (zh) Bgp会话建立、发送接口地址和别名的方法及网络设备
CN113163344B (zh) 有线与无线混合组网的控制方法、装置、介质和电子设备
WO2021018150A1 (zh) 一种链路检测的方法和装置
CN105792385B (zh) 一种基于无线局域网的通信方法及装置

Legal Events

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

Ref document number: 22827444

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE