WO2017088101A1 - Network access information acquiring method, and router - Google Patents

Network access information acquiring method, and router Download PDF

Info

Publication number
WO2017088101A1
WO2017088101A1 PCT/CN2015/095325 CN2015095325W WO2017088101A1 WO 2017088101 A1 WO2017088101 A1 WO 2017088101A1 CN 2015095325 W CN2015095325 W CN 2015095325W WO 2017088101 A1 WO2017088101 A1 WO 2017088101A1
Authority
WO
WIPO (PCT)
Prior art keywords
router
packet
old
network connection
data packet
Prior art date
Application number
PCT/CN2015/095325
Other languages
French (fr)
Chinese (zh)
Inventor
刁猛
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201580079384.3A priority Critical patent/CN108307694B/en
Priority to PCT/CN2015/095325 priority patent/WO2017088101A1/en
Publication of WO2017088101A1 publication Critical patent/WO2017088101A1/en

Links

Images

Classifications

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

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a network connection information acquiring method and a router.
  • Ethernet Ethernet
  • ADSL Asymmetric Digital Subscriber Line
  • ADSL fiber-to-the-home
  • PON Passive Optical Network
  • Wi-Fi WIreless-Fidelity
  • IP Internet Protocol
  • the old router the router that is connected to the uplink network
  • the new router the router that will connect to the uplink network
  • the access mode sets up a new router so that the new router can successfully connect to the upstream network.
  • the old router adopts the PPPoE authentication mode
  • the user needs to know the user name and password.
  • the user name and password of the broadband access can be entered only once when the old router is initially installed. The subsequent use automatically saves the saved username and password.
  • the network connection is made, so when the user replaces the old router, the user name and password are generally not remembered; if the old router adopts the network access mode as the static address mode, the user also needs to obtain the IP address first, and the ordinary user does not know how to obtain the IP address. Both bring a lot of trouble to replace the new router.
  • the present application provides a network connection information acquisition method and a router, which are used to solve the technical problem of how a new router automatically acquires network connection information of an old router.
  • a method for acquiring network connection information is provided, which is applied to a new router having the capability of acquiring network connection information of an old router, including:
  • the new router determines the network connection information of the old router according to the data packet.
  • the new router can receive data packets sent by the old router through the Wide Area Network (WAN) interface through a Local Area Network (LAN) interface, and the data packets sent by the old router through the WAN interface are generally They are normally sent to the servers in the uplink network at work, so the new router is equivalent to intercepting the data packets sent by the old router to the servers in the uplink network.
  • WAN Wide Area Network
  • LAN Local Area Network
  • the new router can directly obtain the network connection information of the old router through the received data packet, and solve the technical problem of how the new router automatically acquires the network connection information of the old router, and then the new router can directly use the obtained network connection information and
  • the uplink network connection eliminates the need for the user to manually configure the new router, which simplifies the process of enabling the new router, reduces the chance of error caused by manual processing by the user, and reduces the burden on the user.
  • the network connection information includes one or more of authentication information, a network connection manner, or an IP address.
  • the obtained network connection information may also be different, but regardless of the network access mode, the obtained network connection information may include authentication information, network connection mode or IP address. One or more, so as to ensure that the new router can It is enough to get the network connection information of the relatively complete old router.
  • the new router determines network connection information of the old router according to the data packet, including:
  • the new router determines that the network connection mode of the old router is a dialing authentication mode
  • the new router accepts a PPPoE session initiated by the old router; wherein the new router works in a PPPoE Server mode;
  • the new router acquires the authentication information of the old router.
  • the new router determines that the network connection mode of the old router is the dial-up authentication mode
  • the new router can also enter the PPPoE server mode, and obtain the authentication information of the old router through the PPPoE session flow with the old router, so that the obtained authentication information can be obtained.
  • the dial-up authentication mode is used to access the uplink network. That is, the new router can obtain the authentication information and access the uplink network by itself.
  • the user does not need to manually operate the user name and password of the old router, thereby reducing the burden on the user and improving the user's burden.
  • the user experience also enhances the intelligence and usability of the new router.
  • the new router determines network connection information of the old router according to the data packet, including:
  • the new router determines that the network connection mode of the old router is a dynamic allocation address mode.
  • the new router determines, according to the data packet, the network connection information of the old router, including:
  • the new router determines whether the source address of the IP packet is legal;
  • the new router determines that the network connection mode of the old router is a static address mode, and the IP address is a source address of the IP packet.
  • the new router can determine the network connection mode of the old router according to the received data packet, and can perform uplink network access 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, 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.
  • the method further includes:
  • the new router switches from the PPPoE Server mode to the PPPoE client mode;
  • the new router uses the obtained network connection information to perform network connection.
  • the new router When the new router obtains the authentication information, the new router works in the PPPoE server mode, and when the uplink network connection is made, the new router needs to work in the PPPoE client mode. Therefore, after obtaining the authentication information, the new router can be from the PPPoE server mode. Switch to the PPPoE client mode, so that the new router can obtain the authentication information by itself or the uplink network connection without any user participation, and the new router can switch the working mode by itself or avoid errors.
  • the method further includes:
  • the new router records a source media access control MAC address of the data packet, and sets the source MAC address as a MAC address of a WAN interface of the new router.
  • ISPs Internet Service Providers
  • MAC addresses bound to them. That is, only routers with specific MAC addresses can connect to the network. For example, in a home, if you use the old router for the first time. Network connection, then the ISP will determine the MAC address of the old router, and if you change other routers, because the router's MAC address changes The ISP may not provide a network connection. Therefore, in this application, a new function can be added to the new router, that is, the MAC address of another router (such as an 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 can not connect to the uplink network.
  • ISPs Internet Service Providers
  • a first router having the capability of acquiring network connection information of an old router, the router comprising:
  • a LAN interface configured to receive a data packet, where the data packet includes an Ethernet packet sent by the old router to the LAN interface by using a WAN interface of the old router;
  • a processor configured to determine, according to the data packet, the network connection information of the old router.
  • the network connection information includes one or more of authentication information, a network connection manner, or an IP address.
  • the processor is configured to:
  • the data packet is an Ethernet packet and is a broadcast packet, and the data packet includes a PPPoE packet, determining that the network connection mode of the old router is a dialing authentication mode;
  • the processor is configured to:
  • the network connection mode of the old router is determined to be a dynamically allocated address mode.
  • the processor is configured to:
  • the data packet is an Ethernet packet and is a non-broadcast packet, and the data packet includes The IP packet determines whether the source address of the IP packet is legal.
  • the network connection mode of the old router is determined to be a static address mode, and the IP address is a source address of the IP packet.
  • the processor is further configured to:
  • the router After acquiring the authentication information of the old router, the router is switched from the PPPoE server mode to the PPPoE client mode;
  • the obtained network connection information is used for network connection.
  • the processor is also used to:
  • the LAN interface After receiving the data packet, the LAN interface records a source media access control MAC address of the data packet, and sets the source MAC address as a MAC address of the WAN interface of the router.
  • a second router having the capability to obtain network connection information for an old router, the router including means for performing the method of the first aspect.
  • FIG. 1A is a schematic diagram of a scenario in which a terminal accesses an Ethernet through a router;
  • FIG. 1B is a schematic diagram of a connection between a new router and an old router according to an embodiment of the present invention
  • FIG. 2 is a first flowchart of a network connection method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a format of an Ethernet broadcast packet according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of obtaining authentication information through a PPPoE session process according to an embodiment of the present invention.
  • FIG. 5 is a second flowchart of a network connection method according to an embodiment of the present invention.
  • the old router is a router that is already connected to the upstream network.
  • the new router which is the router that will connect to the upstream network, is used to replace the old router.
  • Multiple means two or more. "and/or”, describing the association relationship of the associated objects, indicating that there may be three relationships, for example, A and/or B, which may indicate that there are three cases where A exists separately, A and B exist at the same time, and B exists separately.
  • the character "/”, unless otherwise specified, generally indicates that the contextual object is an "or" relationship.
  • FIG. 1A is a schematic diagram of a scenario in which a terminal accesses an Ethernet through a router.
  • the terminal 1 in FIG. 1 is, for example, a mobile phone, and the terminal 2 is, for example, a personal computer (PC).
  • the terminal 1 and the terminal 2 are connected to the router 1 by wireless, and the router 1 is connected to the Internet (Internet) to implement the terminal 1. And the connection of terminal 2 to the Internet.
  • Internet Internet
  • the router 1 is integrated with a modem (modulator-demodulator, modem), so it can be directly connected to the Internet. If the modem is not integrated in the router 1, the router 1 can connect to the modem through the Ethernet, and the modem is connected to the Internet, thereby realizing the connection between the terminal 1 and the terminal 2 and the Internet.
  • modem modulator-demodulator
  • the technical solution provided in the embodiment of the present invention may be adopted.
  • FIG. 1B is a schematic diagram of a wiring manner according to an embodiment of the present invention.
  • FIG. 1B is an example of a home scenario.
  • the WAN interface of the new router is connected to the Ethernet port in the home to access the Internet.
  • the LAN interface of the new router should be connected to the network in the home.
  • the device is connected, for example, to a device such as a personal computer (PC).
  • PC personal computer
  • the new router may be first connected to the uplink network, and then the LAN interface of the new router is connected with the device in the home, that is, when the new router is replaced with the old router, the new router may be newly added.
  • the LAN interface of the router is connected to the WAN interface of the old router.
  • the new router can perform the network connection information obtaining method provided by the embodiment of the present invention.
  • old routers In general, old routers often interact with upstream network devices when they work. For example, if the old router uses a network connection that dynamically allocates addresses, the old routers will work with upstream network devices such as DHCP servers. Interact.
  • the old router generally sends the data packet to the upstream network device through the WAN interface of the old router, and also receives the data packet of the old uplink network device through the WAN interface of the old router.
  • the LAN of the new router is used. After the interface is connected to the WAN interface of the old router, for the old router, it will consider the new router as an uplink network device, so the Ethernet packet will be sent normally through the WAN interface, and the new router can intercept the old router. All data packets to the upstream network device.
  • the data packet may include an Ethernet packet, that is, a data packet sent by the old router to the LAN interface of the new router through the WAN interface of the old router, and may include the LAN sent by the old router to the new router through the WAN interface of the old router. Ethernet packet of the interface.
  • an embodiment of the present invention provides a method for acquiring network connection information, which can be applied to a new router having the capability of acquiring network connection information of an old router.
  • the process of the method is described as follows.
  • Step 201 The new router receives the data packet through the LAN interface of the new router.
  • the data packet includes the first Ethernet packet sent by the old router to the LAN interface of the new router through the WAN interface of the old router.
  • Step 202 The new router determines network information of the old router according to the data packet.
  • the new router may have at least two modes, for example, at least a normal working mode and a detecting mode.
  • the new router can work normally after connecting to the upstream network. In this mode, the new router can provide normal network connectivity for devices in the home through the uplink network.
  • the new router can work in the detection mode when performing the work of obtaining the network connection information provided in the embodiment of the present invention. In the detection mode, the new router can obtain the network connection information of the old router.
  • the new router when the new router is shipped from the factory, it can be set to the detection mode by default, or it can be automatically switched to the detection mode when the uplink network is not detected, or the user can manually switch the new router to the detection mode (for example, the user can press The corresponding button on the new router to switch the mode of the new router), and so on.
  • the new router can automatically switch to the normal working mode, or the new router 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.
  • the new router Before the new router receives data packets through the LAN interface of the new router, it also includes:
  • the new router starts the timer
  • the new router receives data packets through the LAN interface of the new router, including:
  • the new router Before the timer expires, the new router receives data packets through the LAN interface of the new router.
  • the timer is started to give a time limit for 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 still waits for reception in this case. In this case, the power consumption is large for the new router, and it is also useless. Therefore, the new router can set a timer. After the LAN interface of the new router is connected to the WAN interface of the old router, the new router can start the timer. Before the timer expires, the new router can receive the datagram sent by the old router. After the timer expires, the new router can stop receiving whether the new router receives the data packet, thereby reducing the power consumption of the new router.
  • the duration of the timer may be set when the new router is shipped from the factory, or may be set by the user, which is not limited by the embodiment of the present invention.
  • the old router may not send data packets through the WAN interface, or may send a small number of data packets. In this case, the new router It may not be easy to receive data messages. 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 with the WAN interface of the old router, the old router can be restarted, and the old router may go up the network device after restarting. Send a data packet so that the new router can receive data packets sent by the old router through the LAN interface.
  • the new router may The network connection continues in the manner of the prior art.
  • An Ethernet packet includes a destination media access control (MAC) address (generally occupying 6 bytes) and a source MAC address (generally Occupies 6 bytes), type (also known as protocol type field, generally occupies 2 bytes), data (that is, the data carried by the message, generally occupy 46-1500 bytes), and generally occupy 4 Byte's Frame Check Sequence (FCS).
  • MAC media access control
  • Occupies 6 bytes generally occupies 2 bytes
  • type also known as protocol type field
  • FCS Byte's Frame Check Sequence
  • the network connection information of the old router according to the Ethernet packet it is necessary to first determine the type of the Ethernet packet, and the network connection information indicated by the different types is different.
  • the type of an Ethernet packet can be determined by the protocol type field in the Ethernet packet.
  • the network connection information includes one or more of authentication information, a network connection manner, or an IP address.
  • the network connection mode may include a dialing authentication method, a dynamic allocation address mode, and a static address mode. If the network connection mode of the old router obtained by the new router is the dial-up authentication mode, the new router also needs to obtain the authentication information of the old router, so that the network connection is performed through the authentication information, and the authentication information may include, for example, a username and/or a password. Etc.; if the network connection mode of the old router obtained by the new router is static address mode, then the new router also needs to obtain the IP address of the old router, thereby making a network connection through the IP address.
  • the following describes how the new router obtains network connection information.
  • the new router receives the data packet sent by the old router through the LAN interface.
  • the new router parses the received data packet. If the data packet in the received data packet is an Ethernet packet, If the destination MAC address of the Ethernet packet is FF:FF:FF:FF:FF, the new router determines that the Ethernet packet is a broadcast packet. If the value of the protocol type field in the broadcast packet is 0x8863, the new router can determine that the broadcast packet is a PPPoE broadcast packet, and 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 the authentication information of the old router needs to be further obtained.
  • the new router can enter the PPPoE server mode.
  • the router generally works only in the PPPoE client mode.
  • the PPPoE server mode is generally the working mode of the server.
  • it is necessary to improve the new router so that the new router can simulate working in the PPPoE Server mode.
  • the new router After the new router enters PPPoE Server mode, it can accept the PPPoE session initiated by the old router. Generally, after the old router sends the PPPoE broadcast message to the upstream network device (in the embodiment of the present invention, the new router receives the PPPoE broadcast message), the old router initiates a PPPoE session to the uplink network device, and then the present invention
  • the new router working in the 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 flow with the old router.
  • the PPPoE session flow can be divided into three phases, namely the Discovery phase, the Session phase, and the Terminate phase.
  • FIG. 4 is a schematic diagram of the interaction of the PPPoE session flow between the new router and the old router.
  • the first is the Discovery phase, which consists of four processes. After completion, both the new router and the old router will know the PPPoE session ID number (Session_ID) and the other party's Ethernet address. These parameters together determine the unique PPPoE Session.
  • Session_ID PPPoE session ID number
  • the old router sends a PPPoE Active Discovery Initiation (PADI) packet by broadcast, and the PADI packet contains the service type information that the old router wants.
  • PADI PPPoE Active Discovery Initiation
  • the new router After receiving the PADI message, the new router compares the service requested in the PADI message with the service that it can provide. If it can provide, it replies to the old router with PPPoE through unicast. Proactively discover the PPPoE Active Discovery Offer (PADO) message.
  • PADO PPPoE Active Discovery Offer
  • the old router After receiving the PADO packet, the old router sends a PPPoE Active Discovery Request (PADR) packet to the new router through unicast.
  • PADR PPPoE Active Discovery Request
  • the new router generates a unique session ID (ie, Session_ID) that identifies the current PPPoE session with the old router.
  • the new router sends a PPPoE Active Discovery Session-Confirmation (PADS) packet to the old router, and carries the Session_ID in the PADS packet and sends it to the old router.
  • PPPoE Active Discovery Session-Confirmation PADS
  • the PPPoE session is established, the Discovery phase ends, and then enters the Session phase.
  • the work in the Discovery phase establishes a session between the new router and the old router, and then enters the Session phase.
  • the Session phase can be divided into two parts. The first part is the Point to Point Protocol (PPP) negotiation phase. The second part is the PPP packet transmission phase after the PPP negotiation phase ends.
  • PPP Point to Point Protocol
  • the PPP negotiation mode of the PPPoE is the same as that of the normal PPP negotiation mode.
  • the link control protocol (LCP) negotiation phase, the authentication phase, and the Network Control Protocol (NCP) phase are three. stage.
  • the first is the LCP negotiation phase.
  • the LCP negotiation phase mainly completes the tasks of establishing, configuring, and detecting data link connections.
  • the communication parties can adopt different authentication methods, for example, a Password Authentication Protocol (PAP) authentication method, or a Challenge Handshake Authentication Protocol (CHAP).
  • PAP Password Authentication Protocol
  • CHAP Challenge Handshake Authentication Protocol
  • the PPPoE session is performed to obtain the authentication information when the old router performs the network connection through the dial-up authentication mode. Therefore, in the embodiment of the present invention, the new router and the old router are in the LCP negotiation phase.
  • PAP authentication is used for authentication.
  • the old router sends the authentication information of the dial-up authentication mode to the new router in plain text.
  • the old router sends a PAP Request to the new router, and the authentication information is carried in plain text.
  • the PAP Request In the embodiment of the present invention, an example of authentication information
  • it may include information such as a username and password for network connection through dial-up authentication.
  • the new router After the new router obtains the authentication information of the old router, the new router can respond to the authentication failure (PAP NAK) to the old router because there is no need to continue the subsequent session flow. Thus, the PPP session process is terminated.
  • PAP NAK authentication failure
  • the new router can send a PPPoE Active Discovery Terminate (PADT) packet to the old router to terminate the PPPoE session.
  • PADT PPPoE Active Discovery Terminate
  • the PADT packet can be sent to the new router by the old router.
  • the PPPoE session process ends, and the new router can be switched back to the normal PPPoE client mode, and the authentication information can be connected to the uplink network through dial-up authentication.
  • the prompt information may be output.
  • the prompt information is used to prompt the user that the uplink network is successfully connected.
  • the user may disconnect the connection between the new router and the old router. Devices in the home that require network connectivity are connected to the LAN interface of the new router so that they can be networked through the new router.
  • the prompt information may be an audible prompt, or may be a text prompt (for example, the new router sends information to the terminal used by the user), or may be a vibration prompt, or may be other types of prompts, such as
  • the indicator light set on the new router is blinking, and the like, and the type of the prompt information is not limited in the embodiment of the present invention.
  • 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.
  • the new router receives the data packet sent by the old router through the LAN interface, and the new router parses the received data packet. If the data packet in the received data packet is an Ethernet packet, and the Ethernet packet is The destination MAC address is FF:FF:FF:FF:FF, then the new router determines the The Ethernet packet is a broadcast packet.
  • the new router can If the broadcast packet is determined to be a DHCP broadcast packet, the new router determines that the network connection mode of the old router is dynamically allocated.
  • IPv4 packet IPv4 packet
  • IPv6 packet IPv6 packet
  • the new router may send a request message to the DHCP server, where the request message is used to request the DHCP server to allocate 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 based on the assigned dynamic address.
  • the new router receives the data packet sent by the old router through the LAN interface, and the new router parses the received data packet. If the data packet in the received data packet is an Ethernet packet, and the Ethernet packet is 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, If the non-broadcast packet is an IP packet, the new router can determine whether the source address (ie, the source IP address) of the IP packet is legal. If the source address of the IP packet is valid, the new router determines the network of the old router. The connection mode is static address mode, and the new router determines that the IP address to be obtained is the source address of the IP packet.
  • the new router can use the source address of the IP packet as the address of the WAN interface of the new router to connect to the network.
  • the network is connected by a static address
  • the user needs to manually input the IP address, and the operations in the embodiment of the present invention can be automatically completed by the new router, which reduces the burden on the user and reduces the manual operation of the user. The chance of error.
  • a broadcast packet For a broadcast packet, other types of broadcast packets may not be used to obtain the network connection information of the old router, except for the broadcast packets of the PPPoE type and the broadcast packets of the DHCP type. Therefore, if the new router receives the broadcast packet before the timer expires, and determines that the received broadcast packet is neither a PPPoE type broadcast message nor a DHCP type broadcast message, the new router can discard the received broadcast message. , can not get the network connection information of the old router.
  • non-broadcast packet For a non-broadcast packet, other types of non-broadcast packets may not be used to obtain the network connection information of the old router except for the IP packets with the legal source address. Therefore, if the new router receives the timer before the timer expires. If the non-broadcast packet is not an IP packet or an IP packet with an invalid source address, the new router can discard the received packets and cannot obtain the network connection information of the old router.
  • the old router may connect to the network through only one type of network connection, for example, it may be through dial-up authentication
  • some old routers may send multiple types of Ethernet when sending Ethernet packets through the WAN interface.
  • a packet for example, may send a PPPoE broadcast packet, may also send a DHCP broadcast packet, or may send an IP packet.
  • the new router may receive a plurality of different types of Ethernet packets before the timer expires.
  • the embodiment of the present invention assigns priorities to the network connection manners according to the stability of the network connection. For example, the dial-up authentication method has the highest priority, followed by the dynamic allocation of the address mode. The lowest priority is the static address mode. If the new router receives multiple different types of Ethernet packets, the new router can follow the priority. The high to low order determines the network connection of the old router. The following examples are presented.
  • the new router can determine the network connection mode of the old router as the dialing authentication mode indicated by the PPPoE broadcast packet according to the priority of each network connection mode. That is, because the network connection is higher and the network connection is more stable when the network connection is performed by the dial-up authentication method, the embodiment of the present invention preferentially uses the dial-up authentication method for network connection.
  • the new router receives two different types of Ethernet packets, for example, the first Ethernet packet and the third Ethernet packet, where the first Ethernet packet is received.
  • the packet is a PPPoE broadcast packet
  • the third Ethernet packet is an IP packet
  • the third Ethernet packet is a non-broadcast packet with a legal source address. You can determine the network connection mode of the old router as the dialing authentication mode indicated by the PPPoE broadcast packet.
  • the new router receives three different types of Ethernet packets, for example, the first Ethernet packet, the second Ethernet packet, and the third Ethernet packet, where
  • the first Ethernet packet is a PPPoE broadcast packet
  • the second Ethernet packet is a DHCP broadcast packet
  • the third Ethernet packet is an IP packet, for example, the priority of the new router according to each network connection manner.
  • the network connection mode of the old router can be determined as the dialing authentication mode indicated by the PPPoE broadcast packet.
  • the new router receives two different types of Ethernet packets, for example, the second Ethernet packet and the third Ethernet packet, where the second Ethernet packet is, for example, For the DHCP broadcast packet, the third Ethernet packet is, for example, an IP packet.
  • the new router can determine the network connection mode of the old router as the dynamic address allocation mode indicated by the DHCP broadcast packet according to the priority of each network connection mode. .
  • the new router receives both the PPPoE broadcast packet and the DHCP broadcast packet, if the new router fails to connect to the network through dial-up authentication, the new router can re-connect the network by dynamically assigning the address. If the new router fails to connect to the network by dynamically assigning addresses, the new router can connect to the network in the manner provided in the prior art.
  • the new router can reconnect to the network by using a static address. If the new router fails to connect to the network using a static address, the new router can connect to the network in the manner provided in the prior art.
  • the new router can re-use the dynamically assigned address. 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 connect using static addresses. The internet. If the static address mode also fails to connect to the network, the new router can connect to the network in the manner provided in the prior art.
  • the new router can reconnect to the network by using a static address. If the new router fails to connect to the network using a static address, the new router can connect to the network in the manner provided in the prior art.
  • the new router in the case that the new router only receives the PPPoE broadcast message, if the new router fails to connect to the network through the dial-up authentication mode, the new router can connect to the network in the manner provided in the prior art.
  • the new router in the case that the new router only receives the DHCP broadcast packet, if the new router fails to connect to the network through the dynamic address allocation manner, the new router can connect to the network in the manner provided in the prior art.
  • the new router in the case that the new router only receives the non-broadcast IP packet with the legal source address, if the new router fails to connect to the network through the static address mode, the new router can connect to the network by using the method provided in the prior art. .
  • FIG. 5 it is a detailed flowchart of a network connection method according to an embodiment of the present invention.
  • the flowchart generally describes various steps as before. Because the various steps involved in the flowchart and various transition relationships have been introduced in the foregoing, no further details are provided here.
  • ISPs that have MAC addresses bound to them. That is, only routers with specific MAC addresses can connect to the network. For example, in a home, if the old router is used for the first time, the ISP will The MAC address of the old router is determined. If another router is changed, the ISP may not provide a network connection because the MAC address of the router has changed.
  • a new function may be added to the router, that is, the MAC address of another router may 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 needed.
  • the new router receives the data packet sent by the old router, and the new router can record the source MAC address carried by the received data packet, and use the recorded source MAC address as the MAC address of the WAN interface of the new router.
  • the source MAC address carried by the new router through the LAN interface is the MAC address of the old router. That is, the new router is equivalent to the MAC address of the old router.
  • the data packet of the source MAC address of the new router may be a PPPoE broadcast packet, or a DHCP broadcast packet, or an IP packet with a legal source address, or other types of broadcast packets, or Is other types of non-broadcast messages, and so on.
  • the new router records the data packet of the source MAC address, which may 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 may be any data sent by the old router. Message.
  • an embodiment of the present invention provides a router, which may include a LAN interface and a processor.
  • the router may include one or more LAN interfaces.
  • the router may also include other interfaces, for example, may also include a WAN interface for communicating with an uplink network device (eg, a DHCP server, etc.).
  • an uplink network device eg, a DHCP server, etc.
  • the router can also include one or more WAN interfaces.
  • the processor may be a central processing unit or an application specific integrated circuit (ASIC), and may be one or more integrated circuits for controlling program execution, and may be a field programmable gate array (Field Programmable Gate Array). , FPGA) developed hardware circuit, which can be a baseband chip.
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • LAN interfaces and WAN interfaces can be connected to the processor via a bus, or they can be connected to the processor through dedicated connection lines.
  • the code corresponding to the method shown above is solidified into the chip, so that the chip can execute the method shown in FIG. 2 during operation.
  • How to design and program the processor is a technique well known to those skilled in the art, and details are not described herein.
  • the router can be used to perform the method described above with respect to FIG. 2, such as a new router as previously described.
  • the LAN interface of the new router can be connected to the WAN interface of the old router.
  • the new router can receive the data packet 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 packet.
  • the new router receives the data packet sent by the old router, and the processor parses the received data packet. For example, by analyzing the destination MAC address and the protocol field type of the data packet, the processor can determine the type of the data packet.
  • the processor may enable the new router to enter 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.
  • the processor can connect to the uplink network by using the obtained authentication information and dialing authentication.
  • 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 to 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.
  • the processor may determine whether the source address of the IP packet is legal, if the IP packet is 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 packet. After obtaining the source address of the IP packet, the processor can use the source address of the IP packet as the address of the WAN interface of the new router to connect to the uplink network.
  • the new router can also clone the MAC address of the old router if needed. For example, if the processor receives the data packet sent by the old router through the LAN interface, then the processor passes the After the data packet is parsed, the source MAC address of the data packet can be obtained.
  • the source MAC address of the data packet is the MAC address of the old router, and the processor can record the source carried by the data packet. MAC address, and set the source MAC address carried in the data packet to the MAC address of the WAN interface of the new router.
  • an embodiment of the present invention further provides a router, which may include a receiving module and a processing module.
  • the physical device corresponding to the processing module may be a processor as described above, and the physical device corresponding to the receiving module may be a LAN interface as described above.
  • the processing module communicates with an upstream network device (such as a DHCP server, etc.), it can be implemented through the WAN interface as described above.
  • the router can be used to perform the method described above with respect to Figure 2, for example the router can be a new router as previously described. Therefore, for the functions and the like implemented by the functional units in the router, reference may be made to the description of the method part of FIG. 2, and details are not described herein.
  • the disclosed apparatus and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit or unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to implement the embodiments of the present invention.
  • the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may also be an independent physical module.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • all or part of the technical solution of the present invention may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, A server, or network device, or the like, or a processor, performs all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a Universal Serial Bus flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), and a magnetic A variety of media that can store program code, such as a disc or a disc.

Landscapes

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

Abstract

The present invention relates to the technical field of mobile communications, and particularly relates to a method for acquiring network access information and a router, for addressing the technical problem of how a new router can automatically acquire the network access information of an old router. In the present invention, the new router can receive, via an LAN interface, a data packet transmitted by the old router via a WAN interface, so that the new router can directly acquire the network access information of the old router via the received data packet, thus resolving the technical problem of how a new router can automatically acquire the network access information of an old router.

Description

一种网络连接信息获取方法及路由器Network connection information acquisition method and router 技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种网络连接信息获取方法及路由器。The present invention relates to the field of communications technologies, and in particular, to a network connection information acquiring method 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 access Ethernet (Ethernet) through Asymmetric Digital Subscriber Line (ADSL) or fiber-to-the-home (ADSL). At this time, operators generally deploy ADSL in the user's home network. Terminal or Passive Optical Network (PON) terminal. However, with the growing demand for WIreless-Fidelity (Wi-Fi) Internet access, many users will re-buy a wireless router to replace the ADSL terminal or PON deployed in the user's home in order to solve the Wi-Fi coverage of the home. The terminal accesses the Ethernet.
一般来说,路由器的网络接入方式主要有三种:1、以太网上的点对点协议(Point-to-Point Protocol over Ethernet,PPPoE)拨号认证方式(简称拨号认证方式);2、动态分配地址方式,即通过动态主机配置协议(Dynamic Host Configuration Protocol,DHCP)服务器自动分配地址的方式;3、静态地址方式,即通过输入已知的网际协议(Internet Protocol,IP)地址联网的方式。Generally, there are three types of network access methods for a router: 1. Point-to-Point Protocol over Ethernet (PPPoE) dial-up authentication (referred to as dial-up authentication); 2. Dynamic allocation of address methods. That is, the method of automatically assigning an address through a Dynamic Host Configuration Protocol (DHCP) server; 3. The static address mode, that is, a method of inputting a known Internet Protocol (IP) address.
当用户用新路由器(将要连接上行网络的路由器)去替换家里旧路由器(已经连接到上行网络的路由器)时,一般都需要先了解旧路由器采用的网络接入方式,然后手动按照旧路由器的网络接入方式设置新路由器,使得新路由器可以成功连接到上行网络。如果旧路由器采用网络接入方式是PPPoE认证方式,还需要用户知道用户名和密码,一般宽带接入的用户名和密码只在初始安装旧路由器时输入一次即可,后续使用自动使用保存的用户名和密码进行网络连接,所以用户替换旧路由器时一般不记得用户名和密码;如果旧路由器采用网络接入方式是静态地址方式,用户也先需要获取IP地址,普通用户也是不知道如何获取IP地址的,这些都给替换新路由器带来很多麻烦。 When a user replaces the old router (the router that is connected to the uplink network) with the new router (the router that will connect to the uplink network), it is generally necessary to first understand the network access mode adopted by the old router, and then manually follow the network of the old router. The access mode sets up a new router so that the new router can successfully connect to the upstream network. If the old router adopts the PPPoE authentication mode, the user needs to know the user name and password. Generally, the user name and password of the broadband access can be entered only once when the old router is initially installed. The subsequent use automatically saves the saved username and password. The network connection is made, so when the user replaces the old router, the user name and password are generally not remembered; if the old router adopts the network access mode as the static address mode, the user also needs to obtain the IP address first, and the ordinary user does not know how to obtain the IP address. Both 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.
发明内容Summary of the invention
本申请提供一种网络连接信息获取方法及路由器,用以解决新路由器如何自动获取旧路由器的网络连接信息的技术问题。The present application provides a network connection information acquisition method and a router, which are used to solve the technical problem of how a new router automatically acquires network connection information of an old router.
第一方面,提供一种网络连接信息获取方法,应用于具有获取旧路由器的网络连接信息能力的新路由器,包括:In a first aspect, a method for acquiring network connection information is provided, which is applied to a new router having the capability of acquiring network connection information of an old router, including:
所述新路由器通过所述新路由器的LAN接口接收数据报文,所述数据报文包括所述旧路由器通过所述旧路由器的WAN接口发送给所述新路由器的LAN接口的以太网报文;Receiving, by the new router, a data packet by using a LAN interface of the new router, where the data packet includes an Ethernet packet sent by the old router to a LAN interface of the new router by using a 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 data packets sent by the old router through the Wide Area Network (WAN) interface through a Local Area Network (LAN) interface, and the data packets sent by the old router through the WAN interface are generally They are normally sent to the servers in the uplink network at work, so the new router is equivalent to intercepting the data packets sent by the old router to the servers in the uplink network. Then, the new router can directly obtain the network connection information of the old router through the received data packet, and solve the technical problem of how the new router automatically acquires the network connection information of the old router, and then the new router can directly use the obtained network connection information and The uplink network connection eliminates the need for the user to manually configure the new router, which simplifies the process of enabling the new router, reduces the chance of error caused by manual processing by the user, and reduces the burden on the user.
结合第一方面,在第一方面的第一种可能的实现方式中,所述网络连接信息包括:鉴权信息,网络连接方式或IP地址中的一个或者多个。In conjunction with the first aspect, in a first possible implementation manner of the first aspect, the network connection information includes one or more of authentication information, a network connection manner, or an IP address.
因为旧路由器的网络接入方式可能不同,因此获取的网络连接信息也可能不同,但无论是哪种网络接入方式,获取的网络连接信息都可以包括鉴权信息,网络连接方式或IP地址中的一个或者多个,从而尽量保证新路由器能 够获得较为完整的旧路由器的网络连接信息。Because the network access mode of the old router may be different, the obtained network connection information may also be different, but regardless of the network access mode, the obtained network connection information may include authentication information, network connection mode or IP address. One or more, so as to ensure that the new router can It is enough to get the network connection information of the relatively complete old router.
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述新路由器根据所述数据报文,确定所述旧路由器的网络连接信息,包括:With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the new router determines network connection information of the old router according to the data packet, including:
若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含PPPoE报文,则所述新路由器确定所述旧路由器的网络连接方式为拨号认证方式;If the data packet is an Ethernet packet and is a broadcast packet, and the data packet includes a PPPoE packet, the new router determines that the network connection mode of the old router is a dialing authentication mode;
所述新路由器接受所述旧路由器发起的PPPoE会话;其中,所述新路由器工作在PPPoE Server模式;The new router accepts a PPPoE session initiated by the old router; wherein the new router works in a PPPoE Server mode;
在所述新路由器和所述旧路由器的PPPoE会话流程中,所述新路由器获取所述旧路由器的鉴权信息。In the PPPoE session flow of the new router and the old router, the new router acquires 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 the dial-up authentication mode, the new router can also enter the PPPoE server mode, and obtain the authentication information of the old router through the PPPoE session flow with the old router, so that the obtained authentication information can be obtained. The dial-up authentication mode is used to access the uplink network. That is, the new router can obtain the authentication information and access the uplink network by itself. The user does not need to manually operate the user name and password of the old router, thereby reducing the burden on the user and improving the user's burden. The user experience also enhances the intelligence and usability of the new router.
结合第一方面的第一种可能的实现方式,在第一方面的第三种可能的实现方式中,所述新路由器根据所述数据报文,确定所述旧路由器的网络连接信息,包括:With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the new router determines network connection information of the old router according to the data packet, including:
若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含DHCP广播报文,则所述新路由器确定所述旧路由器的网络连接方式为动态分配地址方式。If the data packet is an Ethernet packet and is a broadcast packet, and the data packet includes a DHCP broadcast packet, the new router determines that the network connection mode of the old router is a dynamic allocation address mode.
结合第一方面的第一种可能的实现方式,在第一方面的第四种可能的实现方式中,所述新路由器根据所述数据报文,确定所述旧路由器的网络连接信息,包括:With reference to the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the new router determines, according to the data packet, the network connection information of the old router, including:
若所述数据报文为以太网报文,且为非广播报文,且所述数据报文包含 IP报文,所述新路由器确定所述IP报文的源地址是否合法;If the data packet is an Ethernet packet and is a non-broadcast packet, and the data packet includes The IP packet, the new router determines whether the source address of the IP packet is legal;
若所述IP报文的源地址合法,则所述新路由器确定所述旧路由器的网络连接方式为静态地址方式,所述IP地址为所述IP报文的源地址。If the source address of the IP packet 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 a source address of the IP packet.
新路由器根据接收的数据报文就可以确定旧路由器的网络连接方式,并可以根据不同的网络连接方式自行进行上行网络接入,无需用户的参与。比如,若数据报文包含IP报文,则新路由器可以自行获取IP报文的源地址,从而可以将该IP报文的源地址作为进行上行网络连接的IP地址,无需用户来获取该IP地址,减轻用户的负担。The new router can determine the network connection mode of the old router according to the received data packet, and can perform uplink network access 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, 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 the second possible implementation of the first aspect, in a fifth possible implementation manner of the first aspect, after acquiring the authentication information of the old router, the method further includes:
所述新路由器从所述PPPoE Server模式切换为PPPoE client模式;The new router switches 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 perform network connection.
在新路由器获取鉴权信息时,新路由器工作在PPPoE Server模式,而要进行上行网络连接时,新路由器需工作在PPPoE client模式,因此,在获取鉴权信息后,新路由器可以从PPPoE Server模式切换为PPPoE client模式,这样新路由器既可以自行获取鉴权信息,也可以自行进行上行网络连接,均无需用户的参与,且新路由器可以自行切换工作模式,也可以避免出错。When the new router obtains the authentication information, the new router works in the PPPoE server mode, and when the uplink network connection is made, the new router needs to work in the PPPoE client mode. Therefore, after obtaining the authentication information, the new router can be from the PPPoE server mode. Switch to the PPPoE client mode, so that the new router can obtain the authentication information by itself or the uplink network connection without any user participation, and the new router can switch the working mode by itself or avoid errors.
结合第一方面或第一方面的第一种可能的实现方式至第五种可能的实现方式中的任一种可能的实现方式,在第一方面的第六种可能的实现方式中,在所述新路由器通过所述新路由器的LAN接口接收数据报文之后,还包括:With reference to the first aspect or the first possible implementation manner of the first aspect to the fifth possible implementation manner, in the sixth possible implementation manner of the first aspect, After the new router receives the data packet through the LAN interface of the new router, the method further includes:
所述新路由器记录所述数据报文的源媒体接入控制MAC地址,并将所述源MAC地址设置为所述新路由器的WAN接口的MAC地址。The new router records a source media access control MAC address of the data packet, and sets the source MAC address as a MAC address of a 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 (ISPs) that have MAC addresses bound to them. That is, only routers with specific MAC addresses can connect to the network. For example, in a home, if you use the old router for the first time. Network connection, then the ISP will determine the MAC address of the old router, and if you change other routers, because the router's MAC address changes The ISP may not provide a network connection. Therefore, in this application, a new function can be added to the new router, that is, the MAC address of another router (such as an 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 can not connect to the uplink network.
第二方面,提供第一种路由器,所述路由器具有获取旧路由器的网络连接信息的能力,所述路由器包括:In a second aspect, a first router is provided, the router having the capability of acquiring network connection information of an old router, the router comprising:
LAN接口,用于接收数据报文,所述数据报文包括所述旧路由器通过所述旧路由器的WAN接口发送给所述LAN接口的以太网报文;a LAN interface, configured to receive a data packet, where the data packet includes an Ethernet packet sent by the old router to the LAN interface by using a WAN interface of the old router;
处理器,用于根据所述数据报文,确定所述旧路由器的所述网络连接信息。And a processor, configured to determine, according to the data packet, the network connection information of the old router.
结合第二方面,在第二方面的第一种可能的实现方式中,所述网络连接信息包括:鉴权信息,网络连接方式或IP地址中的一个或者多个。In conjunction with the second aspect, in a first possible implementation manner of the second aspect, the network connection information includes one or more of authentication information, a network connection manner, or an IP address.
结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述处理器用于:In conjunction with 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 packet is an Ethernet packet and is a broadcast packet, and the data packet includes a PPPoE packet, determining that the network connection mode of the old router is a dialing authentication mode;
接受所述旧路由器发起的PPPoE会话;其中,所述路由器工作在PPPoE Server模式;Accepting a PPPoE session initiated by the old router; wherein the router works in a PPPoE Server mode;
在所述路由器和所述旧路由器的PPPoE会话流程中,获取所述旧路由器的鉴权信息。And obtaining, in the PPPoE session flow of the router and the old router, authentication information of the old router.
结合第二方面的第一种可能的实现方式,在第二方面的第三种可能的实现方式中,所述处理器用于:In conjunction with 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 packet is an Ethernet packet and is a broadcast packet, and the data packet includes a DHCP broadcast packet, the network connection mode of the old router is determined to be a dynamically allocated address mode.
结合第二方面的第一种可能的实现方式,在第二方面的第四种可能的实现方式中,所述处理器用于:In conjunction with the first possible implementation of the second aspect, in a fourth possible implementation of the second aspect, the processor is configured to:
若所述数据报文为以太网报文,且为非广播报文,且所述数据报文包含 IP报文,确定所述IP报文的源地址是否合法;If the data packet is an Ethernet packet and is a non-broadcast packet, and the data packet includes The IP packet determines whether the source address of the IP packet is legal.
若所述IP报文的源地址合法,则确定所述旧路由器的网络连接方式为静态地址方式,所述IP地址为所述IP报文的源地址。If the source address of the IP packet is valid, the network connection mode of the old router is determined to be a static address mode, and the IP address is a source address of the IP packet.
结合第二方面的第二种可能的实现方式,在第二方面的第五种可能的实现方式中,所述处理器还用于:In conjunction with the second possible implementation of the second aspect, in a fifth possible implementation of the second aspect, the processor is further configured to:
在获取所述旧路由器的鉴权信息之后,将所述路由器从所述PPPoE Server模式切换为PPPoE client模式;After acquiring the authentication information of the old router, the router is switched from the PPPoE server mode to the PPPoE client mode;
在所述PPPoE client模式下,使用获取的网络连接信息进行网络连接。In the PPPoE client mode, the obtained network connection information is used for network connection.
结合第二方面或第二方面的第一种可能的实现方式至第五种可能的实现方式中的任一种可能的实现方式,在第二方面的第六种可能的实现方式中,所述处理器还用于:With reference to the second aspect or the first possible implementation manner of the second aspect, the possible implementation manner of the fifth possible implementation manner, in the sixth possible implementation manner of the second aspect, The processor is also used to:
在所述LAN接口接收数据报文之后,记录所述数据报文的源媒体接入控制MAC地址,并将所述源MAC地址设置为所述路由器的WAN接口的MAC地址。After receiving the data packet, the LAN interface records a source media access control MAC address of the data packet, and sets the source MAC address as a MAC address of the WAN interface of the router.
第三方面,提供第二种路由器,该路由器具有获取旧路由器的网络连接信息的能力,该路由器包括用于执行第一方面的方法的模块。In a third aspect, a second router is provided having the capability to obtain network connection information for an old router, the router including means for performing the method of the first aspect.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面所介绍的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly described below. It is obvious that the following drawings are only some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without paying any creative work.
图1A为终端通过路由器接入以太网的一种场景示意图;FIG. 1A is a schematic diagram of a scenario in which 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 according to an embodiment of the present invention; FIG.
图2为本发明实施例中网络连接方法的第一种流程图;2 is a first flowchart of a network connection method according to an embodiment of the present invention;
图3为本发明实施例中以太网广播报文的格式示意图;3 is a schematic diagram of a format of an Ethernet broadcast packet according to an embodiment of the present invention;
图4为本发明实施例中通过PPPoE会话流程获取鉴权信息的示意图; 4 is a schematic diagram of obtaining authentication information through a PPPoE session process according to an embodiment of the present invention;
图5为本发明实施例中网络连接方法的第二种流程图。FIG. 5 is a second flowchart of a network connection method according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述。The technical solutions in the embodiments of the present invention will be clearly described below in conjunction with the accompanying drawings in the embodiments of the present invention.
以下,对本发明中的部分用语进行解释说明。Hereinafter, some of the terms in the present invention will be explained.
1)旧路由器,是已经连接到上行网络的路由器。1) The old router is a router that is already connected to the upstream network.
新路由器,是将要连接上行网络的路由器,用于替换旧路由器。The new router, which is the router that will connect to the upstream network, is used to replace the old router.
2)“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,字符“/”,如无特殊说明,一般表示前后关联对象是一种“或”的关系。2) "Multiple" means two or more. "and/or", describing the association relationship of the associated objects, indicating that there may be three relationships, for example, A and/or B, which may indicate that there are three cases where A exists separately, A and B exist at the same time, and B exists separately. In addition, the character "/", unless otherwise specified, generally indicates that the contextual object is an "or" relationship.
首先介绍一下本发明实施例的应用场景。The application scenario of the embodiment of the present invention is first 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 in which a terminal accesses an Ethernet through a router. The terminal 1 in FIG. 1 is, for example, a mobile phone, and the terminal 2 is, for example, a personal computer (PC). The terminal 1 and the terminal 2 are connected to the router 1 by wireless, and the router 1 is connected to the Internet (Internet) to implement the terminal 1. And the connection of terminal 2 to the Internet.
其中,路由器1中集成了调制解调器(modulator-demodulator,modem),所以能够直接连接到互联网。如果路由器1中未集成modem,则路由器1可以通过以太网连接modem,modem再连接到互联网,从而实现终端1和终端2与互联网的连接。Among them, the router 1 is integrated with a modem (modulator-demodulator, modem), so it can be directly connected to the Internet. If the modem is not integrated in the router 1, the router 1 can connect to the modem through the Ethernet, and the modem is connected to the Internet, thereby realizing the connection between the terminal 1 and the terminal 2 and the Internet.
下面结合说明书附图对本发明实施例作进一步详细描述。The embodiments of the present invention are further described in detail below with reference to the accompanying drawings.
其中,本发明实施例中,在要用新路由器替换旧路由器继续工作时,可以采用本发明实施例中提供的技术方案。In the embodiment of the present invention, when the old router is to be replaced by a new router, the technical solution provided in the embodiment of the present invention may 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 according to an embodiment of the present invention. FIG. 1B is an example of a home scenario. In Figure 1B, the WAN interface of the new router is connected to the Ethernet port in the home to access the Internet. The LAN interface of the new router should be connected to the network in the home. The device is connected, for example, to a device such as a personal computer (PC). However, in order to implement the technical solution of the embodiment of the present invention, the new router may be first connected to the uplink network, and then the LAN interface of the new router is connected with the device in the home, that is, when the new router is replaced with the old router, the new router may be newly added. 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 perform the network connection information obtaining method provided by the embodiment of the present invention.
一般来说,旧路由器在工作时也要经常与上行网络设备进行交互,比如,如果旧路由器采用的是动态分配地址方式进行的网络连接,那么旧路由器在工作时会与DHCP服务器等上行网络设备进行交互。而旧路由器一般是通过旧路由器的WAN接口向上行网络设备发送数据报文,也通过旧路由器的WAN接口接收旧上行网络设备的数据报文,那么本发明实施例中,在将新路由器的LAN接口与旧路由器的WAN接口连接后,对于旧路由器来说,其会将新路由器认为是上行网络设备,所以会正常通过WAN接口发送以太网报文,则新路由器就相当于可以拦截旧路由器发送给上行网络设备的所有数据报文。In general, old routers often interact with upstream network devices when they work. For example, if the old router uses a network connection that dynamically allocates addresses, the old routers will work with upstream network devices such as DHCP servers. Interact. The old router generally sends the data packet to the upstream network device through the WAN interface of the old router, and also receives the data packet of the old uplink network device through the WAN interface of the old router. In the embodiment of the present invention, the LAN of the new router is used. After the interface is connected to the WAN interface of the old router, for the old router, it will consider the new router as an uplink network device, so the Ethernet packet will be sent normally through the WAN interface, and the new router can intercept the old router. All data packets to the upstream network device.
其中,数据报文可以包括以太网报文,即,旧路由器通过旧路由器的WAN接口发送给新路由器的LAN接口的数据报文,可以包括旧路由器通过旧路由器的WAN接口发送给新路由器的LAN接口的以太网报文。The data packet may include an Ethernet packet, that is, a data packet sent by the old router to the LAN interface of the new router through the WAN interface of the old router, and may include the LAN sent by the old router to the new router through the WAN interface of the old router. Ethernet packet of the interface.
请参见图2,本发明实施例提供一种网络连接信息获取方法,该方法可以应用于具有获取旧路由器的网络连接信息能力的新路由器,该方法的流程描述如下。Referring to FIG. 2, an embodiment of the present invention provides a method for acquiring network connection information, which can be applied to a new router having the capability of acquiring network connection information of an old router. The process of the method is described as follows.
步骤201:新路由器通过新路由器的LAN接口接收数据报文,数据报文包括旧路由器通过旧路由器的WAN接口发送给新路由器的LAN接口的第一以太网报文;Step 201: The new router receives the data packet through the LAN interface of the new router. The data packet includes the first Ethernet packet 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 network information of the old router according to the data packet.
可选的,新路由器例如可以至少具有两种模式,比如可以至少具有正常工作模式和探测模式。新路由器在连接到上行网络后,可以工作在正常工作 模式下,此时新路由器可以通过上行网络为家庭中的设备提供正常的网络连接。而新路由器在进行本发明实施例中提供的获取网络连接信息的工作时,可以工作在探测模式,在探测模式下,新路由器可以获取旧路由器的网络连接信息。Optionally, the new router may have at least two modes, for example, at least a normal working mode and a detecting mode. The new router can work normally after connecting to the upstream network. In this mode, the new router can provide normal network connectivity for devices in the home through the uplink network. The new router can work in the detection mode when performing the work of obtaining the network connection information provided in the embodiment of the present invention. In the detection mode, the new router can obtain the network connection information of the old router.
例如,在新路由器出厂时,可以默认设置为探测模式,或者在检测不到上行网络时可以自动切换为探测模式,或者也可以由用户手动将新路由器切换为探测模式(例如用户可以通过按下新路由器上的相应按键来切换新路由器的模式),等等。For example, when the new router is shipped from the factory, it can be set to the detection mode by default, or it can be automatically switched to the detection mode when the uplink network is not detected, or the user can manually switch the new router to the detection mode (for example, the user can press The corresponding button on the new router to switch the mode of the new router), and so on.
例如,新路由器在上行网络连接成功后,可以自动切换为正常工作模式,或者在新路由器出厂时,可以默认设置为正常工作模式,或者也可以由用户手动将新路由器切换为正常工作模式,等等。For example, after the uplink network connection is successful, the new router can automatically switch to the normal working mode, or the new router 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 data packets through the LAN interface of the new router.
启动定时器,是为了给网络连接信息获取过程给一个时间限制,因为不排除旧路由器可能很长时间不会通过WAN接口发送数据报文的情况,如果在这种情况下新路由器还一直等待接收的话,对于新路由器来说功耗较大,且也是做了无用功。因此,新路由器可以设置定时器,在将新路由器的LAN接口与旧路由器的WAN接口连接后,新路由器可以启动该定时器,在该定时器超时之前,新路由器可以接收旧路由器发送的数据报文,在该定时器超时之后,无论新路由器是否接收到了数据报文,新路由器都可以停止进行接收,从而减小新路由器的功耗。定时器所持续的时长可以在新路由器出厂时设定好,或者也可以由用户后续自行设定,本发明实施例不作限制。The timer is started to give a time limit for 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 still waits for reception in this case. In this case, the power consumption is large for the new router, and it is also useless. Therefore, the new router can set a timer. After the LAN interface of the new router is connected to the WAN interface of the old router, the new router can start the timer. Before the timer expires, the new router can receive the datagram sent by the old router. After the timer expires, the new router can stop receiving whether the new router receives the data packet, thereby reducing the power consumption of the new router. The duration of the timer may be set when the new router is shipped from the factory, or may be set by the user, which is not limited by the embodiment of the present invention.
一般来说,旧路由器在上行网络连接较为稳定时,可能不会通过WAN接口发送数据报文,或者可能发送少量的数据报文,在这种情况下,新路由器 可能不容易接收数据报文。那么,为了尽量保证新路由器能够接收到旧路由器发送的数据报文,在将新路由器的LAN接口与旧路由器的WAN接口连接后,可以重启旧路由器,旧路由器在重启后可能会向上行网络设备发送数据报文,这样新路由器就能通过LAN接口接收旧路由器发送的数据报文。Generally, when the uplink network connection is stable, the old router may not send data packets through the WAN interface, or may send a small number of data packets. In this case, the new router It may not be easy to receive data messages. 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 with the WAN interface of the old router, the old router can be restarted, and the old router may go up the network device after restarting. Send a data packet so that the new router can receive data packets sent by the old router through the LAN interface.
可选的,如果新路由器在该定时器超时之后还未拦截到任何数据报文,或者虽然拦截到了数据报文,但通过拦截的数据报文无法获取旧路由器的网络连接信息,那么新路由器可以继续采用现有技术中的方式进行网络连接。Optionally, if the new router has not intercepted any data packet after the timer expires, or if the data packet is intercepted but the network connection information of the old router cannot be obtained through the intercepted data packet, the new router may The network connection continues in the manner of the prior art.
请参见图3,为以太网报文的一种可能的格式,一个以太网报文中包括目的媒体访问控制(Media Access Control,MAC)地址(一般占据6个字节)、源MAC地址(一般占据6个字节)、类型(也可以称为协议类型字段,一般占据2个字节)、数据(即该报文所携带的数据,一般占据46-1500字节)、以及一般占据4个字节的帧校验序列(Frame Check Sequence,FCS)。Referring to FIG. 3, it is a possible format of an Ethernet packet. An Ethernet packet includes a destination media access control (MAC) address (generally occupying 6 bytes) and a source MAC address (generally Occupies 6 bytes), type (also known as protocol type field, generally occupies 2 bytes), data (that is, the data carried by the message, generally occupy 46-1500 bytes), and generally occupy 4 Byte's Frame Check Sequence (FCS).
可选的,要根据以太网报文来确定旧路由器的网络连接信息,就要首先确定以太网报文的类型,不同的类型所指示的网络连接信息是不同的。判断一个以太网报文的类型,可以通过以太网报文中的协议类型字段来进行判断。Optionally, to determine the network connection information of the old router according to the Ethernet packet, it is necessary to first determine the type of the Ethernet packet, and the network connection information indicated by the different types is different. The type of an Ethernet packet can be determined by the protocol type field in the Ethernet packet.
可选的,网络连接信息包括:鉴权信息,网络连接方式或IP地址中的一个或者多个。Optionally, the network connection information includes one or more of authentication information, a network connection manner, or an IP address.
例如,网络连接方式可以包括拨号认证方式、动态分配地址方式及静态地址方式。如果新路由器获得的旧路由器的网络连接方式为拨号认证方式,则新路由器还需要获得旧路由器的鉴权信息,从而通过鉴权信息来进行网络连接,鉴权信息例如可以包括用户名和/或密码等;如果新路由器获得的旧路由器的网络连接方式为静态地址方式,那么新路由器还需要获得旧路由器的IP地址,从而通过该IP地址来进行网络连接。For example, the network connection mode may include a dialing authentication method, a dynamic allocation address mode, and a static address mode. If the network connection mode of the old router obtained by the new router is the dial-up authentication mode, the new router also needs to obtain the authentication information of the old router, so that the network connection is performed through the authentication information, and the authentication information may include, for example, a username and/or a password. Etc.; if the network connection mode of the old router obtained by the new router is static address mode, then the new router also needs to obtain the IP address of the old router, thereby making a network connection through the IP address.
下面分别介绍新路由器获取网络连接信息的方式。The following describes how the new router obtains network connection information.
一、拨号认证方式。First, the dial-up authentication method.
新路由器通过LAN接口接收了旧路由器发送的数据报文,新路由器对接收的数据报文进行解析,如果接收的数据报文中有数据报文为以太网报文, 且该以太网报文的目的MAC地址为FF:FF:FF:FF:FF:FF,则新路由器确定该以太网报文为广播报文,如果该广播报文中的协议类型字段的值为0x8863,那么新路由器可以确定该广播报文为PPPoE广播报文,则新路由器确定旧路由器的网络连接方式为拨号认证方式,且新路由器确定还需进一步获取旧路由器的鉴权信息。The new router receives the data packet sent by the old router through the LAN interface. The new router parses the received data packet. If the data packet in the received data packet is an Ethernet packet, If the destination MAC address of the Ethernet packet is FF:FF:FF:FF:FF:FF, the new router determines that the Ethernet packet is a broadcast packet. If the value of the protocol type field in the broadcast packet is 0x8863, the new router can determine that the broadcast packet is a PPPoE broadcast packet, and 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 the authentication information of the old router needs to be further obtained.
可选的,在确定旧路由器的网络连接方式为拨号认证方式之后,新路由器可以进入PPPoE服务器(Server)模式。目前,路由器一般只能工作在PPPoE客户端(Client)模式,PPPoE Server模式一般都是服务器所具有的工作模式。本发明实施例中,为了使得新路由器能够进行PPPoE会话,因此需要对新路由器进行一些改进,使得新路由器能够模拟工作在PPPoE Server模式。Optionally, after determining that the network connection mode of the old router is the dial-up authentication mode, the new router can enter the PPPoE server mode. At present, the router generally works only in the PPPoE client mode. The 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 perform a PPPoE session, it is necessary to improve 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 PPPoE Server mode, it can accept the PPPoE session initiated by the old router. Generally, after the old router sends the PPPoE broadcast message to the upstream network device (in the embodiment of the present invention, the new router receives the PPPoE broadcast message), the old router initiates a PPPoE session to the uplink network device, and then the present invention In the embodiment, the new router working in the 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 flow with the old router.
目前,PPPoE会话流程可分为三个阶段,即发现(Discovery)阶段、会话(Session)阶段和终止(Terminate)阶段。Currently, the PPPoE session flow can be divided into three phases, namely the Discovery phase, the Session phase, and the Terminate phase.
请参见图4,为新路由器和旧路由器之间的PPPoE会话流程的交互示意图。首先进行的是Discovery阶段,Discovery由四个过程组成。完成之后新路由器和旧路由器双方都会知道PPPoE的会话身份标识号(Session_ID)以及对方的以太网地址,这些参数共同确定了唯一的PPPoE Session。Please refer to FIG. 4, which is a schematic diagram of the interaction of the PPPoE session flow between the new router and the old router. The first is the Discovery phase, which consists of four processes. After completion, both the new router and the old router will know the PPPoE session ID number (Session_ID) and the other party's Ethernet address. These parameters together determine the unique PPPoE Session.
首先,旧路由器通过广播方式发送PPPoE主动发现初始包(PPPoE Active Discovery Initiation,PADI)报文,在PADI报文中包含旧路由器想要得到的服务类型信息。First, the old router sends a PPPoE Active Discovery Initiation (PADI) packet by broadcast, and the PADI packet contains the service type information that the old router wants.
新路由器收到PADI报文之后,将PADI报文中请求的服务与自己能够提供的服务进行比较,如果可以提供,则通过单播方式向旧路由器回复PPPoE 主动发现提议包(PPPoE Active Discovery Offer,PADO)报文。After receiving the PADI message, the new router compares the service requested in the PADI message with the service that it can provide. If it can provide, it replies to the old router with PPPoE through unicast. Proactively discover the PPPoE Active Discovery Offer (PADO) message.
旧路由器收到PADO报文后,通过单播方式向新路由器发送PPPoE主动发现请求(PPPoE Active Discovery Request,PADR)报文。After receiving the PADO packet, the old router sends a PPPoE Active Discovery Request (PADR) packet 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 (ie, Session_ID) that identifies the current PPPoE session with the old router. The new router sends a PPPoE Active Discovery Session-Confirmation (PADS) packet to the old router, and carries the Session_ID in the PADS packet and sends it to the old router.
如果以上各过程中没有发生错误,则PPPoE会话建立完成,Discovery阶段结束,之后进入Session阶段。If no error occurs in the above process, 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 phase establishes a session between the new router and the old router, and then enters the Session phase. The Session phase can be divided into two parts. The first part is the Point to Point Protocol (PPP) negotiation phase. The second part is the PPP packet transmission phase after the PPP negotiation phase ends.
其中,PPPoE中的PPP协商方式和普通的PPP协商方式一致,分为链路控制协议(Link Control Protocol,LCP)协商阶段、认证阶段、以及网络控制协议(Network Control Protocol,NCP)阶段这三个阶段。The PPP negotiation mode of the PPPoE is the same as that of the normal PPP negotiation mode. The link control protocol (LCP) negotiation phase, the authentication phase, and the Network Control Protocol (NCP) phase are three. stage.
首先是LCP协商阶段,LCP协商阶段主要完成建立、配置和检测数据链路连接等工作。The first is the LCP negotiation phase. The LCP negotiation phase mainly completes the tasks of establishing, configuring, and detecting data link connections.
一般来说,在LCP协商阶段,通信双方可以采用不同的认证方式,例如可以采用密码认证协议(Password Authentication Protocol,PAP)认证方式,或者也可以采用询问握手认证协议(Challenge Handshake Authentication Protocol,CHAP)认证方式等,本发明实施例中,进行PPPoE会话是为了获得旧路由器通过拨号认证方式进行网络连接时的鉴权信息,因此,本发明实施例中,在LCP协商阶段,令新路由器与旧路由器采用PAP认证方式进行认证。Generally, in the LCP negotiation phase, the communication parties can adopt different authentication methods, for example, a Password Authentication Protocol (PAP) authentication method, or a Challenge Handshake Authentication Protocol (CHAP). In the embodiment of the present invention, the PPPoE session is performed to obtain the authentication information when the old router performs the network connection through the dial-up authentication mode. Therefore, in the embodiment of the present invention, the new router and the old router are in the LCP negotiation phase. PAP authentication is used 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 to the new router, and the authentication information is carried in plain text. In the PAP Request. In the embodiment of the present invention, an example of authentication information For example, it may include information such as a username and password for network connection through dial-up authentication.
新路由器获得旧路由器的鉴权信息后,因为无需再继续进行后面的会话流程,因此新路由器可以向旧路由器回应认证失败(PAP NAK)。由此,PPP会话流程终止。After the new router obtains the authentication information of the old router, the new router can respond to the authentication failure (PAP NAK) to the old router because there is no need to continue the subsequent session flow. 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 (PADT) packet to the old router to terminate the PPPoE session. Alternatively, the PADT packet can be sent to the new router by the old router.
至此,PPPoE会话流程结束,新路由器可以重新切换到正常的PPPoE Client模式,并可以通过获得的鉴权信息以拨号认证方式连接上行网络。At this point, the PPPoE session process ends, and the new router can be switched back to the normal PPPoE client mode, and the authentication information can be connected to the uplink network through dial-up authentication.
另外,新路由器连接上行网络成功后,可以输出提示信息,该提示信息用于提示用户上行网络已连接成功,用户接收该提示信息后,可以断开新路由器与旧路由器之间的连接,可以将家庭中需要进行网络连接的设备连接到新路由器的LAN接口,这样就可以通过新路由器联网了。In addition, after the new router is successfully connected to the uplink network, the prompt information may be output. The prompt information is used to prompt the user that the uplink network is successfully connected. After receiving the prompt information, the user may disconnect the connection between the new router and the old router. Devices in the home that require network connectivity are connected to the LAN interface of the new router so that they can be networked through the new router.
其中,例如该提示信息可以为声音提示,或者也可以为文字提示(例如新路由器向用户使用的终端发送信息),或者也可以是振动提示,或者也可以是其他类型的提示,比如可以是令新路由器上设置的指示灯闪烁等等,只要能够用于提示用户即可,本发明实施例对于提示信息的类型不作限制。For example, the prompt information may be an audible prompt, or may be a text prompt (for example, the new router sends information to the terminal used by the user), or may be a vibration prompt, or may be other types of prompts, such as The indicator light set on the new router is blinking, and the like, and the type of the prompt information is not limited in the embodiment of the present invention.
现在用户在更换路由器时,如果知道原来的路由器是通过拨号认证方式进行网络连接,那么用户还需要重新获得旧路由器的用户名和密码,如果时间太长用户不记得这些,则用户可能还需要登录旧路由器的万维网(Web)页面来获取,或者通过给运营商拨打电话等方式来获取,总之非常麻烦。而采用本发明实施例提供的方式,即使是拨号认证方式,新路由器也可以自动获取旧路由器的鉴权信息,无需用户手动操作,极大地减轻了用户的负担。Now when the user replaces the router, if the original router is connected by dial-up authentication, the user needs to re-acquire the username and password of the old router. If the time is too long, the user may need to log in to the old one. It is very troublesome to obtain the web page of the router or obtain it by calling the operator. In the manner provided by the embodiment of the present invention, even if the mode is dial-up authentication, 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 address methods.
新路由器通过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 parses the received data packet. If the data packet in the received data packet is an Ethernet packet, and the Ethernet packet is The destination MAC address is FF:FF:FF:FF:FF:FF, then the new router determines the The Ethernet packet is a broadcast packet. If the value of the protocol type field in the broadcast packet is 0x0800 (IPv4 packet) or 0x86DD (IPv6 packet), it is determined that the broadcast packet is an IP broadcast packet, and then If the protocol type of the IP broadcast packet is the User Datagram Protocol (UDP), if it is a UDP broadcast packet, and the original port of the broadcast packet is 68 and the destination port is 67, the new router can If the broadcast packet is determined to be a DHCP broadcast packet, the new router determines that the network connection mode of the old router is dynamically allocated.
本发明实施例中,新路由器若确定旧路由器的网络连接方式为动态分配地址方式,那么新路由器可以向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 the dynamic allocation address mode, the new router may send a request message to the DHCP server, where the request message is used to request the DHCP server to allocate 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 based on the assigned dynamic address.
三、静态地址方式。Third, the 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 parses the received data packet. If the data packet in the received data packet is an Ethernet packet, and the Ethernet packet is 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, If the non-broadcast packet is an IP packet, the new router can determine whether the source address (ie, the source IP address) of the IP packet is legal. If the source address of the IP packet is valid, the new router determines the network of the old router. The connection mode is 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 the static address mode, the new router can use the source address of the IP packet as the address of the WAN interface of the new router to connect to the network.
目前,如果通过静态地址方式连接网络,则用户需要手动输入IP地址,而本发明实施例中这些操作都可以由新路由器自动完成,减轻了用户的负担,也减小了因为用户手动操作而带来的出错几率。At present, if the network is connected by a static address, the user needs to manually input the IP address, and the operations in the embodiment of the present invention can be automatically completed by the new router, which reduces the burden on the user and reduces the manual operation of the user. The chance of error.
对于广播报文来说,除了PPPoE类型的广播报文以及DHCP类型的广播报文之外,其他类型的广播报文可能无法用于获取旧路由器的网络连接信息, 因此,如果新路由器在定时器超时之前接收到广播报文,且确定接收的广播报文既不是PPPoE类型的广播报文也不是DHCP类型的广播报文,则新路由器可以丢弃接收的广播报文,无法获取旧路由器的网络连接信息。For a broadcast packet, other types of broadcast packets may not be used to obtain the network connection information of the old router, except for the broadcast packets of the PPPoE type and the broadcast packets of the DHCP type. Therefore, if the new router receives the broadcast packet before the timer expires, and determines that the received broadcast packet is neither a PPPoE type broadcast message nor a DHCP type broadcast message, the new router can discard the received broadcast message. , can not get the network connection information of the old router.
对于非广播报文来说,除了具有合法源地址的IP报文之外,其他类型的非广播报文可能无法用于获取旧路由器的网络连接信息,因此,如果新路由器在定时器超时之前接收到非广播报文,且非广播报文不是IP报文,或者是具有不合法的源地址的IP报文,则新路由器可以丢弃接收的这些报文,无法获取旧路由器的网络连接信息。For a non-broadcast packet, other types of non-broadcast packets may not be used to obtain the network connection information of the old router except for the IP packets with the legal source address. Therefore, if the new router receives the timer before the timer expires. If the non-broadcast packet is not an IP packet or an IP packet with an invalid source address, the new router can discard the received packets and cannot obtain the network connection information of the old router.
可选的,虽然旧路由器可能只通过一种网络连接方式来连接网络,例如可能通过拨号认证方式,但有些旧路由器在通过WAN接口发送以太网报文时,可能会发送多种类型的以太网报文,例如,可能会发送PPPoE广播报文,还可能会发送DHCP广播报文,还可能会发送IP报文。如果是这样,那么新路由器可能会在定时器超时之前接收到多种不同类型的以太网报文,针对这种情况,本发明实施例根据网络连接的稳定性为各网络连接方式分配优先级,例如,拨号认证方式的优先级最高,次之是动态分配地址方式,优先级最低的是静态地址方式,如果新路由器接收了多种不同类型的以太网报文,那么新路由器可以按照优先级从高到低的顺序来确定旧路由器的网络连接方式。以下举例介绍。Optionally, although the old router may connect to the network through only one type of network connection, for example, it may be through dial-up authentication, some old routers may send multiple types of Ethernet when sending Ethernet packets through the WAN interface. A packet, for example, may send a PPPoE broadcast packet, may also send a DHCP broadcast packet, or may send an IP packet. If this is the case, the new router may receive a plurality of different types of Ethernet packets before the timer expires. In this case, the embodiment of the present invention assigns priorities to the network connection manners according to the stability of the network connection. For example, the dial-up authentication method has the highest priority, followed by the dynamic allocation of the address mode. The lowest priority is the static address mode. If the new router receives multiple different types of Ethernet packets, the new router can follow the priority. The high to low order determines the network connection of the old router. The following examples are presented.
可选的,在定时器超时之前,如果新路由器共接收了两种不同类型的以太网报文,例如包括第一以太网报文和第二以太网报文,其中第一以太网报文例如为PPPoE广播报文,第二以太网报文例如为DHCP广播报文,那么新路由器根据各网络连接方式的优先级,可以确定旧路由器的网络连接方式为PPPoE广播报文所指示的拨号认证方式,即,因为通过拨号认证方式进行网络连接时成功率较高,网络连接也较为稳定,因此本发明实施例优先采用拨号认证方式进行网络连接。Optionally, before the timer expires, if the new router receives two different types of Ethernet packets, for example, the first Ethernet packet and the second Ethernet packet, where the first Ethernet packet is, for example, For the PPPoE broadcast packet, the second Ethernet packet is a DHCP broadcast packet, for example, the new router can determine the network connection mode of the old router as the dialing authentication mode indicated by the PPPoE broadcast packet according to the priority of each network connection mode. That is, because the network connection is higher and the network connection is more stable when the network connection is performed by the dial-up authentication method, the embodiment of the present invention preferentially uses 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, the first Ethernet packet and the third Ethernet packet, where the first Ethernet packet is received. For example, the packet is a PPPoE broadcast packet, and the third Ethernet packet is an IP packet, for example, the third Ethernet packet is a non-broadcast packet with a legal source address. You can determine the network connection mode of the old router as the dialing authentication mode indicated by the PPPoE broadcast packet.
可选的,在定时器超时之前,如果新路由器共接收了三种不同类型的以太网报文,例如包括第一以太网报文、第二以太网报文和第三以太网报文,其中,第一以太网报文例如为PPPoE广播报文,第二以太网报文例如为DHCP广播报文,第三以太网报文例如为IP报文,那么新路由器根据各网络连接方式的优先级,可以确定旧路由器的网络连接方式为PPPoE广播报文所指示的拨号认证方式。Optionally, before the timer expires, if the new router receives three different types of Ethernet packets, for example, the first Ethernet packet, the second Ethernet packet, and the third Ethernet packet, where The first Ethernet packet is a PPPoE broadcast packet, for example, the second Ethernet packet is a DHCP broadcast packet, and the third Ethernet packet is an IP packet, for example, the priority of the new router according to each network connection manner. The network connection mode of the old router can be determined as the dialing authentication mode indicated by the PPPoE broadcast packet.
可选的,在定时器超时之前,如果新路由器共接收了两种不同类型的以太网报文,例如包括第二以太网报文和第三以太网报文,其中第二以太网报文例如为DHCP广播报文,第三以太网报文例如为IP报文,那么新路由器根据各网络连接方式的优先级,可以确定旧路由器的网络连接方式为DHCP广播报文所指示的动态分配地址方式。Optionally, before the timer expires, if the new router receives two different types of Ethernet packets, for example, the second Ethernet packet and the third Ethernet packet, where the second Ethernet packet is, for example, For the DHCP broadcast packet, the third Ethernet packet is, for example, an IP packet. The new router can determine the network connection mode of the old router as the dynamic address allocation mode indicated by the DHCP broadcast packet according to the priority of each network connection mode. .
可选的,在新路由器既接收到了PPPoE广播报文也接收到了DHCP广播报文的情况下,如果新路由器通过拨号认证方式连接网络失败,则新路由器可以重新采用动态分配地址方式连接网络。如果新路由器采用动态分配地址方式连接网络也失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, in the case that the new router receives both the PPPoE broadcast packet and the DHCP broadcast packet, if the new router fails to connect to the network through dial-up authentication, the new router can re-connect the network by dynamically assigning the address. If the new router fails to connect to the network by dynamically assigning addresses, the new router can connect to the network in the manner provided in the prior art.
可选的,在新路由器既接收到了PPPoE广播报文也接收到了IP报文的情况下,如果新路由器通过拨号认证方式连接网络失败,则新路由器可以重新采用静态地址方式连接网络。如果新路由器采用静态地址方式连接网络也失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, in the case that the new router receives both the PPPoE broadcast packet and the IP packet, if the new router fails to connect to the network through dial-up authentication, the new router can reconnect to the network by using a static address. If the new router fails to connect to the network using a static address, the new router can connect to the network in the manner provided in the prior art.
可选的,在新路由器既接收到了PPPoE广播报文,也接收到了DHCP广播报文和IP报文的情况下,如果新路由器通过拨号认证方式连接网络失败,则新路由器可以重新采用动态分配地址方式连接网络。如果新路由器采用动态分配地址方式连接网络失败,则新路由器可以继续采用静态地址方式连接 网络。如果静态地址方式连接网络也失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, in the case that the new router receives both the PPPoE broadcast packet and the DHCP broadcast packet and the IP packet, if the new router fails to connect to the network through dial-up authentication, the new router can re-use the dynamically assigned address. 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 connect using static addresses. The internet. If the static address mode also fails to connect to the network, the new router can connect to the network in the manner provided in the prior art.
可选的,在新路由器既接收到了DHCP广播报文也接收到了IP报文的情况下,如果新路由器通过动态分配地址方式连接网络失败,则新路由器可以重新采用静态地址方式连接网络。如果新路由器采用静态地址方式连接网络也失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, if the new router receives both the DHCP broadcast packet and the IP packet, if the new router fails to connect to the network through the dynamic address allocation mode, the new router can reconnect to the network by using a static address. If the new router fails to connect to the network using a static address, the new router can connect to the network in the manner 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 the dial-up authentication mode, the new router can connect to the network in the manner provided in the prior art.
可选的,在新路由器只接收到了DHCP广播报文的情况下,如果新路由器通过动态分配地址方式连接网络失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, in the case that the new router only receives the DHCP broadcast packet, if the new router fails to connect to the network through the dynamic address allocation manner, the new router can connect to the network in the manner provided in the prior art.
可选的,在新路由器只接收到了具有合法源地址的非广播的IP报文的情况下,如果新路由器通过静态地址方式连接网络失败,则新路由器可以采用现有技术中提供的方式连接网络。Optionally, in the case that the new router only receives the non-broadcast IP packet with the legal source address, if the new router fails to connect to the network through the static address mode, the new router can connect to the network by using the method provided in the prior art. .
请参见图5,为本发明实施例中的网络连接方法的一个比较详细的流程图,该流程图大体介绍了如前的各个步骤。因为该流程图中涉及的各个步骤以及各种转折关系等在前面都已有介绍,这里不多赘述。Referring to FIG. 5, it is a detailed flowchart of a network connection method according to an embodiment of the present invention. The flowchart generally describes various steps as before. Because the various steps involved in the flowchart and various transition relationships have been introduced in the foregoing, no further details are provided here.
可选的,现在还是有不少ISP绑定了MAC地址,即,只有具有特定的MAC地址的路由器才能进行网络连接,比如一个家庭中,如果第一次使用旧路由器进行网络连接,那么ISP就认定了旧路由器的MAC地址,之后如果换了其他路由器,则因为路由器的MAC地址变了,ISP可能不会提供网络连接。Optionally, there are still a lot of ISPs that have MAC addresses bound to them. That is, only routers with specific MAC addresses can connect to the network. For example, in a home, if the old router is used for the first time, the ISP will The MAC address of the old router is determined. If another router is changed, the ISP may not provide a 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 may be added to the router, that is, the MAC address of another router may 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 needed.
那么,如果新路由器具有该功能,则在新路由器的LAN接口与旧路由器 的WAN接口连接后,新路由器接收旧路由器发送的数据报文,则新路由器可以记录接收的数据报文携带的源MAC地址,并将记录的源MAC地址作为新路由器的WAN接口的MAC地址,以进行网络连接。其中,新路由器通过LAN接口接收的数据报文携带的源MAC地址就是旧路由器的MAC地址,即,新路由器相当于克隆了旧路由器的MAC地址。Then, if the new router has this feature, then the LAN interface of the new router and the old router After the WAN interface is connected, the new router receives the data packet sent by the old router, and the new router can record the source MAC address carried by 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. The source MAC address carried by the new router through the LAN interface is the MAC address of the old router. That is, the new router is equivalent to the MAC address of the old router.
其中,新路由器记录源MAC地址的数据报文,可以是PPPoE广播报文,或DHCP广播报文,或具有合法源地址的IP报文,或者也可以是其他类型的广播报文,或者也可以是其他类型的非广播报文,等等。另外,新路由器记录源MAC地址的数据报文,可以是新路由器的LAN接口与旧路由器的WAN接口连接后旧路由器发送的第一个数据报文,或者也可以是旧路由器发送的任意一个数据报文。The data packet of the source MAC address of the new router may be a PPPoE broadcast packet, or a DHCP broadcast packet, or an IP packet with a legal source address, or other types of broadcast packets, or Is other types of non-broadcast messages, and so on. In addition, the new router records the data packet of the source MAC address, which may 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 may be any data sent by the old router. Message.
下面介绍本发明实施例中的设备。The device in the embodiment of the present invention is described below.
基于同一发明构思,本发明实施例提供一种路由器,该路由器可以包括LAN接口和处理器。Based on the same inventive concept, an embodiment of the present invention provides a router, which may include a LAN interface and a processor.
其中,该路由器可以包括一个或多个LAN接口。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 an uplink network device (eg, a DHCP server, etc.).
同样的,该路由器也可以包括一个或多个WAN接口。Similarly, the router can also include one or more WAN interfaces.
处理器具体可以是中央处理器或特定应用集成电路(Application Specific Integrated Circuit,ASIC),可以是一个或多个用于控制程序执行的集成电路,可以是使用现场可编程门阵列(Field Programmable Gate Array,FPGA)开发的硬件电路,可以是基带芯片。The processor may be a central processing unit or an application specific integrated circuit (ASIC), and may be one or more integrated circuits for controlling program execution, and may be a field programmable gate array (Field Programmable Gate Array). , FPGA) developed hardware circuit, which can be a baseband chip.
这些LAN接口和WAN接口可以通过总线与处理器相连接,或者也可以通过专门的连接线分别与处理器连接。These LAN interfaces and WAN interfaces can be connected to the processor via a bus, or they can be connected to the processor through dedicated connection lines.
通过对处理器进行设计编程,将前述所示的方法所对应的代码固化到芯片内,从而使芯片在运行时能够执行前述图2所示的方法。如何对处理器进行设计编程为本领域技术人员所公知的技术,这里不再赘述。 By programming the processor, the code corresponding to the method shown above is solidified into the chip, so that the chip can execute the method shown in FIG. 2 during operation. How to design and program the processor is a technique well known to those skilled in the art, and details are not described herein.
该路由器可以用于执行上述图2所述的方法,例如可以是如前所述的新路由器。The router can be used to perform the method described above with respect to FIG. 2, such as a new router as previously described.
该新路由器的LAN接口可以与旧路由器的WAN接口连接,该新路由器可以通过LAN接口接收旧路由器发送的数据报文,从而处理器可以根据接收的数据报文获取旧路由器的网络连接信息。The LAN interface of the new router can be connected to the WAN interface of the old router. The new router can receive the data packet 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 packet.
该新路由器接收旧路由器发送的数据报文,处理器对接收的数据报文进行解析,例如,通过解析数据报文的目的MAC地址和协议字段类型等,处理器可以确定数据报文的类型。The new router receives the data packet sent by the old router, and the processor parses the received data packet. For example, by analyzing the destination MAC address and the protocol field type of the data packet, the processor can determine the type of the data packet.
可选的,如果确定接收的数据报文包括以太网报文,例如包括PPPoE广播报文,处理器确定旧路由器的网络连接方式为拨号认证方式,则处理器可以令新路由器进入PPPoE Server模式,在新路由器进入PPPoE Server模式后,处理器可以接受旧路由器发起的PPPoE会话,从而处理器可以通过与旧路由器之间的PPPoE流程获取旧路由器的鉴权信息。在获取旧路由器的鉴权信息后,处理器可以通过获取的鉴权信息、以拨号认证方式连接上行网络。Optionally, if the received data packet includes an Ethernet packet, for example, a PPPoE broadcast packet, and the processor determines that the network connection mode of the old router is a dial-up authentication mode, the processor may enable the new router to 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 connect to the uplink network by using the obtained authentication information and dialing authentication.
可选的,如果确定接收的数据报文包括以太网报文,例如包括DHCP广播报文,处理器确定旧路由器的网络连接方式为动态分配地址方式,则处理器可以向DHCP服务器发送请求消息,该请求消息用于请求DHCP服务器为新路由器分配动态地址。若DHCP服务器为处理器分配了动态地址,那么处理器可以根据分配的动态地址连接上行网络。Optionally, if it is determined that the received data packet includes an Ethernet packet, for example, a DHCP broadcast packet, and the processor determines that the network connection mode of the old router is dynamically allocated, 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 to 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, for example, the non-broadcast packet is an IP packet, the processor may determine whether the source address of the IP packet is legal, if the IP packet is 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 packet. After obtaining the source address of the IP packet, the processor can use the source address of the IP packet 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 needed. For example, if the processor receives the data packet sent by the old router through the LAN interface, then the processor passes the After the data packet is parsed, the source MAC address of the data packet can be obtained. The source MAC address of the data packet is the MAC address of the old router, and the processor can record the source carried by the data packet. MAC address, and set the source MAC address carried in the data packet to the MAC address of the WAN interface of the new router.
对于该路由器中的各功能单元所实现的更多的功能等,可参考图2方法部分的描述,不再多赘述。For more functions and functions implemented by each functional unit in the router, refer to the description of the method part of FIG. 2, and details are not described herein.
基于同一发明构思,本发明实施例还提供一种路由器,该路由器可以包括接收模块和处理模块。Based on the same inventive concept, an embodiment of the present invention further provides a router, which may include a receiving module and a processing module.
在实际应用中,处理模块对应的实体设备可以是如前所述的处理器,接收模块对应的实体设备可以是如前所述的LAN接口。处理模块在与上行网络设备(例如DHCP服务器等)通信时,可以通过如前所述的WAN接口实现。In an actual application, the physical device corresponding to the processing module may be a processor as described above, and the physical device corresponding to the receiving module may be a LAN interface as described above. When the processing module communicates with an upstream network device (such as a DHCP server, etc.), it can be implemented through the WAN interface as described above.
该路由器可以用于执行上述图2所述的方法,例如该路由器可以是如前所述的新路由器。因此,对于该路由器中的各功能单元所实现的功能等,可参考图2方法部分的描述,不多赘述。The router can be used to perform the method described above with respect to Figure 2, for example the router can be a new router as previously described. Therefore, for the functions and the like implemented by the functional units in the router, reference may be made to the description of the method part of FIG. 2, and details are not described herein.
在本发明中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the unit or unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to implement the embodiments of the present invention.
在本发明实施例中的各功能单元可以集成在一个处理单元中,或者各个单元也可以均是独立的物理模块。 The functional units in the embodiments 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)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the technical solution of the present invention may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, A server, or network device, or the like, or a processor, performs all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a Universal Serial Bus flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), and a magnetic A variety of media that can store program code, such as a disc or a disc.
以上所述,以上实施例仅用以对本发明的技术方案进行了详细介绍,但以上实施例的说明只是用于帮助理解本发明实施例的方法,不应理解为对本发明实施例的限制。本技术领域的技术人员可轻易想到的变化或替换,都应涵盖在本发明实施例的保护范围之内。 The above embodiments are only used to describe the technical solutions of the present invention in detail, but the description of the above embodiments is only for the purpose of facilitating the understanding of the embodiments of the present invention, and should not be construed as limiting the embodiments of the present invention. Variations or substitutions that may be readily conceived by those skilled in the art are intended to be included within the scope of the present invention.

Claims (21)

  1. 一种网络连接信息获取方法,应用于具有获取旧路由器的网络连接信息能力的新路由器,其特征在于,包括:A method for acquiring network connection information, which is applied to a new router having the capability of acquiring network connection information of an old router, and includes:
    所述新路由器通过所述新路由器的局域网LAN接口接收数据报文,所述数据报文包括所述旧路由器通过所述旧路由器的广域网WAN接口发送给所述新路由器的LAN接口的以太网报文;Receiving, by the new router, a data packet by using a local area network LAN interface of the new router, where the data packet includes an Ethernet report sent by the old router to a LAN interface of the new router by using a wide area network WAN interface of the old router. Text
    所述新路由器根据所述数据报文,确定所述旧路由器的所述网络连接信息。The new router determines the network connection information of the old router according to the data packet.
  2. 如权利要求1所述的方法,其特征在于,The method of claim 1 wherein
    所述网络连接信息包括:鉴权信息,网络连接方式或网际协议IP地址中的一个或者多个。The network connection information includes one or more of authentication information, a network connection manner, or an internet protocol IP address.
  3. 如权利要求2所述的方法,其特征在于,所述新路由器根据所述数据报文,确定所述旧路由器的网络连接信息,包括:The method of claim 2, wherein the new router determines network connection information of the old router according to the data packet, including:
    若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含以太网上的点对点协议PPPoE报文,则所述新路由器确定所述旧路由器的网络连接方式为拨号认证方式;If the data packet is an Ethernet packet and is a broadcast packet, and the data packet includes a point-to-point protocol PPPoE packet on the Ethernet, the new router determines that the network connection mode of the old router is dialing. verification method;
    所述新路由器接受所述旧路由器发起的PPPoE会话;其中,所述新路由器工作在PPPoE服务器Server模式;The new router accepts a PPPoE session initiated by the old router; wherein the new router works in a PPPoE server mode;
    在所述新路由器和所述旧路由器的PPPoE会话流程中,所述新路由器获取所述旧路由器的鉴权信息。In the PPPoE session flow of the new router and the old router, the new router acquires the authentication information of the old router.
  4. 如权利要求2所述的方法,其特征在于,所述新路由器根据所述数据报文,确定所述旧路由器的网络连接信息,包括:The method of claim 2, wherein the new router determines network connection information of the old router according to the data packet, including:
    若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含动态主机配置协议DHCP广播报文,则所述新路由器确定所述旧路由器的网络连接方式为动态分配地址方式。If the data packet is an Ethernet packet and is a broadcast packet, and the data packet includes a dynamic host configuration protocol DHCP broadcast packet, the new router determines that the network connection mode of the old router is dynamic. Assign address method.
  5. 如权利要求2所述的方法,其特征在于,所述新路由器根据所述数据 报文,确定所述旧路由器的网络连接信息,包括:The method of claim 2 wherein said new router is based on said data The packet determines the network connection information of the old router, including:
    若所述数据报文为以太网报文,且为非广播报文,且所述数据报文包含IP报文,所述新路由器确定所述IP报文的源地址是否合法;If the data packet is an Ethernet packet and is a non-broadcast packet, and the data packet includes an IP packet, the new router determines whether the source address of the IP packet is legal.
    若所述IP报文的源地址合法,则所述新路由器确定所述旧路由器的网络连接方式为静态地址方式,所述IP地址为所述IP报文的源地址。If the source address of the IP packet 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 a source address of the IP packet.
  6. 如权利要求3所述的方法,其特征在于,在获取所述旧路由器的鉴权信息之后,还包括:The method of claim 3, further comprising: after obtaining the authentication information of the old router,
    所述新路由器从所述PPPoE Server模式切换为PPPoE客户端client模式;The new router switches 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 perform network connection.
  7. 如权利要求1-6任一所述的方法,其特征在于,在所述新路由器通过所述新路由器的LAN接口接收数据报文之后,还包括:The method of any of claims 1-6, further comprising: after the new router receives the data message through the LAN interface of the new router,
    所述新路由器记录所述数据报文的源媒体接入控制MAC地址,并将所述源MAC地址设置为所述新路由器的WAN接口的MAC地址。The new router records a source media access control MAC address of the data packet, and sets the source MAC address as a MAC address of a WAN interface of the new router.
  8. 一种路由器,其特征在于,所述路由器具有获取旧路由器的网络连接信息的能力,所述路由器包括:A router, characterized in that the router has the capability of acquiring network connection information of an old router, and the router includes:
    局域网LAN接口,用于接收数据报文,所述数据报文包括所述旧路由器通过所述旧路由器的广域网WAN接口发送给所述LAN接口的以太网报文;a local area network LAN interface, configured to receive a data packet, where the data packet includes an Ethernet packet sent by the old router to the LAN interface by using a wide area network WAN interface of the old router;
    处理器,用于根据所述数据报文,确定所述旧路由器的所述网络连接信息。And a processor, configured to determine, according to the data packet, the network connection information of the old router.
  9. 如权利要求8所述的路由器,其特征在于,所述网络连接信息包括:鉴权信息,网络连接方式或网际协议IP地址中的一个或者多个。The router according to claim 8, wherein the network connection information comprises one or more of authentication information, a network connection method, or an internet protocol IP address.
  10. 如权利要求9所述的路由器,其特征在于,所述处理器用于:The router of claim 9 wherein said processor is operative to:
    若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含以太网上的点对点协议PPPoE报文,则确定所述旧路由器的网络连接方式为拨号认证方式;If the data packet is an Ethernet packet and is a broadcast packet, and the data packet includes a point-to-point protocol PPPoE packet on the Ethernet, determining that the network connection mode of the old router is a dial-up authentication mode;
    接受所述旧路由器发起的PPPoE会话;其中,所述路由器工作在PPPoE 服务器Server模式;Accepting a PPPoE session initiated by the old router; wherein the router works in PPPoE Server Server mode;
    在所述路由器和所述旧路由器的PPPoE会话流程中,获取所述旧路由器的鉴权信息。And obtaining, in the PPPoE session flow of the router and the old router, authentication information of the old router.
  11. 如权利要求9所述的路由器,其特征在于,所述处理器用于:The router of claim 9 wherein said processor is operative to:
    若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含动态主机配置协议DHCP广播报文,则确定所述旧路由器的网络连接方式为动态分配地址方式。If the data packet is an Ethernet packet and is a broadcast packet, and the data packet includes a dynamic host configuration protocol (DHCP) broadcast packet, the network connection mode of the old router is determined to be a dynamically allocated address mode.
  12. 如权利要求9所述的路由器,其特征在于,所述处理器用于:The router of claim 9 wherein said processor is operative to:
    若所述数据报文为以太网报文,且为非广播报文,且所述数据报文包含IP报文,确定所述IP报文的源地址是否合法;If the data packet is an Ethernet packet and is a non-broadcast packet, and the data packet includes an IP packet, determining whether the source address of the IP packet is legal;
    若所述IP报文的源地址合法,则确定所述旧路由器的网络连接方式为静态地址方式,所述IP地址为所述IP报文的源地址。If the source address of the IP packet is valid, the network connection mode of the old router is determined to be a static address mode, and the IP address is a source address of the IP packet.
  13. 如权利要求10所述的路由器,其特征在于,所述处理器还用于:The router of claim 10, wherein the processor is further configured to:
    在获取所述旧路由器的鉴权信息之后,将所述路由器从所述PPPoE Server模式切换为PPPoE客户端client模式;After acquiring 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, the obtained network connection information is used for network connection.
  14. 如权利要求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 receiving the data packet, the LAN interface records a source media access control MAC address of the data packet, and sets the source MAC address as a MAC address of the WAN interface of the router.
  15. 一种路由器,其特征在于,所述路由器具有获取旧路由器的网络连接信息的能力,所述路由器包括:A router, characterized in that the router has the capability of acquiring network connection information of an old router, and the router includes:
    接收模块,用于通过所述路由器的LAN接口接收数据报文,所述数据报文包括所述旧路由器通过所述旧路由器的WAN接口发送给所述路由器的LAN接口的以太网报文;a receiving module, configured to receive, by using a LAN interface of the router, a data packet, where the data packet includes an Ethernet packet sent by the old router to a LAN interface of the router by using a WAN interface of the old router;
    处理模块,用于根据所述数据报文,确定所述旧路由器的所述网络连接 信息。a processing module, configured to determine, according to the data packet, the network connection of the old router information.
  16. 如权利要求15所述的路由器,其特征在于,所述网络连接信息包括:鉴权信息,网络连接方式或网际协议IP地址中的一个或者多个。The router according to claim 15, wherein the network connection information comprises one or more of authentication information, a network connection method, or an internet protocol IP address.
  17. 如权利要求16所述的路由器,其特征在于,所述处理模块用于:The router of claim 16 wherein said processing module is operative to:
    若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含以太网上的点对点协议PPPoE报文,则确定所述旧路由器的网络连接方式为拨号认证方式;If the data packet is an Ethernet packet and is a broadcast packet, and the data packet includes a point-to-point protocol PPPoE packet on the Ethernet, determining that the network connection mode of the old router is a dial-up authentication mode;
    接受所述旧路由器发起的PPPoE会话;其中,所述路由器工作在PPPoE服务器Server模式;Accepting a PPPoE session initiated by the old router; wherein the router works in a PPPoE server mode;
    在所述路由器和所述旧路由器的PPPoE会话流程中,获取所述旧路由器的鉴权信息。And obtaining, in the PPPoE session flow of the router and the old router, authentication information of the old router.
  18. 如权利要求16所述的路由器,其特征在于,所述处理模块用于:The router of claim 16 wherein said processing module is operative to:
    若所述数据报文为以太网报文,且为广播报文,且所述数据报文包含动态主机配置协议DHCP广播报文,则确定所述旧路由器的网络连接方式为动态分配地址方式。If the data packet is an Ethernet packet and is a broadcast packet, and the data packet includes a dynamic host configuration protocol (DHCP) broadcast packet, the network connection mode of the old router is determined to be a dynamically allocated address mode.
  19. 如权利要求16所述的路由器,其特征在于,所述处理模块用于:The router of claim 16 wherein said processing module is operative to:
    若所述数据报文为以太网报文,且为非广播报文,且所述数据报文包含IP报文,确定所述IP报文的源地址是否合法;If the data packet is an Ethernet packet and is a non-broadcast packet, and the data packet includes an IP packet, determining whether the source address of the IP packet is legal;
    若所述IP报文的源地址合法,则确定所述旧路由器的网络连接方式为静态地址方式,所述IP地址为所述IP报文的源地址。If the source address of the IP packet is valid, the network connection mode of the old router is determined to be a static address mode, and the IP address is a source address of the IP packet.
  20. 如权利要求17所述的路由器,其特征在于,所述处理模块还用于:The router according to claim 17, wherein the processing module is further configured to:
    在获取所述旧路由器的鉴权信息之后,将所述路由器从所述PPPoE Server模式切换为PPPoE客户端client模式;After acquiring 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, the obtained network connection information is used for network connection.
  21. 如权利要求15-20任一所述的路由器,其特征在于,所述处理模块还用于:The router according to any one of claims 15 to 20, wherein the processing module is further configured to:
    在所述LAN接口接收数据报文之后,记录所述数据报文的源媒体接入控 制MAC地址,并将所述源MAC地址设置为所述路由器的WAN接口的MAC地址。 After receiving the data packet, the LAN interface records the source media access control of the data packet. The MAC address is set and the source MAC address is set to the MAC address of the router's WAN interface.
PCT/CN2015/095325 2015-11-23 2015-11-23 Network access information acquiring method, and router WO2017088101A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201580079384.3A CN108307694B (en) 2015-11-23 2015-11-23 Network connection information acquisition method and router
PCT/CN2015/095325 WO2017088101A1 (en) 2015-11-23 2015-11-23 Network access information acquiring method, and router

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 (1)

Publication Number Publication Date
WO2017088101A1 true WO2017088101A1 (en) 2017-06-01

Family

ID=58762828

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095325 WO2017088101A1 (en) 2015-11-23 2015-11-23 Network access information acquiring 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
CN110138607A (en) * 2019-05-09 2019-08-16 深圳市吉祥腾达科技有限公司 Router updating method, system and storage medium
CN110880978A (en) * 2019-12-19 2020-03-13 浙江诺诺网络科技有限公司 Method, device and medium for connecting business processing PC (personal computer) with terminal equipment
EP4020896A4 (en) * 2019-09-02 2022-10-19 Huawei Technologies Co., Ltd. Method and device for configuring network configuration information

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111614565B (en) * 2020-05-19 2022-05-10 青岛海信宽带多媒体技术有限公司 Message forwarding method and gateway
CN112492089B (en) * 2020-11-09 2022-05-24 普联技术有限公司 Dialing method and system of communication equipment and communication equipment
CN114286420B (en) * 2021-12-21 2023-09-05 深圳创维数字技术有限公司 PON technology-based gateway locking method, device, server and medium

Citations (4)

* 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 dynamic assignment of wireless lan access point identity
CN102711282A (en) * 2012-05-21 2012-10-03 浙江优诺肯科技有限公司 Method for accessing zero-input wireless equipment into network and zero-input wireless equipment
CN104902532A (en) * 2014-03-06 2015-09-09 张永杰 A method and system for automatically accessing wireless local area network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102801623B (en) * 2012-08-15 2015-07-22 杭州华三通信技术有限公司 Multi-access data transmitting method and device
CN102970770B (en) * 2012-11-21 2015-06-17 普联技术有限公司 Power line based wireless roaming network establishing method and system

Patent Citations (4)

* 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 dynamic assignment of wireless lan access point identity
CN102711282A (en) * 2012-05-21 2012-10-03 浙江优诺肯科技有限公司 Method for accessing zero-input wireless equipment into network and zero-input wireless equipment
CN104902532A (en) * 2014-03-06 2015-09-09 张永杰 A method and system for automatically accessing wireless local area network

Cited By (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
EP4020896A4 (en) * 2019-09-02 2022-10-19 Huawei Technologies Co., Ltd. Method and device for configuring network configuration information
CN110880978A (en) * 2019-12-19 2020-03-13 浙江诺诺网络科技有限公司 Method, device and medium for connecting business processing PC (personal computer) with terminal equipment
CN110880978B (en) * 2019-12-19 2021-10-15 浙江诺诺网络科技有限公司 Method, device and medium for connecting business processing PC (personal computer) with terminal equipment

Also Published As

Publication number Publication date
CN108307694B (en) 2020-09-11
CN108307694A (en) 2018-07-20

Similar Documents

Publication Publication Date Title
WO2017088101A1 (en) Network access information acquiring method, and router
EP2055046B1 (en) Method and device for identifying and selecting an interface to access a network
EP2124404B1 (en) Device and method for automatically configuring application terminals in a home network
RU2556468C2 (en) Terminal access authentication method and customer premise equipment
WO2014056135A1 (en) Port setting method, routing device, and computer program product
US20070274290A1 (en) Apparatus and method for packet forwarding in layer 2 network
US20110202670A1 (en) Method, device and system for identifying ip session
WO2014015775A1 (en) Ipv6 address stateless auto-configuration system, data card, and implementation method thereof
WO2013123763A1 (en) Dynamic ipv6 configuration method for home gateway
KR101620479B1 (en) A method and a gateway for providing multiple internet access
WO2015018069A1 (en) Method, device and system for acquiring service by network terminal
WO2013167083A2 (en) Method and device for selecting domain name server
WO2015184853A1 (en) Authentication method and apparatus for ipv6 stateless auto-configuration
US20080086549A1 (en) Ppp access terminal, access service device and a method for getting an address of a provider server by the terminal
KR100590875B1 (en) xDSL modem and system including DHCP spoofing server, and PPPoE method for connecting internet using the same
WO2015123947A1 (en) Method and apparatus for delivering local area network information
WO2013178164A1 (en) Ipv6 domain name server (dns) address allocation and obtaining method and device
WO2012155571A1 (en) Base station self-configuration method and device
CN100442735C (en) Dynamic configuration insertion terminal realizing method
KR200195493Y1 (en) Internet protocol auto configuration possible hub
WO2016008250A1 (en) Method, device, system and computer storage medium for realizing dial-up internet access
WO2012162996A1 (en) Ip address obtaining method and network access device
WO2014008822A1 (en) Method, device and system for setting dns server address
WO2014090194A1 (en) Dialing method of terminal device, and access device
WO2016082454A1 (en) Renegotiation processing method and device

Legal Events

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

Ref document number: 15909014

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15909014

Country of ref document: EP

Kind code of ref document: A1