[go: up one dir, main page]

CN108307694A - A kind of network connection information acquisition methods and router - Google Patents

A kind of network connection information acquisition methods and router Download PDF

Info

Publication number
CN108307694A
CN108307694A CN201580079384.3A CN201580079384A CN108307694A CN 108307694 A CN108307694 A CN 108307694A CN 201580079384 A CN201580079384 A CN 201580079384A CN 108307694 A CN108307694 A CN 108307694A
Authority
CN
China
Prior art keywords
router
message
old
network connection
new
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.)
Granted
Application number
CN201580079384.3A
Other languages
Chinese (zh)
Other versions
CN108307694B (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
Publication of CN108307694A publication Critical patent/CN108307694A/en
Application granted granted Critical
Publication of CN108307694B publication Critical patent/CN108307694B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明涉及移动通信技术领域,尤其涉及一种网络连接信息获取方法及路由器,用以解决解决新路由器如何自动获取旧路由器的网络连接信息的技术问题;本发明中,新路由器可以通过LAN接口接收旧路由器通过WAN接口发出的数据报文,这样新路由器就可以直接通过接收的数据报文获得旧路由器的网络连接信息,解决了新路由器如何自动获取旧路由器的网络连接信息的技术问题。

The present invention relates to the technical field of mobile communication, in particular to a method for obtaining network connection information and a router to solve the technical problem of how a new router automatically obtains the network connection information of an old router; in the present invention, the new router can receive the network connection information through the LAN interface. The data message sent by the old router through the WAN interface, so that the new router can directly obtain the network connection information of the old router through the received data message, which solves the technical problem of how the new router automatically obtains the network connection information of the old router.

Description

一种网络连接信息获取方法及路由器Method for acquiring network connection information and router 技术领域technical field

本发明涉及通信技术领域,尤其涉及一种网络连接信息获取方法及路由器。The invention relates to the technical field of communication, in particular to a method for acquiring network connection information and a router.

背景技术Background technique

目前,很多用户的家庭网络通过非对称用户数字线路(Asymmetric Digital Subscriber Line,ADSL)或光纤到户等方式接入以太网(Ethernet)的,此时,运营商一般在用户的家庭网络中部署ADSL终端或无源光纤网络(Passive Optical Network,PON)终端。但是,随着无线保真(WIreless-Fidelity,Wi-Fi)上网需求的增长,很多用户为了解决家庭的Wi-Fi信号覆盖,一般都会重新买一个无线路由器替换用户家庭中部署的ADSL终端或PON终端接入以太网。At present, many users' home networks are connected to Ethernet through Asymmetric Digital Subscriber Line (ADSL) or fiber-to-the-home. At this time, operators generally deploy ADSL in users' home networks. terminal or passive optical network (Passive Optical Network, PON) terminal. However, with the increasing demand for WIreless-Fidelity (Wi-Fi) Internet access, many users generally buy a new wireless router to replace the ADSL terminal or PON deployed in the user's home in order to solve the Wi-Fi signal coverage of the home. The terminal is connected to the Ethernet.

一般来说,路由器的网络接入方式主要有三种:1、以太网上的点对点协议(Point-to-Point Protocol over Ethernet,PPPoE)拨号认证方式(简称拨号认证方式);2、动态分配地址方式,即通过动态主机配置协议(Dynamic Host Configuration Protocol,DHCP)服务器自动分配地址的方式;3、静态地址方式,即通过输入已知的网际协议(Internet Protocol,IP)地址联网的方式。Generally speaking, there are three main network access methods for routers: 1. Point-to-Point Protocol over Ethernet (PPPoE) dial-up authentication mode (referred to as dial-up authentication mode); 2. Dynamic address allocation mode, That is, the way of automatically assigning addresses through the Dynamic Host Configuration Protocol (DHCP) server; 3. The way of static addresses, that is, the way of networking by inputting known Internet Protocol (Internet Protocol, IP) addresses.

当用户用新路由器(将要连接上行网络的路由器)去替换家里旧路由器(已经连接到上行网络的路由器)时,一般都需要先了解旧路由器采用的网络接入方式,然后手动按照旧路由器的网络接入方式设置新路由器,使得新路由器可以成功连接到上行网络。如果旧路由器采用网络接入方式是PPPoE认证方式,还需要用户知道用户名和密码,一般宽带接入的用户名和密码只在初始安装旧路由器时输入一次即可,后续使用自动使用保存的用户名和密码进行网络连接,所以用户替换旧路由器时一般不记得用户名和密码;如果旧路由器采用网络接入方式是静态地址方式,用户也先需要获取IP地址,普通用户也是不知道如何获取IP地址的,这些都给替换新路由器带来很多麻烦。 When a user replaces an old router at home (a router already connected to the uplink network) with a new router (the router that will be connected to the uplink network), it is generally necessary to first understand the network access method used by the old router, and then manually follow the network access method of the old router. The access method is to set the new router so that the new router can successfully connect to the uplink network. If the old router adopts the PPPoE authentication method for network access, the user needs to know the user name and password. Generally, the user name and password for broadband access can only be entered once when the old router is initially installed, and the saved user name and password will be used automatically for subsequent use. For network connection, users generally do not remember the user name and password when replacing the old router; if the old router adopts a static address method for network access, the user also needs to obtain an IP address first, and ordinary users do not know how to obtain an IP address. All bring a lot of trouble to replace the new router.

综上,新路由器如何自动获取旧路由器的网络连接信息将是一个亟待解决的问题。In summary, how the new router automatically obtains the network connection information of the old router will be an urgent problem to be solved.

发明内容Contents of the invention

本申请提供一种网络连接信息获取方法及路由器,用以解决新路由器如何自动获取旧路由器的网络连接信息的技术问题。The present application provides a method for obtaining network connection information and a router to solve the technical problem of how a new router automatically obtains the network connection information of an old router.

第一方面,提供一种网络连接信息获取方法,应用于具有获取旧路由器的网络连接信息能力的新路由器,包括:In the first aspect, a method for obtaining network connection information is provided, which is applied to a new router capable of obtaining network connection information of an old router, including:

所述新路由器通过所述新路由器的LAN接口接收数据报文,所述数据报文包括所述旧路由器通过所述旧路由器的WAN接口发送给所述新路由器的LAN接口的以太网报文;The new router receives a data message through the LAN interface of the new router, and the data message includes an Ethernet message sent by the old router to the LAN interface of the new router through the WAN interface of the old router;

所述新路由器根据所述数据报文,确定所述旧路由器的所述网络连接信息。The new router determines the network connection information of the old router according to the data packet.

本申请中,新路由器可以通过局域网(Local Area Network,LAN)接口接收旧路由器通过广域网(Wide Area Network,WAN)接口发出的数据报文,而旧路由器通过WAN接口发出的数据报文一般来说都是在工作时正常发给上行网络中的服务器的,因此新路由器相当于拦截了旧路由器发送给上行网络中的服务器的数据报文。那么,新路由器可以直接通过接收的数据报文获得旧路由器的网络连接信息,解决了新路由器如何自动获取旧路由器的网络连接信息的技术问题,然后新路由器可以直接使用获取到的网络连接信息与上行网络连接,无需用户手动配置新路由器,简化了新路由器的启用过程,减小了因为用户手动处理而带来的出错几率,同时也减轻用户的负担。In this application, the new router can receive the data packets sent by the old router through the Wide Area Network (Wide Area Network, WAN) interface through the local area network (Local Area Network, LAN) interface, and the data packets sent by the old router through the WAN interface are generally They are all normally sent to the server in the uplink network during work, so the new router is equivalent to intercepting the data packets sent by the old router to the server in the uplink network. Then, the new router can directly obtain the network connection information of the old router through the received data message, which solves the technical problem of how the new router automatically obtains the network connection information of the old router, and then the new router can directly use the obtained network connection information and Uplink network connection does not require users to manually configure new routers, which simplifies the process of enabling new routers, reduces the probability of errors caused by manual processing by users, and also reduces the burden on users.

结合第一方面,在第一方面的第一种可能的实现方式中,所述网络连接信息包括:鉴权信息,网络连接方式或IP地址中的一个或者多个。With reference to the first aspect, in a first possible implementation manner of the first aspect, the network connection information includes: authentication information, one or more of a network connection mode or an IP address.

因为旧路由器的网络接入方式可能不同,因此获取的网络连接信息也可能不同,但无论是哪种网络接入方式,获取的网络连接信息都可以包括鉴权信息,网络连接方式或IP地址中的一个或者多个,从而尽量保证新路由器能 够获得较为完整的旧路由器的网络连接信息。Because the network access method of the old router may be different, the obtained network connection information may also be different, but no matter which network access method is used, the obtained network connection information can include authentication information, network connection method or IP address. One or more of them, so as to ensure that the new router can It is possible to obtain relatively complete network connection information of the old router.

结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述新路由器根据所述数据报文,确定所述旧路由器的网络连接信息,包括:With reference to the first possible implementation of the first aspect, in a second possible implementation of the first aspect, the new router determines the network connection information of the old router according to the data packet, including:

若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含PPPoE报文,则所述新路由器确定所述旧路由器的网络连接方式为拨号认证方式;If the data message is an Ethernet message and is a broadcast message, and the data message includes a PPPoE message, then the new router determines that the network connection mode of the old router is a dial-up authentication mode;

所述新路由器接受所述旧路由器发起的PPPoE会话;其中,所述新路由器工作在PPPoE Server模式;Described new router accepts the PPPoE conversation that described old router initiates; Wherein, described new router works in PPPoE Server mode;

在所述新路由器和所述旧路由器的PPPoE会话流程中,所述新路由器获取所述旧路由器的鉴权信息。During the PPPoE session process between the new router and the old router, the new router obtains the authentication information of the old router.

如果新路由器确定旧路由器的网络连接方式为拨号认证方式,则新路由器还可以进入PPPoE Server模式,通过与旧路由器的PPPoE会话流程来获取旧路由器的鉴权信息,从而可以通过获取的鉴权信息以拨号认证方式接入上行网络,即新路由器可以自行获取鉴权信息并自行接入上行网络,无需用户手动操作,也就无需用户记忆旧路由器的用户名和密码等,减轻了用户的负担,提高用户体验,也提升了新路由器的智能性和实用度。If the new router determines that the network connection mode of the old router is dial-up authentication, the new router can also enter the PPPoE Server mode, and obtain the authentication information of the old router through the PPPoE session process with the old router, so that the obtained authentication information can be passed. Access to the uplink network through dial-up authentication, that is, the new router can obtain authentication information and access the uplink network by itself, without manual operation by the user, and also without the need for the user to memorize the user name and password of the old router, which reduces the burden on the user and improves The user experience also improves the intelligence and practicality of the new router.

结合第一方面的第一种可能的实现方式,在第一方面的第三种可能的实现方式中,所述新路由器根据所述数据报文,确定所述旧路由器的网络连接信息,包括:With reference to the first possible implementation of the first aspect, in a third possible implementation of the first aspect, the new router determines the network connection information of the old router according to the data packet, including:

若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含DHCP广播报文,则所述新路由器确定所述旧路由器的网络连接方式为动态分配地址方式。If the data message is an Ethernet message and is a broadcast message, and the data message includes a DHCP broadcast message, then the new router determines that the network connection mode of the old router is a dynamic address allocation mode.

结合第一方面的第一种可能的实现方式,在第一方面的第四种可能的实现方式中,所述新路由器根据所述数据报文,确定所述旧路由器的网络连接信息,包括:With reference to the first possible implementation of the first aspect, in a fourth possible implementation of the first aspect, the new router determines the network connection information of the old router according to the data packet, including:

若所述数据报文为以太网报文,且为非广播报文,且所述数据报文包含 IP报文,所述新路由器确定所述IP报文的源地址是否合法;If the data message is an Ethernet message and is a non-broadcast message, and the data message includes IP message, the new router determines whether the source address of the IP message is legal;

若所述IP报文的源地址合法,则所述新路由器确定所述旧路由器的网络连接方式为静态地址方式,所述IP地址为所述IP报文的源地址。If the source address of the IP message is valid, the new router determines that the network connection mode of the old router is a static address mode, and the IP address is the source address of the IP message.

新路由器根据接收的数据报文就可以确定旧路由器的网络连接方式,并可以根据不同的网络连接方式自行进行上行网络接入,无需用户的参与。比如,若数据报文包含IP报文,则新路由器可以自行获取IP报文的源地址,从而可以将该IP报文的源地址作为进行上行网络连接的IP地址,无需用户来获取该IP地址,减轻用户的负担。The new router can determine the network connection mode of the old router according to the received data packets, and can perform uplink network access by itself according to different network connection modes without user participation. For example, if the data packet contains an IP packet, the new router can obtain the source address of the IP packet by itself, so that the source address of the IP packet can be used as the IP address for the uplink network connection, and the user does not need to obtain the IP address , to reduce the burden on users.

结合第一方面的第二种可能的实现方式,在第一方面的第五种可能的实现方式中,在获取所述旧路由器的鉴权信息之后,还包括:With reference to the second possible implementation of the first aspect, in the fifth possible implementation of the first aspect, after obtaining the authentication information of the old router, further include:

所述新路由器从所述PPPoE Server模式切换为PPPoE client模式;The new router is switched from the PPPoE Server mode to the PPPoE client mode;

在所述PPPoE client模式下,所述新路由器使用获取的网络连接信息进行网络连接。In the PPPoE client mode, the new router uses the obtained network connection information to connect to the network.

在新路由器获取鉴权信息时,新路由器工作在PPPoE Server模式,而要进行上行网络连接时,新路由器需工作在PPPoE client模式,因此,在获取鉴权信息后,新路由器可以从PPPoE Server模式切换为PPPoE client模式,这样新路由器既可以自行获取鉴权信息,也可以自行进行上行网络连接,均无需用户的参与,且新路由器可以自行切换工作模式,也可以避免出错。When the new router obtains the authentication information, the new router works in PPPoE Server mode, and when connecting to the uplink network, the new router needs to work in the PPPoE client mode. Therefore, after obtaining the authentication information, the new router can start from the PPPoE Server mode. Switch to PPPoE client mode, so that the new router can obtain authentication information by itself, and can also perform uplink network connection without user participation, and the new router can switch working modes by itself, and can also avoid errors.

结合第一方面或第一方面的第一种可能的实现方式至第五种可能的实现方式中的任一种可能的实现方式,在第一方面的第六种可能的实现方式中,在所述新路由器通过所述新路由器的LAN接口接收数据报文之后,还包括:In combination with the first aspect or any possible implementation manner of the first to fifth possible implementation manners of the first aspect, in the sixth possible implementation manner of the first aspect, in the After the new router receives the data message through the LAN interface of the new router, it also includes:

所述新路由器记录所述数据报文的源媒体接入控制MAC地址,并将所述源MAC地址设置为所述新路由器的WAN接口的MAC地址。The new router records the source MAC address of the data packet, and sets the source MAC address as the MAC address of the WAN interface of the new router.

现在还是有不少互联网服务提供商(Internet Service Provider,ISP)绑定了MAC地址,即,只有具有特定的MAC地址的路由器才能进行网络连接,比如一个家庭中,如果第一次使用旧路由器进行网络连接,那么ISP就认定了旧路由器的MAC地址,之后如果换了其他路由器,则因为路由器的MAC地址变 了,ISP可能不会提供网络连接。因此本申请中,可以为新路由器增加新的功能,即可以自动探测并获取其他路由器(比如旧路由器)的MAC地址作为本路由器的WAN接口的MAC地址,从而保证新路由器可以替换旧路由器进行上行网络连接,尽量避免新路由器出现无法连接上行网络的情况。There are still many Internet Service Providers (Internet Service Providers, ISPs) that bind MAC addresses, that is, only routers with specific MAC addresses can connect to the network. For example, in a family, if you use an old router for the first time network connection, then the ISP will recognize the MAC address of the old router, and if another router is changed later, because the MAC address of the router Already, the ISP may not provide the Internet connection. Therefore, in this application, a new function can be added to the new router, that is, the MAC address of other routers (such as the old router) can be automatically detected and obtained as the MAC address of the WAN interface of the router, thereby ensuring that the new router can replace the old router for uplink Network connection, try to avoid the situation that the new router cannot connect to the uplink network.

第二方面,提供第一种路由器,所述路由器具有获取旧路由器的网络连接信息的能力,所述路由器包括:In a second aspect, the first router is provided, the router has the ability to obtain the network connection information of the old router, and the router includes:

LAN接口,用于接收数据报文,所述数据报文包括所述旧路由器通过所述旧路由器的WAN接口发送给所述LAN接口的以太网报文;A LAN interface, configured to receive a data message, the data message includes an Ethernet message sent by the old router to the LAN interface through the WAN interface of the old router;

处理器,用于根据所述数据报文,确定所述旧路由器的所述网络连接信息。A processor, configured to determine the network connection information of the old router according to the data packet.

结合第二方面,在第二方面的第一种可能的实现方式中,所述网络连接信息包括:鉴权信息,网络连接方式或IP地址中的一个或者多个。With reference to the second aspect, in a first possible implementation manner of the second aspect, the network connection information includes: authentication information, one or more of a network connection mode or an IP address.

结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述处理器用于:With reference to the first possible implementation of the second aspect, in a second possible implementation of the second aspect, the processor is configured to:

若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含PPPoE报文,则确定所述旧路由器的网络连接方式为拨号认证方式;If the data message is an Ethernet message and is a broadcast message, and the data message includes a PPPoE message, then it is determined that the network connection mode of the old router is a dial-up authentication mode;

接受所述旧路由器发起的PPPoE会话;其中,所述路由器工作在PPPoE Server模式;Accept the PPPoE session that described old router initiates; Wherein, described router works in PPPoE Server mode;

在所述路由器和所述旧路由器的PPPoE会话流程中,获取所述旧路由器的鉴权信息。In the PPPoE session process between the router and the old router, the authentication information of the old router is acquired.

结合第二方面的第一种可能的实现方式,在第二方面的第三种可能的实现方式中,所述处理器用于:With reference to the first possible implementation of the second aspect, in a third possible implementation of the second aspect, the processor is configured to:

若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含DHCP广播报文,则确定所述旧路由器的网络连接方式为动态分配地址方式。If the data message is an Ethernet message and is a broadcast message, and the data message includes a DHCP broadcast message, then determine that the network connection mode of the old router is a dynamic address allocation mode.

结合第二方面的第一种可能的实现方式,在第二方面的第四种可能的实现方式中,所述处理器用于:With reference to the first possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the processor is configured to:

若所述数据报文为以太网报文,且为非广播报文,且所述数据报文包含 IP报文,确定所述IP报文的源地址是否合法;If the data message is an Ethernet message and is a non-broadcast message, and the data message includes IP message, determining whether the source address of the IP message is legal;

若所述IP报文的源地址合法,则确定所述旧路由器的网络连接方式为静态地址方式,所述IP地址为所述IP报文的源地址。If the source address of the IP message is legal, then determine that the network connection mode of the old router is a static address mode, and the IP address is the source address of the IP message.

结合第二方面的第二种可能的实现方式,在第二方面的第五种可能的实现方式中,所述处理器还用于:With reference to the second possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the processor is further configured to:

在获取所述旧路由器的鉴权信息之后,将所述路由器从所述PPPoE Server模式切换为PPPoE client模式;After obtaining the authentication information of the old router, switch the router from the PPPoE Server mode to the PPPoE client mode;

在所述PPPoE client模式下,使用获取的网络连接信息进行网络连接。In the PPPoE client mode, use the obtained network connection information for network connection.

结合第二方面或第二方面的第一种可能的实现方式至第五种可能的实现方式中的任一种可能的实现方式,在第二方面的第六种可能的实现方式中,所述处理器还用于:In combination with the second aspect or any possible implementation manner of the first possible implementation manner to the fifth possible implementation manner of the second aspect, in the sixth possible implementation manner of the second aspect, the Processors are also used to:

在所述LAN接口接收数据报文之后,记录所述数据报文的源媒体接入控制MAC地址,并将所述源MAC地址设置为所述路由器的WAN接口的MAC地址。After the LAN interface receives the data message, record the source MAC address of the data message, and set the source MAC address as the MAC address of the WAN interface of the router.

第三方面,提供第二种路由器,该路由器具有获取旧路由器的网络连接信息的能力,该路由器包括用于执行第一方面的方法的模块。In a third aspect, a second type of router is provided, the router has the capability of obtaining network connection information of the old router, and the router includes a module for executing the method of the first aspect.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面所介绍的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required in the embodiments of the present invention. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.

图1A为终端通过路由器接入以太网的一种场景示意图;FIG. 1A is a schematic diagram of a scenario where a terminal accesses an Ethernet through a router;

图1B为本发明实施例中新路由器与旧路由器的连接示意图;FIG. 1B is a schematic diagram of a connection between a new router and an old router in an embodiment of the present invention;

图2为本发明实施例中网络连接方法的第一种流程图;Fig. 2 is the first flow chart of the network connection method in the embodiment of the present invention;

图3为本发明实施例中以太网广播报文的格式示意图;Fig. 3 is a schematic diagram of the format of an Ethernet broadcast message in an embodiment of the present invention;

图4为本发明实施例中通过PPPoE会话流程获取鉴权信息的示意图; FIG. 4 is a schematic diagram of obtaining authentication information through a PPPoE session process in an embodiment of the present invention;

图5为本发明实施例中网络连接方法的第二种流程图。Fig. 5 is a second flow chart of the network connection method in the embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly described below in conjunction with the drawings in the embodiments of the present invention.

以下,对本发明中的部分用语进行解释说明。Hereinafter, some terms used in the present invention will be explained.

1)旧路由器,是已经连接到上行网络的路由器。1) The old router is a router that has been connected to the uplink network.

新路由器,是将要连接上行网络的路由器,用于替换旧路由器。The new router is the router that will be connected to the uplink network and is used to replace the old router.

2)“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,字符“/”,如无特殊说明,一般表示前后关联对象是一种“或”的关系。2) "Multiple" means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. In addition, the character "/", unless otherwise specified, generally indicates that the associated objects before and after are in an "or" relationship.

首先介绍一下本发明实施例的应用场景。Firstly, the application scenarios of the embodiments of the present invention are introduced.

请参见图1A,为终端通过路由器接入以太网的一种场景示意图。图1中的终端1例如为手机,终端2例如为个人计算机(Personal computer,PC),终端1和终端2通过无线方式连接路由器1,路由器1再连接到互联网(Internet),从而实现了终端1和终端2与互联网的连接。Please refer to FIG. 1A , which is a schematic diagram of a scenario where a terminal accesses an Ethernet through a router. Terminal 1 in Fig. 1 is for example mobile phone, and terminal 2 is for example personal computer (Personal computer, PC), and terminal 1 and terminal 2 are connected router 1 by wireless mode, and router 1 is connected to Internet (Internet) again, thereby realized terminal 1 and Terminal 2's connection to the Internet.

其中,路由器1中集成了调制解调器(modulator-demodulator,modem),所以能够直接连接到互联网。如果路由器1中未集成modem,则路由器1可以通过以太网连接modem,modem再连接到互联网,从而实现终端1和终端2与互联网的连接。Wherein, a modem (modulator-demodulator, modem) is integrated in the router 1, so it can be directly connected to the Internet. If the modem is not integrated in the router 1, the router 1 can be connected to the modem through Ethernet, and the modem is then connected to the Internet, so as to realize the connection between the terminal 1 and the terminal 2 and the Internet.

下面结合说明书附图对本发明实施例作进一步详细描述。The embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings.

其中,本发明实施例中,在要用新路由器替换旧路由器继续工作时,可以采用本发明实施例中提供的技术方案。Wherein, in the embodiment of the present invention, when the old router needs to be replaced by a new router to continue working, the technical solution provided in the embodiment of the present invention can be adopted.

另外,请参见图1B,为本发明实施例中的布线方式示意图,其中,图1B是以家庭场景为例。图1B中,新路由器的WAN接口与家庭中的以太网口连接,以接入互联网,新路由器的LAN接口本应与家庭中需要进行网络连接的 设备连接,例如可以包括个人计算机(PC)等设备。但为了实现本发明实施例的技术方案,可以首先令新路由器连接到上行网络后再将新路由器的LAN接口与家庭中的设备连接,即,要令新路由器替换旧路由器时,可以先将新路由器的LAN接口与旧路由器的WAN接口连接,如图1B所示,在将这两个接口连接后,新路由器可以执行本发明实施例提供的网络连接信息获取方法。In addition, please refer to FIG. 1B , which is a schematic diagram of a wiring manner in an embodiment of the present invention, wherein FIG. 1B is a family scene as an example. In Figure 1B, the WAN interface of the new router is connected to the Ethernet port in the home to access the Internet, and the LAN interface of the new router should have been connected to the network in the home. The device connection may include, for example, devices such as personal computers (PCs). However, in order to realize the technical solution of the embodiment of the present invention, the LAN interface of the new router can be connected to the equipment in the family after first connecting the new router to the uplink network, that is, when the old router is to be replaced by the new router, the new The LAN interface of the router is connected to the WAN interface of the old router, as shown in FIG. 1B , after the two interfaces are connected, the new router can execute the network connection information acquisition method provided by the embodiment of the present invention.

一般来说,旧路由器在工作时也要经常与上行网络设备进行交互,比如,如果旧路由器采用的是动态分配地址方式进行的网络连接,那么旧路由器在工作时会与DHCP服务器等上行网络设备进行交互。而旧路由器一般是通过旧路由器的WAN接口向上行网络设备发送数据报文,也通过旧路由器的WAN接口接收旧上行网络设备的数据报文,那么本发明实施例中,在将新路由器的LAN接口与旧路由器的WAN接口连接后,对于旧路由器来说,其会将新路由器认为是上行网络设备,所以会正常通过WAN接口发送以太网报文,则新路由器就相当于可以拦截旧路由器发送给上行网络设备的所有数据报文。Generally speaking, old routers often interact with uplink network devices during work. For example, if the old router uses a dynamic address allocation method for network connection, then the old router will communicate with uplink network devices such as DHCP servers during work. to interact. The old router generally sends data packets to the upstream network equipment through the WAN interface of the old router, and also receives the data packets of the old upstream network equipment through the WAN interface of the old router. After the interface is connected to the WAN interface of the old router, for the old router, it will regard the new router as an uplink network device, so it will normally send Ethernet packets through the WAN interface, and the new router is equivalent to intercepting the old router to send All data packets sent to uplink network devices.

其中,数据报文可以包括以太网报文,即,旧路由器通过旧路由器的WAN接口发送给新路由器的LAN接口的数据报文,可以包括旧路由器通过旧路由器的WAN接口发送给新路由器的LAN接口的以太网报文。Wherein, the data message may include an Ethernet message, that is, the data message sent by the old router to the LAN interface of the new router through the WAN interface of the old router may include the LAN message sent by the old router to the new router through the WAN interface of the old router. Ethernet packets of the interface.

请参见图2,本发明实施例提供一种网络连接信息获取方法,该方法可以应用于具有获取旧路由器的网络连接信息能力的新路由器,该方法的流程描述如下。Referring to FIG. 2 , an embodiment of the present invention provides a method for obtaining network connection information, which can be applied to a new router capable of obtaining network connection information of an old router, and the flow of the method is described as follows.

步骤201:新路由器通过新路由器的LAN接口接收数据报文,数据报文包括旧路由器通过旧路由器的WAN接口发送给新路由器的LAN接口的第一以太网报文;Step 201: the new router receives the data message through the LAN interface of the new router, and the data message includes the first Ethernet message sent by the old router to the LAN interface of the new router through the WAN interface of the old router;

步骤202:新路由器根据该数据报文,确定旧路由器的网络信息。Step 202: The new router determines the network information of the old router according to the data packet.

可选的,新路由器例如可以至少具有两种模式,比如可以至少具有正常工作模式和探测模式。新路由器在连接到上行网络后,可以工作在正常工作 模式下,此时新路由器可以通过上行网络为家庭中的设备提供正常的网络连接。而新路由器在进行本发明实施例中提供的获取网络连接信息的工作时,可以工作在探测模式,在探测模式下,新路由器可以获取旧路由器的网络连接信息。Optionally, the new router may have at least two modes, for example, may have at least a normal working mode and a detection mode. After the new router is connected to the uplink network, it can work normally In mode, the new router can provide normal network connection for devices in the home through the uplink network. When the new router performs the work of obtaining network connection information provided in the embodiment of the present invention, it can work in the detection mode. In the detection mode, the new router can obtain the network connection information of the old router.

例如,在新路由器出厂时,可以默认设置为探测模式,或者在检测不到上行网络时可以自动切换为探测模式,或者也可以由用户手动将新路由器切换为探测模式(例如用户可以通过按下新路由器上的相应按键来切换新路由器的模式),等等。For example, when a new router leaves the factory, it can be set to the detection mode by default, or it can be automatically switched to the detection mode when no uplink network is detected, or the user can manually switch the new router to the detection mode (for example, the user can press the the corresponding button on the new router to switch the mode of the new router), and so on.

例如,新路由器在上行网络连接成功后,可以自动切换为正常工作模式,或者在新路由器出厂时,可以默认设置为正常工作模式,或者也可以由用户手动将新路由器切换为正常工作模式,等等。For example, after the new router is successfully connected to the uplink network, it can automatically switch to the normal working mode, or when the new router leaves the factory, it can be set to the normal working mode by default, or the user can manually switch the new router to the normal working mode, etc. Wait.

可选的,optional,

在新路由器通过新路由器的LAN接口接收数据报文之前,还包括:Before the new router receives data packets through the LAN interface of the new router, it also includes:

新路由器启动定时器;The new router starts the timer;

新路由器通过新路由器的LAN接口接收数据报文,包括:The new router receives data packets through the LAN interface of the new router, including:

在该定时器超时前,新路由器通过新路由器的LAN接口接收数据报文。Before the timer expires, the new router receives the data message through the LAN interface of the new router.

启动定时器,是为了给网络连接信息获取过程给一个时间限制,因为不排除旧路由器可能很长时间不会通过WAN接口发送数据报文的情况,如果在这种情况下新路由器还一直等待接收的话,对于新路由器来说功耗较大,且也是做了无用功。因此,新路由器可以设置定时器,在将新路由器的LAN接口与旧路由器的WAN接口连接后,新路由器可以启动该定时器,在该定时器超时之前,新路由器可以接收旧路由器发送的数据报文,在该定时器超时之后,无论新路由器是否接收到了数据报文,新路由器都可以停止进行接收,从而减小新路由器的功耗。定时器所持续的时长可以在新路由器出厂时设定好,或者也可以由用户后续自行设定,本发明实施例不作限制。The purpose of starting the timer is to give a time limit to the network connection information acquisition process, because it does not rule out that the old router may not send data packets through the WAN interface for a long time, if the new router is still waiting to receive in this case If not, the power consumption of the new router is relatively large, and it has also done useless work. So, the new router can set a timer, after connecting the new router's LAN interface with the old router's WAN interface, the new router can start the timer, and before the timer expires, the new router can receive the datagram sent by the old router After the timer expires, no matter whether the new router has received the data message, the new router can stop receiving the data message, thereby reducing the power consumption of the new router. The duration of the timer can be set when the new router leaves the factory, or can be set by the user later, which is not limited by the embodiment of the present invention.

一般来说,旧路由器在上行网络连接较为稳定时,可能不会通过WAN接口发送数据报文,或者可能发送少量的数据报文,在这种情况下,新路由器 可能不容易接收数据报文。那么,为了尽量保证新路由器能够接收到旧路由器发送的数据报文,在将新路由器的LAN接口与旧路由器的WAN接口连接后,可以重启旧路由器,旧路由器在重启后可能会向上行网络设备发送数据报文,这样新路由器就能通过LAN接口接收旧路由器发送的数据报文。Generally speaking, when the uplink network connection of the old router is relatively stable, it may not send data packets through the WAN interface, or may send a small amount of data packets. In this case, the new router Datagrams may not be easily received. Then, in order to ensure that the new router can receive the data packets sent by the old router, after connecting the LAN interface of the new router to the WAN interface of the old router, you can restart the old router. Send the datagram so that the new router can receive the datagram sent by the old router through the LAN interface.

可选的,如果新路由器在该定时器超时之后还未拦截到任何数据报文,或者虽然拦截到了数据报文,但通过拦截的数据报文无法获取旧路由器的网络连接信息,那么新路由器可以继续采用现有技术中的方式进行网络连接。Optionally, if the new router has not intercepted any data packets after the timer expires, or although it has intercepted the data packets, the network connection information of the old router cannot be obtained through the intercepted data packets, then the new router can Continue to use the method in the prior art for network connection.

请参见图3,为以太网报文的一种可能的格式,一个以太网报文中包括目的媒体访问控制(Media Access Control,MAC)地址(一般占据6个字节)、源MAC地址(一般占据6个字节)、类型(也可以称为协议类型字段,一般占据2个字节)、数据(即该报文所携带的数据,一般占据46-1500字节)、以及一般占据4个字节的帧校验序列(Frame Check Sequence,FCS)。Please refer to Fig. 3, it is a kind of possible format of Ethernet message, comprise destination Media Access Control (Media Access Control, MAC) address (generally occupy 6 bytes), source MAC address (generally) in an Ethernet message Occupies 6 bytes), type (also known as the protocol type field, generally occupies 2 bytes), data (that is, the data carried by the message, generally occupies 46-1500 bytes), and generally occupies 4 Byte Frame Check Sequence (Frame Check Sequence, FCS).

可选的,要根据以太网报文来确定旧路由器的网络连接信息,就要首先确定以太网报文的类型,不同的类型所指示的网络连接信息是不同的。判断一个以太网报文的类型,可以通过以太网报文中的协议类型字段来进行判断。Optionally, to determine the network connection information of the old router according to the Ethernet packets, it is necessary to first determine the type of the Ethernet packets, and different types indicate different network connection information. The type of an Ethernet packet can be judged through the protocol type field in the Ethernet packet.

可选的,网络连接信息包括:鉴权信息,网络连接方式或IP地址中的一个或者多个。Optionally, the network connection information includes: authentication information, one or more of network connection mode or IP address.

例如,网络连接方式可以包括拨号认证方式、动态分配地址方式及静态地址方式。如果新路由器获得的旧路由器的网络连接方式为拨号认证方式,则新路由器还需要获得旧路由器的鉴权信息,从而通过鉴权信息来进行网络连接,鉴权信息例如可以包括用户名和/或密码等;如果新路由器获得的旧路由器的网络连接方式为静态地址方式,那么新路由器还需要获得旧路由器的IP地址,从而通过该IP地址来进行网络连接。For example, the network connection mode may include dial-up authentication mode, dynamic address allocation mode and static address mode. If the network connection mode of the old router obtained by the new router is a dial-up authentication mode, the new router also needs to obtain the authentication information of the old router, so as to perform network connection through the authentication information, and the authentication information may include, for example, a user name and/or a password etc.; if the network connection mode of the old router obtained by the new router is a static address mode, then the new router also needs to obtain the IP address of the old router, so as to perform network connection through this IP address.

下面分别介绍新路由器获取网络连接信息的方式。The following describes how the new router obtains network connection information.

一、拨号认证方式。1. Dial-up authentication method.

新路由器通过LAN接口接收了旧路由器发送的数据报文,新路由器对接收的数据报文进行解析,如果接收的数据报文中有数据报文为以太网报文, 且该以太网报文的目的MAC地址为FF:FF:FF:FF:FF:FF,则新路由器确定该以太网报文为广播报文,如果该广播报文中的协议类型字段的值为0x8863,那么新路由器可以确定该广播报文为PPPoE广播报文,则新路由器确定旧路由器的网络连接方式为拨号认证方式,且新路由器确定还需进一步获取旧路由器的鉴权信息。The new router receives the data message sent by the old router through the LAN interface, and the new router analyzes the received data message. If any data message in the received data message is an Ethernet message, And the destination MAC address of this Ethernet message is FF:FF:FF:FF:FF:FF, then the new router determines that this Ethernet message is a broadcast message, if the value of the protocol type field in the broadcast message is 0x8863, then the new router can determine that the broadcast message is a PPPoE broadcast message, then the new router determines that the network connection mode of the old router is the dial-up authentication mode, and the new router determines that it needs to further obtain the authentication information of the old router.

可选的,在确定旧路由器的网络连接方式为拨号认证方式之后,新路由器可以进入PPPoE服务器(Server)模式。目前,路由器一般只能工作在PPPoE客户端(Client)模式,PPPoE Server模式一般都是服务器所具有的工作模式。本发明实施例中,为了使得新路由器能够进行PPPoE会话,因此需要对新路由器进行一些改进,使得新路由器能够模拟工作在PPPoE Server模式。Optionally, after it is determined that the network connection mode of the old router is the dial-up authentication mode, the new router can enter the PPPoE server (Server) mode. At present, routers generally can only work in PPPoE client (Client) mode, and PPPoE Server mode is generally the working mode of the server. In the embodiment of the present invention, in order to enable the new router to carry out the PPPoE session, it is necessary to make some improvements to the new router so that the new router can simulate working in the PPPoE Server mode.

新路由器进入PPPoE Server模式后,可以接受旧路由器发起的PPPoE会话。一般来说,旧路由器向上行网络设备发送PPPoE广播报文后(本发明实施例中是新路由器接收了该PPPoE广播报文),旧路由器就会向上行网络设备发起PPPoE会话,那么,本发明实施例中,工作在PPPoE Server模式的新路由器就可以接受旧路由器发起的PPPoE会话,新路由器可以通过和旧路由器的PPPoE会话流程来获取旧路由器的鉴权信息。After the new router enters the PPPoE Server mode, it can accept the PPPoE sessions initiated by the old router. Generally speaking, after the old router sends the PPPoE broadcast message to the upstream network equipment (in the embodiment of the present invention, the new router receives the PPPoE broadcast message), the old router will initiate a PPPoE session to the upstream network equipment, so, the present invention In an embodiment, the new router working in PPPoE Server mode can accept the PPPoE session initiated by the old router, and the new router can obtain the authentication information of the old router through the PPPoE session process with the old router.

目前,PPPoE会话流程可分为三个阶段,即发现(Discovery)阶段、会话(Session)阶段和终止(Terminate)阶段。At present, the PPPoE session process can be divided into three phases, that is, the discovery (Discovery) phase, the session (Session) phase and the termination (Terminate) phase.

请参见图4,为新路由器和旧路由器之间的PPPoE会话流程的交互示意图。首先进行的是Discovery阶段,Discovery由四个过程组成。完成之后新路由器和旧路由器双方都会知道PPPoE的会话身份标识号(Session_ID)以及对方的以太网地址,这些参数共同确定了唯一的PPPoE Session。Please refer to FIG. 4 , which is a schematic diagram of interaction of the PPPoE session flow between the new router and the old router. The first step is the Discovery stage, which consists of four processes. After completion, both the new router and the old router will know the session ID number (Session_ID) of PPPoE and the Ethernet address of the other party. These parameters jointly determine the unique PPPoE Session.

首先,旧路由器通过广播方式发送PPPoE主动发现初始包(PPPoE Active Discovery Initiation,PADI)报文,在PADI报文中包含旧路由器想要得到的服务类型信息。First, the old router sends a PPPoE Active Discovery Initiation (PADI) message by broadcast, and the PADI message contains the service type information that the old router wants to obtain.

新路由器收到PADI报文之后,将PADI报文中请求的服务与自己能够提供的服务进行比较,如果可以提供,则通过单播方式向旧路由器回复PPPoE 主动发现提议包(PPPoE Active Discovery Offer,PADO)报文。After the new router receives the PADI message, it compares the service requested in the PADI message with the service it can provide, and if it can provide it, it will reply PPPoE to the old router through unicast Active Discovery Offer (PPPoE Active Discovery Offer, PADO) message.

旧路由器收到PADO报文后,通过单播方式向新路由器发送PPPoE主动发现请求(PPPoE Active Discovery Request,PADR)报文。After the old router receives the PADO message, it sends a PPPoE Active Discovery Request (PPPoE Active Discovery Request, PADR) message to the new router through unicast.

新路由器产生唯一的会话ID(即Session_ID),用于标识与旧路由器之间的本次PPPoE会话。新路由器向旧路由器发送PPPoE主动发现会话确认(PPPoE Active Discovery Session-confirmation,PADS)报文,并将Session_ID携带在PADS报文中发送给旧路由器。The new router generates a unique session ID (Session_ID), which is used to identify the current PPPoE session with the old router. The new router sends a PPPoE active discovery session confirmation (PPPoE Active Discovery Session-confirmation, PADS) message to the old router, and carries the Session_ID in the PADS message and sends it to the old router.

如果以上各过程中没有发生错误,则PPPoE会话建立完成,Discovery阶段结束,之后进入Session阶段。If no errors occur in the above processes, the PPPoE session is established, the Discovery phase ends, and then enters the Session phase.

Discovery阶段的工作为新路由器和旧路由器之间建立了会话,之后进入Session阶段。Session阶段可划分为两部分,第一部分是点对点协议(Point to Point Protocol,PPP)协商阶段,第二部分是PPP协商阶段结束后,若协商成功,则进入的PPP报文传输阶段。The work in the Discovery stage establishes a session between the new router and the old router, and then enters the Session stage. The Session stage can be divided into two parts. The first part is the Point to Point Protocol (PPP) negotiation stage, and the second part is the PPP packet transmission stage after the PPP negotiation stage ends and if the negotiation is successful.

其中,PPPoE中的PPP协商方式和普通的PPP协商方式一致,分为链路控制协议(Link Control Protocol,LCP)协商阶段、认证阶段、以及网络控制协议(Network Control Protocol,NCP)阶段这三个阶段。Among them, the PPP negotiation method in PPPoE is consistent with the ordinary PPP negotiation method, which is divided into three stages: the link control protocol (Link Control Protocol, LCP) negotiation stage, the authentication stage, and the network control protocol (Network Control Protocol, NCP) stage. stage.

首先是LCP协商阶段,LCP协商阶段主要完成建立、配置和检测数据链路连接等工作。The first is the LCP negotiation stage. The LCP negotiation stage mainly completes the establishment, configuration, and detection of data link connections.

一般来说,在LCP协商阶段,通信双方可以采用不同的认证方式,例如可以采用密码认证协议(Password Authentication Protocol,PAP)认证方式,或者也可以采用询问握手认证协议(Challenge Handshake Authentication Protocol,CHAP)认证方式等,本发明实施例中,进行PPPoE会话是为了获得旧路由器通过拨号认证方式进行网络连接时的鉴权信息,因此,本发明实施例中,在LCP协商阶段,令新路由器与旧路由器采用PAP认证方式进行认证。Generally speaking, during the LCP negotiation phase, the communication parties can adopt different authentication methods, such as the Password Authentication Protocol (Password Authentication Protocol, PAP) authentication method, or the Challenge Handshake Authentication Protocol (Challenge Handshake Authentication Protocol, CHAP). Authentication methods, etc., in the embodiment of the present invention, the PPPoE session is performed in order to obtain the authentication information when the old router connects to the network through the dial-up authentication method. Therefore, in the embodiment of the present invention, in the LCP negotiation stage, the new router and the old router Use the PAP authentication method for authentication.

在PAP认证方式下,旧路由器将拨号认证方式的鉴权信息以明文方式发送给新路由器,如图4中,旧路由器向新路由器发送PAP Request(PAP请求),将鉴权信息以明文方式携带在PAP Request中。本发明实施例中,鉴权信息例 如可以包括通过拨号认证方式进行网络连接的用户名和密码等信息。In the PAP authentication mode, the old router sends the authentication information of the dial-up authentication mode to the new router in plain text, as shown in Figure 4, the old router sends a PAP Request (PAP request) to the new router, and carries the authentication information in plain text In PAP Request. In the embodiment of the present invention, authentication information example For example, information such as user names and passwords for network connections through dial-up authentication may be included.

新路由器获得旧路由器的鉴权信息后,因为无需再继续进行后面的会话流程,因此新路由器可以向旧路由器回应认证失败(PAP NAK)。由此,PPP会话流程终止。After the new router obtains the authentication information of the old router, because there is no need to continue the subsequent session process, the new router can respond to the old router with an authentication failure (PAP NAK). Thus, the PPP session process is terminated.

之后,新路由器可以向旧路由器发送PPPoE主动发现终止(PPPoE Active Discovery Terminate,PADT)报文,以终止PPPoE会话流程,或,PADT报文也可以是旧路由器发送给新路由器的。Afterwards, the new router can send a PPPoE Active Discovery Terminate (PPPoE Active Discovery Terminate, PADT) message to the old router to terminate the PPPoE session process, or the PADT message can also be sent by the old router to the new router.

至此,PPPoE会话流程结束,新路由器可以重新切换到正常的PPPoE Client模式,并可以通过获得的鉴权信息以拨号认证方式连接上行网络。At this point, the PPPoE session process is over, and the new router can switch to the normal PPPoE Client mode again, and can connect to the uplink network by means of dial-up authentication through the obtained authentication information.

另外,新路由器连接上行网络成功后,可以输出提示信息,该提示信息用于提示用户上行网络已连接成功,用户接收该提示信息后,可以断开新路由器与旧路由器之间的连接,可以将家庭中需要进行网络连接的设备连接到新路由器的LAN接口,这样就可以通过新路由器联网了。In addition, after the new router successfully connects to the uplink network, it can output prompt information, which is used to remind the user that the uplink network has been successfully connected. After receiving the prompt information, the user can disconnect the connection between the new router and the old router. The devices in the home that need to be connected to the Internet are connected to the LAN interface of the new router, so that they can be connected to the Internet through the new router.

其中,例如该提示信息可以为声音提示,或者也可以为文字提示(例如新路由器向用户使用的终端发送信息),或者也可以是振动提示,或者也可以是其他类型的提示,比如可以是令新路由器上设置的指示灯闪烁等等,只要能够用于提示用户即可,本发明实施例对于提示信息的类型不作限制。Wherein, for example, the prompt information can be a sound prompt, or it can also be a text prompt (for example, a new router sends information to a terminal used by a user), or it can also be a vibration prompt, or it can be other types of prompts, for example, it can be a prompt As long as the indicator light set on the new router flickers and the like can be used to prompt the user, the embodiment of the present invention does not limit the type of prompt information.

现在用户在更换路由器时,如果知道原来的路由器是通过拨号认证方式进行网络连接,那么用户还需要重新获得旧路由器的用户名和密码,如果时间太长用户不记得这些,则用户可能还需要登录旧路由器的万维网(Web)页面来获取,或者通过给运营商拨打电话等方式来获取,总之非常麻烦。而采用本发明实施例提供的方式,即使是拨号认证方式,新路由器也可以自动获取旧路由器的鉴权信息,无需用户手动操作,极大地减轻了用户的负担。Now when the user replaces the router, if he knows that the original router is connected to the network through dial-up authentication, the user needs to obtain the user name and password of the old router again. The router's World Wide Web (Web) page to obtain, or to obtain by calling the operator, etc., in a word, very troublesome. However, with the method provided by the embodiment of the present invention, even if it is a dial-up authentication method, the new router can automatically obtain the authentication information of the old router without manual operation by the user, which greatly reduces the burden on the user.

二、动态分配地址方式。Second, the dynamic allocation of addresses.

新路由器通过LAN接口接收了旧路由器发送的数据报文,新路由器对接收的数据报文进行解析,如果接收的数据报文中有数据报文为以太网报文,且该以太网报文的目的MAC地址为FF:FF:FF:FF:FF:FF,则新路由器确定该 以太网报文为广播报文,如果该广播报文中的协议类型字段的值为0x0800(IPv4报文)或0x86DD(IPv6报文),则确定该广播报文是IP广播报文,然后再看该IP广播报文的协议类型是否是用户数据报协议(User Datagram Protocol,UDP),如果是UDP广播报文,并且该广播报文的原端口是68,目的端口是67,那么新路由器可以确定该广播报文为DHCP广播报文,则新路由器确定旧路由器的网络连接方式为动态分配地址方式。The new router receives the data packet sent by the old router through the LAN interface, and the new router analyzes the received data packet. If any data packet in the received data packet is an Ethernet packet, and the Ethernet packet’s If the destination MAC address is FF:FF:FF:FF:FF:FF, the new router determines the The Ethernet message is a broadcast message, if the value of the protocol type field in the broadcast message is 0x0800 (IPv4 message) or 0x86DD (IPv6 message), then it is determined that the broadcast message is an IP broadcast message, and then See if the protocol type of the IP broadcast message is User Datagram Protocol (UDP), if it is a UDP broadcast message, and the original port of the broadcast message is 68, and the destination port is 67, then the new router can After determining that the broadcast message is a DHCP broadcast message, the new router determines that the network connection mode of the old router is a dynamic address allocation mode.

本发明实施例中,新路由器若确定旧路由器的网络连接方式为动态分配地址方式,那么新路由器可以向DHCP服务器发送请求消息,该请求消息用于请求DHCP服务器为新路由器分配动态地址。若DHCP服务器为新路由器分配了动态地址,那么新路由器可以根据分配的动态地址连接网络。In the embodiment of the present invention, if the new router determines that the network connection mode of the old router is a dynamic address allocation mode, then the new router can send a request message to the DHCP server, and the request message is used to request the DHCP server to assign a dynamic address for the new router. If the DHCP server assigns a dynamic address to the new router, the new router can connect to the network according to the assigned dynamic address.

三、静态地址方式。3. Static address mode.

新路由器通过LAN接口接收了旧路由器发送的数据报文,新路由器对接收的数据报文进行解析,如果接收的数据报文中有数据报文为以太网报文,且该以太网报文的目的MAC地址不是FF:FF:FF:FF:FF:FF,则新路由器确定该以太网报文为非广播报文,如果该非广播报文中的协议类型字段的值为0x0800或0x86DD,则确定该非广播报文是IP报文,则新路由器可以确定该IP报文的源地址(即源IP地址)是否合法,如果该IP报文的源地址合法,则新路由器确定旧路由器的网络连接方式为静态地址方式,且新路由器确定需获取的IP地址为该IP报文的源地址。The new router receives the data packet sent by the old router through the LAN interface, and the new router analyzes the received data packet. If any data packet in the received data packet is an Ethernet packet, and the Ethernet packet’s If the destination MAC address is not FF:FF:FF:FF:FF:FF, the new router determines that the Ethernet packet is a non-broadcast packet. If the value of the protocol type field in the non-broadcast packet is 0x0800 or 0x86DD, then Determine that this non-broadcast message is an IP message, then the new router can determine whether the source address (i.e. source IP address) of this IP message is legal, if the source address of this IP message is legal, then the new router determines the network address of the old router The connection mode is a static address mode, and the new router determines that the IP address to be obtained is the source address of the IP packet.

本发明实施例中,新路由器若确定旧路由器的网络连接方式为静态地址方式,则新路由器可以将该IP报文的源地址作为新路由器的WAN接口的地址,以连接网络。In the embodiment of the present invention, if the new router determines that the network connection mode of the old router is a static address mode, the new router can use the source address of the IP message as the address of the WAN interface of the new router to connect to the network.

目前,如果通过静态地址方式连接网络,则用户需要手动输入IP地址,而本发明实施例中这些操作都可以由新路由器自动完成,减轻了用户的负担,也减小了因为用户手动操作而带来的出错几率。At present, if a static address is used to connect to the network, the user needs to manually enter the IP address, but in the embodiment of the present invention, these operations can be automatically completed by the new router, which reduces the burden on the user and reduces the burden caused by the manual operation of the user. to the probability of error.

对于广播报文来说,除了PPPoE类型的广播报文以及DHCP类型的广播报文之外,其他类型的广播报文可能无法用于获取旧路由器的网络连接信息, 因此,如果新路由器在定时器超时之前接收到广播报文,且确定接收的广播报文既不是PPPoE类型的广播报文也不是DHCP类型的广播报文,则新路由器可以丢弃接收的广播报文,无法获取旧路由器的网络连接信息。For broadcast packets, except for PPPoE-type broadcast packets and DHCP-type broadcast packets, other types of broadcast packets may not be used to obtain the network connection information of the old router. Therefore, if the new router receives the broadcast packet before the timer expires and determines that the received broadcast packet is neither a PPPoE broadcast packet nor a DHCP type broadcast packet, the new router can discard the received broadcast packet , the network connection information of the old router could not be obtained.

对于非广播报文来说,除了具有合法源地址的IP报文之外,其他类型的非广播报文可能无法用于获取旧路由器的网络连接信息,因此,如果新路由器在定时器超时之前接收到非广播报文,且非广播报文不是IP报文,或者是具有不合法的源地址的IP报文,则新路由器可以丢弃接收的这些报文,无法获取旧路由器的网络连接信息。For non-broadcast packets, except for IP packets with legal source addresses, other types of non-broadcast packets may not be used to obtain the network connection information of the old router. Therefore, if the new router receives If a non-broadcast packet is received, and the non-broadcast packet is not an IP packet, or is an IP packet with an illegal source address, the new router can discard these received packets and cannot obtain the network connection information of the old router.

可选的,虽然旧路由器可能只通过一种网络连接方式来连接网络,例如可能通过拨号认证方式,但有些旧路由器在通过WAN接口发送以太网报文时,可能会发送多种类型的以太网报文,例如,可能会发送PPPoE广播报文,还可能会发送DHCP广播报文,还可能会发送IP报文。如果是这样,那么新路由器可能会在定时器超时之前接收到多种不同类型的以太网报文,针对这种情况,本发明实施例根据网络连接的稳定性为各网络连接方式分配优先级,例如,拨号认证方式的优先级最高,次之是动态分配地址方式,优先级最低的是静态地址方式,如果新路由器接收了多种不同类型的以太网报文,那么新路由器可以按照优先级从高到低的顺序来确定旧路由器的网络连接方式。以下举例介绍。Optionally, although old routers may only connect to the network through a network connection method, such as dial-up authentication, some old routers may send multiple types of Ethernet packets when sending Ethernet packets through the WAN interface. The message, for example, may send a PPPoE broadcast message, may also send a DHCP broadcast message, and may also send an IP message. If so, the new router may receive multiple different types of Ethernet packets before the timer expires. In this case, the embodiment of the present invention assigns priority to each network connection mode according to the stability of the network connection. For example, the dial-up authentication method has the highest priority, followed by the dynamic address allocation method, and the static address method has the lowest priority. If the new router receives multiple types of Ethernet packets, the new router can start from Highest to lowest order to determine how the old router is connected to the network. The following examples are introduced.

可选的,在定时器超时之前,如果新路由器共接收了两种不同类型的以太网报文,例如包括第一以太网报文和第二以太网报文,其中第一以太网报文例如为PPPoE广播报文,第二以太网报文例如为DHCP广播报文,那么新路由器根据各网络连接方式的优先级,可以确定旧路由器的网络连接方式为PPPoE广播报文所指示的拨号认证方式,即,因为通过拨号认证方式进行网络连接时成功率较高,网络连接也较为稳定,因此本发明实施例优先采用拨号认证方式进行网络连接。Optionally, before the timer expires, if the new router receives two different types of Ethernet packets, for example, including a first Ethernet packet and a second Ethernet packet, wherein the first Ethernet packet is, for example, is a PPPoE broadcast message, and the second Ethernet message is, for example, a DHCP broadcast message, then the new router can determine that the network connection mode of the old router is the dial-up authentication mode indicated by the PPPoE broadcast message according to the priority of each network connection mode. , that is, because the success rate of the network connection through the dial-up authentication method is high, and the network connection is relatively stable, so the embodiment of the present invention preferentially adopts the dial-up authentication method for network connection.

可选的,在定时器超时之前,如果新路由器共接收了两种不同类型的以太网报文,例如包括第一以太网报文和第三以太网报文,其中第一以太网报 文例如为PPPoE广播报文,第三以太网报文例如为IP报文(这里的第三以太网报文为具有合法源地址的非广播报文),那么新路由器根据各网络连接方式的优先级,可以确定旧路由器的网络连接方式为PPPoE广播报文所指示的拨号认证方式。Optionally, before the timer expires, if the new router receives two different types of Ethernet packets, for example, including the first Ethernet packet and the third Ethernet packet, wherein the first Ethernet packet The text is, for example, a PPPoE broadcast message, and the third Ethernet message is, for example, an IP message (the third Ethernet message here is a non-broadcast message with a legal source address), so the new router is based on the priority of each network connection mode. level, it can be determined that the network connection mode of the old router is the dial-up authentication mode indicated by the PPPoE broadcast message.

可选的,在定时器超时之前,如果新路由器共接收了三种不同类型的以太网报文,例如包括第一以太网报文、第二以太网报文和第三以太网报文,其中,第一以太网报文例如为PPPoE广播报文,第二以太网报文例如为DHCP广播报文,第三以太网报文例如为IP报文,那么新路由器根据各网络连接方式的优先级,可以确定旧路由器的网络连接方式为PPPoE广播报文所指示的拨号认证方式。Optionally, before the timer expires, if the new router receives three different types of Ethernet packets, for example, including the first Ethernet packet, the second Ethernet packet and the third Ethernet packet, wherein , the first Ethernet message is, for example, a PPPoE broadcast message, the second Ethernet message is, for example, a DHCP broadcast message, and the third Ethernet message is, for example, an IP message. , it can be determined that the network connection mode of the old router is the dial-up authentication mode indicated by the PPPoE broadcast message.

可选的,在定时器超时之前,如果新路由器共接收了两种不同类型的以太网报文,例如包括第二以太网报文和第三以太网报文,其中第二以太网报文例如为DHCP广播报文,第三以太网报文例如为IP报文,那么新路由器根据各网络连接方式的优先级,可以确定旧路由器的网络连接方式为DHCP广播报文所指示的动态分配地址方式。Optionally, before the timer expires, if the new router receives two different types of Ethernet packets, for example, including a second Ethernet packet and a third Ethernet packet, wherein the second Ethernet packet is, for example, It is a DHCP broadcast message, and the third Ethernet message is, for example, an IP message, so the new router can determine that the network connection mode of the old router is the dynamic address allocation mode indicated by the DHCP broadcast message according to the priority of each network connection mode .

可选的,在新路由器既接收到了PPPoE广播报文也接收到了DHCP广播报文的情况下,如果新路由器通过拨号认证方式连接网络失败,则新路由器可以重新采用动态分配地址方式连接网络。如果新路由器采用动态分配地址方式连接网络也失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, when the new router has received both the PPPoE broadcast message and the DHCP broadcast message, if the new router fails to connect to the network through dial-up authentication, the new router can reconnect to the network by dynamically assigning addresses. If the new router fails to connect to the network by dynamically assigning addresses, the new router can connect to the network by using the method provided in the prior art.

可选的,在新路由器既接收到了PPPoE广播报文也接收到了IP报文的情况下,如果新路由器通过拨号认证方式连接网络失败,则新路由器可以重新采用静态地址方式连接网络。如果新路由器采用静态地址方式连接网络也失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, when the new router has received both the PPPoE broadcast message and the IP message, if the new router fails to connect to the network through dial-up authentication, the new router can reconnect to the network with a static address. If the new router fails to connect to the network using the static address method, the new router can connect to the network using the method provided in the prior art.

可选的,在新路由器既接收到了PPPoE广播报文,也接收到了DHCP广播报文和IP报文的情况下,如果新路由器通过拨号认证方式连接网络失败,则新路由器可以重新采用动态分配地址方式连接网络。如果新路由器采用动态分配地址方式连接网络失败,则新路由器可以继续采用静态地址方式连接 网络。如果静态地址方式连接网络也失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, when the new router has received both PPPoE broadcast packets and DHCP broadcast packets and IP packets, if the new router fails to connect to the network through dial-up authentication, the new router can use dynamic address allocation again way to connect to the network. If the new router fails to connect to the network by dynamically assigning addresses, the new router can continue to use static addresses to connect network. If the static address method also fails to connect to the network, the new router can use the method provided in the prior art to connect to the network.

可选的,在新路由器既接收到了DHCP广播报文也接收到了IP报文的情况下,如果新路由器通过动态分配地址方式连接网络失败,则新路由器可以重新采用静态地址方式连接网络。如果新路由器采用静态地址方式连接网络也失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, when the new router has received both the DHCP broadcast message and the IP message, if the new router fails to connect to the network by dynamically assigning addresses, the new router can reconnect to the network by using a static address. If the new router fails to connect to the network using the static address method, the new router can connect to the network using the method provided in the prior art.

可选的,在新路由器只接收到了PPPoE广播报文的情况下,如果新路由器通过拨号认证方式连接网络失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, in the case that the new router only receives the PPPoE broadcast message, if the new router fails to connect to the network through dial-up authentication, the new router can connect to the network using the method provided in the prior art.

可选的,在新路由器只接收到了DHCP广播报文的情况下,如果新路由器通过动态分配地址方式连接网络失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, in the case that the new router only receives the DHCP broadcast message, if the new router fails to connect to the network through dynamic address allocation, the new router can connect to the network in the way provided in the prior art.

可选的,在新路由器只接收到了具有合法源地址的非广播的IP报文的情况下,如果新路由器通过静态地址方式连接网络失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, in the case that the new router has only received non-broadcast IP packets with a legal source address, if the new router fails to connect to the network through a static address, the new router can use the method provided in the prior art to connect to the network .

请参见图5,为本发明实施例中的网络连接方法的一个比较详细的流程图,该流程图大体介绍了如前的各个步骤。因为该流程图中涉及的各个步骤以及各种转折关系等在前面都已有介绍,这里不多赘述。Please refer to FIG. 5 , which is a more detailed flow chart of the network connection method in the embodiment of the present invention, which generally introduces the previous steps. Because each step involved in this flow chart and various turning relationships have been introduced before, so I won't repeat them here.

可选的,现在还是有不少ISP绑定了MAC地址,即,只有具有特定的MAC地址的路由器才能进行网络连接,比如一个家庭中,如果第一次使用旧路由器进行网络连接,那么ISP就认定了旧路由器的MAC地址,之后如果换了其他路由器,则因为路由器的MAC地址变了,ISP可能不会提供网络连接。Optionally, many ISPs are still bound with MAC addresses, that is, only routers with specific MAC addresses can connect to the network. For example, in a family, if the old router is used for the first time to connect to the network, the ISP will After identifying the MAC address of the old router, if you change to another router later, the ISP may not provide network connection because the MAC address of the router has changed.

为了解决这个问题,本发明实施例中,可以为路由器增加新的功能,即可以自动探测并获取其他路由器的MAC地址作为本路由器的WAN接口的MAC地址。该功能可以在路由器出厂时即自动开启,或者也可以由用户在需要时启用。In order to solve this problem, in the embodiment of the present invention, a new function can be added to the router, that is, the MAC address of other routers can be automatically detected and obtained as the MAC address of the WAN interface of the router. This feature can be turned on automatically when the router leaves the factory, or it can be enabled by the user when desired.

那么,如果新路由器具有该功能,则在新路由器的LAN接口与旧路由器 的WAN接口连接后,新路由器接收旧路由器发送的数据报文,则新路由器可以记录接收的数据报文携带的源MAC地址,并将记录的源MAC地址作为新路由器的WAN接口的MAC地址,以进行网络连接。其中,新路由器通过LAN接口接收的数据报文携带的源MAC地址就是旧路由器的MAC地址,即,新路由器相当于克隆了旧路由器的MAC地址。Then, if the new router has this function, the LAN interface of the new router and the old router After the WAN interface of the new router is connected, the new router receives the data packet sent by the old router, then the new router can record the source MAC address carried in the received data packet, and use the recorded source MAC address as the MAC address of the WAN interface of the new router. for network connection. Wherein, the source MAC address carried in the data message received by the new router through the LAN interface is the MAC address of the old router, that is, the new router is equivalent to cloning the MAC address of the old router.

其中,新路由器记录源MAC地址的数据报文,可以是PPPoE广播报文,或DHCP广播报文,或具有合法源地址的IP报文,或者也可以是其他类型的广播报文,或者也可以是其他类型的非广播报文,等等。另外,新路由器记录源MAC地址的数据报文,可以是新路由器的LAN接口与旧路由器的WAN接口连接后旧路由器发送的第一个数据报文,或者也可以是旧路由器发送的任意一个数据报文。Wherein, the new router records the data message of the source MAC address, which can be a PPPoE broadcast message, or a DHCP broadcast message, or an IP message with a legal source address, or other types of broadcast messages, or can also be are other types of non-broadcast packets, and so on. In addition, the new router records the data packet of the source MAC address, which can be the first data packet sent by the old router after the LAN interface of the new router is connected to the WAN interface of the old router, or it can be any data packet sent by the old router. message.

下面介绍本发明实施例中的设备。The devices in the embodiments of the present invention are introduced below.

基于同一发明构思,本发明实施例提供一种路由器,该路由器可以包括LAN接口和处理器。Based on the same inventive concept, an embodiment of the present invention provides a router, where the router may include a LAN interface and a processor.

其中,该路由器可以包括一个或多个LAN接口。Wherein, the router may include one or more LAN interfaces.

可选的,该路由器还可以包括其他接口,例如还可以包括WAN接口,用于与上行网络设备(例如DHCP服务器等)进行通信。Optionally, the router may also include other interfaces, for example, may also include a WAN interface for communicating with uplink network devices (such as a DHCP server, etc.).

同样的,该路由器也可以包括一个或多个WAN接口。Likewise, the router may also include one or more WAN interfaces.

处理器具体可以是中央处理器或特定应用集成电路(Application Specific Integrated Circuit,ASIC),可以是一个或多个用于控制程序执行的集成电路,可以是使用现场可编程门阵列(Field Programmable Gate Array,FPGA)开发的硬件电路,可以是基带芯片。Specifically, the processor can be a central processing unit or an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), which can be one or more integrated circuits used to control program execution, or can be implemented using a Field Programmable Gate Array (Field Programmable Gate Array) , FPGA) developed hardware circuit can be a baseband chip.

这些LAN接口和WAN接口可以通过总线与处理器相连接,或者也可以通过专门的连接线分别与处理器连接。These LAN interfaces and WAN interfaces can be connected to the processor through a bus, or can also be connected to the processor respectively through special connection lines.

通过对处理器进行设计编程,将前述所示的方法所对应的代码固化到芯片内,从而使芯片在运行时能够执行前述图2所示的方法。如何对处理器进行设计编程为本领域技术人员所公知的技术,这里不再赘述。 By designing and programming the processor, the code corresponding to the aforementioned method is solidified into the chip, so that the chip can execute the aforementioned method shown in FIG. 2 during operation. How to design and program a processor is well known to those skilled in the art, and will not be repeated here.

该路由器可以用于执行上述图2所述的方法,例如可以是如前所述的新路由器。The router may be used to execute the method described in FIG. 2 above, for example, it may be the new router as described above.

该新路由器的LAN接口可以与旧路由器的WAN接口连接,该新路由器可以通过LAN接口接收旧路由器发送的数据报文,从而处理器可以根据接收的数据报文获取旧路由器的网络连接信息。The LAN interface of the new router can be connected to the WAN interface of the old router, and the new router can receive the data message sent by the old router through the LAN interface, so that the processor can obtain the network connection information of the old router according to the received data message.

该新路由器接收旧路由器发送的数据报文,处理器对接收的数据报文进行解析,例如,通过解析数据报文的目的MAC地址和协议字段类型等,处理器可以确定数据报文的类型。The new router receives the data message sent by the old router, and the processor analyzes the received data message. For example, by analyzing the destination MAC address and protocol field type of the data message, the processor can determine the type of the data message.

可选的,如果确定接收的数据报文包括以太网报文,例如包括PPPoE广播报文,处理器确定旧路由器的网络连接方式为拨号认证方式,则处理器可以令新路由器进入PPPoE Server模式,在新路由器进入PPPoE Server模式后,处理器可以接受旧路由器发起的PPPoE会话,从而处理器可以通过与旧路由器之间的PPPoE流程获取旧路由器的鉴权信息。在获取旧路由器的鉴权信息后,处理器可以通过获取的鉴权信息、以拨号认证方式连接上行网络。Optionally, if it is determined that the received data message includes an Ethernet message, such as including a PPPoE broadcast message, the processor determines that the network connection mode of the old router is a dial-up authentication mode, then the processor can make the new router enter the PPPoE Server mode, After the new router enters the PPPoE Server mode, the processor can accept the PPPoE session initiated by the old router, so that the processor can obtain the authentication information of the old router through the PPPoE process with the old router. After obtaining the authentication information of the old router, the processor can use the obtained authentication information to connect to the uplink network in a dial-up authentication manner.

可选的,如果确定接收的数据报文包括以太网报文,例如包括DHCP广播报文,处理器确定旧路由器的网络连接方式为动态分配地址方式,则处理器可以向DHCP服务器发送请求消息,该请求消息用于请求DHCP服务器为新路由器分配动态地址。若DHCP服务器为处理器分配了动态地址,那么处理器可以根据分配的动态地址连接上行网络。Optionally, if it is determined that the received data message includes an Ethernet message, such as a DHCP broadcast message, and the processor determines that the network connection mode of the old router is a dynamic address allocation mode, the processor may send a request message to the DHCP server, The request message is used to request the DHCP server to assign a dynamic address for the new router. If the DHCP server assigns a dynamic address to the processor, the processor can connect to the uplink network according to the assigned dynamic address.

可选的,如果确定接收的数据报文为以太网报文,例如包括非广播报文,且为IP报文,则处理器可以确定该IP报文的源地址是否合法,如果该IP报文的源地址合法,则处理器确定旧路由器的网络连接方式为静态地址方式,且处理器确定需获取的IP地址为该IP报文的源地址。在获取该IP报文的源地址后,处理器可以将该IP报文的源地址作为新路由器的WAN接口的地址,以连接上行网络。Optionally, if it is determined that the received data packet is an Ethernet packet, such as including a non-broadcast packet, and is an IP packet, the processor can determine whether the source address of the IP packet is legal, if the IP packet If the source address is valid, the processor determines that the network connection mode of the old router is a static address mode, and the processor determines that the IP address to be obtained is the source address of the IP message. After obtaining the source address of the IP message, the processor can use the source address of the IP message as the address of the WAN interface of the new router to connect to the uplink network.

可选的,若有需要的话,该新路由器还可以克隆旧路由器的MAC地址。比如,处理器通过LAN接口接收了旧路由器发送的数据报文,那么处理器通 过对该数据报文进行解析,可以获得该数据报文携带的源MAC地址,该数据报文携带的源MAC地址也就是旧路由器的MAC地址,则处理器可以记录该数据报文携带的源MAC地址,并将该数据报文携带的源MAC地址设置为新路由器的WAN接口的MAC地址。Optionally, the new router can also clone the MAC address of the old router if necessary. For example, if the processor receives a data packet sent by the old router through the LAN interface, the processor will By parsing the data packet, the source MAC address carried by the data packet can be obtained. The source MAC address carried by the data packet is also the MAC address of the old router, and the processor can record the source MAC address carried by the data packet. MAC address, and set the source MAC address carried in the data packet as the MAC address of the WAN interface of the new router.

对于该路由器中的各功能单元所实现的更多的功能等,可参考图2方法部分的描述,不再多赘述。For more functions realized by each functional unit in the router, reference may be made to the description of the method part in FIG. 2 , and details are not repeated here.

基于同一发明构思,本发明实施例还提供一种路由器,该路由器可以包括接收模块和处理模块。Based on the same inventive concept, an embodiment of the present invention also provides a router, which may include a receiving module and a processing module.

在实际应用中,处理模块对应的实体设备可以是如前所述的处理器,接收模块对应的实体设备可以是如前所述的LAN接口。处理模块在与上行网络设备(例如DHCP服务器等)通信时,可以通过如前所述的WAN接口实现。In practical applications, the physical device corresponding to the processing module may be the aforementioned processor, and the physical device corresponding to the receiving module may be the aforementioned LAN interface. When the processing module communicates with an uplink network device (such as a DHCP server, etc.), it can be implemented through the aforementioned WAN interface.

该路由器可以用于执行上述图2所述的方法,例如该路由器可以是如前所述的新路由器。因此,对于该路由器中的各功能单元所实现的功能等,可参考图2方法部分的描述,不多赘述。The router may be used to execute the method described in FIG. 2 above, for example, the router may be the new router as described above. Therefore, for the functions realized by the functional units in the router, etc., reference may be made to the description of the method part in FIG. 2 , and details will not be repeated.

在本发明中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be Incorporation may either be integrated into another system, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to implement the embodiments of the present invention.

在本发明实施例中的各功能单元可以集成在一个处理单元中,或者各个单元也可以均是独立的物理模块。 Each functional unit in the embodiment of the present invention may be integrated into one processing unit, or each unit may also be an independent physical module.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:通用串行总线闪存盘(Universal Serial Bus flash drive)、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random-access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, all or part of the technical solutions of the present invention may be embodied in the form of software products, which are stored in a storage medium and include instructions to enable a computer device (which may be a personal computer, A server, or a network device, etc.) or a processor (processor) executes all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage media include: Universal Serial Bus flash drive (Universal Serial Bus flash drive), mobile hard disk, read-only memory (read-only memory, ROM), random-access memory (random-access memory, RAM), magnetic disk Various media that can store program codes such as discs or optical discs.

以上所述,以上实施例仅用以对本发明的技术方案进行了详细介绍,但以上实施例的说明只是用于帮助理解本发明实施例的方法,不应理解为对本发明实施例的限制。本技术领域的技术人员可轻易想到的变化或替换,都应涵盖在本发明实施例的保护范围之内。 As mentioned above, the above embodiments are only used to introduce the technical solutions of the present invention in detail, but the descriptions of the above embodiments are only used to help understand the methods of the embodiments of the present invention, and should not be construed as limitations on the embodiments of the present invention. Changes or substitutions that can be easily imagined by those skilled in the art should fall within the protection scope of the embodiments of the present invention.

Claims (21)

一种网络连接信息获取方法,应用于具有获取旧路由器的网络连接信息能力的新路由器,其特征在于,包括:A method for obtaining network connection information, applied to a new router capable of obtaining network connection information of an old router, characterized in that it includes: 所述新路由器通过所述新路由器的局域网LAN接口接收数据报文,所述数据报文包括所述旧路由器通过所述旧路由器的广域网WAN接口发送给所述新路由器的LAN接口的以太网报文;The new router receives a data packet through the LAN interface of the new router, and the data packet includes the Ethernet packet sent by the old router to the LAN interface of the new router through the WAN interface of the old router. arts; 所述新路由器根据所述数据报文,确定所述旧路由器的所述网络连接信息。The new router determines the network connection information of the old router according to the data packet. 如权利要求1所述的方法,其特征在于,The method of claim 1, wherein 所述网络连接信息包括:鉴权信息,网络连接方式或网际协议IP地址中的一个或者多个。The network connection information includes: authentication information, one or more of network connection mode or Internet Protocol IP address. 如权利要求2所述的方法,其特征在于,所述新路由器根据所述数据报文,确定所述旧路由器的网络连接信息,包括:The method according to claim 2, wherein the new router determines the network connection information of the old router according to the data message, including: 若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含以太网上的点对点协议PPPoE报文,则所述新路由器确定所述旧路由器的网络连接方式为拨号认证方式;If the data message is an Ethernet message and is a broadcast message, and the data message includes a point-to-point protocol PPPoE message on the Ethernet, then the new router determines that the network connection mode of the old router is dial-up verification method; 所述新路由器接受所述旧路由器发起的PPPoE会话;其中,所述新路由器工作在PPPoE服务器Server模式;The new router accepts the PPPoE session initiated by the old router; wherein, the new router works in the PPPoE server mode; 在所述新路由器和所述旧路由器的PPPoE会话流程中,所述新路由器获取所述旧路由器的鉴权信息。During the PPPoE session process between the new router and the old router, the new router obtains the authentication information of the old router. 如权利要求2所述的方法,其特征在于,所述新路由器根据所述数据报文,确定所述旧路由器的网络连接信息,包括:The method according to claim 2, wherein the new router determines the network connection information of the old router according to the data message, including: 若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含动态主机配置协议DHCP广播报文,则所述新路由器确定所述旧路由器的网络连接方式为动态分配地址方式。If the data message is an Ethernet message and is a broadcast message, and the data message includes a Dynamic Host Configuration Protocol DHCP broadcast message, then the new router determines that the network connection mode of the old router is dynamic Address allocation method. 如权利要求2所述的方法,其特征在于,所述新路由器根据所述数据 报文,确定所述旧路由器的网络连接信息,包括:The method according to claim 2, wherein the new router according to the data message, to determine the network connection information of the old router, including: 若所述数据报文为以太网报文,且为非广播报文,且所述数据报文包含IP报文,所述新路由器确定所述IP报文的源地址是否合法;If the data message is an Ethernet message and is a non-broadcast message, and the data message includes an IP message, the new router determines whether the source address of the IP message is legal; 若所述IP报文的源地址合法,则所述新路由器确定所述旧路由器的网络连接方式为静态地址方式,所述IP地址为所述IP报文的源地址。If the source address of the IP message is valid, the new router determines that the network connection mode of the old router is a static address mode, and the IP address is the source address of the IP message. 如权利要求3所述的方法,其特征在于,在获取所述旧路由器的鉴权信息之后,还包括:The method according to claim 3, further comprising: after obtaining the authentication information of the old router: 所述新路由器从所述PPPoE Server模式切换为PPPoE客户端client模式;The new router is switched from the PPPoE Server mode to the PPPoE client client mode; 在所述PPPoE client模式下,所述新路由器使用获取的网络连接信息进行网络连接。In the PPPoE client mode, the new router uses the obtained network connection information to connect to the network. 如权利要求1-6任一所述的方法,其特征在于,在所述新路由器通过所述新路由器的LAN接口接收数据报文之后,还包括:The method according to any one of claims 1-6, wherein, after the new router receives the data message through the LAN interface of the new router, further comprising: 所述新路由器记录所述数据报文的源媒体接入控制MAC地址,并将所述源MAC地址设置为所述新路由器的WAN接口的MAC地址。The new router records the source MAC address of the data packet, and sets the source MAC address as the MAC address of the WAN interface of the new router. 一种路由器,其特征在于,所述路由器具有获取旧路由器的网络连接信息的能力,所述路由器包括:A router, characterized in that, the router has the ability to obtain the network connection information of the old router, and the router includes: 局域网LAN接口,用于接收数据报文,所述数据报文包括所述旧路由器通过所述旧路由器的广域网WAN接口发送给所述LAN接口的以太网报文;The LAN interface of the local area network is used to receive the data message, and the data message includes the Ethernet message sent by the old router to the LAN interface through the WAN interface of the old router; 处理器,用于根据所述数据报文,确定所述旧路由器的所述网络连接信息。A processor, configured to determine the network connection information of the old router according to the data packet. 如权利要求8所述的路由器,其特征在于,所述网络连接信息包括:鉴权信息,网络连接方式或网际协议IP地址中的一个或者多个。The router according to claim 8, wherein the network connection information includes: one or more of authentication information, network connection mode or Internet Protocol IP address. 如权利要求9所述的路由器,其特征在于,所述处理器用于:The router according to claim 9, wherein the processor is used for: 若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含以太网上的点对点协议PPPoE报文,则确定所述旧路由器的网络连接方式为拨号认证方式;If the data message is an Ethernet message and is a broadcast message, and the data message includes a point-to-point protocol PPPoE message on the Ethernet, then it is determined that the network connection mode of the old router is a dial-up authentication mode; 接受所述旧路由器发起的PPPoE会话;其中,所述路由器工作在PPPoE 服务器Server模式;Accept the PPPoE session initiated by the old router; wherein, the router works in PPPoE Server Server mode; 在所述路由器和所述旧路由器的PPPoE会话流程中,获取所述旧路由器的鉴权信息。In the PPPoE session process between the router and the old router, the authentication information of the old router is acquired. 如权利要求9所述的路由器,其特征在于,所述处理器用于:The router according to claim 9, wherein the processor is used for: 若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含动态主机配置协议DHCP广播报文,则确定所述旧路由器的网络连接方式为动态分配地址方式。If the data message is an Ethernet message and is a broadcast message, and the data message includes a DHCP broadcast message, it is determined that the network connection mode of the old router is a dynamic address allocation mode. 如权利要求9所述的路由器,其特征在于,所述处理器用于:The router according to claim 9, wherein the processor is used for: 若所述数据报文为以太网报文,且为非广播报文,且所述数据报文包含IP报文,确定所述IP报文的源地址是否合法;If the data message is an Ethernet message and is a non-broadcast message, and the data message includes an IP message, determine whether the source address of the IP message is legal; 若所述IP报文的源地址合法,则确定所述旧路由器的网络连接方式为静态地址方式,所述IP地址为所述IP报文的源地址。If the source address of the IP message is legal, then determine that the network connection mode of the old router is a static address mode, and the IP address is the source address of the IP message. 如权利要求10所述的路由器,其特征在于,所述处理器还用于:The router according to claim 10, wherein the processor is further used for: 在获取所述旧路由器的鉴权信息之后,将所述路由器从所述PPPoE Server模式切换为PPPoE客户端client模式;After obtaining the authentication information of the old router, the router is switched from the PPPoE Server mode to the PPPoE client client mode; 在所述PPPoE client模式下,使用获取的网络连接信息进行网络连接。In the PPPoE client mode, use the obtained network connection information for network connection. 如权利要求8-13任一所述的路由器,其特征在于,所述处理器还用于:The router according to any one of claims 8-13, wherein the processor is further configured to: 在所述LAN接口接收数据报文之后,记录所述数据报文的源媒体接入控制MAC地址,并将所述源MAC地址设置为所述路由器的WAN接口的MAC地址。After the LAN interface receives the data message, record the source MAC address of the data message, and set the source MAC address as the MAC address of the WAN interface of the router. 一种路由器,其特征在于,所述路由器具有获取旧路由器的网络连接信息的能力,所述路由器包括:A router, characterized in that, the router has the ability to obtain the network connection information of the old router, and the router includes: 接收模块,用于通过所述路由器的LAN接口接收数据报文,所述数据报文包括所述旧路由器通过所述旧路由器的WAN接口发送给所述路由器的LAN接口的以太网报文;A receiving module, configured to receive a data message through the LAN interface of the router, the data message includes an Ethernet message sent by the old router to the LAN interface of the router through the WAN interface of the old router; 处理模块,用于根据所述数据报文,确定所述旧路由器的所述网络连接 信息。A processing module, configured to determine the network connection of the old router according to the data packet information. 如权利要求15所述的路由器,其特征在于,所述网络连接信息包括:鉴权信息,网络连接方式或网际协议IP地址中的一个或者多个。The router according to claim 15, wherein the network connection information includes: one or more of authentication information, network connection mode or Internet Protocol IP address. 如权利要求16所述的路由器,其特征在于,所述处理模块用于:The router according to claim 16, wherein the processing module is used for: 若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含以太网上的点对点协议PPPoE报文,则确定所述旧路由器的网络连接方式为拨号认证方式;If the data message is an Ethernet message and is a broadcast message, and the data message includes a point-to-point protocol PPPoE message on the Ethernet, then it is determined that the network connection mode of the old router is a dial-up authentication mode; 接受所述旧路由器发起的PPPoE会话;其中,所述路由器工作在PPPoE服务器Server模式;Accept the PPPoE session that described old router initiates; Wherein, described router works in PPPoE server Server pattern; 在所述路由器和所述旧路由器的PPPoE会话流程中,获取所述旧路由器的鉴权信息。In the PPPoE session process between the router and the old router, the authentication information of the old router is acquired. 如权利要求16所述的路由器,其特征在于,所述处理模块用于:The router according to claim 16, wherein the processing module is used for: 若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含动态主机配置协议DHCP广播报文,则确定所述旧路由器的网络连接方式为动态分配地址方式。If the data message is an Ethernet message and is a broadcast message, and the data message includes a DHCP broadcast message, it is determined that the network connection mode of the old router is a dynamic address allocation mode. 如权利要求16所述的路由器,其特征在于,所述处理模块用于:The router according to claim 16, wherein the processing module is used for: 若所述数据报文为以太网报文,且为非广播报文,且所述数据报文包含IP报文,确定所述IP报文的源地址是否合法;If the data message is an Ethernet message and is a non-broadcast message, and the data message includes an IP message, determine whether the source address of the IP message is legal; 若所述IP报文的源地址合法,则确定所述旧路由器的网络连接方式为静态地址方式,所述IP地址为所述IP报文的源地址。If the source address of the IP message is legal, then determine that the network connection mode of the old router is a static address mode, and the IP address is the source address of the IP message. 如权利要求17所述的路由器,其特征在于,所述处理模块还用于:The router according to claim 17, wherein the processing module is also used for: 在获取所述旧路由器的鉴权信息之后,将所述路由器从所述PPPoE Server模式切换为PPPoE客户端client模式;After obtaining the authentication information of the old router, the router is switched from the PPPoE Server mode to the PPPoE client client mode; 在所述PPPoE client模式下,使用获取的网络连接信息进行网络连接。In the PPPoE client mode, use the obtained network connection information for network connection. 如权利要求15-20任一所述的路由器,其特征在于,所述处理模块还用于:The router according to any one of claims 15-20, wherein the processing module is further used for: 在所述LAN接口接收数据报文之后,记录所述数据报文的源媒体接入控 制MAC地址,并将所述源MAC地址设置为所述路由器的WAN接口的MAC地址。 After the LAN interface receives the data message, record the source media access control of the data message Control the MAC address, and set the source MAC address as the MAC address of the WAN interface of the router.
CN201580079384.3A 2015-11-23 2015-11-23 A kind of network connection information acquisition method and router Active CN108307694B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/095325 WO2017088101A1 (en) 2015-11-23 2015-11-23 Network access information acquiring method, and router

Publications (2)

Publication Number Publication Date
CN108307694A true CN108307694A (en) 2018-07-20
CN108307694B CN108307694B (en) 2020-09-11

Family

ID=58762828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201580079384.3A Active CN108307694B (en) 2015-11-23 2015-11-23 A kind of network connection information acquisition method and router

Country Status (2)

Country Link
CN (1) CN108307694B (en)
WO (1) WO2017088101A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111614565A (en) * 2020-05-19 2020-09-01 青岛海信宽带多媒体技术有限公司 Message forwarding method and gateway
CN114286420A (en) * 2021-12-21 2022-04-05 深圳创维数字技术有限公司 Locking method, device, server and medium of gateway based on PON technology
CN116489007A (en) * 2022-01-13 2023-07-25 荣耀终端有限公司 Cutover method, network device, and computer-readable storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110138607A (en) * 2019-05-09 2019-08-16 深圳市吉祥腾达科技有限公司 Router updating method, system and storage medium
CN110730114B (en) * 2019-09-02 2021-02-12 华为技术有限公司 A method and device for configuring network configuration information
CN110880978B (en) * 2019-12-19 2021-10-15 浙江诺诺网络科技有限公司 Method, device and medium for connecting business processing PC (personal computer) with terminal equipment
CN112492089B (en) * 2020-11-09 2022-05-24 普联技术有限公司 Dialing method and system of communication equipment and communication equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6438606B1 (en) * 1998-12-23 2002-08-20 Cisco Technology, Inc. Router image support device
CN101199161A (en) * 2005-08-01 2008-06-11 思科技术公司 Method and system for dynamically assigning wireless LAN access point identities
CN102711282A (en) * 2012-05-21 2012-10-03 浙江优诺肯科技有限公司 Method for accessing zero-input wireless equipment into network and zero-input wireless equipment
CN102801623A (en) * 2012-08-15 2012-11-28 杭州华三通信技术有限公司 Multi-access data transmitting method and device
CN102970770A (en) * 2012-11-21 2013-03-13 深圳市普联技术有限公司 Power line based wireless roaming network establishing method and system
CN104902532A (en) * 2014-03-06 2015-09-09 张永杰 A method and system for automatically accessing wireless local area network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6438606B1 (en) * 1998-12-23 2002-08-20 Cisco Technology, Inc. Router image support device
CN101199161A (en) * 2005-08-01 2008-06-11 思科技术公司 Method and system for dynamically assigning wireless LAN access point identities
CN102711282A (en) * 2012-05-21 2012-10-03 浙江优诺肯科技有限公司 Method for accessing zero-input wireless equipment into network and zero-input wireless equipment
CN102801623A (en) * 2012-08-15 2012-11-28 杭州华三通信技术有限公司 Multi-access data transmitting method and device
CN102970770A (en) * 2012-11-21 2013-03-13 深圳市普联技术有限公司 Power line based wireless roaming network establishing method and system
CN104902532A (en) * 2014-03-06 2015-09-09 张永杰 A method and system for automatically accessing wireless local area network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何钰等: "路由器级联有讲究", 《中国有线电视》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111614565A (en) * 2020-05-19 2020-09-01 青岛海信宽带多媒体技术有限公司 Message forwarding method and gateway
CN114286420A (en) * 2021-12-21 2022-04-05 深圳创维数字技术有限公司 Locking method, device, server and medium of gateway based on PON technology
CN114286420B (en) * 2021-12-21 2023-09-05 深圳创维数字技术有限公司 PON technology-based gateway locking method, device, server and medium
CN116489007A (en) * 2022-01-13 2023-07-25 荣耀终端有限公司 Cutover method, network device, and computer-readable storage medium

Also Published As

Publication number Publication date
WO2017088101A1 (en) 2017-06-01
CN108307694B (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN108307694B (en) A kind of network connection information acquisition method and router
KR101418351B1 (en) Method and device for identifying and selecting an interface for accessing a network
CN101883158B (en) Method and client for acquiring VLAN (Virtual Local Area Network) IDs (Identifiers) and network protocol addresses
CN106487788B (en) A kind of user access method, SDN controller, forwarding device and subscriber access system
CN102594635B (en) Based on the terminal access method of home gateway and system and home gateway
CN106302353B (en) Identity authentication method, identity authentication system and related equipment
WO2014056135A1 (en) Port setting method, routing device, and computer program product
US20110202670A1 (en) Method, device and system for identifying ip session
US9172554B2 (en) Method and network access device for enabling data forwarding between different physical mediums
EP4312406A1 (en) Separate pfcp session model for network access by residential gateways
CN101127762A (en) A method and system for information interaction based on dynamic host configuration protocol
CN101160916A (en) Method and system for realizing automatic service distribution of PPP access terminal
WO2017080335A1 (en) Pppoe network-based dialing method, dialing system, and router
CN104852974B (en) A kind of message processing method and relevant device in PPPoE verification process
CN104780229A (en) Method, system and cloud system for setting cloud server IP address through cloud terminal
WO2016008250A1 (en) Method, device, system and computer storage medium for realizing dial-up internet access
CN100435520C (en) Methods of choosing services offered by different network service providers
WO2013178164A1 (en) Ipv6 domain name server (dns) address allocation and obtaining method and device
KR200195493Y1 (en) Internet protocol auto configuration possible hub
WO2020119768A1 (en) Accounting policy acquisition method and apparatus
CN115086276B (en) Address management method, device, equipment and system
Cisco Configuring Protocol Translation and Virtual Asynchronous Devices
CN105049241A (en) Method and system for terminal to access network
Cisco Configuring SLIP and PPP
Cisco Configuring SLIP and PPP

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210421

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: Shenzhen Zhixin new information technology Co.,Ltd.

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

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211015

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: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee before: Shenzhen Zhixin new information technology Co.,Ltd.

TR01 Transfer of patent right
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

CP03 Change of name, title or address