[go: up one dir, main page]

CN101621449B - Methods and device for terminal access and proxy update in mesh network - Google Patents

Methods and device for terminal access and proxy update in mesh network Download PDF

Info

Publication number
CN101621449B
CN101621449B CN 200810068229 CN200810068229A CN101621449B CN 101621449 B CN101621449 B CN 101621449B CN 200810068229 CN200810068229 CN 200810068229 CN 200810068229 A CN200810068229 A CN 200810068229A CN 101621449 B CN101621449 B CN 101621449B
Authority
CN
China
Prior art keywords
terminal
address
message
gateway
access point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN 200810068229
Other languages
Chinese (zh)
Other versions
CN101621449A (en
Inventor
周元
田永刚
张炜
莫良耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 200810068229 priority Critical patent/CN101621449B/en
Publication of CN101621449A publication Critical patent/CN101621449A/en
Application granted granted Critical
Publication of CN101621449B publication Critical patent/CN101621449B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明实施例涉及mesh网络通信领域,提供了mesh网络中终端接入方法和代理更新的方法,以及mesh网关、mesh接入点、地址转换设备和mesh网络系统。通过在mesh网络中为所有的终端配置一个全网统一的IP地址,使终端在接入、切换、代理更新过程中,MAP不需要重新为终端配置IP地址,节省了DHCP的流程,消除了因重新配置IP地址造成的切换时延增加的问题,降低了切换时延,提高了网络的服务性能。

The embodiment of the present invention relates to the mesh network communication field, and provides a terminal access method and an agent update method in the mesh network, as well as a mesh gateway, a mesh access point, an address translation device and a mesh network system. By configuring a unified IP address for all terminals in the mesh network, the MAP does not need to reconfigure the IP address for the terminal during the process of terminal access, handover, and agent update, which saves the DHCP process and eliminates the need for The problem of increased switching delay caused by reconfiguring the IP address reduces the switching delay and improves the service performance of the network.

Description

mesh网络中终端接入和代理更新的方法、装置Method and device for terminal access and agent update in mesh network

技术领域 technical field

本发明涉及mesh网络通信领域,尤其是一种mesh网络中终端接入方法和代理更新的方法,以及mesh网关、mesh接入点、地址转换设备和mesh网络系统。The invention relates to the field of mesh network communication, in particular to a terminal access method and an agent update method in the mesh network, as well as a mesh gateway, a mesh access point, an address translation device and a mesh network system.

背景技术 Background technique

无线网状网(WMN,wireless mesh network)是一种基于多跳路由、对等网络技术的新型网络结构,具有移动宽带的特性,同时它本身可以动态地不断扩展,自组网、自管理,自动修复、自我平衡。Wireless mesh network (WMN, wireless mesh network) is a new network structure based on multi-hop routing and peer-to-peer network technology. Self-healing, self-balancing.

在mesh(网状网)网络中,路由问题是一个重要的研究课题,当前使用的路由有基于IP(Internet Protocol,网际协议)层的路由,也有基于MAC(Media Access Control,媒体访问控制)层的路由。802.11是一个MAC、PHY层(物理层)的协议族,802.11s mesh网络工作组作为研究WiFi mesh的工作组,使用基于MAC层的路由协议,在mesh网络中,使用设备的MAC地址对终端进行标识,同时体现终端的位置信息。在mesh网络中,移动性是一个重要需求。移动性的目标是,MN(Mobile Node,移动节点)在移动的时候能够附着到新的AP(access point,接入点),并且正在进行的通信能够无缝的路由到新的AP。由于WiFi mesh网络是基于MAC层多跳路由的,终端在移动的过程中,由一个mesh网络的AP切换到另外一个AP的时候,MN的所在的IP子网可能发生变化,而现有技术中,随着MN的切换导致其所在的IP子网发生变化时,MN需要执行发生在MAC层以上的DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)交互过程,与mesh网络网关侧的DHCP server通信,重新为终端分配子网IP地址。In the mesh (mesh network) network, the routing problem is an important research topic. The currently used routing includes routing based on the IP (Internet Protocol, Internet Protocol) layer, and also based on the MAC (Media Access Control, media access control) layer. routing. 802.11 is a MAC and PHY layer (physical layer) protocol family. The 802.11s mesh network working group, as a working group for researching WiFi mesh, uses a routing protocol based on the MAC layer. The logo also reflects the location information of the terminal. In mesh networks, mobility is an important requirement. The goal of mobility is that the MN (Mobile Node, mobile node) can attach to a new AP (access point, access point) when moving, and the ongoing communication can be seamlessly routed to the new AP. Since the WiFi mesh network is based on multi-hop routing at the MAC layer, when the terminal is switched from one AP of the mesh network to another AP during the movement, the IP subnet where the MN is located may change, while in the prior art , when the IP subnet where the MN is located changes due to the handover of the MN, the MN needs to execute the DHCP (Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol) interaction process that occurs above the MAC layer, and communicate with the DHCP server on the gateway side of the mesh network , and re-allocate the subnet IP address for the terminal.

现有技术中,MN的所在的IP子网发生变化时,发生在MAC层以上的交互(例如DHCP过程)需要MN与mesh网络网关侧进行通信,进行相关的操作,而这个交互过程是基于多跳的,持续时间比较长,会导致切换时延较长,网络的性能较低。In the prior art, when the IP subnet where the MN is located changes, the interaction above the MAC layer (such as the DHCP process) requires the MN to communicate with the mesh network gateway side to perform related operations, and this interaction process is based on multiple If the jump lasts for a long time, it will lead to a long switching delay and low network performance.

发明内容 Contents of the invention

本发明实施例一方面提供了mesh网络中终端接入的方法和代理更新的方法,另一方面提供了mesh网关、mesh接入点、地址转换设备和mesh网络系统,能够使终端在IP子网发生变换的时候,不需要进行DHCP交互,不需要重新为终端分配IP地址,减少了接入和切换的时延,提高了网络的性能。Embodiments of the present invention provide a method for terminal access and an agent update method in a mesh network on the one hand, and provide a mesh gateway, a mesh access point, an address translation device, and a mesh network system on the other hand, enabling the terminal When a change occurs, there is no need for DHCP interaction, and no need to re-allocate IP addresses for terminals, which reduces access and handover delays and improves network performance.

本发明实施例提供的一种mesh网络中终端接入的方法,包括:A method for terminal access in a mesh network provided by an embodiment of the present invention includes:

mesh接入点建立与接入终端的关联;The mesh access point establishes an association with the access terminal;

mesh接入点接收所述终端发送的第一消息,其中,所述第一消息中包括终端地址和终端的端口号;The mesh access point receives the first message sent by the terminal, where the first message includes a terminal address and a port number of the terminal;

mesh接入点向所述终端发送第二消息,其中,所述第二消息中包括全网统一的IP地址,用于终端利用所述全网统一的IP地址与外部网络进行通信。The mesh access point sends a second message to the terminal, where the second message includes a network-wide unified IP address, for the terminal to use the network-wide unified IP address to communicate with an external network.

本发明实施例提供的一种mesh网络代理更新的方法,网络中的终端被配置为全网统一的IP地址,包括:In the method for updating a mesh network agent provided by the embodiment of the present invention, the terminals in the network are configured with a unified IP address for the entire network, including:

目标mesh接入点接收第一消息,其中,所述第一消息包括终端地址和终端的端口号,所述目标mesh接入点为所述终端将切换到的mesh接入点;The target mesh access point receives a first message, wherein the first message includes a terminal address and a port number of the terminal, and the target mesh access point is a mesh access point to which the terminal will switch;

所述目标mesh接入点将所述第一消息中的终端地址和终端的端口号携带在代理更新消息中,向网关发送代理更新消息;其中,所述代理更新消息用于所述网关进行代理更新。The target mesh access point carries the terminal address and the port number of the terminal in the first message in a proxy update message, and sends a proxy update message to the gateway; wherein, the proxy update message is used for the gateway to perform proxy renew.

本发明实施例提供的一种mesh网关节点,包括:A mesh gateway node provided by an embodiment of the present invention includes:

接收模块,用于接收mesh接入点发送的代理更新消息;其中,所述代理更新消息包括终端的MAC地址和终端的端口号,所述终端被配置为全网统一的IP地址;The receiving module is configured to receive an agent update message sent by the mesh access point; wherein, the agent update message includes the MAC address of the terminal and the port number of the terminal, and the terminal is configured as a unified IP address throughout the network;

代理信息模块,用于根据所述接收模块接收的代理更新消息,保存终端和mesh接入点的对应关系为所述终端的代理信息;An agent information module, configured to save the corresponding relationship between the terminal and the mesh access point as the agent information of the terminal according to the agent update message received by the receiving module;

发送模块,用于在所述代理信息模块保存终端的代理信息后,发送代理更新成功消息给所述mesh接入点。A sending module, configured to send an agent update success message to the mesh access point after the agent information module saves the agent information of the terminal.

本发明实施例提供的一种mesh接入点,包括:A mesh access point provided by an embodiment of the present invention includes:

接收模块,用于接收第一消息,其中,所述第一消息包括终端的MAC地址和终端的端口号,所述终端被配置为全网统一的IP地址;A receiving module, configured to receive a first message, wherein the first message includes the MAC address of the terminal and the port number of the terminal, and the terminal is configured as a unified IP address throughout the network;

处理模块,用于根据所述接收模块接收的第一消息,构建代理更新消息,其中,所述代理更新消息包括终端的MAC地址和终端的端口号;A processing module, configured to construct a proxy update message according to the first message received by the receiving module, where the proxy update message includes the MAC address of the terminal and the port number of the terminal;

发送模块,用于向网关发送所述处理模块构建的代理更新消息;其中,所述代理更新消息用于所述网关进行代理更新。The sending module is configured to send the proxy update message constructed by the processing module to the gateway; wherein the proxy update message is used for the gateway to perform proxy update.

本发明实施例提供的一种地址转换设备,包括:An address translation device provided by an embodiment of the present invention includes:

接收模块,用于接收网关发送的地址注册消息;其中,所述地址注册消息包括,终端的MAC地址和终端的端口号,所述终端被配置为全网统一的IP地址;A receiving module, configured to receive an address registration message sent by the gateway; wherein the address registration message includes the MAC address of the terminal and the port number of the terminal, and the terminal is configured as a unified IP address for the entire network;

地址转换模块,用于根据所述接收模块接收的地址注册消息,分配一个网关端口号给所述终端,建立终端的MAC地址、终端的端口号与网关的IP地址、网关端口号的地址转换关系;The address translation module is used to allocate a gateway port number to the terminal according to the address registration message received by the receiving module, and establish an address translation relationship between the MAC address of the terminal, the port number of the terminal, the IP address of the gateway, and the gateway port number ;

发送模块,用于发送地址注册成功消息给所述网关。A sending module, configured to send an address registration success message to the gateway.

本发明实施例提供的一种mesh网络系统,网络中的终端被配置为全网统一的IP地址,包括:In a mesh network system provided by an embodiment of the present invention, terminals in the network are configured with a unified IP address for the entire network, including:

mesh接入点,用于接收第一消息,其中,所述第一消息包括终端的MAC地址和终端的端口号;根据所述接收的第一消息,构建代理更新消息,其中,所述代理更新消息包括终端的MAC地址和终端的端口号;向网关发送所述构建的代理更新消息;The mesh access point is configured to receive a first message, wherein the first message includes the MAC address of the terminal and the port number of the terminal; construct an agent update message according to the received first message, wherein the agent update The message includes the MAC address of the terminal and the port number of the terminal; sending the constructed proxy update message to the gateway;

网关,用于接收所述mesh接入点发送的代理更新消息,其中,所述代理更新消息包括终端的MAC地址和终端的端口号;根据所述接收的代理更新消息,保存终端和所述mesh接入点的对应关系为所述终端的代理信息;发送代理更新成功消息给所述mesh接入点。a gateway, configured to receive an agent update message sent by the mesh access point, wherein the agent update message includes the MAC address of the terminal and the port number of the terminal; according to the received agent update message, store the terminal and the mesh The corresponding relationship of the access point is the agent information of the terminal; sending an agent update success message to the mesh access point.

本发明提出一种在mesh网络中的IP地址分配和移动性管理方案,在mesh网络中的终端和mesh节点可以使用相同的IP地址接入外部网络。由于在mesh网络中为所有的终端配置一个全网统一的IP地址,终端在整个mesh网络中具有唯一且统一的IP地址,终端在mesh网络中移动或代理更新时,不存在由一个子网切换到另外一个子网的情况,MAP不需要重新为终端配置IP地址,节省了DHCP的流程,消除了因重新配置IP地址造成的切换时延增加的问题,降低了切换时延,提高了网络的服务性能。The invention proposes an IP address allocation and mobility management scheme in the mesh network, and the terminals and mesh nodes in the mesh network can use the same IP address to access the external network. Since a unified IP address is configured for all terminals in the mesh network, the terminal has a unique and unified IP address in the entire mesh network. When the terminal moves in the mesh network or the agent is updated, there is no switching from a subnet In the case of another subnet, MAP does not need to reconfigure the IP address for the terminal, which saves the DHCP process, eliminates the problem of increased switching delay caused by reconfiguring the IP address, reduces the switching delay, and improves network services. performance.

附图说明 Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1为本发明实施例一的终端初始接入方法流程图;FIG. 1 is a flow chart of a terminal initial access method according to Embodiment 1 of the present invention;

图2为本发明实施例二的终端快速切换方法流程图;FIG. 2 is a flow chart of a method for quickly switching terminals according to Embodiment 2 of the present invention;

图3为本发明实施例三的终端跨网关快速切换方法流程图;FIG. 3 is a flowchart of a method for quickly switching terminals across gateways according to Embodiment 3 of the present invention;

图4为本发明实施例四的终端普通切换方法流程图;FIG. 4 is a flow chart of a terminal common switching method according to Embodiment 4 of the present invention;

图5为本发明实施例五的终端跨网关普通切换方法流程图;FIG. 5 is a flow chart of a method for common switching between terminals across gateways according to Embodiment 5 of the present invention;

图6为本发明实施例六的mesh网络系统示意图;6 is a schematic diagram of a mesh network system according to Embodiment 6 of the present invention;

图7为本发明实施例六的MAP设备的结构图;FIG. 7 is a structural diagram of a MAP device according to Embodiment 6 of the present invention;

图8为本发明实施例六的网关设备的结构图;FIG. 8 is a structural diagram of a gateway device according to Embodiment 6 of the present invention;

图9为本发明实施例七的mesh网络系统示意图;FIG. 9 is a schematic diagram of a mesh network system according to Embodiment 7 of the present invention;

图10为本发明实施例七的MAP的结构图;FIG. 10 is a structural diagram of a MAP according to Embodiment 7 of the present invention;

图11为本发明实施例七的网关的结构图;FIG. 11 is a structural diagram of a gateway according to Embodiment 7 of the present invention;

图12为本发明实施例七的地址转换设备的结构图。FIG. 12 is a structural diagram of an address translation device according to Embodiment 7 of the present invention.

具体实施方式 Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

实施例一Embodiment one

如附图1所示,本发明实施例提供了一种mesh网络中终端初始接入的方法,该方法包括:As shown in Figure 1, the embodiment of the present invention provides a method for initial access of a terminal in a mesh network, the method comprising:

步骤101、终端(terminal)与MAP(mesh access point,mesh接入点)建立关联,建立终端与MAP之间的通信链路,完成接入认证;其中,该通信链路可以不涉及三层(IP层),仅仅是二层(MAC层)链路;Step 101, the terminal (terminal) establishes an association with a MAP (mesh access point, mesh access point), establishes a communication link between the terminal and the MAP, and completes access authentication; wherein, the communication link may not involve three layers ( IP layer), only the second layer (MAC layer) link;

建立关联可以采用如下两种方式中的任一种:(1)终端主动广播探询请求(probe request),网络中的各MAP收到探询请求后发送探询响应(proberesponse),在探询响应中可以包含,MAP的MAC地址、ESSID、SSPN、QoS能力、MAP后端的GW的IP地址等,终端根据探询响应中包含的信息进行网络选择,例如,根据信号强度、QoS能力匹配等选择一个MAP作为接入点;(2)终端被的接收网络发送的信标(beacon)帧;其中,在信标帧中可以包含,MAP的MAC地址、ESSID、SSPN、QoS能力、MAP后端的GW的IP地址等,之后,终端根据信标帧中包含的信息进行网络选择;The association can be established in any of the following two ways: (1) The terminal actively broadcasts a probe request (probe request), and each MAP in the network sends a probe response (prober response) after receiving the probe request, and the probe response can include , MAP’s MAC address, ESSID, SSPN, QoS capability, IP address of the GW behind the MAP, etc., the terminal selects a network according to the information contained in the inquiry response, for example, selects a MAP as an access point based on signal strength, QoS capability matching, etc. point; (2) the beacon (beacon) frame sent by the receiving network of the terminal; wherein, the beacon frame may include the MAC address of the MAP, ESSID, SSPN, QoS capability, the IP address of the GW at the MAP backend, etc., After that, the terminal performs network selection according to the information contained in the beacon frame;

步骤102、终端向建立连接的MAP发送DHCP发现(DHCP discover)消息,发起DHCP流程;该DHCP discover消息中包括<终端的MAC地址:终端port>,该终端port(端口)在终端与外部网络通信时使用,可以由终端自己确定,从终端自身的端口中随机确定一个;Step 102, the terminal sends a DHCP discovery (DHCP discover) message to the MAP where the connection is established, and initiates a DHCP process; the DHCP discover message includes <terminal MAC address: terminal port>, and the terminal port (port) communicates between the terminal and the external network When used, it can be determined by the terminal itself, and one is randomly determined from the ports of the terminal itself;

步骤103、MAP发送DHCP提供(DHCP offer)消息给终端,将mesh网络中的统一IP地址配置给终端;Step 103, MAP sends a DHCP offer (DHCP offer) message to the terminal, and the unified IP address in the mesh network is configured to the terminal;

MAP作为DHCP服务器(DHCP server),将全网统一IP地址携带在DHCP提供消息中发送给终端,并可以进一步设置这个IP地址的租用期为永久有效;该全网统一IP地址,可以为预先配置在MAP中;As a DHCP server (DHCP server), MAP carries the unified IP address of the whole network in the DHCP offer message and sends it to the terminal, and can further set the lease period of this IP address as permanent; the unified IP address of the whole network can be pre-configured in MAP;

步骤104、终端接收DHCP offer消息,根据其中的全网统一IP地址,设置自身的IP地址为该全网统一IP地址;Step 104, the terminal receives the DHCP offer message, and sets its own IP address as the unified IP address of the whole network according to the unified IP address of the whole network;

步骤105、MAP将DHCP offer消息返回给终端后,DHCP流程结束,MAP触发代理更新流程,MAP向归属网关(gateway,GW)发送代理更新消息,将终端的代理信息注册到终端的归属网关中;其中,归属网关是MAP为终端选择的一个网关,MAP记录该归属网关信息,同时向该归属网关上注册<终端的MAC地址:终端port>与MAP的MAC地址的对应关系,即代理信息;Step 105, after the MAP returns the DHCP offer message to the terminal, the DHCP process ends, the MAP triggers the agent update process, and the MAP sends an agent update message to the home gateway (gateway, GW), and registers the agent information of the terminal in the home gateway of the terminal; Wherein, the home gateway is a gateway selected by the MAP for the terminal, and the MAP records the home gateway information, and at the same time registers the corresponding relationship between <terminal MAC address: terminal port> and the MAC address of the MAP, that is, proxy information;

步骤106、终端的归属网关接收MAP发送的代理更新消息,在自身的代理信息表中更新终端的代理信息后,向AT(address translation,地址转换)设备发送地址注册消息;其中,AT设备是逻辑功能实体,可以是一个独立的物理实体,也可以位于网关或其他设备中,作为网关或其他设备的一个功能模块;Step 106, the home gateway of the terminal receives the agent update message sent by the MAP, and after updating the agent information of the terminal in its own agent information table, sends an address registration message to an AT (address translation, address translation) device; wherein, the AT device is a logical The functional entity can be an independent physical entity, or it can be located in a gateway or other equipment as a functional module of the gateway or other equipment;

步骤107、AT设备接收地址注册消息,分配一个网关Port给注册的终端,建立<终端的MAC地址:终端port>与<网关节点的IP地址:网关port>的对应关系,并将<终端的MAC地址:终端port>与<网关节点的IP地址:网关port>的对应关系加入转换关系表;其中,转换关系表用于记录<终端的MAC地址:终端port>与<网关节点的IP地址:网关port>的转换关系,并可以供各个设备进行查询;同时,由于终端是初次接入mesh网络,AT设备还可以为终端确定一个HA(home agent,归属代理),并将该HA的地址携带在注册成功消息中;Step 107, the AT device receives the address registration message, assigns a gateway Port to the registered terminal, establishes the corresponding relationship between <terminal MAC address: terminal port> and <gateway node IP address: gateway port>, and sets <terminal MAC address The corresponding relationship between address: terminal port> and <IP address of gateway node: gateway port> is added to the conversion relationship table; among them, the conversion relationship table is used to record <MAC address of terminal: terminal port> and <IP address of gateway node: gateway port> conversion relationship, and can be used for each device to query; at the same time, since the terminal is accessing the mesh network for the first time, the AT device can also determine a HA (home agent, home agent) for the terminal, and carry the address of the HA in the In the registration success message;

步骤108、AT设备发送注册成功消息(OK)给终端的归属网关,确认地址转换消息注册成功;该注册成功消息包括终端的归属代理HA的地址;Step 108, the AT device sends a registration success message (OK) to the home gateway of the terminal to confirm that the address translation message is registered successfully; the registration success message includes the address of the home agent HA of the terminal;

步骤109、归属网关发送代理更新成功消息(OK)给MAP;该代理更新成功消息包括终端的归属代理HA的地址,MAP作为终端初次接入的接入点可以进一步保存该终端的归属代理HA的地址;Step 109, the home gateway sends an agent update success message (OK) to the MAP; the agent update success message includes the address of the home agent HA of the terminal, and the MAP can further store the address of the home agent HA of the terminal as the access point for the initial access of the terminal. address;

步骤110、终端完成IP地址的配置以后,就可以正常通信了,之后的地址转换关系注册操作对终端来说是透明的。Step 110, after the terminal completes the configuration of the IP address, it can communicate normally, and the subsequent address conversion relationship registration operation is transparent to the terminal.

本实施例中,AT设备是逻辑功能实体,可能位于其它的设备中。例如,当AT设备位于归属网关中作为归属网关的一个模块,流程中地址注册消息、注册成功消息均为模块内的原语,不是实际的报文消息,并且此时AT设备与归属网关可以对外共用同一个MAC地址。在之后的各实施例中,参考本实施例的过程,本领域技术人员很容易想到当AT设备作为一个独立的实体,或者在网关或其他设备上作为一个模块时,各实施例的具体实现,所以,不论AT设备是否与归属网关在同一个物理实体上,均在本发明的保护范围之内。In this embodiment, the AT device is a logical functional entity, which may be located in other devices. For example, when the AT device is located in the home gateway as a module of the home gateway, the address registration message and registration success message in the process are primitives in the module, not actual message messages, and at this time the AT device and the home gateway can communicate with each other. share the same MAC address. In the following embodiments, referring to the process of this embodiment, those skilled in the art can easily think of the specific implementation of each embodiment when the AT device is used as an independent entity, or as a module on a gateway or other devices, Therefore, no matter whether the AT device is on the same physical entity as the home gateway or not, it is within the protection scope of the present invention.

本实施例中,终端在接入网络时,MAP将全网统一的IP地址携带在DHCP提供消息中配置给终端,之后终端以此IP地址与外部网络进行通信,并且由于配置的IP地址是全网统一的,所以终端在切换过程中也不再进行IP地址的重分配,从而消除了因重新配置IP地址造成的切换时延增加的问题,减小了切换时延,提高了网络的服务性能。In this embodiment, when the terminal accesses the network, the MAP carries the uniform IP address of the entire network in the DHCP offer message and configures it for the terminal, and then the terminal uses this IP address to communicate with the external network. The network is unified, so the terminal does not redistribute the IP address during the switching process, thereby eliminating the problem of increased switching delay caused by reconfiguring the IP address, reducing the switching delay, and improving the service performance of the network .

实施例二Embodiment two

如附图2所示,本发明实施例提供了一种mesh网络中终端快速切换的方法,本实施例中,终端从OMAP(old MAP,原MAP)向NMAP(new MAP,新MAP)切换,NMAP和OMAP都存在到终端的归属网关的路由,其中,归属网关是用来保存终端的代理信息的mesh节点,该快速切换的方法包括:As shown in Figure 2, the embodiment of the present invention provides a method for fast switching of terminals in a mesh network. In this embodiment, the terminal switches from OMAP (old MAP, former MAP) to NMAP (new MAP, new MAP). Both NMAP and OMAP have a route to the home gateway of the terminal, wherein the home gateway is a mesh node used to save the proxy information of the terminal, and the fast switching method includes:

步骤201、OMAP触发切换,发送扫描相邻网络的网络扫描请求(request)消息给终端;Step 201, OMAP triggers switching, and sends a network scanning request (request) message for scanning adjacent networks to the terminal;

其中,随着终端的移动,OMAP根据终端当前的状态信息和本地触发策略触发切换;Among them, as the terminal moves, OMAP triggers switching according to the current status information of the terminal and the local trigger strategy;

OMAP的本地触发策略可以包括:本设备由于需要维护、升级、断电等原因不能再为终端服务,本设备的能力不能满足终端发起的业务的需求,高优先级的用户接入MAP使得不能为低优先级的用户服务等;其它可能的触发条件有,其它mesh设备发送过来的需要终端切换的请求;The local trigger strategy of OMAP can include: the device can no longer serve the terminal due to reasons such as maintenance, upgrade, power failure, etc.; Low-priority user services, etc.; other possible trigger conditions include requests from other mesh devices that require terminal switching;

终端的状态信息可由终端定期向OMAP上报,上报的终端状态信息可以包括:流量(Throughput)(单位kbps)、包误码率(Packet error rate)、包传输时延(最小值、最大值、平均值,时延抖动)(Packet transfer delay(min,max,average,jitter))、丢包率(packet loss rate);The status information of the terminal can be regularly reported by the terminal to the OMAP, and the reported terminal status information can include: Throughput (unit kbps), packet error rate (Packet error rate), packet transmission delay (minimum value, maximum value, average value, delay jitter) (Packet transfer delay (min, max, average, jitter)), packet loss rate (packet loss rate);

步骤202、终端接到网络扫描请求后,向相邻网络中的各MAP发送探询请求(probe request)消息;Step 202, after receiving the network scanning request, the terminal sends a probe request (probe request) message to each MAP in the adjacent network;

步骤203、接收到终端发送的探询请求的MAP,向终端返回探询响应(probe response)消息;其中,探询响应消息中可以携带,本MAP的MAC地址、ESSID、SSPN、QoS能力、本MAP后端的存在路由的网关的IP地址等;Step 203, the MAP that receives the probe request sent by the terminal returns a probe response (probe response) message to the terminal; wherein, the probe response message can carry the MAC address, ESSID, SSPN, QoS capability, and the MAP backend of this MAP. The IP address of the gateway where the route exists, etc.;

步骤204、以返回探询响应消息的各MAP作为终端的候选MAP,终端将各候选MAP返回的探询响应消息中携带的各MAP的信息,通过网络扫描响应(response)消息上报给OMAP;Step 204, using each MAP returning the inquiry response message as a candidate MAP of the terminal, the terminal reports the information of each MAP carried in the inquiry response message returned by each candidate MAP to the OMAP through a network scan response (response) message;

步骤205、OMAP接收网络扫描响应,根据各候选MAP的MAC地址和各候选MAP后端的网关的IP地址,向任一候选MAP后端的可达的网关查询候选MAP的信息;其中,候选MAP与其后端的网关存在可达路由,一个候选MAP可以同时与多个网关之间可达,当这些可达的网关中存在终端的归属网关时,优先考虑向终端的归属网络查询候选MAP的信息,因为终端在初始接入mesh网络的时候,首先向其归属网关注册相应信息,向终端的归属网关查询候选MAP的信息能够使得后续在切换的时候,尽量切换到存在到终端的归属网关的路由的候选MAP,这样可以使终端的切换尽量不跨归属网关,由于跨归属网关切换需要更多的交互和更长的,所以优先考虑向终端的归属网络查询候选MAP的信息,能够从整体上减少切换时延;Step 205, OMAP receives the network scan response, according to the MAC address of each candidate MAP and the IP address of the gateway of each candidate MAP back end, query the information of the candidate MAP to the reachable gateway of any candidate MAP back end; Wherein, the candidate MAP and the subsequent There is a reachable route to the gateway at the end, and a candidate MAP can be reachable to multiple gateways at the same time. When there is a home gateway of the terminal among these reachable gateways, it is preferred to query the information of the candidate MAP from the home network of the terminal, because the terminal When initially accessing the mesh network, first register the corresponding information with its home gateway, and query the information of candidate MAPs from the terminal's home gateway, so that in the subsequent handover, try to switch to the candidate MAP that has a route to the terminal's home gateway , so that the handover of the terminal can be made as far as possible without crossing the home gateway. Since the handover across the home gateway requires more interaction and longer time, it is prioritized to query the information of candidate MAPs from the home network of the terminal, which can reduce the handover delay as a whole. ;

步骤206、各网关向OMAP发送查询响应,返回候选MAP的信息;其中,候选MAP的信息可以包括:MAP支持的切换类型、MAP支持的throughput、packet error rate、支持的QoS,安全等;Step 206, each gateway sends a query response to the OMAP, and returns the information of the candidate MAP; wherein, the information of the candidate MAP may include: the switching type supported by the MAP, the throughput supported by the MAP, the packet error rate, the supported QoS, security, etc.;

步骤207、OMAP根据查询到的候选MAP的信息进行网络选择,以选定的MAP为目标MAP,即NMAP;其中,网络选择时采用的策略可以是:在满足终端正常通信的情况下,优先选择存在到终端的归属网关的路由的候选MAP作为目标MAP;Step 207, OMAP performs network selection according to the information of the queried candidate MAP, and selects the selected MAP as the target MAP, that is, NMAP; wherein, the strategy adopted during network selection may be: in the case of meeting the normal communication of the terminal, preferentially select There is a candidate MAP for the route to the home gateway of the terminal as the target MAP;

步骤208、OMAP向终端发送申请资源查询消息,查询终端切换到新网络所要申请的资源;Step 208, OMAP sends an application resource query message to the terminal, querying the resources to be applied for by the terminal to switch to the new network;

步骤209、终端返回申请资源响应消息,报告自身切换到新网络所要申请的资源;Step 209, the terminal returns an application resource response message, reporting the resource it needs to apply for when switching to the new network;

步骤210、OMAP根据申请资源响应向NMAP发送快速切换请求,该切换请求中携带了终端所要申请的资源信息和<终端的MAC地址:port>,其中,该<终端的MAC地址:终端port>可以是在终端接入时OMAP保存的,具体可以参考实施例一中的步骤102;为了向NMAP通知终端的归属代理HA的地址,OMAP可以进一步在快速切换请求中携带终端的归属代理HA的地址;Step 210, OMAP sends a quick handover request to NMAP according to the resource application response, the handover request carries resource information to be applied by the terminal and <terminal MAC address: port>, where the <terminal MAC address: terminal port> can be It is stored by OMAP when the terminal accesses, for details, refer to step 102 in Embodiment 1; in order to notify NMAP of the address of the home agent HA of the terminal, OMAP can further carry the address of the home agent HA of the terminal in the fast handover request;

步骤211、NMAP收到快速切换请求后,根据快速切换请求中的终端所要申请的资源信息,进行资源预留;NMAP可以进一步获取该快速切换请求中携带的终端的归属代理HA的地址,保存该终端的归属代理HA的地址;Step 211: After receiving the fast handover request, NMAP performs resource reservation according to the resource information requested by the terminal in the fast handover request; NMAP can further obtain the address of the home agent HA of the terminal carried in the fast handover request, and save the The address of the home agent HA of the terminal;

步骤212、NMAP同时进行代理更新,向终端的归属网关发送代理更新请求消息;该代理更新请求中携带<终端的MAC地址:终端port>与NMAP地址的对应关系,或进一步包括终端的归属代理HA的地址;Step 212, NMAP performs agent update at the same time, and sends an agent update request message to the home gateway of the terminal; the agent update request carries the corresponding relationship between <terminal MAC address: terminal port> and the NMAP address, or further includes the terminal's home agent HA the address of;

步骤213、归属网关收到NMAP发送的代理更新请求消息后,更新保存的终端的代理信息,将终端的原代理信息(<终端的MAC地址:终端port>与OMAP地址的对应关系)替换为新代理信息(<终端的MAC地址:终端port>与NMAP地址的对应关系);Step 213, after the home gateway receives the proxy update request message sent by the NMAP, it updates the saved terminal proxy information, and replaces the terminal's original proxy information (correspondence between <terminal MAC address: terminal port> and the OMAP address) with the new Proxy information (correspondence between <terminal MAC address: terminal port> and NMAP address);

步骤214、归属网关代理更新完,向NMAP发送代理更新成功消息;Step 214, the home gateway agent is updated, and sends an agent update success message to NMAP;

步骤215、NMAP资源预留成功,并且收到归属网关发送的代理更新成功消息后,向OMAP返回快速切换响应;其中,资源预留(步骤211)和代理更新(步骤212~步骤214)的先后顺序不做具体限定,两者可以是同时进行的,或者任一操作先执行,之后再执行另一操作;Step 215, NMAP resource reservation is successful, and after receiving the proxy update success message sent by the home gateway, return a fast switching response to OMAP; wherein, the sequence of resource reservation (step 211) and proxy update (step 212~step 214) The order is not specifically limited, the two can be performed at the same time, or either operation is performed first, and then the other operation is performed;

步骤216、OMAP收到快速切换响应后,向终端发送切换开始消息;Step 216: After receiving the fast handover response, the OMAP sends a handover start message to the terminal;

步骤217、OMAP同时将发往终端的数据转发给NMAP,并可以在终端与NMAP建立关联后,进一步由NMAP发送给终端;Step 217, OMAP forwards the data sent to the terminal to NMAP at the same time, and can be further sent to the terminal by NMAP after the terminal is associated with NMAP;

步骤218、终端收到切换开始消息后,断开与OMAP的连接;Step 218, after the terminal receives the handover start message, it disconnects from the OMAP;

步骤219、终端同时与NMAP建立关联,建立终端与MAP之间的通信链路,完成认证;其中,该通信链路可以不涉及三层(IP层),仅仅是二层(MAC层)链路,用于传输之后终端与NMAP之间交互的消息;Step 219, the terminal establishes an association with NMAP at the same time, establishes a communication link between the terminal and the MAP, and completes the authentication; wherein, the communication link may not involve the third layer (IP layer), but only the second layer (MAC layer) link , used for messages interacting between the terminal and NMAP after transmission;

步骤220、终端通过建立的关联,发送切换完成请求给NMAP;Step 220, the terminal sends a handover completion request to NMAP through the established association;

步骤221、NMAP收到切换完成请求后,发送资源释放请求给OMAP;Step 221, after receiving the handover completion request, NMAP sends a resource release request to OMAP;

步骤222、当OMAP收到资源释放请求时,如果其转发队列中没有发往终端的分组,则释放终端在OMAP中占用的资源,停止数据转发,如果其转发队列还有发往终端的分组,则将这些分组发往NMAP后,释放终端在OMAP中占用的资源,停止数据转发;Step 222, when OMAP receives the resource release request, if there is no packet sent to the terminal in its forwarding queue, then release the resources occupied by the terminal in OMAP, stop data forwarding, if its forwarding queue also has packets sent to the terminal, After sending these packets to NMAP, release the resources occupied by the terminal in OMAP, and stop data forwarding;

步骤223、OMAP返回资源释放响应给NMAP;Step 223, OMAP returns a resource release response to NMAP;

步骤224、NMAP返回切换完成响应给终端;Step 224, NMAP returns a handover completion response to the terminal;

步骤225、终端完成从OMAP到NMAP的切换之后,可以按照现有技术进行正常通信。Step 225, after the terminal completes the handover from OMAP to NMAP, it can perform normal communication according to the prior art.

本实施例中,如果OMAP和NMAP之间存在直接通信的链路,OMAP和NMAP可以直接通信;如果OMAP和NMAP之间没有直接通信的链路,则OMAP和NMAP之间使用mesh中的二层路由机制根据双方的MAC地址互相通信。In this embodiment, if there is a direct communication link between OMAP and NMAP, OMAP and NMAP can communicate directly; if there is no direct communication link between OMAP and NMAP, then use the second layer in the mesh between OMAP and NMAP The routing mechanism communicates with each other based on the MAC addresses of both parties.

本实施例中,OMAP与NMAP之间对应同一个终端的归属网关,终端在mesh网络内的移动过程中,其关联的MAP发生变化,但是NMAP存在到该终端的归属网关路由,这时终端的归属网关不发生变化。In this embodiment, OMAP and NMAP correspond to the home gateway of the same terminal. When the terminal moves in the mesh network, its associated MAP changes, but NMAP has a home gateway route to the terminal. At this time, the terminal's The home gateway does not change.

本实施例中,终端在切换的时候,原MAP将<终端的MAC地址:终端port>携带在快速切换请求中发送给新MAP,新MAP保存该<终端的MAC地址:终端port>,之后可以根据该<终端的MAC地址:终端port>通过终端的归属网关与外部网络进行通信,终端在切换过程(步骤216~步骤224)中,MAP不需要重新为终端配置IP地址,终端直接采用全网统一的IP,使终端在切换前后IP地址不变,从而消除了因重新配置IP地址造成的切换时延增加的问题,减小了切换时延,提高了网络的服务性能。并且,由于在终端与OMAP断开数据通信之前(步骤218),NMAP已经完成了代理更新操作(步骤212~步骤214),进一步减少了数据通信断开的时间,减小了切换时延,提高了网络的服务性能。In this embodiment, when the terminal is switching, the original MAP carries <terminal MAC address: terminal port> in the fast handover request and sends it to the new MAP, and the new MAP saves the <terminal MAC address: terminal port>, and then can According to the <terminal MAC address: terminal port>, the terminal communicates with the external network through the terminal's home gateway. During the switching process of the terminal (step 216 to step 224), the MAP does not need to reconfigure the IP address for the terminal, and the terminal directly uses the whole network The unified IP keeps the IP address of the terminal unchanged before and after switching, thereby eliminating the problem of increased switching delay caused by reconfiguring the IP address, reducing the switching delay, and improving network service performance. And, because before terminal and OMAP disconnect data communication (step 218), NMAP has finished proxy update operation (step 212~step 214), further reduces the time of data communication disconnection, reduces switching delay, improves service performance of the network.

实施例三Embodiment three

实施例二中的移动切换方法,不涉及终端归属网关的变化,当终端跨归属网关进行移动切换时,终端在mesh网络内的移动过程中,从OMAP向NMAP切换,但NMAP上不存在到该终端原归属网关(old GW,OGW)的路由,NMAP需要重新为终端注册一个新归属网关(new GW,NGW),如附图3所示,本实施例提供了一种mesh网络中终端跨网关的快速切换的方法,该方法包括:The mobile handover method in Embodiment 2 does not involve the change of the home gateway of the terminal. When the terminal performs mobile handover across home gateways, the terminal switches from OMAP to NMAP during the movement process in the mesh network, but the NMAP does not exist to the mobile handover method. For the route of the original home gateway (old GW, OGW) of the terminal, NMAP needs to re-register a new home gateway (new GW, NGW) for the terminal. As shown in Figure 3, this embodiment provides a cross-gateway network for terminals in a mesh network. The method of fast switching, the method includes:

步骤301、OMAP触发切换,发送扫描相邻网络的网络扫描请求(request)消息给终端;Step 301, OMAP triggers switching, and sends a network scanning request (request) message for scanning adjacent networks to the terminal;

其中,随着终端的移动,OMAP根据终端当前的状态信息和本地触发策略触发切换;Among them, as the terminal moves, OMAP triggers switching according to the current status information of the terminal and the local trigger strategy;

OMAP的本地触发策略可以包括:本设备由于需要维护、升级、断电等原因不能再为终端服务,本设备的能力不能满足终端发起的业务的需求,高优先级的用户接入MAP使得不能为低优先级的用户服务等;其它可能的触发条件有,其它mesh设备发送过来的需要终端切换的请求;The local trigger strategy of OMAP can include: the device can no longer serve the terminal due to reasons such as maintenance, upgrade, power failure, etc.; Low-priority user services, etc.; other possible trigger conditions include requests from other mesh devices that require terminal switching;

终端的状态信息可由终端定期向OMAP上报,上报的终端状态信息可以包括:流量(Throughput)(单位kbps)、包误码率(Packet error rate)、包传输时延(最小值、最大值、平均值,时延抖动)(Packet transfer delay(min,max,average,jitter))、丢包率(packet loss rate);The status information of the terminal can be regularly reported by the terminal to the OMAP, and the reported terminal status information can include: Throughput (unit kbps), packet error rate (Packet error rate), packet transmission delay (minimum value, maximum value, average value, delay jitter) (Packet transfer delay (min, max, average, jitter)), packet loss rate (packet loss rate);

步骤302、终端接到网络扫描请求后,向相邻网络中的各MAP发送探询请求(probe request)消息;Step 302, after receiving the network scanning request, the terminal sends a probe request (probe request) message to each MAP in the adjacent network;

步骤303、接收到终端发送的探询请求的MAP,向终端返回探询响应(probe response)消息;其中,探询响应消息中可以携带,本MAP的MAC地址、ESSID、SSPN、QoS能力、本MAP后端的存在路由的网关的IP地址等;Step 303, the MAP that receives the probe request sent by the terminal returns a probe response (probe response) message to the terminal; wherein, the probe response message can carry, the MAC address, ESSID, SSPN, QoS capability of the MAP, the backend of the MAP The IP address of the gateway where the route exists, etc.;

步骤304、以返回探询响应消息的各MAP作为终端的候选MAP,终端将各候选MAP返回的探询响应消息中携带的各MAP的信息,通过网络扫描响应(response)消息上报给OMAP;Step 304, using each MAP returning the query response message as a candidate MAP of the terminal, the terminal reports the information of each MAP carried in the query response message returned by each candidate MAP to the OMAP through a network scan response (response) message;

步骤305、OMAP接收网络扫描响应,根据各候选MAP的MAC地址和各候选MAP后端的网关的IP地址,向任一候选MAP后端的可达的网关查询候选MAP的信息;其中,候选MAP与其后端的网关存在可达路由,一个候选MAP可以同时与多个网关之间可达,当这些可达的网关中不存在终端的归属网关时,则通过终端的原归属网关OGW向这些可达网关查询候选MAP的信息;Step 305, OMAP receives the network scanning response, according to the MAC address of each candidate MAP and the IP address of the gateway of each candidate MAP back end, query the information of the candidate MAP to the reachable gateway of any candidate MAP back end; Wherein, the candidate MAP and the subsequent There is a reachable route to the gateway at the end, and a candidate MAP can be reachable to multiple gateways at the same time. When there is no home gateway of the terminal among these reachable gateways, query these reachable gateways through the original home gateway OGW of the terminal. Candidate MAP information;

步骤306、各网关向OMAP发送查询响应,返回候选MAP的信息;其中,候选MAP的信息可以包括:MAP支持的切换类型、MAP支持的throughput、packet error rate、支持的QoS,安全等;Step 306, each gateway sends a query response to the OMAP, and returns the information of the candidate MAP; wherein, the information of the candidate MAP may include: the switching type supported by the MAP, the throughput supported by the MAP, the packet error rate, the supported QoS, security, etc.;

步骤307、OMAP根据查询到的候选MAP的信息进行网络选择,以选定的MAP为目标MAP,即NMAP;其中,选择的NMAP可以不存在到终端的归属网关可达mesh路由;Step 307, the OMAP performs network selection according to the information of the candidate MAPs inquired, and takes the selected MAP as the target MAP, that is, the NMAP; wherein, the selected NMAP may not have a reachable mesh route to the home gateway of the terminal;

步骤308、OMAP向终端发送申请资源查询消息,查询终端切换到新网络所要申请的资源;Step 308, OMAP sends an application resource query message to the terminal, querying the resources that the terminal needs to apply for when switching to the new network;

步骤309、终端返回申请资源响应消息,报告自身切换到新网络所要申请的资源;Step 309, the terminal returns an application resource response message, reporting the resource it needs to apply for when switching to the new network;

步骤310、OMAP根据申请资源响应向NMAP发送快速切换请求,该切换请求中携带了终端所要申请的资源信息和<终端的MAC地址:终端port>,其中,该<终端的MAC地址:终端port>可以是在终端接入时OMAP保存的,具体可以参考实施例一中的步骤102;为了向NMAP通知终端的归属代理HA的地址,OMAP可以进一步在快速切换请求中携带终端的归属代理HA的地址;Step 310, OMAP sends a fast switching request to NMAP according to the resource application response, the switching request carries the resource information to be applied by the terminal and <terminal MAC address: terminal port>, wherein the <terminal MAC address: terminal port> It may be saved by OMAP when the terminal accesses, for details, refer to step 102 in Embodiment 1; in order to notify NMAP of the address of the home agent HA of the terminal, OMAP may further carry the address of the home agent HA of the terminal in the fast handover request ;

步骤311、NMAP收到快速切换请求后,根据快速切换请求中的终端所要申请的资源信息,进行资源预留;NMAP可以进一步获取该快速切换请求中携带的终端的归属代理HA的地址,保存该终端的归属代理HA的地址;Step 311: After receiving the fast handover request, NMAP performs resource reservation according to the resource information requested by the terminal in the fast handover request; NMAP can further obtain the address of the home agent HA of the terminal carried in the fast handover request, and save the The address of the home agent HA of the terminal;

步骤312、NMAP同时进行代理更新,因为NMAP不存在到终端原归属网关OGW的可达路由,所以NMAP为终端选择一个新归属网关NGW,并向该新归属网关发送代理更新请求消息;代理更新请求中携带<终端的MAC地址:终端port>与NMAP地址的对应关系,或进一步包括终端的归属代理HA的地址;Step 312, NMAP performs proxy update at the same time, because NMAP does not have a reachable route to the original home gateway OGW of the terminal, so NMAP selects a new home gateway NGW for the terminal, and sends a proxy update request message to the new home gateway; proxy update request carry the corresponding relationship between <terminal MAC address: terminal port> and the NMAP address, or further include the address of the home agent HA of the terminal;

步骤313、新归属网关收到NMAP发送的代理更新请求消息后,更新终端的代理信息,在自身的代理信息表中添加终端的代理信息(<终端的MAC地址:终端port>与NMAP地址的对应关系);Step 313, after the new home gateway receives the proxy update request message sent by NMAP, update the proxy information of the terminal, and add the proxy information of the terminal in its own proxy information table (the correspondence between <the MAC address of the terminal: terminal port> and the NMAP address relation);

步骤314、新归属网关在更新代理表时,代理表中原先不存在终端的代理信息,因此,新归属网关同时给终端进行地址转换关系注册,根据代理更新消息中的<终端的MAC地址:终端port>为终端分配一个新归属网关port,在新归属网关上建立<终端的MAC地址:终端port>与<新归属网关节点的IP地址:新归属网关port>的对应关系,并将<终端的MAC地址:终端port>与<新归属网关节点的IP地址:新归属网关port>的对应关系加入转换关系表;此时,新归属网关包括地址转换功能,即AT设备是新归属网关的一个模块;Step 314, when the new home gateway updates the proxy table, there is no proxy information of the terminal in the proxy table, so the new home gateway registers the address translation relationship for the terminal at the same time, according to <terminal MAC address: terminal in the proxy update message port> allocates a new home gateway port for the terminal, and establishes the corresponding relationship between <terminal MAC address: terminal port> and <new home gateway node IP address: new home gateway port> on the new home gateway, and assigns <terminal The corresponding relationship between MAC address: terminal port> and <IP address of the new home gateway node: new home gateway port> is added to the conversion relationship table; at this time, the new home gateway includes the address translation function, that is, the AT device is a module of the new home gateway ;

步骤315、新归属网关代理更新完,向NMAP发送代理更新成功消息;Step 315, after the agent update of the new home gateway is completed, an agent update success message is sent to NMAP;

步骤316、NMAP资源预留成功,并且收到新归属网关发送的代理更新成功消息后,向OMAP返回快速切换响应;其中,资源预留(步骤311)和代理更新(步骤312~步骤314)的先后顺序不做具体限定,两者可以是同时进行的,或者任一操作先执行,之后再执行另一操作;Step 316, NMAP resource reservation is successful, and after receiving the proxy update success message sent by the new home gateway, return a fast switching response to OMAP; wherein, resource reservation (step 311) and proxy update (step 312~step 314) There is no specific limitation on the sequence, the two can be performed at the same time, or either operation is performed first, and then the other operation is performed later;

步骤317、OMAP收到快速切换响应后,向终端发送切换开始消息;Step 317. After receiving the fast handover response, OMAP sends a handover start message to the terminal;

步骤318、OMAP同时将发往终端的数据转发给NMAP,并可以在终端与NMAP建立关联后,进一步由NMAP发送给终端;Step 318, OMAP forwards the data sent to the terminal to NMAP at the same time, and after the terminal is associated with NMAP, NMAP can further send it to the terminal;

步骤319、终端收到切换开始消息后,断开与OMAP的连接;Step 319, after receiving the switching start message, the terminal disconnects from the OMAP;

步骤320、终端同时与NMAP建立关联,建立终端与MAP之间的通信链路,完成认证;其中,该通信链路可以不涉及三层(IP层),仅仅是二层(MAC层)链路,用于传输之后终端与NMAP之间交互的消息;Step 320, the terminal establishes an association with NMAP at the same time, establishes a communication link between the terminal and the MAP, and completes the authentication; wherein, the communication link may not involve the third layer (IP layer), but only the second layer (MAC layer) link , used for messages interacting between the terminal and NMAP after transmission;

步骤321、终端通过建立的关联,发送切换完成请求给NMAP;Step 321, the terminal sends a handover completion request to NMAP through the established association;

步骤322、NMAP收到切换完成请求后,发送资源释放请求给OMAP;Step 322, after receiving the handover completion request, NMAP sends a resource release request to OMAP;

步骤323、当OMAP收到资源释放请求时,如果其转发队列中没有发往终端的分组,则释放终端在OMAP中占用的资源,停止数据转发,如果其转发队列还有发往终端的分组,则将这些分组发往NMAP后,释放终端在OMAP中占用的资源,停止数据转发;Step 323, when OMAP receives the resource release request, if there is no packet sent to the terminal in its forwarding queue, then release the resource occupied by the terminal in OMAP, stop data forwarding, if its forwarding queue also has packets sent to the terminal, After sending these packets to NMAP, release the resources occupied by the terminal in OMAP, and stop data forwarding;

步骤324、OMAP发送代理更新删除消息至切换前的终端的原归属网关;Step 324, OMAP sends a proxy update delete message to the original home gateway of the terminal before switching;

步骤325、原归属网关收到代理更新删除消息后,删除原先保存的终端的代理信息,Step 325, after the original home gateway receives the agent update and delete message, it deletes the previously stored agent information of the terminal,

步骤326、原归属网关向终端切换前的原AT设备发起地址删除消息;Step 326, the original home gateway sends an address deletion message to the original AT device before the terminal handover;

步骤327、原AT设备删除保存的<终端的MAC地址:终端port>与<原归属网关节点的IP地址:原归属网关port>的转换关系后,向原归属网关发送地址删除成功消息;Step 327: After the original AT device deletes the saved conversion relationship between <terminal MAC address: terminal port> and <original home gateway node IP address: original home gateway port>, it sends an address deletion success message to the original home gateway;

步骤328、原归属网关向OMAP发送代理更新删除成功消息;Step 328, the original home gateway sends an agent update and deletion success message to the OMAP;

步骤329、OMAP返回资源释放响应给NMAP;Step 329, OMAP returns a resource release response to NMAP;

步骤330、NMAP返回切换完成响应给终端;Step 330, NMAP returns a handover completion response to the terminal;

步骤331、终端完成从OMAP到NMAP的切换之后,可以按照现有技术进行正常通信;Step 331, after the terminal finishes switching from OMAP to NMAP, it can perform normal communication according to the existing technology;

步骤332、在步骤314的新归属网关地址注册成功后,新归属网关向mesh中的HA(home agent,归属代理)发起Mobile IP的banding up流程,根据代理更新消息中携带的终端的归属代理HA的地址,新归属网关向HA发送BU(banding up,绑定更新)消息,在banding up的消息中需要携带原归属网关的IP地址、分配给终端的原归属网关port,和新归属网关的IP地址、分配给终端的新归属网关port信息;Step 332, after the new home gateway address registration in step 314 is successful, the new home gateway initiates the banding up process of Mobile IP to the HA (home agent, home agent) in the mesh, according to the home agent HA of the terminal carried in the agent update message address, the new home gateway sends a BU (banding up, binding update) message to the HA, and the banding up message needs to carry the IP address of the original home gateway, the original home gateway port assigned to the terminal, and the IP of the new home gateway Address, new home gateway port information assigned to the terminal;

步骤333、HA接收BU消息,保存<原归属网关IP:原归属网关port>与<新归属网关IP:新归属网关port>的对应关系;Step 333, the HA receives the BU message, and saves the corresponding relationship between <original home gateway IP: original home gateway port> and <new home gateway IP: new home gateway port>;

步骤334、HA向新归属网关返回确认(back)消息;Step 334, HA returns confirmation (back) message to new home gateway;

步骤335、之后,HA接收发给<原归属网关IP:原归属网关port>的数据包,将其转发给<新归属网关IP:新归属网关port>,从而实现将发给<原归属网关IP:原归属网关port>的消息转发给<新归属网关IP:新归属网关port>;Step 335. Afterwards, the HA receives the data packet sent to <original home gateway IP: original home gateway port> and forwards it to <new home gateway IP: new home gateway port>, so as to realize the packet sent to <original home gateway IP : The message of the original home gateway port> is forwarded to <new home gateway IP: new home gateway port>;

其中,在AT设备建立地址转换关系时,由于网关可能不具有IP地址,所以可以采用AT设备自身的IP地址和端口号port建立地址转换关系,此时,banding up的消息中携带<原AT设备IP:原AT设备port>和<新AT设备IP:新AT设备port>,从而实现将发给<原AT设备IP:原AT设备port>的消息转发给<新AT设备IP:新AT设备port>,保证终端可以正确接收外部网络发送给终端的数据包。Among them, when the AT device establishes the address translation relationship, since the gateway may not have an IP address, the IP address of the AT device itself and the port number port can be used to establish the address translation relationship. At this time, the banding up message carries <original AT device IP: original AT device port> and <new AT device IP: new AT device port>, so as to forward the message sent to <original AT device IP: original AT device port> to <new AT device IP: new AT device port> >, to ensure that the terminal can correctly receive the data packets sent from the external network to the terminal.

本实施例中,由于OMAP和NMAP对应终端的归属网关发生变化,因此,OMAP和NMAP存在不能二层直接通信的情况,这时,OMAP和NMAP的通信基于IP层的互通,以OMAP发送消息给NMAP为例:源IP地址使用OMAP的IP地址,这个IP地址是mesh网络的统一的IP地址,这个IP地址在数据包通过OGW的时候,会改为OGW的地址,并且源port基于AT机制设为OMAP在OGW中注册的Port,即根据AT设备中保存的<OMAP的MAC地址:port>与<网关节点的IP地址:网关port>的转换关系,将数据包中的<OMAP的MAC地址:port>转换为对应的<网关节点的IP地址:网关port>;目的IP地址使用NGW的IP地址,目的port基于AT机制设为NMAP在NGW中注册的port。NMAP发送消息给OMAP与之类似,不再赘述。In this embodiment, because the home gateway of the terminal corresponding to OMAP and NMAP changes, there is a situation that OMAP and NMAP cannot communicate directly at the second layer. At this time, the communication between OMAP and NMAP is based on the intercommunication of the IP layer. Take NMAP as an example: the source IP address uses the IP address of OMAP. This IP address is the unified IP address of the mesh network. When the data packet passes through the OGW, this IP address will be changed to the OGW address, and the source port is set based on the AT mechanism. It is the Port registered in OGW for OMAP, that is, according to the conversion relationship between <OMAP MAC address: port> and <gateway node IP address: gateway port> saved in the AT device, the <OMAP MAC address in the data packet: port> is converted to the corresponding <IP address of the gateway node: gateway port>; the destination IP address uses the IP address of the NGW, and the destination port is set to the port registered in the NGW by NMAP based on the AT mechanism. Sending a message from NMAP to OMAP is similar and will not be repeated here.

本实施例中,终端在切换的时候,原MAP将<终端的MAC地址:终端port>携带在快速切换请求中发送给新MAP,新MAP保存该<终端的MAC地址:终端port>,之后可以根据该<终端的MAC地址:终端port>通过终端的新归属网关与外部网络进行通信,终端在切换过程(步骤216~步骤220)中,MAP不需要重新为终端配置IP地址,终端直接采用全网统一的IP,使终端在切换前后IP地址不变,从而消除了因重新配置IP地址造成的切换时延增加的问题,减小了切换时延,提高了网络的服务性能。并且,由于在终端与OMAP断开数据通信之前(步骤319),NMAP已经完成了代理更新和地址转换关系建立(步骤312~步骤315),进一步减少了数据通信断开的时间,减小了切换时延,提高了网络的服务性能。另外,由于新MAP与原MAP属于不同的网关,新MAP进一步在新归属网关上建立终端的地址转换关系,并与HA进行banding up流程,保证了切换后的终端能够正确收发与外部网络相关的数据包,与外部网络进行通信。In this embodiment, when the terminal is switching, the original MAP carries <terminal MAC address: terminal port> in the fast handover request and sends it to the new MAP, and the new MAP saves the <terminal MAC address: terminal port>, and then can According to the <terminal MAC address: terminal port>, the terminal communicates with the external network through the new home gateway of the terminal. During the handover process (step 216-step 220), the MAP does not need to reconfigure the IP address for the terminal, and the terminal directly adopts the full The unified IP of the network makes the IP address of the terminal unchanged before and after switching, thereby eliminating the problem of increased switching delay caused by reconfiguring the IP address, reducing the switching delay, and improving the service performance of the network. And, before the terminal and OMAP disconnect data communication (step 319), NMAP has finished proxy updating and address translation relationship establishment (step 312~step 315), further reduces the time of data communication disconnection, reduces handover Delay improves the service performance of the network. In addition, since the new MAP and the original MAP belong to different gateways, the new MAP further establishes the address translation relationship of the terminal on the new home gateway, and performs a banding up process with the HA to ensure that the switched terminal can correctly send and receive information related to the external network. packets, to communicate with the external network.

实施例四Embodiment four

如附图4所示,本发明实施例提供了一种mesh网络中终端普通切换的方法,本实施例中,终端从OMAP(old MAP,原MAP)向NMAP(new MAP,新MAP)切换,NMAP和OMAP都存在到终端的归属网关的路由,其中,归属网关是用来保存终端的代理信息的mesh节点,该普通切换的方法包括:As shown in accompanying drawing 4, the embodiment of the present invention provides a kind of method that the terminal generally switches in the mesh network, in this embodiment, the terminal switches from OMAP (old MAP, former MAP) to NMAP (new MAP, new MAP), Both NMAP and OMAP have a route to the home gateway of the terminal, wherein the home gateway is a mesh node used to save the proxy information of the terminal. The common switching method includes:

步骤401、OMAP触发切换,发送扫描相邻网络的网络扫描请求(request)消息给终端;Step 401, OMAP triggers switching, and sends a network scanning request (request) message for scanning adjacent networks to the terminal;

其中,随着终端的移动,OMAP根据终端当前的状态信息和本地触发策略触发切换;Among them, as the terminal moves, OMAP triggers switching according to the current status information of the terminal and the local trigger strategy;

OMAP的本地触发策略可以包括:本设备由于需要维护、升级、断电等原因不能再为终端服务,本设备的能力不能满足终端发起的业务的需求,高优先级的用户接入MAP使得不能为低优先级的用户服务等;其它可能的触发条件有,其它mesh设备发送过来的需要终端切换的请求;The local trigger strategy of OMAP can include: the device can no longer serve the terminal due to reasons such as maintenance, upgrade, power failure, etc.; Low-priority user services, etc.; other possible trigger conditions include requests from other mesh devices that require terminal switching;

终端的状态信息可由终端定期向OMAP上报,上报的终端状态信息可以包括:流量(Throughput)(单位kbps)、包误码率(Packet error rate)、包传输时延(最小值、最大值、平均值,时延抖动)(Packet transfer delay(min,max,average,jitter))、丢包率(packet loss rate);The status information of the terminal can be regularly reported by the terminal to the OMAP, and the reported terminal status information can include: Throughput (unit kbps), packet error rate (Packet error rate), packet transmission delay (minimum value, maximum value, average value, delay jitter) (Packet transfer delay (min, max, average, jitter)), packet loss rate (packet loss rate);

步骤402、终端接到网络扫描请求后,向相邻网络中的各MAP发送探询请求(probe request)消息;Step 402, after receiving the network scanning request, the terminal sends a probe request (probe request) message to each MAP in the adjacent network;

步骤403、接收到终端发送的探询请求的MAP,向终端返回探询响应(probe response)消息;其中,探询响应消息中可以携带,本MAP的MAC地址、ESSID、SSPN、QoS能力、本MAP后端的存在路由的网关的IP地址等;Step 403, the MAP that receives the probe request sent by the terminal returns a probe response (probe response) message to the terminal; wherein, the probe response message can carry, the MAC address, ESSID, SSPN, QoS capability of the MAP, the backend of the MAP The IP address of the gateway where the route exists, etc.;

步骤404、以返回探询响应消息的各MAP作为终端的候选MAP,终端将各候选MAP返回的探询响应消息中携带的各MAP的信息,通过网络扫描响应(response)消息上报给OMAP;Step 404, using each MAP returning the query response message as a candidate MAP of the terminal, the terminal reports the information of each MAP carried in the query response message returned by each candidate MAP to the OMAP through a network scan response (response) message;

步骤405、OMAP接收网络扫描响应,根据各候选MAP的MAC地址和各候选MAP后端的网关的IP地址,向任一候选MAP后端的可达的网关查询候选MAP的信息;其中,候选MAP与其后端的网关存在可达路由,一个候选MAP可以同时与多个网关之间可达,当这些可达的网关中存在终端的归属网关时,优先考虑向终端的归属网络查询候选MAP的信息;Step 405, OMAP receives the network scanning response, according to the MAC address of each candidate MAP and the IP address of the gateway of each candidate MAP back end, query the information of the candidate MAP to the reachable gateway of the back end of any candidate MAP; Wherein, the candidate MAP and the subsequent There is a reachable route to the gateway at the end, and a candidate MAP can be reachable to multiple gateways at the same time. When there is a home gateway of the terminal among these reachable gateways, priority is given to querying the information of the candidate MAP from the home network of the terminal;

步骤406、各网关向OMAP发送查询响应,返回候选MAP的信息;其中,候选MAP的信息可以包括:MAP支持的切换类型、MAP支持的throughput、packet error rate、支持的QoS,安全等;Step 406, each gateway sends query response to OMAP, returns the information of candidate MAP; Wherein, the information of candidate MAP can comprise: the switching type that MAP supports, the throughput that MAP supports, packet error rate, the QoS that supports, security etc.;

步骤407、OMAP根据查询到的候选MAP的信息进行网络选择,以选定的MAP为目标MAP,即NMAP;其中,网络选择时采用的策略可以是:在满足终端正常通信的情况下,优先选择存在到终端的归属网关的路由的候选MAP作为目标MAP;Step 407, OMAP performs network selection according to the information of the queried candidate MAP, and takes the selected MAP as the target MAP, that is, NMAP; wherein, the strategy adopted during network selection may be: in the case of meeting the normal communication of the terminal, preferentially select There is a candidate MAP for the route to the home gateway of the terminal as the target MAP;

步骤408、OMAP向终端发送申请资源查询消息,查询终端切换到新网络所要申请的资源;Step 408, OMAP sends an application resource query message to the terminal, querying the resources to be applied for by the terminal to switch to the new network;

步骤409、终端返回申请资源响应消息,报告自身切换到新网络所要申请的资源;Step 409, the terminal returns an application resource response message, reporting the resources it needs to apply for when switching to the new network;

步骤41O、OMAP根据申请资源响应向NMAP发送切换请求,该切换请求中携带了终端所要申请的资源信息;为了向NMAP通知终端的归属代理HA的地址,OMAP可以进一步在切换请求中携带终端的归属代理HA的地址;Step 410, OMAP sends a handover request to NMAP according to the resource application response, and the handover request carries the resource information to be applied by the terminal; in order to notify NMAP of the address of the home agent HA of the terminal, OMAP can further carry the home of the terminal in the handover request Address of proxy HA;

步骤411、NMAP收到切换请求后,根据切换请求中的终端所要申请的资源信息,进行资源预留;NMAP可以进一步获取该切换请求中携带的终端的归属代理HA的地址,保存该终端的归属代理HA的地址;Step 411: After receiving the handover request, NMAP performs resource reservation according to the resource information requested by the terminal in the handover request; NMAP can further obtain the address of the home agent HA of the terminal carried in the handover request, and save the terminal's home Address of proxy HA;

步骤412、NMAP资源预留成功后,向OMAP返回切换响应;Step 412, after the NMAP resource reservation is successful, return a switching response to the OMAP;

步骤413、OMAP收到切换响应后,向终端发送切换开始消息;Step 413, after receiving the handover response, the OMAP sends a handover start message to the terminal;

步骤414、OMAP同时将发往终端的数据转发给NMAP,并可以在终端与NMAP建立关联后,进一步由NMAP发送给终端;Step 414, OMAP forwards the data sent to the terminal to NMAP at the same time, and after the terminal is associated with NMAP, NMAP can further send it to the terminal;

步骤415、终端收到切换开始消息后,断开与OMAP的连接;Step 415, after receiving the switching start message, the terminal disconnects from the OMAP;

步骤416、终端同时与NMAP建立关联,建立终端与MAP之间的通信链路,完成认证;其中,该通信链路可以不涉及三层(IP层),仅仅是二层(MAC层)链路,用于传输之后终端与NMAP之间交互的消息;Step 416, the terminal establishes an association with the NMAP at the same time, establishes a communication link between the terminal and the MAP, and completes the authentication; wherein, the communication link may not involve the third layer (IP layer), but only the second layer (MAC layer) link , used for messages interacting between the terminal and NMAP after transmission;

步骤417、终端通过建立的关联,发送切换完成请求给NMAP;该切换完成请求中包括,<终端的MAC地址:终端port>;Step 417, the terminal sends a handover completion request to NMAP through the established association; the handover completion request includes <terminal MAC address: terminal port>;

步骤418、NMAP收到切换完成请求后,进行代理更新,向终端的归属网关发送代理更新请求消息;该代理更新请求中携带<终端的MAC地址:终端port>与NMAP地址的对应关系,或进一步包括终端的归属代理HA的地址;Step 418, NMAP performs proxy update after receiving the handover completion request, and sends a proxy update request message to the home gateway of the terminal; the proxy update request carries the corresponding relationship between <terminal MAC address: terminal port> and the NMAP address, or further Including the address of the home agent HA of the terminal;

步骤419、归属网关收到NMAP发送的代理更新请求消息后,更新保存的终端的代理信息,将终端的原代理信息(<终端的MAC地址:终端port>与OMAP地址的对应关系)替换为新代理信息(<终端的MAC地址:终端port>与NMAP地址的对应关系);Step 419, after the home gateway receives the agent update request message sent by the NMAP, it updates the saved terminal agent information, and replaces the terminal's original agent information (correspondence between <terminal MAC address: terminal port> and the OMAP address) with the new Proxy information (correspondence between <terminal MAC address: terminal port> and NMAP address);

步骤420、归属网关代理更新完,向NMAP发送代理更新成功消息;Step 420, the home gateway agent is updated, and sends an agent update success message to NMAP;

步骤421、NMAP收到归属网关发送的代理更新成功消息后,发送资源释放请求给OMAP;Step 421, NMAP sends a resource release request to OMAP after receiving the proxy update success message sent by the home gateway;

步骤422、当OMAP收到资源释放请求时,如果其转发队列中没有发往终端的分组,则释放终端在OMAP中占用的资源,停止数据转发,如果其转发队列还有发往终端的分组,则将这些分组发往NMAP后,释放终端在OMAP中占用的资源,停止数据转发;Step 422, when OMAP receives the resource release request, if there is no packet sent to the terminal in its forwarding queue, then release the resource occupied by the terminal in OMAP, stop data forwarding, if its forwarding queue also has packets sent to the terminal, After sending these packets to NMAP, release the resources occupied by the terminal in OMAP, and stop data forwarding;

步骤423、OMAP返回资源释放响应给NMAP;Step 423, OMAP returns a resource release response to NMAP;

步骤424、NMAP返回切换完成响应给终端;Step 424, NMAP returns a handover completion response to the terminal;

步骤425、终端完成从OMAP到NMAP的切换之后,可以按照现有技术进行正常通信。Step 425, after the terminal completes the handover from OMAP to NMAP, it can perform normal communication according to the prior art.

本实施例中,如果OMAP和NMAP之间存在直接通信的链路,OMAP和NMAP可以直接通信;如果OMAP和NMAP之间没有直接通信的链路,则OMAP和NMAP之间使用mesh中的二层路由机制根据双方的MAC地址互相通信。In this embodiment, if there is a direct communication link between OMAP and NMAP, OMAP and NMAP can communicate directly; if there is no direct communication link between OMAP and NMAP, then use the second layer in the mesh between OMAP and NMAP The routing mechanism communicates with each other based on the MAC addresses of both parties.

本实施例中,终端在切换的时候,原MAP将<终端的MAC地址:终端port>携带在切换请求中发送给新MAP,新MAP保存该<终端的MAC地址:终端port>,之后可以根据该<终端的MAC地址:终端port>通过终端的归属网关与外部网络进行通信,终端在切换过程(步骤415~步骤424)中,MAP不需要重新为终端配置IP地址,终端直接采用全网统一的IP,使终端在切换前后IP地址不变,从而消除了因重新配置IP地址造成的切换时延增加的问题,减小了切换时延,提高了网络的服务性能。In this embodiment, when the terminal is switching, the original MAP carries <terminal MAC address: terminal port> in the switching request and sends it to the new MAP, and the new MAP saves the <terminal MAC address: terminal port>. The <terminal MAC address: terminal port> communicates with the external network through the terminal's home gateway. During the switching process (step 415 to step 424) of the terminal, the MAP does not need to reconfigure the IP address for the terminal, and the terminal directly uses the unified IP, so that the IP address of the terminal remains unchanged before and after switching, thereby eliminating the problem of increased switching delay caused by reconfiguring the IP address, reducing the switching delay, and improving network service performance.

实施例五Embodiment five

实施例四中的移动切换方法,不涉及终端归属网关的变化,当终端跨归属网关进行移动切换时,终端在mesh网络内的移动过程中,从OMAP向NMAP切换,但NMAP上不存在到该终端原归属网关(old GW,OGW)的路由,NMAP需要重新为终端注册一个新归属网关(new GW,NGW),如附图5所示,本实施例提供了一种mesh网络中终端跨网关的普通切换的方法,该方法包括:The mobile handover method in Embodiment 4 does not involve the change of the home gateway of the terminal. When the terminal performs mobile handover across the home gateway, the terminal switches from OMAP to NMAP during the movement process in the mesh network, but the NMAP does not exist to the mobile handover method. For the route of the original home gateway (old GW, OGW) of the terminal, NMAP needs to re-register a new home gateway (new GW, NGW) for the terminal. As shown in Figure 5, this embodiment provides a cross-gateway network for terminals in a mesh network. The general switching method, the method includes:

步骤501、OMAP触发切换,发送扫描相邻网络的网络扫描请求(request)消息给终端;Step 501, OMAP triggers switching, and sends a network scanning request (request) message for scanning adjacent networks to the terminal;

其中,随着终端的移动,OMAP根据终端当前的状态信息和本地触发策略触发切换;Among them, as the terminal moves, OMAP triggers switching according to the current status information of the terminal and the local trigger strategy;

OMAP的本地触发策略可以包括:本设备由于需要维护、升级、断电等原因不能再为终端服务,本设备的能力不能满足终端发起的业务的需求,高优先级的用户接入MAP使得不能为低优先级的用户服务等;其它可能的触发条件有,其它mesh设备发送过来的需要终端切换的请求;The local trigger strategy of OMAP can include: the device can no longer serve the terminal due to reasons such as maintenance, upgrade, power failure, etc.; Low-priority user services, etc.; other possible trigger conditions include requests from other mesh devices that require terminal switching;

终端的状态信息可由终端定期向OMAP上报,上报的终端状态信息可以包括:流量(Throughput)(单位kbps)、包误码率(Packet error rate)、包传输时延(最小值、最大值、平均值,时延抖动)(Packet transfer delay(min,max,average,jitter))、丢包率(packet loss rate);The status information of the terminal can be regularly reported by the terminal to the OMAP, and the reported terminal status information can include: Throughput (unit kbps), packet error rate (Packet error rate), packet transmission delay (minimum value, maximum value, average value, delay jitter) (Packet transfer delay (min, max, average, jitter)), packet loss rate (packet loss rate);

步骤502、终端接到网络扫描请求后,向相邻网络中的各MAP发送探询请求(probe request)消息;Step 502, after receiving the network scanning request, the terminal sends a probe request (probe request) message to each MAP in the adjacent network;

步骤503、接收到终端发送的探询请求的MAP,向终端返回探询响应(probe response)消息;其中,探询响应消息中可以携带,本MAP的MAC地址、ESSID、SSPN、QoS能力、本MAP后端的存在路由的网关的IP地址等;Step 503, the MAP that receives the probe request sent by the terminal returns a probe response (probe response) message to the terminal; wherein, the probe response message can carry the MAC address, ESSID, SSPN, QoS capability, and the MAP backend of the MAP. The IP address of the gateway where the route exists, etc.;

步骤504、以返回探询响应消息的各MAP作为终端的候选MAP,终端将各候选MAP返回的探询响应消息中携带的各MAP的信息,通过网络扫描响应(response)消息上报给OMAP;Step 504, using each MAP returning the query response message as a candidate MAP of the terminal, the terminal reports the information of each MAP carried in the query response message returned by each candidate MAP to the OMAP through a network scan response (response) message;

步骤505、OMAP接收网络扫描响应,根据各候选MAP的MAC地址和各候选MAP后端的网关的IP地址,向任一候选MAP后端的可达的网关查询候选MAP的信息;其中,候选MAP与其后端的网关存在可达路由,一个候选MAP可以同时与多个网关之间可达,当这些可达的网关中不存在终端的归属网关时,则通过终端的原归属网关OGW向这些可达网关查询候选MAP的信息;Step 505, OMAP receives the network scanning response, according to the MAC address of each candidate MAP and the IP address of the gateway of each candidate MAP back end, query the information of the candidate MAP to the reachable gateway of any candidate MAP back end; Wherein, the candidate MAP and the subsequent There is a reachable route to the gateway at the end, and a candidate MAP can be reachable to multiple gateways at the same time. When there is no home gateway of the terminal among these reachable gateways, query these reachable gateways through the original home gateway OGW of the terminal. Candidate MAP information;

步骤506、各网关向OMAP发送查询响应,返回候选MAP的信息;其中,候选MAP的信息可以包括:MAP支持的切换类型、MAP支持的throughput、packet error rate、支持的QoS,安全等;Step 506, each gateway sends query response to OMAP, returns the information of candidate MAP; Wherein, the information of candidate MAP can include: the switching type that MAP supports, the throughput that MAP supports, packet error rate, the QoS that supports, security etc.;

步骤507、OMAP根据查询到的候选MAP的信息进行网络选择,以选定的MAP为目标MAP,即NMAP;其中,选择的NMAP可以不存在到终端的归属网关可达mesh路由;Step 507, the OMAP performs network selection according to the information of the candidate MAP inquired, and takes the selected MAP as the target MAP, that is, the NMAP; wherein, the selected NMAP may not have a reachable mesh route to the home gateway of the terminal;

步骤508、OMAP向终端发送申请资源查询消息,查询终端切换到新网络所要申请的资源;Step 508, OMAP sends an application resource query message to the terminal, querying the resource to be applied for by the terminal switching to the new network;

步骤509、终端返回申请资源响应消息,报告自身切换到新网络所要申请的资源;Step 509, the terminal returns an application resource response message, reporting the resources it needs to apply for when switching to the new network;

步骤510、OMAP根据申请资源响应向NMAP发送切换请求,该切换请求中携带了终端所要申请的资源信息;为了向NMAP通知终端的归属代理HA的地址,OMAP可以进一步在切换请求中携带终端的归属代理HA的地址;Step 510, OMAP sends a handover request to NMAP according to the resource application response, and the handover request carries the resource information to be applied by the terminal; in order to notify NMAP of the address of the terminal's home agent HA, OMAP may further carry the terminal's home agent in the handover request Address of proxy HA;

步骤511、NMAP收到切换请求后,根据切换请求中的终端所要中请的资源信息,进行资源预留;NMAP可以进一步获取该切换请求中携带的终端的归属代理HA的地址,保存该终端的归属代理HA的地址;Step 511: After receiving the handover request, NMAP performs resource reservation according to the resource information requested by the terminal in the handover request; NMAP can further obtain the address of the home agent HA of the terminal carried in the handover request, and save the terminal's HA address. The address of the home agent HA;

步骤512、NMAP资源预留成功后,向OMAP返回切换响应;Step 512, after NMAP resource reservation is successful, return a handover response to OMAP;

步骤513、OMAP收到切换响应后,向终端发送切换开始消息;Step 513, after receiving the handover response, the OMAP sends a handover start message to the terminal;

步骤514、OMAP同时将发往终端的数据转发给NMAP,并可以在终端与NMAP建立关联后,进一步由NMAP发送给终端;Step 514, OMAP forwards the data sent to the terminal to NMAP at the same time, and after the terminal is associated with NMAP, NMAP can further send it to the terminal;

步骤515、终端收到切换开始消息后,断开与OMAP的连接;Step 515, after receiving the switching start message, the terminal disconnects from the OMAP;

步骤516、终端同时与NMAP建立关联,建立终端与MAP之间的通信链路,完成认证;其中,该通信链路可以不涉及三层(IP层),仅仅是二层(MAC层)链路,用于传输之后终端与NMAP之间交互的消息;Step 516, the terminal establishes an association with NMAP at the same time, establishes a communication link between the terminal and the MAP, and completes the authentication; wherein, the communication link may not involve the third layer (IP layer), but only the second layer (MAC layer) link , used for messages interacting between the terminal and NMAP after transmission;

步骤517、终端通过建立的关联,发送切换完成请求给NMAP;该切换完成请求中包括,<终端的MAC地址:终端port>;Step 517, the terminal sends a handover completion request to NMAP through the established association; the handover completion request includes <terminal MAC address: terminal port>;

步骤518、NMAP收到切换完成请求后,进行代理更新,因为NMAP不存在到终端原归属网关OGW的可达路由,所以NMAP为终端选择一个新归属网关NGW,并向该新归属网关发送代理更新请求消息;该代理更新请求中携带<终端的MAC地址:终端port>与NMAP地址的对应关系,或进一步包括终端的归属代理HA的地址;Step 518: NMAP performs proxy update after receiving the handover completion request, because NMAP does not have a reachable route to the original home gateway OGW of the terminal, so NMAP selects a new home gateway NGW for the terminal, and sends a proxy update to the new home gateway Request message; the agent update request carries the corresponding relationship between <terminal MAC address: terminal port> and the NMAP address, or further includes the address of the home agent HA of the terminal;

步骤519、新归属网关收到NMAP发送的代理更新请求消息后,更新终端的代理信息,在自身的代理信息表中添加终端的代理信息(<终端的MAC地址:终端port>与NMAP地址的对应关系);Step 519, after the new home gateway receives the agent update request message sent by NMAP, it updates the agent information of the terminal, and adds the agent information of the terminal in its own agent information table (the correspondence between <the MAC address of the terminal: terminal port> and the NMAP address relation);

步骤520、新归属网关在更新代理表时,代理表中原先不存在终端的代理信息,因此,新归属网关同时给终端进行地址转换关系注册,根据代理更新消息中的<终端的MAC地址:终端port>为终端分配一个新归属网关port,在新归属网关上建立<终端的MAC地址:终端port>与<新归属网关节点的IP地址:新归属网关port>的对应关系,并将<终端的MAC地址:终端port>与<新归属网关节点的IP地址:新归属网关port>的对应关系加入转换关系表;此时,新归属网关包括地址转换功能,即AT设备是新归属网关的一个模块;Step 520, when the new home gateway updates the proxy table, there is no proxy information of the terminal in the proxy table, so the new home gateway registers the address translation relationship for the terminal at the same time, according to <terminal MAC address: terminal in the proxy update message port> allocates a new home gateway port for the terminal, and establishes the corresponding relationship between <terminal MAC address: terminal port> and <new home gateway node IP address: new home gateway port> on the new home gateway, and assigns <terminal The corresponding relationship between MAC address: terminal port> and <IP address of the new home gateway node: new home gateway port> is added to the conversion relationship table; at this time, the new home gateway includes the address translation function, that is, the AT device is a module of the new home gateway ;

步骤521、新归属网关代理更新完,向NMAP发送代理更新成功消息;Step 521, after the new home gateway proxy is updated, a proxy update success message is sent to NMAP;

步骤522、NMAP收到归属网关发送的代理更新成功消息后,发送资源释放请求给OMAP;Step 522: After receiving the proxy update success message sent by the home gateway, the NMAP sends a resource release request to the OMAP;

步骤523、当OMAP收到资源释放请求时,如果其转发队列中没有发往终端的分组,则释放终端在OMAP中占用的资源,停止数据转发,如果其转发队列还有发往终端的分组,则将这些分组发往NMAP后,释放终端在OMAP中占用的资源,停止数据转发;Step 523, when OMAP receives the resource release request, if there is no grouping sent to the terminal in its forwarding queue, then release the resources occupied by the terminal in OMAP, stop data forwarding, if its forwarding queue also has packets sent to the terminal, After sending these packets to NMAP, release the resources occupied by the terminal in OMAP, and stop data forwarding;

步骤524、OMAP发送代理更新删除消息至切换前的终端的原归属网关OGW;Step 524, OMAP sends a proxy update delete message to the original home gateway OGW of the terminal before the handover;

步骤525、原归属网关收到代理更新删除消息后,删除原先保存的终端的代理信息;Step 525: After receiving the agent update and delete message, the original home gateway deletes the previously saved terminal agent information;

步骤526、原归属网关向终端切换前的原AT设备发起地址删除消息;Step 526, the original home gateway sends an address deletion message to the original AT device before the terminal handover;

步骤527、原AT设备删除保存的<终端的MAC地址:终端port>与<原归属网关节点的IP地址:原归属网关port>的转换关系后,向原归属网关发送地址删除成功消息;Step 527: After the original AT device deletes the saved conversion relationship between <terminal MAC address: terminal port> and <original home gateway node IP address: original home gateway port>, it sends an address deletion success message to the original home gateway;

步骤528、原归属网关向OMAP发送代理更新删除成功消息;Step 528, the original home gateway sends an agent update and deletion success message to the OMAP;

步骤529、OMAP返回资源释放响应给NMAP;Step 529, OMAP returns a resource release response to NMAP;

步骤530、NMAP返回切换完成响应给终端;Step 530, NMAP returns a handover completion response to the terminal;

步骤531、终端完成从OMAP到NMAP的切换之后,可以按照现有技术进行正常通信;Step 531, after the terminal finishes switching from OMAP to NMAP, it can perform normal communication according to the existing technology;

步骤532:在步骤520的新归属网关地址注册成功后,新归属网关向mesh中的HA(home agent,归属代理)发起Mobile IP的banding up流程,根据代理更新消息中携带的终端的归属代理HA的地址,新归属网关向HA发送BU(banding up,绑定更新)消息,在banding up的消息中需要携带原归属网关的IP地址、分配给终端的原归属网关port,和新归属网关的IP地址、分配给终端的新归属网关port信息;Step 532: After the new home gateway address registration in step 520 is successful, the new home gateway initiates the banding up process of Mobile IP to the HA (home agent, home agent) in the mesh, according to the home agent HA of the terminal carried in the agent update message address, the new home gateway sends a BU (banding up, binding update) message to the HA, and the banding up message needs to carry the IP address of the original home gateway, the original home gateway port assigned to the terminal, and the IP of the new home gateway Address, new home gateway port information assigned to the terminal;

步骤533、HA接收BU消息,保存<原归属网关IP:原归属网关port>与<新归属网关IP:新归属网关port>的对应关系;Step 533, the HA receives the BU message, and saves the corresponding relationship between <original home gateway IP: original home gateway port> and <new home gateway IP: new home gateway port>;

步骤534、HA向新归属网关返回确认(back)消息;Step 534, HA returns confirmation (back) message to new home gateway;

步骤535、之后,HA接收发给<原归属网关IP:原归属网关port>的数据包,将其转发给<新归属网关IP:新归属网关port>,从而实现将发给<原归属网关IP:原归属网关port>的消息转发给<新归属网关IP:新归属网关port>;Step 535. Afterwards, the HA receives the data packet sent to <original home gateway IP: original home gateway port> and forwards it to <new home gateway IP: new home gateway port>, so as to realize the packet sent to <original home gateway IP : The message of the original home gateway port> is forwarded to <new home gateway IP: new home gateway port>;

其中,在AT设备建立地址转换关系时,由于网关可能不具有IP地址,所以可以采用AT设备自身的IP地址和端口号port建立地址转换关系,此时,banding up的消息中携带<原AT设备IP:原AT设备port>和<新AT设备IP:新AT设备port>,从而实现将发给<原AT设备IP:原AT设备port>的消息转发给<新AT设备IP:新AT设备port>,保证终端可以正确接收外部网络发送给终端的数据包。Among them, when the AT device establishes the address translation relationship, since the gateway may not have an IP address, the IP address of the AT device itself and the port number port can be used to establish the address translation relationship. At this time, the banding up message carries <original AT device IP: original AT device port> and <new AT device IP: new AT device port>, so as to forward the message sent to <original AT device IP: original AT device port> to <new AT device IP: new AT device port> >, to ensure that the terminal can correctly receive the data packets sent from the external network to the terminal.

本实施例中,由于OMAP和NMAP对应终端的归属网关发生变化,因此,OMAP和NMAP存在不能二层直接通信的情况,这时,OMAP和NMAP的通信基于IP层的互通,以OMAP发送消息给NMAP为例:源IP地址使用OMAP的IP地址,这个IP地址是mesh网络的统一的IP地址,这个IP地址在数据包通过OGW的时候,会改为OGW的地址,并且源port基于AT机制设为OMAP在OGW中注册的Port,即根据AT设备中保存的<OMAP的MAC地址:port>与<网关节点的IP地址:网关port>的转换关系,将数据包中的<OMAP的MAC地址:port>转换为对应的<网关节点的IP地址:网关port>;目的IP地址使用NGW的IP地址,目的port基于AT机制设为NMAP在NGW中注册的port。NMAP发送消息给OMAP与之类似,不再赘述。In this embodiment, because the home gateway of the terminal corresponding to OMAP and NMAP changes, there is a situation that OMAP and NMAP cannot communicate directly at the second layer. At this time, the communication between OMAP and NMAP is based on the intercommunication of the IP layer. Take NMAP as an example: the source IP address uses the IP address of OMAP. This IP address is the unified IP address of the mesh network. When the data packet passes through the OGW, this IP address will be changed to the OGW address, and the source port is set based on the AT mechanism. It is the Port registered in OGW for OMAP, that is, according to the conversion relationship between <OMAP MAC address: port> and <gateway node IP address: gateway port> saved in the AT device, the <OMAP MAC address in the data packet: port> is converted to the corresponding <IP address of the gateway node: gateway port>; the destination IP address uses the IP address of the NGW, and the destination port is set to the port registered in the NGW by NMAP based on the AT mechanism. Sending a message from NMAP to OMAP is similar and will not be repeated here.

本实施例中,终端在切换的时候,原MAP将<终端的MAC地址:终端port>携带在切换请求中发送给新MAP,新MAP保存该<终端的MAC地址:终端port>,之后可以根据该<终端的MAC地址:终端port>通过终端的新归属网关与外部网络进行通信,终端在切换过程(步骤216~步骤220)中,MAP不需要重新为终端配置IP地址,终端直接采用全网统一的IP,使终端在切换前后IP地址不变,从而消除了因重新配置IP地址造成的切换时延增加的问题,减小了切换时延,提高了网络的服务性能。并且,由于新MAP与原MAP属于不同的网关,新MAP进一步在新归属网关上建立终端的地址转换关系,并与HA进行banding up流程,保证了切换后的终端能够正确收发与外部网络相关的数据包,与外部网络进行通信。In this embodiment, when the terminal is switching, the original MAP carries <terminal MAC address: terminal port> in the switching request and sends it to the new MAP, and the new MAP saves the <terminal MAC address: terminal port>. The <terminal MAC address: terminal port> communicates with the external network through the new home gateway of the terminal. During the switching process (step 216-step 220) of the terminal, the MAP does not need to reconfigure the IP address for the terminal, and the terminal directly uses the whole network The unified IP keeps the IP address of the terminal unchanged before and after switching, thereby eliminating the problem of increased switching delay caused by reconfiguring the IP address, reducing the switching delay, and improving network service performance. Moreover, since the new MAP and the original MAP belong to different gateways, the new MAP further establishes the address translation relationship of the terminal on the new home gateway, and performs a banding up process with the HA to ensure that the switched terminal can correctly send and receive messages related to the external network. packets, to communicate with the external network.

实施例六Embodiment six

如附图6所示,本实施例提供了一种mesh网络系统,该系统包括:有无线接入功能的STA61(station,终端设备),组成mesh网络的MP62(meshpoint,mesh点)和MAP63(Mesh access point,mesh接入点),mesh网络与internet等其它网络的接口设备GW64(gateway,网关),mesh网络中用于支持MIP(mobile IP,移动IP)协议的HA65(home agent,归属代理)。As shown in accompanying drawing 6, present embodiment provides a kind of mesh network system, and this system comprises: STA61 (station, terminal equipment) with wireless access function, MP62 (meshpoint, mesh point) and MAP63 ( Mesh access point, mesh access point), the interface device GW64 (gateway, gateway) between the mesh network and the Internet and other networks, and the HA65 (home agent, home agent) used to support the MIP (mobile IP, mobile IP) protocol in the mesh network ).

终端STA61通过mesh接入点MAP63接入mesh网络进行通信,当终端需要与mesh网络以外的设备进行通信时,网关GW64对终端STA61和mesh网络以外的设备的数据交换进行转发。The terminal STA61 accesses the mesh network through the mesh access point MAP63 to communicate. When the terminal needs to communicate with devices outside the mesh network, the gateway GW64 forwards the data exchange between the terminal STA61 and the devices outside the mesh network.

MAP63设备的功能模块如图7所述,MAP63包括:The functional modules of the MAP63 device are described in Figure 7, and the MAP63 includes:

接收模块71,用于接收来自STA、GW、其它MAP或者MP设备的数据包;A receiving module 71, configured to receive data packets from STA, GW, other MAP or MP devices;

发送模块72,用于发送发往STA、GW、其它MAP或者MP设备的数据包;Sending module 72, for sending the data packet sent to STA, GW, other MAP or MP equipment;

MAC处理模块73,用于根据接收模块71收到的数据包,如果是DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)相关数据包,将其发送至IP地址分配模块74;如果是ARP(Address Resolution Protocol,地址解析协议)相关数据包,将其发送至ARP处理模块75;如果是其它数据包,则判断数据包是否是发送给本设备的,如果不是,则根据MAC的路由信息将其发送给发送模块,如果是发送给本设备,则MAC处理模块73将数据包发送给相应的处理模块进行处理;MAC处理模块73接收由IP地址分配模块74、ARP处理模块75发送的数据包,根据MAC的路由信息将其发送给发送模块72发送出去;MAC processing module 73, for the packet received according to receiving module 71, if it is DHCP (Dynamic Host Configuration Protocol, dynamic host configuration protocol) related packet, it is sent to IP address assignment module 74; If it is ARP (Address Resolution Protocol, Address Resolution Protocol) relevant data packets, send it to ARP processing module 75; If it is other data packets, then judge whether data packets are sent to this equipment, if not, then send it according to the route information of MAC To the sending module, if it is sent to this equipment, then the MAC processing module 73 sends the data packet to the corresponding processing module for processing; the MAC processing module 73 receives the data packet sent by the IP address assignment module 74, the ARP processing module 75, according to The routing information of MAC sends it to sending module 72 to send out;

IP地址分配模块74,用于接收由MAC处理模块73发送的DHCP相关数据包,为相应的DHCP响应报文配置预先设置的整个mesh网络默认的全网统一的IP地址,将DHCP响应报文发送给MAC处理模块73;当接收的DHCP相关数据包是终端发出的请求一个发现DHCP服务器的DHCPDiscover消息时,发送DHCP offer信息给MAC处理模块73,并进一步由MAC处理模块73经发送模块72发送终端,在DHCP offer中包括全网统一的IP地址,其租用期为永久有效;The IP address distribution module 74 is used to receive the DHCP-related data packets sent by the MAC processing module 73, configure the default unified IP address of the entire mesh network that is preset for the corresponding DHCP response message, and send the DHCP response message To the MAC processing module 73; when the received DHCP-related packet is a request from the terminal to find a DHCPDiscover message of the DHCP server, send the DHCP offer information to the MAC processing module 73, and further send the terminal via the sending module 72 by the MAC processing module 73 , the DHCP offer includes a unified IP address for the entire network, and its lease period is permanently valid;

ARP处理模块75,用于接收由MAC处理模块73发送的ARP请求数据包,将ARP请求的IP地址解析成GW的MAC地址,将ARP响应发送给MAC处理模块73。The ARP processing module 75 is configured to receive the ARP request packet sent by the MAC processing module 73 , resolve the IP address of the ARP request into the MAC address of the GW, and send the ARP response to the MAC processing module 73 .

网关设备64的功能模块如图8所示,网关64包括:The functional modules of the gateway device 64 are as shown in Figure 8, and the gateway 64 includes:

第二接收模块81,用于接收来自STA、GW、其它MAP或者MP设备的数据包;The second receiving module 81 is configured to receive data packets from STA, GW, other MAP or MP devices;

第二发送模块82,用于发送发往STA、GW、其它MAP或者MP设备的数据包;The second sending module 82 is used to send data packets sent to STA, GW, other MAP or MP devices;

第二MAC处理模块83,用于接收由第二接收模块81发送的数据包,如果是注册或删除<终端的MAC地址:port>与<网关节点的IP地址:port>的转换关系的数据包,则将数据包发送给地址转换模块84;对于其它数据包,则发送给IP处理模块85;接收地址转换模块84和IP处理模块85发送的数据包,并将其发送给第二发送模块82;The second MAC processing module 83 is used to receive the data packet sent by the second receiving module 81, if it is to register or delete the data packet of the conversion relationship between <terminal MAC address: port> and <gateway node IP address: port> , then the packet is sent to the address translation module 84; for other packets, it is sent to the IP processing module 85; the packet sent by the address translation module 84 and the IP processing module 85 is sent to the second sending module 82 ;

地址转换模块84,用于接收由MAC处理模块83发送的注册或删除<终端的MAC地址:port>与<网关节点的IP地址:port>的转换关系的数据包,进行相应的处理后返回相应的确认消息给MAC处理模块83;接收IP处理模块85查询<终端的MAC地址:port>与<网关节点的IP地址:port>的转换关系的请求,并根据查询结果响应IP处理模块85;接收MAC处理模块83删除<终端的MAC地址:port>与<网关节点的IP地址:port>的转换关系的请求,删除后返回相应的确认消息给MAC处理模块83;保存并维护所有向本网关设备注册的<终端的MAC地址:port>与<网关节点的IP地址:port>的转换关系表;当接收到注册<终端的MAC地址:port>与<网关节点的IP地址:port>的转换关系的请求时,分配一个网关的Port给注册的终端,将<终端的MAC地址:port>与<网关节点的IP地址:port>的转换关系加入转换关系表,返回加入的结果;当接收到查询<终端的MAC地址:port>与<网关节点的IP地址:port>的转换关系的请求时,查询转换关系表并返回相应的查询结果;当接收到删除<终端的MAC地址:port>与<网关节点的IP地址:port>的转换关系的请求时,在转换关系表中删除相应表项,返回删除的结果;支持Mobile IP协议;The address conversion module 84 is used to receive the data packet sent by the MAC processing module 83 to register or delete the conversion relationship between <terminal MAC address: port> and <gateway node's IP address: port>, and return to the corresponding packet after corresponding processing The confirmation message is given to the MAC processing module 83; the receiving IP processing module 85 inquires about the request of the conversion relationship between <the MAC address of the terminal: port> and <the IP address of the gateway node: port>, and responds to the IP processing module 85 according to the query result; receiving MAC processing module 83 deletes <terminal's MAC address: port> and <gateway node's IP address: port> request of conversion relation, returns corresponding confirmation message to MAC processing module 83 after deleting; Save and maintain all to this gateway equipment Registered conversion relationship between <terminal MAC address: port> and <gateway node IP address: port>; when receiving the registered conversion relationship between <terminal MAC address: port> and <gateway node IP address: port> When a request is made, assign a port of the gateway to the registered terminal, add the conversion relationship between <terminal MAC address: port> and <gateway node IP address: port> into the conversion relationship table, and return the result of the addition; when the query is received When requesting the conversion relationship between <terminal MAC address: port> and <gateway node IP address: port>, query the conversion relationship table and return the corresponding query result; when receiving the request to delete <terminal MAC address: port> and < IP address of the gateway node: When requesting the conversion relationship of port>, delete the corresponding entry in the conversion relationship table and return the deleted result; support Mobile IP protocol;

IP处理模块85,用于接收由MAC处理模块83发送的数据包,向地址转换模块81查询相应的<终端的MAC地址:port>与<网关节点的IP地址:port>的转换关系,根据查询结果做出相应的处理后发送回MAC处理模块83;其中,相应的处理可以是,接收由MAC处理模块83发送的数据包,如果数据包的源IP地址是mesh全网统一的IP地址,那么根据数据包的<源MAC地址:port>向地址转换模块84查询<终端的MAC地址:port>与<网关节点的IP地址:port>的转换关系,根据查询到的结果将源IP地址和port改为设备本身(即网关节点)的IP地址和port,发往目的设备,或者,如果数据包的目的地址是设备本身的IP地址,那么根据数据包的<目的IP地址:port>信息向地址转换模块84查询<终端的MAC地址:port>与<网关节点的IP地址:port>的转换关系,根据查询到的结果将目的IP地址和port改为全网统一的IP地址和port,并将目的MAC地址置为查询到的终端MAC地址,发往目的终端。The IP processing module 85 is used to receive the packet sent by the MAC processing module 83, and inquires the conversion relationship between the corresponding <terminal MAC address: port> and <the gateway node's IP address: port> to the address translation module 81, according to the query The result is sent back to the MAC processing module 83 after making corresponding processing; Wherein, corresponding processing can be, receive the data packet that is sent by the MAC processing module 83, if the source IP address of data packet is the unified IP address of mesh whole network, then According to the <source MAC address of data packet: port> to address conversion module 84 inquiry <terminal MAC address: port> and <the IP address of gateway node: port> conversion relation, source IP address and port according to the result of inquiry Change it to the IP address and port of the device itself (that is, the gateway node), and send it to the destination device, or, if the destination address of the data packet is the IP address of the device itself, then according to the <destination IP address: port> information of the data packet to the address The conversion module 84 inquires about the conversion relationship between <the MAC address of the terminal: port> and <the IP address of the gateway node: port>, changes the destination IP address and port into the unified IP address and port of the whole network according to the result of the query, and The destination MAC address is set to the queried terminal MAC address and sent to the destination terminal.

实施例七Embodiment seven

本实施例提供了一种mesh网络系统,如图9所示,该系统包括:初次接入的终端91、从MAP95向MAP92切换的终端96,mesh接入点MAP92、MAP95,网关93、地址转换设备94;This embodiment provides a mesh network system, as shown in Figure 9, the system includes: a terminal 91 for initial access, a terminal 96 switched from MAP95 to MAP92, mesh access points MAP92, MAP95, gateway 93, address translation device 94;

终端91,用于向MAP92发送DHCP发现(DHCP discover)消息,该DHCP发现消息中携带终端91的地址和终端91的端口号(用port1表示);接收MAP92发送的携带mesh网络统一IP地址的DHCP提供(DHCP offer)消息;Terminal 91 is used to send a DHCP discovery (DHCP discover) message to MAP92, which carries the address of terminal 91 and the port number (expressed with port1) of terminal 91 in the DHCP discovery message; receives the DHCP carrying the uniform IP address of the mesh network sent by MAP92 Provide (DHCP offer) message;

MAP92,用于接收终端91发送的DHCP发现消息,发送DHCP提供消息给终端92,其中,DHCP提供消息中携带mesh网络统一IP地址;并向网关93发送代理更新消息,其中,代理更新消息中携带终端91的地址、端口号port1,和MAP92的地址;MAP92 is used to receive the DHCP discovery message sent by the terminal 91, and send a DHCP offer message to the terminal 92, wherein the DHCP offer message carries the unified IP address of the mesh network; and sends an agent update message to the gateway 93, wherein the agent update message carries The address of terminal 91, the port number port1, and the address of MAP92;

网关93,用于接收MAP92发送的代理更新消息,将终端的代理信息(<终端91的地址:port1>与MAP92的地址的对应关系)保存在代理信息表中,并向MAP92返回代理更新成功消息;向地址转换设备94发送地址注册消息,该地址注册消息中携带<终端91的地址:port1>;Gateway 93 is used to receive the agent update message sent by MAP92, save the agent information of the terminal (the correspondence between <the address of terminal 91: port1> and the address of MAP92) in the agent information table, and return the agent update success message to MAP92 ; Send an address registration message to the address conversion device 94, the address registration message carries <address of the terminal 91: port1>;

地址转换设备94,用于接收网关93发送的地址注册消息,为终端91分配一个端口号port2,该端口号port2属于网关93或地址转换设备94的IP地址,并建立<终端91的地址:port1>与<网关93的IP地址:port2>(或者<地址转换设备94的IP地址:port2>)的地址转换关系;向网关93返回地址注册成功消息。The address conversion device 94 is used to receive the address registration message sent by the gateway 93, and distributes a port number port2 for the terminal 91. The port number port2 belongs to the IP address of the gateway 93 or the address conversion device 94, and establishes the address of the terminal 91: port1 > Address translation relationship with <IP address of gateway 93: port2> (or <IP address of address translation device 94: port2>); return address registration success message to gateway 93.

其中,如图10所示,MAP92可以包括:第一接收模块921,用于接收终端91发送的DHCP发现消息或其他MAP95发送的快速切换请求或终端96发送的切换完成请求,其中,该DHCP发现消息包括终端91的MAC地址和终端91的端口号port1,该快速切换请求包括将从其他MAP95切换至MAP92的终端96的MAC地址和该终端96的端口号port6,该切换完成请求包括终端96的MAC地址和该终端96的端口号port6;第一处理模块922,用于根据第一接收模块921接收的DHCP发现消息,构建DHCP提供消息和代理更新消息,其中,该DHCP提供消息包括全网统一IP地址,该代理更新消息包括终端91的MAC地址、终端91的端口号port1和MAP92的MAC地址;第一发送模块923,用于向终端91发送第一处理模块922构建的DHCP提供消息,向网关93发送第一处理模块922构建的代理更新消息。第一处理模块922可以进一步包括:DHCP单元9221,用于根据第一接收模块921接收的DHCP发现消息,构建DHCP提供消息和代理更新消息,并触发第一发送模块923发送构建的DHCP提供消息和代理更新消息,其中,该代理更新消息包括终端91的MAC地址、终端91的端口号port1和MAP92的MAC地址;快速切换单元9222,用于根据第一接收模块921接收的快速切换请求,构建代理更新消息,其中,该代理更新消息包括终端96的MAC地址、终端96的端口号port6和MAP92的MAC地址。或者,第一处理模块922可以进一步包括:DHCP单元9221,用于根据第一接收模块921接收的DHCP发现消息,构建DHCP提供消息和代理更新消息,并触发第一发送模块923发送构建的DHCP提供消息和代理更新消息,其中,该代理更新消息包括终端91的MAC地址、终端91的端口号port1和MAP92的MAC地址;切换完成单元9223,用于根据第一接收模块921接收的切换完成请求,构建代理更新消息,其中,该代理更新消息包括终端96的MAC地址、终端96的端口号port6和MAP92的MAC地址。Wherein, as shown in FIG. 10 , MAP92 may include: a first receiving module 921, configured to receive a DHCP discovery message sent by terminal 91 or a fast switching request sent by other MAP95 or a switching completion request sent by terminal 96, wherein the DHCP discovery message The message includes the MAC address of the terminal 91 and the port number port1 of the terminal 91, and the fast switching request includes the MAC address of the terminal 96 and the port number port6 of the terminal 96 which will be switched from other MAP95 to the MAP92, and the switching completion request includes the port number port6 of the terminal 96. The MAC address and the port number port6 of the terminal 96; the first processing module 922 is configured to construct a DHCP offer message and an agent update message according to the DHCP discovery message received by the first receiving module 921, wherein the DHCP offer message includes a network-wide unified IP address, the proxy update message includes the MAC address of the terminal 91, the port number port1 of the terminal 91 and the MAC address of the MAP92; the first sending module 923 is used to send the DHCP provided by the first processing module 922 to the terminal 91 and provide a message to the terminal 91. The gateway 93 sends the proxy update message constructed by the first processing module 922 . The first processing module 922 may further include: a DHCP unit 9221, configured to construct a DHCP offer message and an agent update message according to the DHCP discovery message received by the first receiving module 921, and trigger the first sending module 923 to send the constructed DHCP offer message and An agent update message, wherein the agent update message includes the MAC address of the terminal 91, the port number port1 of the terminal 91, and the MAC address of the MAP92; the fast switching unit 9222 is configured to construct a proxy according to the fast switching request received by the first receiving module 921 An update message, wherein the proxy update message includes the MAC address of the terminal 96, the port number port6 of the terminal 96, and the MAC address of the MAP92. Alternatively, the first processing module 922 may further include: a DHCP unit 9221 configured to construct a DHCP offer message and an agent update message according to the DHCP discovery message received by the first receiving module 921, and trigger the first sending module 923 to send the constructed DHCP offer message. message and an agent update message, wherein the agent update message includes the MAC address of the terminal 91, the port number port1 of the terminal 91, and the MAC address of the MAP92; the switching completion unit 9223 is configured to receive the switching completion request according to the first receiving module 921, A proxy update message is constructed, wherein the proxy update message includes the MAC address of the terminal 96, the port number port6 of the terminal 96, and the MAC address of the MAP92.

其中,如图11所示,网关93可以包括:第二接收模块931,用于接收MAP92发送的代理更新消息;代理信息模块932,用于根据第二接收模块931接收的代理更新消息,在代理信息表中保存<终端91的MAC地址:port1>(或<终端96的MAC地址:port6>)与MAP92的MAC地址的对应关系;第二发送模块933,用于向地址转换设备94发送地址注册消息,该地址注册消息包括<终端91的MAC地址:port1>(或<终端96的MAC地址:port6>),或,发送代理更新成功消息给第一接收模块921。代理更新模块932可以进一步包括:代理表单元9321,用于保存代理信息;更新判断单元9322,用于根据代理表单元9321中保存的代理信息,判断保存的代理信息中是否有终端91的代理信息,如果已经存在终端91的代理信息,则将代理表单元9321中终端91的原代理信息替换为第二接收模块931新接收的代理更新消息中的<终端91的MAC地址:port1>(或<终端96的MAC地址:port6>)与MAP92的MAC地址的对应关系,并触发第二发送模块933发送代理更新成功消息给第一接收模块921,如果不存在终端91的代理信息,则在代理表单元9321中添加终端91的代理信息,即第二接收模块931新接收的代理更新消息中的<终端91的MAC地址:port1>(或<终端96的MAC地址:port6>)与MAP92的MAC地址的对应关系,并触发第二发送模块933发送代理更新成功消息给第一接收模块921和发送地址注册消息给地址转换设备94。Wherein, as shown in FIG. 11 , the gateway 93 may include: a second receiving module 931, configured to receive the agent update message sent by the MAP92; an agent information module 932, configured to receive the agent update message according to the second receiving module 931, in the agent The corresponding relationship between <the MAC address of the terminal 91: port1> (or <the MAC address of the terminal 96: port6>) and the MAC address of the MAP92 is stored in the information table; the second sending module 933 is used to send the address registration to the address translation device 94 message, the address registration message includes <MAC address of the terminal 91: port1> (or <MAC address of the terminal 96: port6>), or, send an agent update success message to the first receiving module 921. The proxy update module 932 may further include: a proxy table unit 9321 for storing proxy information; an update judging unit 9322 for judging whether there is proxy information of the terminal 91 in the stored proxy information according to the proxy information stored in the proxy table unit 9321 , if the proxy information of the terminal 91 already exists, then the original proxy information of the terminal 91 in the proxy table unit 9321 is replaced by <the MAC address of the terminal 91: port1> (or < The MAC address of terminal 96: port6>) and the corresponding relationship of the MAC address of MAP92, and trigger the second sending module 933 to send agent update success message to the first receiving module 921, if there is no agent information of terminal 91, then in agent table The proxy information of the terminal 91 is added in the unit 9321, that is, <the MAC address of the terminal 91: port1> (or <the MAC address of the terminal 96: port6>) and the MAC address of the MAP92 in the proxy update message newly received by the second receiving module 931 and trigger the second sending module 933 to send a proxy update success message to the first receiving module 921 and send an address registration message to the address translation device 94 .

其中,如图12所示,地址转换设备94可以包括:第三接收模块941,用于接收网关93发送的地址注册消息;地址转换模块942,用于根据第三接收模块941接收的地址注册消息,建立<终端91的MAC地址:port1>(或<终端96的MAC地址:port6>)与<网关93的IP地址:port2>(或者<地址转换设备94的IP地址:port2>)的地址转换关系,并在地址转换关系表中保存该建立的地址转换关系;第三发送模块943,用于发送地址注册成功消息给第二接收模块931。Wherein, as shown in FIG. 12 , the address conversion device 94 may include: a third receiving module 941, configured to receive the address registration message sent by the gateway 93; an address conversion module 942, configured to receive the address registration message according to the third receiving module 941 , establish address translation between <the MAC address of the terminal 91: port1> (or <the MAC address of the terminal 96: port6>) and <the IP address of the gateway 93: port2> (or <the IP address of the address translation device 94: port2>) relationship, and save the established address translation relationship in the address translation relationship table; the third sending module 943 is configured to send an address registration success message to the second receiving module 931 .

本实施例的系统中,还可以进一步包括归属代理HA97,用于接收地址转换设备94发送的BU(banding up,绑定更新)消息,该BU消息中携带切换终端96的原归属网关的IP地址、分配给终端96的原归属网关port,和终端96的新归属网关的IP地址、分配给终端96的新归属网关port信息,<终端96的原归属网关IP:终端96的原归属网关port>与<终端96的新归属网关IP:终端96的新归属网关port>的对应关系,返回确认消息给地址转换设备94。In the system of this embodiment, the home agent HA97 may further be included, which is used to receive the BU (banding up, binding update) message sent by the address translation device 94, and the BU message carries the IP address of the original home gateway of the switching terminal 96 , the original home gateway port assigned to the terminal 96, and the IP address of the new home gateway of the terminal 96, the new home gateway port information assigned to the terminal 96, <the original home gateway IP of the terminal 96: the original home gateway port of the terminal 96> For the corresponding relationship with <the new home gateway IP of the terminal 96:the new home gateway port of the terminal 96>, a confirmation message is returned to the address translation device 94 .

本实施例中,终端在切换的时候,原MAP将<终端的MAC地址:终端port>携带在快速切换请求中发送给新MAP,新MAP保存该<终端的MAC地址:终端port>,之后可以根据该<终端的MAC地址:终端port>通过终端的新归属网关与外部网络进行通信,终端在切换过程(步骤216~步骤220)中,MAP不需要重新为终端配置IP地址,终端直接采用全网统一的IP,使终端在切换前后IP地址不变,从而消除了因重新配置IP地址造成的切换时延增加的问题,减小了切换时延,提高了网络的服务性能。并且,由于新MAP与原MAP属于不同的网关,新MAP进一步在新归属网关上建立终端的地址转换关系,并与HA进行banding up流程,保证了切换后的终端能够正确收发与外部网络相关的数据包,与外部网络进行通信。In this embodiment, when the terminal is switching, the original MAP carries <terminal MAC address: terminal port> in the fast handover request and sends it to the new MAP, and the new MAP saves the <terminal MAC address: terminal port>, and then can According to the <terminal MAC address: terminal port>, the terminal communicates with the external network through the new home gateway of the terminal. During the handover process (step 216-step 220), the MAP does not need to reconfigure the IP address for the terminal, and the terminal directly adopts the full The unified IP of the network makes the IP address of the terminal unchanged before and after switching, thereby eliminating the problem of increased switching delay caused by reconfiguring the IP address, reducing the switching delay, and improving the service performance of the network. Moreover, since the new MAP and the original MAP belong to different gateways, the new MAP further establishes the address translation relationship of the terminal on the new home gateway, and performs a banding up process with the HA to ensure that the switched terminal can correctly send and receive messages related to the external network. packets, to communicate with the external network.

本实施例中,地址转换设备94是一个逻辑实体,可以具体实现为网关93的一个模块。In this embodiment, the address translation device 94 is a logical entity, and may be specifically implemented as a module of the gateway 93 .

本实施例中,终端在接入网络时,MAP将全网统一的IP地址携带在DHCP提供消息中配置给终端,之后终端以此IP地址与外部网络进行通信,并且由于配置的IP地址是全网统一的,所以终端在切换过程中也不必进行IP地址的重分配,从而消除了因重新配置IP地址造成的切换时延增加的问题,减小了切换时延,提高了网络的服务性能。In this embodiment, when the terminal accesses the network, the MAP carries the uniform IP address of the entire network in the DHCP offer message and configures it for the terminal, and then the terminal uses this IP address to communicate with the external network. The network is unified, so the terminal does not need to redistribute the IP address during the switching process, thereby eliminating the problem of increased switching delay caused by reconfiguring the IP address, reducing the switching delay, and improving the service performance of the network.

本发明各实施例,由于终端配置了全网统一的IP,因此终端在mesh网络中切换时不需要重置终端的IP,减小了切换时延,提高了网络的服务性能,并且在此基础上,本发明各实施例的技术方案能够与现有网络良好的兼容,极大的降低网络升级成本。In each embodiment of the present invention, since the terminal is configured with a unified IP of the entire network, the terminal does not need to reset the IP of the terminal when switching in the mesh network, which reduces the switching delay and improves the service performance of the network. Above all, the technical solution of each embodiment of the present invention can be well compatible with the existing network, greatly reducing the cost of network upgrade.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in a computer-readable storage medium. During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM), etc.

总之,以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。In a word, the above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (18)

1.一种mesh网络中终端接入的方法,其特征在于,包括:1. A method for terminal access in a mesh network, characterized in that, comprising: mesh接入点建立与接入终端的关联;The mesh access point establishes an association with the access terminal; mesh接入点接收所述终端发送的第一消息,其中,所述第一消息中包括终端地址和终端的端口号;The mesh access point receives the first message sent by the terminal, where the first message includes a terminal address and a port number of the terminal; mesh接入点向所述终端发送第二消息,其中,所述第二消息中包括全网统一的IP地址,用于终端利用所述全网统一的IP地址与外部网络进行通信。The mesh access point sends a second message to the terminal, where the second message includes a network-wide unified IP address, for the terminal to use the network-wide unified IP address to communicate with an external network. 2.如权利要求1所述的方法,其特征在于,所述第一消息为DHCP发现消息,所述第二消息为DHCP提供消息,所述mesh接入点在接收到所述DHCP发现消息后,将所述全网统一的IP地址携带在所述DHCP提供消息中返回给终端。2. The method according to claim 1, wherein the first message is a DHCP discovery message, the second message is a DHCP provision message, and the mesh access point receives the DHCP discovery message , carrying the unified IP address of the entire network in the DHCP offer message and returning it to the terminal. 3.如权利要求1或2所述的方法,其特征在于,所述关联为MAC通信链路,所述终端地址为终端的MAC地址,所述方法还包括:3. The method according to claim 1 or 2, wherein the association is a MAC communication link, and the terminal address is the MAC address of the terminal, and the method further comprises: 所述mesh接入点获取所述第一消息中终端的MAC地址和终端的端口号;The mesh access point obtains the MAC address of the terminal and the port number of the terminal in the first message; 为终端选择一个网关作为终端的归属网关;Select a gateway for the terminal as the home gateway of the terminal; 向所述归属网关发送代理更新消息,其中,所述代理更新消息包括终端的MAC地址和终端的端口号。sending a proxy update message to the home gateway, where the proxy update message includes the MAC address of the terminal and the port number of the terminal. 4.如权利要求3所述的方法,其特征在于,所述方法还包括:4. The method of claim 3, further comprising: 所述归属网关根据所述代理更新消息,保存终端的代理信息,其中,所述代理信息为所述终端和所述mesh节点的对应关系;The home gateway saves the proxy information of the terminal according to the proxy update message, where the proxy information is the corresponding relationship between the terminal and the mesh node; 所述归属网关分配一个网关端口号给所述终端,建立地址转换对应关系,其中,所述地址转换对应关系为终端的MAC地址和终端的端口号与网关的IP地址和网关端口号的对应转换关系。The home gateway assigns a gateway port number to the terminal, and establishes an address translation correspondence, wherein the address translation correspondence is the corresponding translation between the terminal's MAC address and the terminal's port number, and the gateway's IP address and gateway port number relation. 5.一种mesh网络代理更新的方法,其特征在于,网络中的终端被配置为全网统一的IP地址,所述方法包括:5. a method for mesh network agent update, it is characterized in that, the terminal in the network is configured as the unified IP address of the whole network, and described method comprises: 目标mesh接入点接收第一消息,其中,所述第一消息包括终端地址和终端的端口号,所述目标mesh接入点为所述终端将切换到的mesh接入点;The target mesh access point receives a first message, wherein the first message includes a terminal address and a port number of the terminal, and the target mesh access point is a mesh access point to which the terminal will switch; 所述目标mesh接入点将所述第一消息中的终端地址和终端的端口号携带在代理更新消息中,向网关发送代理更新消息;其中,所述代理更新消息用于所述网关进行代理更新。The target mesh access point carries the terminal address and the port number of the terminal in the first message in a proxy update message, and sends a proxy update message to the gateway; wherein, the proxy update message is used for the gateway to perform proxy renew. 6.如权利要求5所述的方法,其特征在于,所述终端地址为终端的MAC地址,所述终端的IP地址是全网统一的IP地址。6. The method according to claim 5, wherein the terminal address is a MAC address of the terminal, and the IP address of the terminal is a unified IP address of the entire network. 7.如权利要求6所述的方法,其特征在于,所述第一消息为所述终端切换前的原mesh接入点发送的快速切换请求消息,所述切换请求消息包括终端的MAC地址、终端的端口号和终端切换时需申请的资源信息,所述方法还包括:7. The method according to claim 6, wherein the first message is a fast handover request message sent by the original mesh access point before the terminal handover, and the handover request message includes the terminal's MAC address, The port number of the terminal and the resource information to be applied for when the terminal is switched, the method also includes: 所述目标mesh接入点根据所述终端切换时需申请的资源信息,进行资源预留。The target mesh access point performs resource reservation according to the resource information that the terminal needs to apply for when switching. 8.如权利要求6所述的方法,其特征在于,所述第一消息为所述终端发送的切换完成请求消息,所述切换完成请求消息包括终端的MAC地址、终端的端口号,在所述目标mesh接入点接收第一消息之前,所述方法还包括:8. The method according to claim 6, wherein the first message is a handover completion request message sent by the terminal, and the handover completion request message includes the MAC address of the terminal and the port number of the terminal, and in the Before the target mesh access point receives the first message, the method further includes: 所述目标mesh接入点与所述终端建立关联,所述关联是MAC层通信链路,用于传输所述切换完成请求消息。The target mesh access point establishes an association with the terminal, and the association is a MAC layer communication link for transmitting the handover completion request message. 9.如权利要求7或8所述的方法,其特征在于,所述方法还包括:9. The method according to claim 7 or 8, further comprising: 如果所述终端切换后的目标mesh接入点和切换前的原mesh接入点都存在至同一网关的可达路由,则所述网关根据所述代理更新消息,更新终端的代理信息,将所述终端和所述原mesh接入节点的对应关系替换为所述终端和所述目标mesh接入节点的对应关系;或者,If both the target mesh access point after the terminal is switched and the original mesh access point before the switch have reachable routes to the same gateway, the gateway updates the proxy information of the terminal according to the proxy update message, and transfers the The corresponding relationship between the terminal and the original mesh access node is replaced by the corresponding relationship between the terminal and the target mesh access node; or, 如果所述终端切换后的目标mesh接入点和切换前的原mesh接入点不存在至同一网关的可达路由,则所述网关根据所述代理更新消息,更新终端的代理信息,保存所述终端和所述目标mesh接入节点的对应关系,并分配一个网关端口号给所述终端,建立地址转换对应关系,其中,所述地址转换对应关系为终端的MAC地址和终端的端口号与网关的IP地址和网关端口号的对应转换关系。If the target mesh access point after the terminal is switched and the original mesh access point before the switch do not have a reachable route to the same gateway, the gateway updates the proxy information of the terminal according to the proxy update message, and saves all The corresponding relationship between the terminal and the target mesh access node, and assign a gateway port number to the terminal, and establish an address translation correspondence, wherein the address translation correspondence is the MAC address of the terminal and the port number of the terminal and The corresponding conversion relationship between the IP address of the gateway and the port number of the gateway. 10.如权利要求9所述的方法,其特征在于,所述方法还包括:10. The method of claim 9, further comprising: 所述切换前的原mesh接入点根据所述终端收集的候选mesh接入点信息,确定一个候选mesh接入点为所述目标mesh接入点;其中,所述原mesh接入点优先选择,和所述原mesh接入点存在至同一网关的可达路由的候选mesh接入点,为目标接入点。The original mesh access point before the handover determines a candidate mesh access point as the target mesh access point according to the candidate mesh access point information collected by the terminal; wherein, the original mesh access point preferably selects , and the candidate mesh access point that has a reachable route to the same gateway as the original mesh access point is the target access point. 11.一种mesh网关节点,其特征在于,所述节点包括:11. A mesh gateway node, characterized in that the node comprises: 接收模块,用于接收mesh接入点发送的代理更新消息;其中,所述代理更新消息包括终端的MAC地址和终端的端口号,所述终端被配置为全网统一的IP地址;The receiving module is configured to receive an agent update message sent by the mesh access point; wherein, the agent update message includes the MAC address of the terminal and the port number of the terminal, and the terminal is configured as a unified IP address throughout the network; 代理信息模块,用于根据所述接收模块接收的代理更新消息,保存终端和mesh接入点的对应关系为所述终端的代理信息;An agent information module, configured to save the corresponding relationship between the terminal and the mesh access point as the agent information of the terminal according to the agent update message received by the receiving module; 发送模块,用于在所述代理信息模块保存终端的代理信息后,发送代理更新成功消息给所述mesh接入点。A sending module, configured to send an agent update success message to the mesh access point after the agent information module saves the agent information of the terminal. 12.如权利要求11所述的节点,其特征在于,所述代理信息模块包括:12. The node according to claim 11, wherein the agent information module comprises: 代理表单元,用于保存代理信息;Proxy table unit, used to store proxy information; 更新判断单元,用于根据所述代理表单元中保存的代理信息,判断原先保存的代理信息中是否已有终端的代理信息,如果已经存在所述终端的代理信息,则将所述代理表单元中所述终端的原代理信息替换为所述终端与所述mesh接入点的对应关系,如果不存在所述终端的代理信息,则在所述代理表中添加所述终端与所述mesh接入点的对应关系。The update judging unit is used for judging whether there is proxy information of the terminal in the previously saved proxy information according to the proxy information stored in the proxy table unit, and if the proxy information of the terminal already exists, the proxy table unit is updated to The original proxy information of the terminal is replaced with the corresponding relationship between the terminal and the mesh access point. If there is no proxy information of the terminal, add the terminal and the mesh access point in the proxy table. Correspondence between entry points. 13.如权利要求12所述的节点,其特征在于,所述节点还包括:13. The node according to claim 12, wherein the node further comprises: 地址转换模块,用于当所述更新判断单元判断出所述原先保存的代理信息中不存在所述终端的代理信息时,为所述终端分配一个网关端口号,建立地址转换对应关系,其中,所述地址转换对应关系为终端的MAC地址和终端的端口号与网关的IP地址和网关端口号的对应转换关系。The address translation module is configured to assign a gateway port number to the terminal and establish an address translation correspondence when the update judging unit judges that the proxy information of the terminal does not exist in the previously stored proxy information, wherein, The address translation correspondence is a correspondence translation relationship between the MAC address of the terminal and the port number of the terminal, and the IP address of the gateway and the port number of the gateway. 14.一种mesh接入点,其特征在于,所述接入点包括:14. A mesh access point, characterized in that the access point comprises: 接收模块,用于接收第一消息,其中,所述第一消息包括终端的MAC地址和终端的端口号,所述终端被配置为全网统一的IP地址;A receiving module, configured to receive a first message, wherein the first message includes the MAC address of the terminal and the port number of the terminal, and the terminal is configured as a unified IP address throughout the network; 处理模块,用于根据所述接收模块接收的第一消息,构建代理更新消息,其中,所述代理更新消息包括终端的MAC地址和终端的端口号;A processing module, configured to construct a proxy update message according to the first message received by the receiving module, where the proxy update message includes the MAC address of the terminal and the port number of the terminal; 发送模块,用于向网关发送所述处理模块构建的代理更新消息;其中,所述代理更新消息用于所述网关进行代理更新。The sending module is configured to send the proxy update message constructed by the processing module to the gateway; wherein the proxy update message is used for the gateway to perform proxy update. 15.如权利要求14所述的接入点,其特征在于,所述处理模块包括:15. The access point according to claim 14, wherein the processing module comprises: 第一消息处理单元,用于如果所述接收模块接收的第一消息为所述终端发送的DHCP发现消息时,构建DHCP提供消息和代理更新消息;其中,所述DHCP提供消息包括全网统一的IP地址;The first message processing unit is configured to construct a DHCP offer message and an agent update message if the first message received by the receiving module is a DHCP discovery message sent by the terminal; wherein, the DHCP offer message includes a unified network-wide IP address; 第二消息处理单元,用于如果所述接收模块接收的第一消息为其他mesh接入点发送的快速切换请求时,或如果所述接收模块接收的第一消息为所述终端发送的切换完成请求时,构建代理更新消息;The second message processing unit is configured to if the first message received by the receiving module is a fast handover request sent by another mesh access point, or if the first message received by the receiving module is a handover completion sent by the terminal When requested, the build agent updates the message; 所述发送模块还用于,向所述终端发送DHCP提供消息,所述DHCP提供消息用于所述终端利用其中的全网统一的IP地址与外部网络进行通信。The sending module is further configured to send a DHCP offer message to the terminal, and the DHCP offer message is used for the terminal to communicate with an external network using a unified IP address of the whole network. 16.一种mesh网络系统,其特征在于,网络中的终端被配置为全网统一的IP地址,所述系统包括:16. A mesh network system is characterized in that, the terminal in the network is configured as a unified IP address of the whole network, and the system comprises: mesh接入点,用于接收第一消息,其中,所述第一消息包括终端的MAC地址和终端的端口号;根据所述接收的第一消息,构建代理更新消息,其中,所述代理更新消息包括终端的MAC地址和终端的端口号;向网关发送所述构建的代理更新消息;The mesh access point is configured to receive a first message, wherein the first message includes the MAC address of the terminal and the port number of the terminal; construct an agent update message according to the received first message, wherein the agent update The message includes the MAC address of the terminal and the port number of the terminal; sending the constructed proxy update message to the gateway; 网关,用于接收所述mesh接入点发送的代理更新消息,其中,所述代理更新消息包括终端的MAC地址和终端的端口号;根据所述接收的代理更新消息,保存终端和所述mesh接入点的对应关系为所述终端的代理信息;发送代理更新成功消息给所述mesh接入点。a gateway, configured to receive an agent update message sent by the mesh access point, wherein the agent update message includes the MAC address of the terminal and the port number of the terminal; according to the received agent update message, store the terminal and the mesh The corresponding relationship of the access point is the agent information of the terminal; sending an agent update success message to the mesh access point. 17.如权利要求16所述的系统,其特征在于,所述系统还包括:17. The system of claim 16, further comprising: 地址转换设备,用于接收所述网关发送的地址注册消息,其中,所述地址注册消息包括,终端的MAC地址和终端的端口号;根据所述接收的地址注册消息,分配一个网关端口号给所述终端,建立终端的MAC地址、终端的端口号与网关的IP地址、网关端口号的地址转换关系;发送地址注册成功消息给所述网关。The address translation device is configured to receive the address registration message sent by the gateway, wherein the address registration message includes the MAC address of the terminal and the port number of the terminal; according to the received address registration message, allocate a gateway port number to The terminal establishes an address translation relationship between the MAC address of the terminal, the port number of the terminal, the IP address of the gateway, and the port number of the gateway; and sends an address registration success message to the gateway. 18.如权利要求16所述的系统,其特征在于,所述网关包括:18. The system of claim 16, wherein the gateway comprises: 接收模块,用于接收mesh接入点发送的代理更新消息;A receiving module, configured to receive an agent update message sent by the mesh access point; 代理信息模块,用于根据所述接收模块接收的代理更新消息,保存终端和mesh接入点的对应关系为所述终端的代理信息;An agent information module, configured to save the corresponding relationship between the terminal and the mesh access point as the agent information of the terminal according to the agent update message received by the receiving module; 地址转换模块,用于根据所述接收模块接收的代理更新消息,为所述终端分配一个网关端口号,建立地址转换对应关系,其中,所述地址转换对应关系为终端的MAC地址和终端的端口号与网关的IP地址和网关端口号的对应转换关系;The address translation module is configured to assign a gateway port number to the terminal according to the agent update message received by the receiving module, and establish an address translation correspondence, wherein the address translation correspondence is the MAC address of the terminal and the port of the terminal number, the corresponding conversion relationship between the IP address of the gateway and the port number of the gateway; 发送模块,用于在所述代理信息模块保存终端的代理信息后,发送代理更新成功消息给所述mesh接入点。A sending module, configured to send an agent update success message to the mesh access point after the agent information module saves the agent information of the terminal.
CN 200810068229 2008-06-30 2008-06-30 Methods and device for terminal access and proxy update in mesh network Active CN101621449B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810068229 CN101621449B (en) 2008-06-30 2008-06-30 Methods and device for terminal access and proxy update in mesh network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810068229 CN101621449B (en) 2008-06-30 2008-06-30 Methods and device for terminal access and proxy update in mesh network

Publications (2)

Publication Number Publication Date
CN101621449A CN101621449A (en) 2010-01-06
CN101621449B true CN101621449B (en) 2013-08-07

Family

ID=41514505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810068229 Active CN101621449B (en) 2008-06-30 2008-06-30 Methods and device for terminal access and proxy update in mesh network

Country Status (1)

Country Link
CN (1) CN101621449B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188746A (en) * 2011-12-31 2013-07-03 北京大唐高鸿软件技术有限公司 Network switching method of mobile terminal in routing system achieving identity and position identification separation
CN104010292B (en) * 2014-06-16 2018-09-21 武汉大学 A kind of VoWLAN loaming methods based on AP auxiliary
CN104468866B (en) * 2014-12-26 2017-11-21 陈晨 A kind of multiple gateway terminal fast roaming method in WLAN
CN105554854A (en) * 2015-12-31 2016-05-04 天彩电子(深圳)有限公司 WIFI switching method and system in local area network
CN108092830B (en) 2018-02-09 2020-01-24 乐鑫信息科技(上海)股份有限公司 Method for applying TCP/IP protocol in Mesh network
CN109413226A (en) * 2018-11-30 2019-03-01 南京邮电大学 A kind of system and method for realizing zero Agent IP fast roaming
CN111163185A (en) * 2019-12-30 2020-05-15 乐鑫信息科技(上海)股份有限公司 Method for IP addressing access to nodes in mesh network
CN113381936B (en) * 2020-03-09 2023-08-15 阿里巴巴集团控股有限公司 Network information processing method and device and network equipment
CN112506553B (en) * 2020-11-30 2024-03-19 北京达佳互联信息技术有限公司 Upgrading method and device for data surface container of service grid and electronic equipment
CN113099503B (en) * 2021-03-24 2022-08-26 网经科技(苏州)有限公司 Roaming switching method in multi-set wireless mesh network
CN114710795B (en) * 2022-06-06 2022-08-26 希诺麦田技术(深圳)有限公司 ARP table optimization method, equipment and application of wireless ad hoc network
CN115941390A (en) * 2022-12-07 2023-04-07 北京长焜科技有限公司 Two-layer network communication method based on ad hoc network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842995A (en) * 2003-06-24 2006-10-04 特鲁波斯网络公司 A method of wireless roaming
CN1972230A (en) * 2006-11-09 2007-05-30 杭州华为三康技术有限公司 A broadcasting method and access controller for wireless LAN address resolution protocol

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006086703A (en) * 2004-09-15 2006-03-30 Toshiba Corp Access controller, program and remote actuating method of terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842995A (en) * 2003-06-24 2006-10-04 特鲁波斯网络公司 A method of wireless roaming
CN1972230A (en) * 2006-11-09 2007-05-30 杭州华为三康技术有限公司 A broadcasting method and access controller for wireless LAN address resolution protocol

Also Published As

Publication number Publication date
CN101621449A (en) 2010-01-06

Similar Documents

Publication Publication Date Title
CN101621449B (en) Methods and device for terminal access and proxy update in mesh network
JP3587984B2 (en) Mobile communication system, packet gateway device, location information management method, and location information notification method
CN106790732B (en) Address translation method, device and system, and network identification control method and device
KR101346407B1 (en) Communication method, method for forwarding data message during the communication process and communication node thereof
US8711749B2 (en) Information obtaining and notification, data message forwarding and handover method and access node
JP5461701B2 (en) Information notification method, data message transfer method in switching process, and AN
CN101299696B (en) Mobile LAN and method for implementing service continuity
TWI388165B (en) Wireless communication system and routing method for packet switching service, femto ap using the routing method
CN101127758B (en) Method and system for obtaining IP address of mobile node
JP3538527B2 (en) Wireless communication system and wireless communication method
CN100486198C (en) Method to search access controller in wireless LAN and proxy server
CN116647834B (en) A mobile network communication method and system for low-latency, high-reliability services
WO2011032455A1 (en) Method, system and access gateway router for handoff management and user data management when handing off
CN101605319B (en) State-switching information-processing method, movable access gateway and movable terminal
US7649888B2 (en) System for link independent multi-homing in heterogeneous access networks
CN109743726B (en) Method for sharing static terminal in LTE system roaming scene
CN101848514B (en) WiMAX access network is switched to method and the relevant device of WiFi access network
CN102316086A (en) Relay method for service data and relay node system
CN103582009B (en) Data transmission method, host base station and data network system
CN107231449B (en) ARP request forwarding method and device and W L AN communication system
CN102547908B (en) Listing maintenance, system and IAD router
CN110913348A (en) Distributed network architecture without fixed infrastructure and its location management method
CN102137467B (en) WiMAX (Worldwide Interoperability for Microwave Access) system for switching without fixed anchors and switching method thereof
JP4919973B2 (en) Method and apparatus for setting network address of mobile terminal in mobile communication system
WO2011026355A1 (en) Method for a node accessing a home agent, home agent cluster system and service router

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210422

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Device Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Terminal Co.,Ltd.

Country or region after: China

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before: Honor Device Co.,Ltd.

Country or region before: China