WO2018161215A1 - Network equipment working mode automatic switching method and network equipment thereof - Google Patents
Network equipment working mode automatic switching method and network equipment thereof Download PDFInfo
- Publication number
- WO2018161215A1 WO2018161215A1 PCT/CN2017/075756 CN2017075756W WO2018161215A1 WO 2018161215 A1 WO2018161215 A1 WO 2018161215A1 CN 2017075756 W CN2017075756 W CN 2017075756W WO 2018161215 A1 WO2018161215 A1 WO 2018161215A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- network device
- network
- role
- mode
- gateway
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000004891 communication Methods 0.000 claims description 11
- 238000012423 maintenance Methods 0.000 abstract description 17
- 230000008859 change Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 12
- 238000013461 design Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 8
- 230000006855 networking Effects 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 230000003044 adaptive effect Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000011144 upstream manufacturing Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000000060 site-specific infrared dichroism spectroscopy Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
Definitions
- the present application relates to the field of communications, and in particular, to a method for automatically switching a working mode of a network device and a network device thereof.
- the network generally consists of a home gateway plus multiple devices.
- home networks have gradually expanded, and the typical scenario is the extension of Wi-Fi networks.
- a Wi-Fi relay (Access Point, AP) device In order to extend the use of Wi-Fi in the home network, a Wi-Fi relay (Access Point, AP) device is usually used.
- the AP device accesses the home network in a bridging manner, so that devices linked to the AP can directly connect directly with other devices in the home network.
- router devices are used in the home network, and these routers are part of the home network.
- the terminal devices in the home network that are linked to different routers cannot be directly in the local area network (LAN). Communication needs to be forwarded through one or more routers.
- LAN local area network
- China Telecom defines the management specifications of the external AP, and requires that the network devices (mainly including routers and AP devices) in the home network need to use the bridge mode. Therefore, it is necessary to configure the cascaded network devices in the home network to be in a bridged working mode.
- the networking mode of the current home network device manufacturer is manually configured through the World Wide Web (WEB) page, so that the network device switches between the bridge mode and the route mode, and the user performs networking according to the network working mode of the device, and according to The use of devices in the home network, the working mode configuration of the cascaded routing device, manual switching to the bridge mode through the WEB page.
- WEB World Wide Web
- the current switching method requires high technical requirements for users. Users need to know the working mode and networking mode of the home network device. It is necessary to have tools for accessing the home network device to configure the working mode of the device (such as a personal computer and a browser).
- the networking mode (bridge mode or routing mode) of the home network device cannot be changed once it is set. When the networking relationship of the home network changes, the mode of the related home network device needs to be reconfigured, and the network maintenance cost is high. .
- the embodiment of the present application provides a method for automatically switching a working mode of a network device and a network device thereof, where the network device can automatically switch the working mode when the state of the network device of the home network changes.
- An embodiment of the present application provides a method for automatically switching a working mode of a network device, which specifically includes:
- the home network With the gradual increase of network devices in the home network, in order to expand the use of the network, the home network often needs to be extended by the cascading device.
- the working mode of the network device can be automatically switched, Will reduce network maintenance costs.
- the first network device determines whether there is a presence in the home network. There is a change in the status of the network device, and if so, the network device that changes according to the status determines its own network role; if the first network device determines that its own network role is the gateway device, the first network device will The working mode of the network device is automatically configured to be in the routing mode.
- the first network device When the first network device determines that its network role is a cascading device, the first network device automatically configures its working mode to be in the bridging mode. In the embodiment of the present application, after determining the network role of the first network device, the first network device automatically switches its working mode, thereby reducing the cost of network maintenance.
- determining the first network device Network roles include:
- the state of the first network device changes, that is, when the first network device joins the home network as a new network device, the state of the first network device changes from offline to online or the network of the first network device in the home network
- the first network device will sense the change of its own state, and send the first request information to the second network device, where the sending mode is to all the home network.
- the second network device broadcasts, wherein the second network device is a network device other than the first network device in the home network.
- the second network device After receiving the first request message, the second network device sends a first feedback message to the first network device, where the first feedback message carries the IP of the second network device, and the first network device receives the first feedback according to the first feedback message.
- the information determines the network roles of all the second network devices, and then the first network device determines its own network role according to the network role of the second network device.
- the network function of the first network device is determined according to the change of the state of the first network device, and the achievability of the embodiment of the present application is increased, and the burden of the first network device is reduced. Improve the efficiency of the first network device.
- the determining, by the first network device, the network role of the first network device according to the network role of the second network device includes:
- the number of the gateway devices in the second network device is determined.
- the first network device finds that there is one or more gateway devices in the second network device, that is, when the first network device finds that the gateway device exists in the second network device, the first network device will The network device is determined to be a cascading device; when the first network device finds that there is no gateway device in the second network device, but the first network device senses that it has acquired its own WAN port IP, at this time, the first network device will The network device is determined to be the gateway device.
- the first network device finds that there is no gateway device in the second network device and does not obtain the WAN port IP, the first network device will maintain the current network role.
- the embodiment of the present application specifically describes how the first network device determines the network role of the first network device according to the network role of the second network device, which enriches the specific implementation manner of this embodiment.
- the method further includes:
- the first network device sends a second request message to the second network device, where the specific sending manner is to broadcast in the home network, so that the network device in the home network receives the message, where the second request message carries the first network.
- the IP of the device so that after the second network device receives the second request message sent by the first network device, the working mode is configured Set to bridge mode.
- the first network device after the first network device learns that the gateway device does not exist in the second network device, and the network device itself obtains the WAN port IP, the first network device also needs to send the second request message to the second network device, enriching The implementation of this embodiment.
- determining the first network device Network roles include:
- the fourth network device When the state of the fourth network device in the home network changes, that is, when the fourth network device joins the home network as a new network device, the state of the fourth network device changes from offline to online, and the state of the fourth network device When changing from online to offline or when the role of the fourth network device in the home network is switched (the gateway device and the cascade device are interchanged), the fourth network device will sense that its own state changes, generate and broadcast a third request message.
- each third network device in the home network will broadcast a second feedback message in the home network, where the second feedback message carries the IP of the third network device, when the first network device After receiving the second feedback message, the network role of the third network device is obtained according to the second feedback message, and then the first network device determines the network role of the third network device according to the network role of the third network device, where The third network device is a fourth network device in the home network and other network devices than the first network device.
- how the first network device determines the network role of the first network device is specifically described, which enriches the implementation means of the embodiment of the present application.
- the first network device determines that the state of the at least one network device in the home network changes, determining the first network.
- the network roles of the device include:
- the first network device When the first network device senses that it is powered on or goes online, it will obtain its own IP and then obtain its own network role according to the IP. In the embodiment of the present application, the first network device can obtain its own network role according to the IP address of the network port, and the achievability of the embodiment of the present application is increased.
- the acquiring, by the first network device, the network role of the first network device according to the first network device IP includes:
- the first network device After the first network device obtains its own IP, it will determine its own network role according to the type of the IP. When the first network device determines that its IP type belongs to the WAN type, it will determine its own network role as The gateway device; when the first network device determines that the type of its own IP belongs to the local area network type, it will determine its own network role as the cascading device.
- the first network device is specifically configured to obtain its own network role according to its own IP, which increases the achievability and operability of the embodiment of the present application.
- the first network device determines that the state of the at least one network device in the home network changes, determining the first After the network role of the network device, the method further includes:
- the first network device When the first network device is a gateway device, the first network device further needs to broadcast a first switching instruction to the fifth network device in the home network, where the first switching instruction indicates that the working mode of the fifth network device is configured as a bridge mode.
- the fifth network device is a network device other than the first network device in the home network.
- the first network device if the first network device is a gateway device, the first network device further needs to send a first switching instruction to the fifth network device, so that the fifth network can configure its working mode as the bridge mode according to the instruction. , adding the embodiment of the present application Achievability.
- the gateway device in the fifth network device broadcasts a second switching instruction to the home network, where the first network device will Receiving the second switching instruction, and configuring the working mode to be a bridge mode according to the second switching instruction, wherein the second switching instruction indicates that the working mode of the first network device is configured to be a bridge mode.
- the second switching instruction from the fifth network device is received, so that the working mode of the first network device is configured as a bridge mode, and the implementation of the application is added. The achievability of the example.
- a second aspect of the embodiment of the present application provides a network device, including:
- a determining unit configured to determine a network role of the first network device when the first network device determines that a state of the at least one network device exists in the home network
- the first configuration unit is configured to: when the determining unit determines The network function of the first network device is a gateway device, and the working mode is configured as a routing mode
- the second configuration unit is configured to: when the determining unit determines that the network role of the first network device is a cascading device, The working mode is configured as a bridge mode.
- the first network device after determining the network role of the first network device, the first network device automatically switches its working mode, thereby reducing the cost of network maintenance.
- the determining unit includes:
- a sending subunit configured to: when the first network device determines that the state of the first network device changes, send a first request message to the second network device, where the second network device is in the home network a first receiving subunit of the first network device, configured to receive a first feedback message of the second network device, where the first feedback message carries a network between the networks of the second network device
- the first feedback message is sent by the second network device according to the first request message
- the first obtaining subunit is configured to receive the first feedback message according to the receiving subunit
- the first network device is specifically configured to determine the network role of the first network device, which increases the achievability of the embodiment of the present application, reduces the burden on the first network device, and improves the first network device. Work efficiency.
- the determining subunit includes:
- a first determining module configured to determine, according to the network role of the second network device, that one or more gateway devices are present in the second network device, determining that the network role of the first network device is a cascading device
- a second determining module configured to: when it is learned that the gateway device is not present in the second network device according to the network role of the second network device, and the first network device acquires the WAN port IP of the WAN, determine the The network function of the first network device is a gateway device, and the holding module is configured to learn, according to the network role of the second network device, that the gateway device does not exist in the second network device, and the first network device does not obtain the When the WAN port is IP, the first network device maintains the current network role.
- the embodiment of the present application specifically describes how the first network device determines the network role of the first network device according to the network role of the second network device, and enriches the specific implementation of the embodiment. formula.
- the network device further includes:
- a sending module configured to send a second request message to the second network device, where the second request message instructs the second network device to configure an operating mode to a bridging mode.
- the first network device after the first network device learns that the gateway device does not exist in the second network device, and the network device itself obtains the WAN port IP, the first network device also needs to send the second request message to the second network device, enriching The implementation of this embodiment.
- the determining unit includes: (when the network device whose state changes is not the first network device)
- a second receiving subunit configured to receive a second feedback message, where the second feedback message is sent by the third network device according to the third request message, where the second feedback information carries an IP of the third network device,
- the third request message is generated by the fourth network device and is broadcast in the home network, where the fourth network device is a network device whose status is changed in the home network, and the third network device is the first network device except the first network device and a network device other than the fourth network device; a second obtaining subunit, configured to acquire a network role of the third network device according to the second feedback message; and a second determining subunit, configured to use, according to the third network
- the network role of the device determines the network role of the first network device. In the embodiment of the present application, how the first network device determines the network role of the first network device is specifically described, which enriches the implementation means of the embodiment of the present application.
- the determining unit includes:
- a third acquiring subunit configured to acquire the first network device IP when the first network device determines that the state of the first network device changes
- the fourth acquiring subunit is configured to be used according to the first
- the network device IP acquires a network role of the first network device.
- the first network device can obtain its own network role according to the IP address of the network port, and the achievability of the embodiment of the present application is increased.
- the fourth acquiring subunit includes:
- a third determining module configured to determine, when the type of the first network device IP is a WAN type, a network role of the first network device as a gateway device, and a fourth determining module, configured to determine the first
- the network role of the first network device is determined to be a cascading device.
- the first network device is specifically configured to obtain its own network role according to its own IP, which increases the achievability and operability of the embodiment of the present application.
- the network device further includes:
- a sending unit configured to: when the network role of the first network device is a gateway device, send a first switching instruction to the third network device, where the first switching instruction indicates that the working mode of the third network device is configured as a bridge a mode, the third network device is another network device in the home network except the first network device.
- the first network device if the first network device is a gateway device, the first network device needs to go to the first The fifth network device sends the first switching instruction, so that the fifth network can configure its working mode as the bridging mode according to the instruction, and the implementation of the application is added. The achievability of the example.
- a receiving module configured to: when the network role of the first network device is a cascading device, receive a second switching instruction sent by the gateway device in the fifth network device, and operate the mode according to the second switching instruction
- the configuration is a bridge mode
- the second switching instruction indicates that the working mode of the first network device is configured as a bridge mode.
- the first network device is a cascading device
- the second switching instruction from the fifth network device is received, so that the working mode of the first network device is configured as a bridge mode, and the implementation of the application is added. The achievability of the example.
- a third aspect of the embodiments of the present application provides a network device, including:
- the network device can automatically switch its working mode and reduce network maintenance costs.
- the embodiments of the present application have the following advantages:
- the network role of the first network device when the first network device determines that the state of the at least one network device in the home network changes, the network role of the first network device is determined, if the network role of the first network device The gateway device configures the working mode as a routing mode; if the network role of the first network device is a cascading device, the first network device configures the working mode as a bridge mode .
- the embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
- FIG. 1 is a schematic structural diagram of a network in an embodiment of the present application.
- FIG. 2 is a schematic diagram of a discovery protocol framework of UPnP according to an embodiment of the present application
- FIG. 3 is a schematic diagram of an embodiment of a method for automatically switching a working mode of a network device according to an embodiment of the present disclosure
- FIG. 4 is a schematic diagram of another embodiment of a method for automatically switching a working mode of a network device according to an embodiment of the present application
- FIG. 5 is a schematic diagram of another embodiment of a method for automatically switching a working mode of a network device according to an embodiment of the present disclosure
- FIG. 6 is a schematic diagram of an embodiment of a network structure in an embodiment of the present application.
- FIG. 7 is a schematic diagram of an embodiment of a network device according to an embodiment of the present application.
- FIG. 8 is a schematic diagram of another embodiment of a network device according to an embodiment of the present application.
- FIG. 9 is a schematic diagram of another embodiment of a network device according to an embodiment of the present application.
- FIG. 10 is a schematic diagram of another embodiment of a network device according to an embodiment of the present application.
- FIG. 11 is a schematic diagram of another embodiment of a network device according to an embodiment of the present application.
- the embodiment of the present invention provides a method for automatically switching a working mode of a network device and a network device thereof, which are used to automatically configure an operating mode of the network device and reduce maintenance cost of the network device.
- FIG. 1 is a cascading network device (referred to as a router in the embodiment of the present application) accessing a gateway device in a routing mode.
- China Telecom defines the management specifications of the external AP devices, and requires that the working modes of the extended network devices (cascading devices) in the home network use the bridge mode, and the gateway devices in the home network.
- the working mode uses the routing mode. Therefore, the working mode of the cascading device in the home network needs to be configured as a bridge mode, and the working mode of the gateway device in the home network is configured as a routing mode.
- the network device in the embodiment of the present application may use a Universal Plug and Play (UPnP) protocol, and may also use other protocols.
- UnP Universal Plug and Play
- the network device developer defines the protocol.
- the specific protocol is not limited herein.
- the UPnP protocol is a set of network protocols promoted by the UPnP TM Forum.
- the goal of the agreement is to enable home networks (data sharing, communication and entertainment) and various devices in the corporate network to be seamlessly connected to each other, ie in a home network or a corporate network, between two or more terminal devices Communicate with each other regardless of their physical location and simplify the implementation of the relevant network.
- UpnP achieves this by defining and publishing UPnP device control protocols based on open, Internet communication network protocol standards.
- the current home network discovery protocol is generally implemented based on a Transmission Control Protocol (TCP) broadcast message.
- UPnP is a relatively mature home network discovery protocol in the industry.
- the discovery protocol framework of UPnP is shown in Figure 2. Because UPnP is extended based on the HTTP HyperText Transfer Protocol (HTTP) protocol, any legal field can be added to the HTTP header. We can enable devices in the home network to see each other's working modes.
- HTTP HyperText Transfer Protocol
- the Device Network Type (DNT) field can be added. This field is an optional field if the device It is a network device and is used to describe the network working mode of the device.
- the premise that the working mode of the network device is automatically switched is that the user configuration recorded in the user configuration in the network device is configured as an adaptive mode.
- the network device in the home network determines its own network role through negotiation between network devices.
- the network device's own network role needs to be determined through mutual negotiation between the network devices in the home network, and then the network device configures its own working mode according to its own network role.
- an embodiment of a method for automatically switching a working mode of a network device in the embodiment of the present application includes:
- the first network device sends first request information to a network device in the home network.
- the first request message is broadcasted to the home network according to the change, and the first request message requests to know the network of other network devices in the home network.
- the second network device in the home network will receive the first request message.
- other network devices except the first network device in the home network are referred to as the second network device.
- the scenario in which the first network device senses that its state has changed may be that the first network device joins the home network as a new network device, and the state of the first network device changes from offline to online or the first network device. Network roles in the home network are switched.
- the second network device sends a first feedback message to the network device in the home network.
- the second network device after the second network device receives the first request message sent by the first network device, the second network device broadcasts the first feedback message in the home network according to the request message, where the first network device will The first feedback message sent by the second network device is received according to the broadcast, where the first feedback message should carry the IP of the second network device, and the first feedback message may carry the current working mode of the second network device, or The first network device determines the network role of the second network device according to the IP information.
- the first network device determines its own network role according to the first feedback message. If the first network device is a gateway device, step 304 is performed. If the first network device is a cascade device, step 305 is performed.
- the first network device acquires the network role of the second network device according to the first feedback message, and the specific acquiring method is According to the IP of the second network device carried in the first feedback message, when the type of the IP is a WAN type, the first network device determines that the network role of the second network device is a gateway device, and when the type of the IP is a local area network type The first network device determines that the network role of the second network device is a cascading device; after the first network device acquires the network role of each second network device, it determines the acquired network of the second network device. The number of the gateway devices in the role.
- the first network The device determines that its own network role is a cascading device; when the second network device acquired by the first network device does not have a gateway device, that is, the obtained network The number of the device is 0, and the first network device obtains the IP of the WAN. At this time, the first network device determines its own network role as the gateway device; when the first network device acquires the second network device The gateway device does not exist, that is, the number of the obtained gateway devices is 0, but the first network device does not obtain the IP of the WAN. At this time, the first network device determines its own network role as the cascade device. .
- a network device will also broadcast a second request message in the home network, wherein the second request message indicates that the device receiving the message configures the working mode to be in a bridge mode, in which the second request message is written in the second request message.
- the IP address of a network device so that the network device that receives the message in the home network knows that the gateway device exists in the home network, and then the network device that receives the message in the home network locates its own network role as a cascading device, and then according to Your own network role configures its working mode to bridge mode.
- the first network device configures the working mode as a path. By mode.
- the first network device configures the working mode as the routing mode, where the first network device is current.
- the working mode is the bridge mode
- the first network device switches its working mode to the routing mode; if the current working mode of the first network device is the routing mode, the first network device maintains the current status.
- the first network device configures the working mode as a bridging mode.
- the first network device configures the working mode as the bridging mode, in which, if the first network device is currently The working mode is the routing mode, and the first network device switches its working mode to the bridging mode; if the current working mode of the first network device is the bridging mode, the first network device maintains the current status.
- the state change in the home network is not the first network device, but a device other than the first network device, such as the fourth network device, that is, when the fourth network device is added as a new network device.
- the first network device determines its own network.
- An embodiment of the role is that when the fourth network device senses that its state changes, the third request message is generated and broadcast according to the state change information, when each third network device in the home network receives the third request.
- the second feedback message is broadcasted in the home network according to the third request message, where the second feedback message carries the IP of the third network device, and after receiving the second feedback message, the first network device will Obtaining a network role of the third network device according to the second feedback message, and then the first network device is further configured according to the network of the third network device Color to determine their role in the network, wherein the third network device to other network devices in the home network in addition to the first and fourth network equipment network equipment.
- the first network device determines, according to the state change of the network device in the home network, the second network device determines the network role of the first network device, if the network role of the first network device is the gateway device.
- the first network device configures the working mode as the routing mode; if the network role of the first network device is the cascading device, the first network device configures the working mode to the bridge mode.
- the embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
- the network device itself determines its own network role.
- network devices in the home network are not required to negotiate with each other, that is, independent of other network devices in the home network, and the network device independently determines its own network role, and then the network device works on its own according to its own network role. Mode to configure. .
- another embodiment of a method for automatically switching a network device working mode in an embodiment of the present application includes:
- the first network device acquires its own IP according to its own state change.
- the first network device when the first network device senses that it is powered on or goes online, it will actively acquire its own IP.
- a specific example is that when the first network device is started, the first network device waits for an online event of the network port. If the network port is online, the IP address is obtained.
- the first network device obtains its own network role according to its own IP. If the first network device is a gateway device, step 403 is performed. If the first network device is a cascade device, step 404 is performed.
- the IP after the first network device obtains its own IP, the IP will be type-determined. If the type of the IP determined by the first network device is a WAN type, determining that the network role of the first network device is a gateway device; if the first network device determines that the type of the IP of the first network device is a local area network type, determining the first network device The network role is a cascade device.
- the first network device configures the working mode as a routing mode.
- the first network device configures the working mode as the routing mode, where the first network device is current.
- the working mode is the bridge mode
- the first network device switches its working mode to the routing mode; if the current working mode of the first network device is the routing mode, the first network device maintains the current status.
- the first network device configures the working mode to be a bridge mode.
- the first network device configures the working mode as the bridging mode, for example, if the first network device is currently The working mode is the routing mode, and the first network device switches its working mode to the bridging mode; if the current working mode of the first network device is the bridging mode, the first network device maintains the current status.
- the first network device determines the network role of the first network device according to the IP address of the first network device. If the network role of the first network device is the gateway device, the first network device configures the working mode as the route. Mode; if the network role of the first network device is a cascade device, the first network device configures the working mode to the bridge mode.
- the embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
- the gateway device and the cascade device perform negotiation communication.
- This embodiment is mainly applied to a scenario where the number of network devices in the home network is small.
- the first network device determines that it is a gateway device, it configures its working mode as a routing mode and sends the mode to the home network.
- the non-gateway network device ie, the cascading device
- the embodiments of the present application negotiate the working mode of the network device as long as it is a Socket message communication based on the Transmission Control Protocol/Internet Protocol (TCP/IP), or even based on Layer 2 communication.
- TCP/IP Transmission Control Protocol/Internet Protocol
- some network devices can simply negotiate a working mode based on a TCP link, and configure a routing mode of the device into a bridge mode.
- This method is relatively simple to apply to a LAN network with only a small number of network devices, that is, it does not negotiate through UPnP broadcast messages, but directly communicates through peer-to-peer communication.
- another embodiment of a method for automatically switching a working mode of a network device in the embodiment of the present application includes:
- the first network device determines its own network role according to its own IP.
- the network role of the first network device is a gateway device, step 502 is performed.
- the network role of the first network device is a cascade device, steps are performed. 503.
- the first network device determines that its IP is a wide area network IP, it determines that its own network role is a gateway device.
- the first network device determines that its own IP is a local area network IP, it determines that its own network role is Cascading equipment.
- the first network device sends a switching instruction to the fifth network device, so that the fifth network device is configured according to the switching finger. Let configure your own working mode.
- the first network device when it is determined that the first network device is a gateway device, the first network device sends a first switching instruction to the fifth network device, so that the fifth network device configures its working mode as a bridge mode according to the instruction.
- the first switching instruction indicates that the working mode of the fifth network device is configured as a bridge mode, and the fifth network device is a network device other than the first network device in the home network.
- the fifth network device when the fifth network device receives the first switching instruction, if the current working mode of the fifth network device is the gateway mode, then the fifth network device needs to switch its working mode to the bridge mode; If the current working mode of the fifth network device is the bridge mode, the fifth network device maintains the status quo.
- the first network device receives a second switching instruction sent by the gateway device in the fifth network device, and configures its working mode according to the second switching instruction.
- the gateway device in the fifth network device broadcasts the second switching instruction to the home network.
- the first network device will receive the second switching instruction, and configure the working mode to be a bridge mode according to the second switching instruction, wherein the second switching instruction indicates that the working mode of the first network device is configured as a bridge mode.
- the first network device when the first network device receives the second switching instruction, if the current working mode of the first network device is the gateway mode, the first network device needs to switch its working mode to the bridge mode; The current working mode of the network device is the bridge mode, and the first network device maintains the status quo.
- the first network device determines the network role of the first network device according to its own IP, it will communicate with another network role in the home network, that is, the gateway device and the cascading device.
- Communicating if the network role of the first network device is a gateway device, the first network device configures an operating mode to a routing mode and sends a switching instruction to the fifth network device; if the network role of the first network device is a cascading device, Then, according to the switching instruction sent by the gateway device, its working mode is configured as the bridge mode.
- the embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
- the home network device can automatically configure its working mode according to mutual negotiation or self-determination, thereby simplifying the networking and configuration process of the home network; when the network devices in the home network are interchanged After that, the network device can also configure its own working mode; when there are multiple routing devices in the home network, if a critical node (gateway device) in the home network fails, the user can take a secondary node (cascading device) directly. Replace it without having to manually modify the working mode.
- a critical node gateway device
- the device In the home network, there is also a usage scenario: the device is uplinked via Wi-Fi. At this point, if the device is a separate Wi-Fi uplink, there is no problem. However, there may be cases where both the uplink and the Wi-Fi uplink exist simultaneously.
- Network devices can also use UPnP packets for network negotiation to decide whether to use Wi-Fi uplink or Ethernet uplink.
- the network device When the network device starts up, it also satisfies the Ethernet uplink and Wi-Fi uplink conditions (that is, the uplink port has a link, and Wi-Fi can also be linked).
- the network device user When the network device user is configured to be adaptive, it should be used preferentially. Upward (disconnect Wi-Fi link). However, at this time, it is possible to use the state port as the downlink LAN side interface. Therefore, dynamic identification is required, and the negotiation decision is as follows:
- the network device automatically turns off or disables Wi-Fi first
- the network device sends the extended UPnP query message to the uplink port;
- Iii Analyze the received reply message. If there is a route mode device (ie, a gateway device), it means that it can switch to the uplink state. In the adaptive mode, the device automatically switches to the Ethernet uplink.
- a route mode device ie, a gateway device
- Ethernet uplink is online (the link is normal), refer to step 1) to send a search message to the port;
- step 1) if the network device that receives the route is consistent with the currently cached device information, it indicates that the uplink and the Wi-Fi uplink can reach the same network device;
- the user configuration of the network device is adaptive, disconnect or disable the Wi-Fi network, and switch to the uplink;
- the UPnP protocol sends a related state change packet when the network status changes.
- an embodiment of the network device in the embodiment of the present application includes:
- FIG. 7 is a schematic structural diagram of a network device according to an embodiment of the present disclosure.
- the network device 700 may have a large difference due to different configurations or performances, and may include one or more central processing units (CPUs) 710 (for example, one or more processors) and memory 720, one or more storage media 730 that store application 733 or data 732 (eg, one or one storage device in Shanghai).
- the memory 720 and the storage medium 730 may be short-term storage or persistent storage.
- the program stored on storage medium 730 may include one or more modules (not shown), each of which may include a series of instruction operations in the server.
- Network device 700 may also include one or more power sources 740, one or more wired or wireless network interfaces 750, one or more input and output interfaces 760, and/or one or more operating systems 731, such as WindoWs ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more. It will be understood by those skilled in the art that the network device structure illustrated in FIG. 7 does not constitute a limitation to the network device, and may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
- the memory 720 can be used to store software programs and modules, and the processor 710 executes various functional applications and data processing of the network devices by running software programs and modules stored in the memory 720.
- the memory 720 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of network devices (such as audio data, phone books, etc.).
- memory 720 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
- the program of the rate transfer adjustment mechanism and the received data stream provided in the embodiment of the present application are stored in the memory 720, and the processor 710 calls from the memory 720 when it is needed.
- the processor 710 is a control center of the network device, and can adjust the transmission rate according to the set adjustment mechanism.
- the processor 710 connects various portions of the entire network device using various interfaces and lines, performs various types of network devices by running or executing software programs and/or modules stored in the memory 720, and recalling data stored in the memory 720. Function and processing data so that the opponent can adjust the transmission rate.
- the processor 710 can include one or more processing units.
- the processor 710 is configured to perform steps 301 to 305 in FIG. 3, and details are not described herein again.
- the input interface 750 and the output interface 760 are used to control the input and output external devices
- the processor 710 is connected to the input interface 750 and the output interface 760 through the internal bus of the network device, and the input interface 750 and the output interface 760 respectively
- the upstream and downstream external devices are connected to finally realize the data transmission of the processor 710 and the upstream and downstream external devices.
- the data can be transmitted between different devices through the input interface 750 and the output interface 760, and the output rate of the service can be quickly adjusted to adapt.
- Bandwidth changes demand as needed, and reduces node data caching, node processing latency, and end-to-end transmission latency.
- FIG. 7 is a detailed description of the network device in the embodiment of the present application from the perspective of the hardware processing.
- the network device in the embodiment of the present application is described in detail from the perspective of the modular functional entity.
- FIG. 8 in the embodiment of the present application,
- One embodiment of a network device includes:
- a determining unit 801 configured to determine, when the first network device determines that a state of the at least one network device exists in the home network, to change a network role of the first network device;
- the determining unit 801 includes:
- the sending subunit 8011 is configured to: when the first network device determines that the state of the first network device changes, send a first request message to the second network device, where the second network device is a home network except the first network Other network devices of the device;
- the first receiving sub-unit 8012 is configured to receive a first feedback message of the second network device, where the first feedback message carries the protocol IP of the interconnection between the networks of the second network device, where the first feedback message is the second network device according to the Sending a request message;
- a first obtaining sub-unit 8013 configured to acquire a network role of the second network device according to the first feedback message received by the receiving subunit;
- the first determining subunit 8014 is configured to determine a network role of the first network device according to the network role of the second network device acquired by the obtaining subunit.
- the first determining subunit 8014 further includes:
- the first determining module 80141 is configured to determine, when the one or more gateway devices are present in the second network device according to the network role of the second network device, that the network role of the first network device is a cascading device;
- the second determining module 80142 is configured to: when the network device of the second network device learns that the gateway device does not exist in the second network device, and the first network device acquires the WAN port IP of the WAN, determine that the network role of the first network device is Gateway device
- the sending module 80143 is configured to send a second request message to the second network device, where the second request message instructs the second network device to configure the working mode to the bridge mode.
- the maintaining module 80144 is configured to: when the network device of the second network device learns that the gateway device does not exist in the second network device, and the first network device does not obtain the WAN port IP, the first network device maintains the current network role.
- a first configuration unit 802 configured to: when the determining unit determines that the network role of the first network device is a gateway device, configure the working mode as a routing mode;
- the second configuration unit 803 is configured to configure the working mode to be a bridge mode when the determining unit determines that the network role of the first network device is a cascading device.
- the determining unit 801 determines a network role of the first network device. If the network role of the first network device is a gateway device, the first configuration unit 802 configures the working mode as a routing mode; if the first network device The network role is a cascade device, and the second configuration unit 803 configures the working mode to the bridge mode.
- the embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
- another embodiment of the network device in this embodiment of the present application includes:
- a determining unit 901 configured to determine, when the first network device determines that a state of the at least one network device exists in the home network, to change a network role of the first network device;
- the determining unit 901 further includes:
- the second receiving subunit 9011 is configured to receive a second feedback message, where the second feedback message is sent by the third network device according to the third request message, the second feedback information carries the IP of the third network device, and the third request message is sent by the fourth
- the network device generates and broadcasts in the home network
- the fourth network device is a network device whose state transmission changes in the home network
- the third network device is a network device other than the first network device and the fourth network device in the home network
- a second obtaining sub-unit 9012 configured to acquire a network role of the third network device according to the second feedback message
- the second determining subunit 9013 is configured to determine a network role of the first network device according to the network role of the third network device.
- the first configuration unit 902 is configured to: when the determining unit determines that the network role of the first network device is a gateway device, configure the working mode as a routing mode;
- the second configuration unit 903 is configured to configure the working mode to be a bridge mode when the determining unit determines that the network role of the first network device is a cascading device.
- the determining unit 901 determines a network role of the first network device, if the first network device The network role is a gateway device, and the first configuration unit 902 configures the working mode as the routing mode; if the network role of the first network device is the cascading device, the second configuration unit 903 configures the working mode as the bridge mode.
- the embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
- another embodiment of the network device in this embodiment of the present application includes:
- a determining unit 1001 configured to determine, when the first network device determines that a state of the at least one network device exists in the home network, to change a network role of the first network device;
- the determining unit 1001 further includes:
- the third obtaining subunit 10011 is configured to acquire the first network device IP when the first network device determines that the state of the first network device changes;
- the fourth obtaining subunit 10012 is configured to acquire a network role of the first network device according to the first network device IP.
- the fourth obtaining subunit 10012 further includes:
- the third determining module 100121 is configured to: when determining that the type of the first network device IP is a wide area network type, determine that the network role of the first network device is a gateway device;
- the fourth determining module 100122 is configured to determine that the network role of the first network device is a cascading device when determining that the type of the first network device IP is a local area network type.
- the first configuration unit 1002 is configured to: when the determining unit determines that the network role of the first network device is a gateway device, configure the working mode as a routing mode;
- the second configuration unit 1003 is configured to configure the working mode to be a bridge mode when the determining unit determines that the network role of the first network device is a cascading device.
- the determining unit 1001 determines the network role of the first network device. If the network role of the first network device is a gateway device, the first configuration unit 1002 configures the working mode as the routing mode; if the first network device The network role is a cascading device, and the second configuration unit 1003 configures the working mode to be a bridge mode.
- the embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
- another embodiment of the network device in this embodiment of the present application includes:
- a determining unit 1101 configured to determine, when the first network device determines that a state of the at least one network device exists in the home network, to change a network role of the first network device;
- the determining unit 1101 further includes:
- the third obtaining sub-unit 11011 is configured to acquire the first network device IP when the first network device determines that the state of the first network device changes;
- the fourth obtaining subunit 11012 is configured to acquire a network role of the first network device according to the first network device IP.
- the fourth obtaining subunit 11012 further includes:
- the third determining module 110121 is configured to: when determining that the type of the first network device IP is a wide area network type, determine that the network role of the first network device is a gateway device;
- the fourth determining module 110122 is configured to determine that the network role of the first network device is a cascading device when determining that the type of the first network device IP is a local area network type.
- the sending unit 1102 is configured to: when the network role of the first network device is a gateway device, send a first switching instruction to the third network device, where the first switching instruction indicates that the working mode of the third network device is configured as a bridge mode, and the third network
- the device is another network device in the home network except the first network device;
- the receiving module 1103 is configured to: when the network role of the first network device is a cascading device, receive a second switching instruction sent by the gateway device in the fifth network device, and configure the working mode to be in a bridge mode according to the second switching instruction,
- the second switching instruction indicates that the working mode of the first network device is configured as a bridge mode.
- the determining unit 1101 determines a network role of the first network device. If the network role of the first network device is a gateway device, the sending unit 1102 sends a first switching instruction to the third network device, indicating the third network device.
- the working mode is configured as a routing mode; if the network role of the first network device is a cascading device, the receiving module 1103 receives a second switching instruction sent by the gateway device in the fifth network device, and operates the mode according to the second switching instruction. Configured in bridge mode.
- the embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
- the disclosed system, apparatus, and method may be implemented in other manners.
- the device embodiments described above are merely illustrative.
- the division of cells is only a logical function division.
- multiple units or components may be combined or integrated. Go to 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 in an electrical, mechanical or other form.
- the units described as separate components may or may not be physically separate, 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 achieve the purpose of the solution of the embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
- An integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, can be stored in a computer readable storage medium.
- the technical solution of the present application in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
- a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
Disclosed in the embodiment of the present application are a method for automatically switching a working mode of a network equipment and a network equipment thereof, which are used to automatically configure the working mode of the network equipment and to reduce the maintenance cost of the network equipment. The method of the embodiment of the application comprises: a first network equipment determines the network role of the first network equipment when determining that the status of at least one network equipment in a home network changes; if the network role of the first network equipment is a gateway equipment, then the first network equipment configures the working mode thereof as a routing mode; and if the network role of the first network equipment is a cascading equipment, the first network equipment configures the working mode thereof as a bridging mode. The embodiment of the present application enables the network equipment to automatically configure the working mode of the network equipment according to the network role of the network equipment and reduce the maintenance cost of the network equipment.
Description
本申请涉及通信领域,尤其涉及一种网络设备工作模式自动切换的方法及其网络设备。The present application relates to the field of communications, and in particular, to a method for automatically switching a working mode of a network device and a network device thereof.
在家庭内使用的计算机网络,家庭里的电子设备一般都共享同一个网络。该网络一般由一个家庭网关加多台设备组成。随着家庭电子设备的逐步增加,特别是基于无线保真Wi-Fi的无线接入设备增加,家庭网络已经出现逐步扩大的情况,典型的场景就是Wi-Fi网络的延伸。In a computer network used in the home, electronic devices in the home generally share the same network. The network generally consists of a home gateway plus multiple devices. With the gradual increase of home electronic devices, especially wireless Wi-Fi-based wireless access devices, home networks have gradually expanded, and the typical scenario is the extension of Wi-Fi networks.
家庭网网络中为了延伸Wi-Fi的使用范围,通常情况会使用一个Wi-Fi中继(Access Point,AP)设备。AP设备使用桥接的方式接入到家庭网络中,使得链接到AP上的设备可以直接与家庭网络中的其它设备直接互联。In order to extend the use of Wi-Fi in the home network, a Wi-Fi relay (Access Point, AP) device is usually used. The AP device accesses the home network in a bridging manner, so that devices linked to the AP can directly connect directly with other devices in the home network.
同时,家庭网络中还存在一种延伸Wi-Fi范围的应用组网方式:路由级联。即,在家庭网络中使用一个或者多个路由器设备,这些路由器是家庭网络中的一部份,在家庭网络中的链接到不同路由器下的终端设备无法直接在局域网(Local Area Network,LAN)中通信,需要通过一个或者多个路由器转发。At the same time, there is also an application networking mode extending the Wi-Fi range in the home network: route cascading. That is, one or more router devices are used in the home network, and these routers are part of the home network. The terminal devices in the home network that are linked to different routers cannot be directly in the local area network (LAN). Communication needs to be forwarded through one or more routers.
为了统一管理家庭网络中的所有终端设备,中国电信定义了外置AP的管理规范,要求家庭网络中的网络设备(主要包括路由器和AP设备)都需要使用桥接模式。因此,需要将家庭网络中的级联的网络设备都配置成桥接的工作模式。In order to uniformly manage all terminal devices in the home network, China Telecom defines the management specifications of the external AP, and requires that the network devices (mainly including routers and AP devices) in the home network need to use the bridge mode. Therefore, it is necessary to configure the cascaded network devices in the home network to be in a bridged working mode.
当前家庭网络设备厂商的组网方式是通过万维网(World Wide Web,WEB)页面来人工配置,实现网络设备在桥接模式和路由模式之间切换,用户根据设备的网络工作模式进行组网,并根据家庭网络中设备的使用诉求,对级联的路由设备进行工作模式配置,人工通过WEB页面切换到桥接模式。The networking mode of the current home network device manufacturer is manually configured through the World Wide Web (WEB) page, so that the network device switches between the bridge mode and the route mode, and the user performs networking according to the network working mode of the device, and according to The use of devices in the home network, the working mode configuration of the cascaded routing device, manual switching to the bridge mode through the WEB page.
当前的切换方法需要对用户的技术要求较高,用户需要清楚家庭网络设备的工作模式以及组网模式,需要有可以访问家庭网络设备的工具来配置设备的工作模式(如个人电脑和浏览器),且家庭网络设备的组网模式(桥接模式或者路由模式)一旦设置以后,就不能变化,当家庭网络的组网关系发生变化时,相关家庭网络设备的模式就需要重新配置,网络维护成本高。The current switching method requires high technical requirements for users. Users need to know the working mode and networking mode of the home network device. It is necessary to have tools for accessing the home network device to configure the working mode of the device (such as a personal computer and a browser). The networking mode (bridge mode or routing mode) of the home network device cannot be changed once it is set. When the networking relationship of the home network changes, the mode of the related home network device needs to be reconfigured, and the network maintenance cost is high. .
发明内容Summary of the invention
本申请实施例提供了一种网络设备工作模式自动切换的方法及其网络设备,用于当家庭网络的网络设备状态发生变化时,网络设备能够自动切换工作模式。The embodiment of the present application provides a method for automatically switching a working mode of a network device and a network device thereof, where the network device can automatically switch the working mode when the state of the network device of the home network changes.
本申请实施例一方面提供了一种网络设备工作模式自动切换的方法,具体包括:An embodiment of the present application provides a method for automatically switching a working mode of a network device, which specifically includes:
随着家庭网络中网络设备的逐步增加,为了扩展网络的使用范围,家庭网络常常需要级联设备延伸,当家庭网络中的组网关系发生变化时,如果网络设备的工作模式可以自动切换,将会降低网络维护成本。在这个过程中,第一网络设备会判断家庭网络中是否存在
有网络设备的状态发送变化,如果有,则会根据该状态发生变化的网络设备确定自身的网络角色;如果该第一网络设备判断自身的网络角色为网关设备的时候,该第一网络设备将会自动将自身的工作模式配置为路由模式;当该第一网络设备判断自身的网络角色为级联设备的时候,该第一网络设备将会自动将自身的工作模式配置为桥接模式。本申请实施例中,第一网络设备确定自身的网络角色之后,将自动切换自身的工作模式,降低了网络维护的成本。With the gradual increase of network devices in the home network, in order to expand the use of the network, the home network often needs to be extended by the cascading device. When the networking relationship in the home network changes, if the working mode of the network device can be automatically switched, Will reduce network maintenance costs. In this process, the first network device determines whether there is a presence in the home network.
There is a change in the status of the network device, and if so, the network device that changes according to the status determines its own network role; if the first network device determines that its own network role is the gateway device, the first network device will The working mode of the network device is automatically configured to be in the routing mode. When the first network device determines that its network role is a cascading device, the first network device automatically configures its working mode to be in the bridging mode. In the embodiment of the present application, after determining the network role of the first network device, the first network device automatically switches its working mode, thereby reducing the cost of network maintenance.
一种可能的设计中,在本申请实施例第一方面的第一种实现方式中,第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色包括:In a possible implementation, in a first implementation manner of the first aspect of the embodiment of the present application, when the first network device determines that the state of the at least one network device in the home network changes, determining the first network device Network roles include:
当第一网络设备的状态发生变化时,即当第一网络设备作为新的网络设备加入到家庭网络中、第一网络设备的状态从离线变为在线或第一网络设备在家庭网络中的网络角色被切换(网关设备和级联设备互换)时,第一网络设备将感应到自身的状态发生变化,并向第二网络设备发送第一请求信息,其中,发送方式为向家庭网络中所有的第二网络设备广播,其中,第二网络设备为家庭网络中除了第一网络设备之外其他的网络设备。第二网络设备接收到该第一请求消息之后,将向第一网络设备发送第一反馈消息,其中,该第一反馈消息携带有第二网络设备的IP,第一网络设备根据该第一反馈信息判断所有的第二网络设备的网络角色,然后第一网络设备根据第二网络设备的网络角色来确定自身的网络角色。本申请实施例中,具体说明了第一网络设备如何根据自身状态的变化确定所述第一网络设备的网络角色,增加了本申请实施例的可实现性,减轻了第一网络设备的负担,提高第一网络设备的工作效率。When the state of the first network device changes, that is, when the first network device joins the home network as a new network device, the state of the first network device changes from offline to online or the network of the first network device in the home network When the role is switched (the gateway device and the cascading device are interchanged), the first network device will sense the change of its own state, and send the first request information to the second network device, where the sending mode is to all the home network. The second network device broadcasts, wherein the second network device is a network device other than the first network device in the home network. After receiving the first request message, the second network device sends a first feedback message to the first network device, where the first feedback message carries the IP of the second network device, and the first network device receives the first feedback according to the first feedback message. The information determines the network roles of all the second network devices, and then the first network device determines its own network role according to the network role of the second network device. In the embodiment of the present application, the network function of the first network device is determined according to the change of the state of the first network device, and the achievability of the embodiment of the present application is increased, and the burden of the first network device is reduced. Improve the efficiency of the first network device.
一种可能的设计中,在本申请实施例第一方面的第二种实现方式中,第一网络设备根据所述第二网络设备的网络角色确定所述第一网络设备的网络角色包括:In a possible implementation, in a second implementation manner of the first aspect of the embodiment, the determining, by the first network device, the network role of the first network device according to the network role of the second network device includes:
当第一网络设备获取到了家庭网络中各个第二网络设备的网络角色之后,将判断第二网络设备中网关设备的个数。当第一网络设备获取到的第二网络设备中存在一个或一个以上的网关设备的时候,即第一网络设备发现第二网络设备中存在网关设备的时候,此时第一网络设备将会将自身的网络角色确定为级联设备;当第一网络设备发现第二网络设备中没有网关设备,但是第一网络设备感知到自身获取到了自身WAN口IP时,此时,第一网络设备将会将自身的网络角色确定为网关设备;当一网络设备发现第二网络设备中没有网关设备,而且自身没有获取到WAN口IP时,此时,第一网络设备将维持当前的网络角色。本申请实施例中,具体说明了第一网络设备是如何根据所述第二网络设备的网络角色确定所述第一网络设备的网络角色的,丰富了本实施例的具体实施方式。After the first network device acquires the network roles of the second network devices in the home network, the number of the gateway devices in the second network device is determined. When the first network device finds that there is one or more gateway devices in the second network device, that is, when the first network device finds that the gateway device exists in the second network device, the first network device will The network device is determined to be a cascading device; when the first network device finds that there is no gateway device in the second network device, but the first network device senses that it has acquired its own WAN port IP, at this time, the first network device will The network device is determined to be the gateway device. When a network device finds that there is no gateway device in the second network device and does not obtain the WAN port IP, the first network device will maintain the current network role. The embodiment of the present application specifically describes how the first network device determines the network role of the first network device according to the network role of the second network device, which enriches the specific implementation manner of this embodiment.
在一种可能的设计中,在本申请实施例第一方面的第三种实现方式中,当所述第一网络设备根据所述第二网络设备的网络角色获知所述第二网络设备中不存在网关设备,且所述第一网络设备获取到WAN口IP之后,所述方法还包括:In a possible design, in a third implementation manner of the first aspect of the embodiments of the present application, when the first network device learns, according to the network role of the second network device, the second network device does not After the gateway device is available, and the first network device obtains the WAN port IP, the method further includes:
第一网络设备会向第二网络设备发送第二请求消息,具体发送方式是在家庭网络中广播,使得处于家庭网络中的网络设备接收到该消息,其中,第二请求消息带有第一网络设备的IP,使得第二网络设备接收到第一网络设备发送的第二请求消息之后,将工作模式配
置为桥接模式。本申请实施例中,当第一网络设备获知第二网络设备中不存在网关设备,而且自身获取到了自身WAN口IP之后,第一网络设备还需要向第二网络设备发送第二请求消息,丰富了本实施例的实现方式。The first network device sends a second request message to the second network device, where the specific sending manner is to broadcast in the home network, so that the network device in the home network receives the message, where the second request message carries the first network. The IP of the device, so that after the second network device receives the second request message sent by the first network device, the working mode is configured
Set to bridge mode. In the embodiment of the present application, after the first network device learns that the gateway device does not exist in the second network device, and the network device itself obtains the WAN port IP, the first network device also needs to send the second request message to the second network device, enriching The implementation of this embodiment.
在一种可能的设计中,在本申请实施例第一方面的第四种实现方式中,第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色包括:In a possible implementation, in a fourth implementation manner of the first aspect of the embodiments of the present application, when the first network device determines that the state of the at least one network device in the home network changes, determining the first network device Network roles include:
当家庭网络中的第四网络设备的状态发生变化时,即当第四网络设备作为新的网络设备加入到家庭网络中、第四网络设备的状态从离线变为在线、第四网络设备的状态从在线变为离线或第四网络设备在家庭网络中的角色被切换(网关设备和级联设备互换)时,第四网络设备将感应到自身的状态发生变化,生成并广播第三请求消息,当家庭网络中的各个第三网络设备接收到该第三请求消息之后,将会在家庭网络中广播第二反馈消息,第二反馈消息带有第三网络设备的IP,当第一网络设备接收到该第二反馈消息之后,将会根据该第二反馈消息获取第三网络设备的网络角色,然后第一网络设备再根据该第三网络设备的网络角色去确定自身的网络角色,其中,第三网络设备为家庭网络中出第四网络设备和第一网络设备之外的其他网络设备。本申请实施例中,再次具体说明了第一网络设备是如何确定第一网络设备的网络角色的,丰富了本申请实施例的实现手段。When the state of the fourth network device in the home network changes, that is, when the fourth network device joins the home network as a new network device, the state of the fourth network device changes from offline to online, and the state of the fourth network device When changing from online to offline or when the role of the fourth network device in the home network is switched (the gateway device and the cascade device are interchanged), the fourth network device will sense that its own state changes, generate and broadcast a third request message. After receiving the third request message, each third network device in the home network will broadcast a second feedback message in the home network, where the second feedback message carries the IP of the third network device, when the first network device After receiving the second feedback message, the network role of the third network device is obtained according to the second feedback message, and then the first network device determines the network role of the third network device according to the network role of the third network device, where The third network device is a fourth network device in the home network and other network devices than the first network device. In the embodiment of the present application, how the first network device determines the network role of the first network device is specifically described, which enriches the implementation means of the embodiment of the present application.
在一种可能的设计中面,在本申请实施例第一方面的第五种实现方式中,第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色包括:In a possible design, in a fifth implementation manner of the first aspect of the embodiment of the present application, when the first network device determines that the state of the at least one network device in the home network changes, determining the first network. The network roles of the device include:
当第一网络设备感应到自身上电或者上线时,将会获取自身的IP,然后根据该IP获取自身的网络角色。本申请实施例中,第一网络设备可以根据自身网口的IP获取自身的网络角色,增加了本申请实施例的可实现性。When the first network device senses that it is powered on or goes online, it will obtain its own IP and then obtain its own network role according to the IP. In the embodiment of the present application, the first network device can obtain its own network role according to the IP address of the network port, and the achievability of the embodiment of the present application is increased.
在一种可能的设计中,在本申请实施例第一方面的第六种实现方式中,第一网络设备根据所述第一网络设备IP获取所述第一网络设备的网络角色包括:In a possible design, in a sixth implementation manner of the first aspect of the embodiment, the acquiring, by the first network device, the network role of the first network device according to the first network device IP includes:
当第一网络设备获取到自身的IP之后,将会根据该IP的类型判断自身的网络角色,当第一网络设备判断自身的IP的类型属于广域网类型时,将会把自身的网络角色确定为网关设备;当第一网络设备判断自身的IP的类型属于局域网类型时,将会把自身的网络角色确定为级联设备。本申请实施例中,具体说明了第一网络设备是如何根据自身的IP来获取自身的网络角色的,增加了本申请实施例的可实现性和可操作性。After the first network device obtains its own IP, it will determine its own network role according to the type of the IP. When the first network device determines that its IP type belongs to the WAN type, it will determine its own network role as The gateway device; when the first network device determines that the type of its own IP belongs to the local area network type, it will determine its own network role as the cascading device. In the embodiment of the present application, the first network device is specifically configured to obtain its own network role according to its own IP, which increases the achievability and operability of the embodiment of the present application.
在一种可能的设计中,在本申请实施例第一方面的第七种实现方式中,所述第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色之后,所述方法还包括:In a possible design, in a seventh implementation manner of the first aspect of the embodiment, the first network device determines that the state of the at least one network device in the home network changes, determining the first After the network role of the network device, the method further includes:
当第一网络设备为网关设备的时候,第一网络设备还需要向家庭网络中的第五网络设备广播第一切换指令,其中,第一切换指令指示第五网络设备的工作模式配置为桥接模式,第五网络设备为家庭网络中除了第一网络设备之外其他的网络设备。本申请实施例中,如果第一网络设备为网关设备,那么第一网络设备还需要向第五网络设备发送第一切换指令,使得第五网络可以根据该指令将自身的工作模式配置为桥接模式,增加了本申请实施例的
可实现性。When the first network device is a gateway device, the first network device further needs to broadcast a first switching instruction to the fifth network device in the home network, where the first switching instruction indicates that the working mode of the fifth network device is configured as a bridge mode. The fifth network device is a network device other than the first network device in the home network. In the embodiment of the present application, if the first network device is a gateway device, the first network device further needs to send a first switching instruction to the fifth network device, so that the fifth network can configure its working mode as the bridge mode according to the instruction. , adding the embodiment of the present application
Achievability.
或,or,
当第一网络设备为级联设备的时候,即网关设备存在于第五网络设备中的时候,第五网络设备中的网关设备会向家庭网络中广播第二切换指令,第一网络设备将会接收到该第二切换指令,并根据该第二切换指令将工作模式配置为桥接模式,其中,该第二切换指令指示第一网络设备的工作模式配置为桥接模式。本申请实施例中,当第一网络设备为级联设备时,将会接收到来自第五网络设备的第二切换指令,使得第一网络设备的工作模式配置为桥接模式,增加了本申请实施例的可实现性。When the first network device is a cascading device, that is, when the gateway device exists in the fifth network device, the gateway device in the fifth network device broadcasts a second switching instruction to the home network, where the first network device will Receiving the second switching instruction, and configuring the working mode to be a bridge mode according to the second switching instruction, wherein the second switching instruction indicates that the working mode of the first network device is configured to be a bridge mode. In the embodiment of the present application, when the first network device is a cascading device, the second switching instruction from the fifth network device is received, so that the working mode of the first network device is configured as a bridge mode, and the implementation of the application is added. The achievability of the example.
本申请实施例的第二方面提供一种网络设备,包括:A second aspect of the embodiment of the present application provides a network device, including:
确定单元,用于当第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色;第一配置单元,用于当所述确定单元确定所述第一网络设备的网络角色为网关设备,则将工作模式配置为路由模式;第二配置单元,用于当所述确定单元确定所述第一网络设备的网络角色为级联设备,则将所述工作模式配置为桥接模式。本申请实施例中,第一网络设备确定自身的网络角色之后,将自动切换自身的工作模式,降低了网络维护的成本。a determining unit, configured to determine a network role of the first network device when the first network device determines that a state of the at least one network device exists in the home network, where the first configuration unit is configured to: when the determining unit determines The network function of the first network device is a gateway device, and the working mode is configured as a routing mode; the second configuration unit is configured to: when the determining unit determines that the network role of the first network device is a cascading device, The working mode is configured as a bridge mode. In the embodiment of the present application, after determining the network role of the first network device, the first network device automatically switches its working mode, thereby reducing the cost of network maintenance.
在一种可能的设计中,在本申请实施例第二方面的第一种实现方式中,所述确定单元包括:In a possible design, in a first implementation manner of the second aspect of the embodiments, the determining unit includes:
发送子单元,用于当所述第一网络设备判断所述第一网络设备的状态发生变化时,向第二网络设备发送第一请求消息,所述第二网络设备为所述家庭网络中除所述第一网络设备的其他网络设备;第一接收子单元,用于接收所述第二网络设备的第一反馈消息,所述第一反馈消息携带所述第二网络设备的网络之间互连的协议IP,所述第一反馈消息为所述第二网络设备根据所述第一请求消息发送;第一获取子单元,用于根据所述接收子单元接收到的所述第一反馈消息获取所述第二网络设备的网络角色;第一确定子单元,用于根据所述获取子单元获取到的所述第二网络设备的网络角色确定所述第一网络设备的网络角色。本申请实施例中,具体说明了第一网络设备如何确定所述第一网络设备的网络角色,增加了本申请实施例的可实现性,减轻了第一网络设备的负担,提高第一网络设备的工作效率。a sending subunit, configured to: when the first network device determines that the state of the first network device changes, send a first request message to the second network device, where the second network device is in the home network a first receiving subunit of the first network device, configured to receive a first feedback message of the second network device, where the first feedback message carries a network between the networks of the second network device The first feedback message is sent by the second network device according to the first request message, and the first obtaining subunit is configured to receive the first feedback message according to the receiving subunit Obtaining a network role of the second network device; the first determining subunit, configured to determine a network role of the first network device according to the network role of the second network device acquired by the acquiring subunit. In the embodiment of the present application, the first network device is specifically configured to determine the network role of the first network device, which increases the achievability of the embodiment of the present application, reduces the burden on the first network device, and improves the first network device. Work efficiency.
在一种可能的设计中,在本申请实施例第二方面的第二种实现方式中,所述确定子单元包括:In a possible implementation, in a second implementation manner of the second aspect of the embodiments of the present application, the determining subunit includes:
第一确定模块,用于当根据所述第二网络设备的网络角色获知所述第二网络设备中存在一个或一个以上的网关设备时,确定所述第一网络设备的网络角色为级联设备;第二确定模块,用于当根据所述第二网络设备的网络角色获知所述第二网络设备中不存在网关设备,且所述第一网络设备获取到广域网WAN口IP时,确定所述第一网络设备的网络角色为网关设备;保持模块,用于当根据所述第二网络设备的网络角色获知所述第二网络设备中不存在网关设备,且所述第一网络设备未获取到所述WAN口IP时,则所述第一网络设备保持当前的网络角色。本申请实施例中,具体说明了第一网络设备是如何根据所述第二网络设备的网络角色确定所述第一网络设备的网络角色的,丰富了本实施例的具体实施方
式。a first determining module, configured to determine, according to the network role of the second network device, that one or more gateway devices are present in the second network device, determining that the network role of the first network device is a cascading device a second determining module, configured to: when it is learned that the gateway device is not present in the second network device according to the network role of the second network device, and the first network device acquires the WAN port IP of the WAN, determine the The network function of the first network device is a gateway device, and the holding module is configured to learn, according to the network role of the second network device, that the gateway device does not exist in the second network device, and the first network device does not obtain the When the WAN port is IP, the first network device maintains the current network role. The embodiment of the present application specifically describes how the first network device determines the network role of the first network device according to the network role of the second network device, and enriches the specific implementation of the embodiment.
formula.
在一种可能的设计中,在本申请实施例第二方面的第三种实现方式中,所述网络设备还包括:In a possible implementation, in a third implementation manner of the second aspect of the embodiments, the network device further includes:
发送模块,用于向所述第二网络设备发送第二请求消息,所述第二请求消息指示所述第二网络设备将工作模式配置为桥接模式。本申请实施例中,当第一网络设备获知第二网络设备中不存在网关设备,而且自身获取到了自身WAN口IP之后,第一网络设备还需要向第二网络设备发送第二请求消息,丰富了本实施例的实现方式。And a sending module, configured to send a second request message to the second network device, where the second request message instructs the second network device to configure an operating mode to a bridging mode. In the embodiment of the present application, after the first network device learns that the gateway device does not exist in the second network device, and the network device itself obtains the WAN port IP, the first network device also needs to send the second request message to the second network device, enriching The implementation of this embodiment.
在一种可能的设计中,在本申请实施例第二方面的第四种实现方式中,所述确定单元包括:(当状态发生变化的网络设备不是第一网络设备时)In a possible design, in a fourth implementation manner of the second aspect of the embodiment, the determining unit includes: (when the network device whose state changes is not the first network device)
第二接收子单元,用于接收第二反馈消息,所述第二反馈消息由第三网络设备根据第三请求消息发送,所述第二反馈信息携带所述第三网络设备的IP,所述第三请求消息由第四网络设备生成且在家庭网络中广播,所述第四网络设备为家庭网络中状态发送变化的网络设备,所述第三网络设备为家庭网络中除第一网络设备和第四网络设备之外的网络设备;第二获取子单元,用于根据所述第二反馈消息获取所述第三网络设备的网络角色;第二确定子单元,用于根据所述第三网络设备的网络角色确定所述第一网络设备的网络角色。本申请实施例中,再次具体说明了第一网络设备是如何确定第一网络设备的网络角色的,丰富了本申请实施例的实现手段。a second receiving subunit, configured to receive a second feedback message, where the second feedback message is sent by the third network device according to the third request message, where the second feedback information carries an IP of the third network device, The third request message is generated by the fourth network device and is broadcast in the home network, where the fourth network device is a network device whose status is changed in the home network, and the third network device is the first network device except the first network device and a network device other than the fourth network device; a second obtaining subunit, configured to acquire a network role of the third network device according to the second feedback message; and a second determining subunit, configured to use, according to the third network The network role of the device determines the network role of the first network device. In the embodiment of the present application, how the first network device determines the network role of the first network device is specifically described, which enriches the implementation means of the embodiment of the present application.
在一种可能的设计中,在本申请实施例第二方面的第五种实现方式中,所述确定单元包括:In a possible design, in a fifth implementation manner of the second aspect of the embodiments, the determining unit includes:
第三获取子单元,用于当所述第一网络设备判断所述第一网络设备的状态发生变化时,获取所述第一网络设备IP;第四获取子单元,用于根据所述第一网络设备IP获取所述第一网络设备的网络角色。本申请实施例中,第一网络设备可以根据自身网口的IP获取自身的网络角色,增加了本申请实施例的可实现性。a third acquiring subunit, configured to acquire the first network device IP when the first network device determines that the state of the first network device changes, and the fourth acquiring subunit is configured to be used according to the first The network device IP acquires a network role of the first network device. In the embodiment of the present application, the first network device can obtain its own network role according to the IP address of the network port, and the achievability of the embodiment of the present application is increased.
在一种可能的设计中,在本申请实施例第二方面的第六种实现方式中,所述第四获取子单元包括:In a possible design, in a sixth implementation manner of the second aspect of the embodiment, the fourth acquiring subunit includes:
第三确定模块,用于当确定所述第一网络设备IP的类型为广域网类型时,确定所述第一网络设备的网络角色为网关设备;第四确定模块,用于当确定所述第一网络设备IP的类型为局域网类型时,确定所述第一网络设备的网络角色为级联设备。本申请实施例中,具体说明了第一网络设备是如何根据自身的IP来获取自身的网络角色的,增加了本申请实施例的可实现性和可操作性。a third determining module, configured to determine, when the type of the first network device IP is a WAN type, a network role of the first network device as a gateway device, and a fourth determining module, configured to determine the first When the type of the network device IP is a local area network type, the network role of the first network device is determined to be a cascading device. In the embodiment of the present application, the first network device is specifically configured to obtain its own network role according to its own IP, which increases the achievability and operability of the embodiment of the present application.
在一种可能的设计中,在本申请实施例第二方面的第七种实现方式中,所述网络设备还包括:In a possible design, in a seventh implementation manner of the second aspect of the embodiments, the network device further includes:
发送单元,用于若所述第一网络设备的网络角色为网关设备时,向第三网络设备发送第一切换指令,所述第一切换指令指示所述第三网络设备的工作模式配置为桥接模式,所述第三网络设备为所述家庭网络中除所述第一网络设备的其他网络设备;本申请实施例中,如果第一网络设备为网关设备,那么第一网络设备还需要向第五网络设备发送第一切换指令,使得第五网络可以根据该指令将自身的工作模式配置为桥接模式,增加了本申请实施
例的可实现性。a sending unit, configured to: when the network role of the first network device is a gateway device, send a first switching instruction to the third network device, where the first switching instruction indicates that the working mode of the third network device is configured as a bridge a mode, the third network device is another network device in the home network except the first network device. In this embodiment, if the first network device is a gateway device, the first network device needs to go to the first The fifth network device sends the first switching instruction, so that the fifth network can configure its working mode as the bridging mode according to the instruction, and the implementation of the application is added.
The achievability of the example.
或,or,
接收模块,用于若所述第一网络设备的网络角色为级联设备时,接收所述第五网络设备中的网关设备发送的第二切换指令,并根据所述第二切换指令将工作模式配置为桥接模式,所述第二切换指令指示所述第一网络设备的工作模式配置为桥接模式。本申请实施例中,当第一网络设备为级联设备时,将会接收到来自第五网络设备的第二切换指令,使得第一网络设备的工作模式配置为桥接模式,增加了本申请实施例的可实现性。a receiving module, configured to: when the network role of the first network device is a cascading device, receive a second switching instruction sent by the gateway device in the fifth network device, and operate the mode according to the second switching instruction The configuration is a bridge mode, and the second switching instruction indicates that the working mode of the first network device is configured as a bridge mode. In the embodiment of the present application, when the first network device is a cascading device, the second switching instruction from the fifth network device is received, so that the working mode of the first network device is configured as a bridge mode, and the implementation of the application is added. The achievability of the example.
本申请实施例的第三方面提供一种网络设备,其特征在于,包括:A third aspect of the embodiments of the present application provides a network device, including:
输入装置、输出装置、处理器和存储器;通过调用所述存储器存储的操作指令,所述处理器,用于执行如下步骤:第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色;若所述第一网络设备的网络角色为网关设备,则将工作模式配置为路由模式;若所述第一网络设备的网络角色为级联设备,则将所述工作模式配置为桥接模式。本申请实施例中,网络设备可以自动切换自身的工作模式,降低网络维护成本。The input device, the output device, the processor, and the memory; the processor is configured to perform the following steps: the first network device determines that the state of the at least one network device in the home network changes when the state of the network device is changed Determining a network role of the first network device; if the network role of the first network device is a gateway device, configuring a working mode as a routing mode; if the network role of the first network device is a cascading device, The working mode is then configured as a bridge mode. In the embodiment of the present application, the network device can automatically switch its working mode and reduce network maintenance costs.
从以上技术方案可以看出,本申请实施例具有以下优点:As can be seen from the above technical solutions, the embodiments of the present application have the following advantages:
本申请实施例提供的技术方案中,第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色,如果所述第一网络设备的网络角色为网关设备,则所述第一网络设备将工作模式配置为路由模式;如果所述第一网络设备的网络角色为级联设备,则所述第一网络设备将所述工作模式配置为桥接模式。本申请实施例能够使得网络设备根据自身的网络角色,自动配置网络设备的工作模式,降低了网络设备的维护成本。In the technical solution provided by the embodiment of the present application, when the first network device determines that the state of the at least one network device in the home network changes, the network role of the first network device is determined, if the network role of the first network device The gateway device configures the working mode as a routing mode; if the network role of the first network device is a cascading device, the first network device configures the working mode as a bridge mode . The embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
图1为本申请实施例中网络结构示意图;1 is a schematic structural diagram of a network in an embodiment of the present application;
图2为本申请实施例的UPnP的发现协议框架示意图;2 is a schematic diagram of a discovery protocol framework of UPnP according to an embodiment of the present application;
图3为本申请实施例中网络设备工作模式自动切换的方法一个实施例示意图;FIG. 3 is a schematic diagram of an embodiment of a method for automatically switching a working mode of a network device according to an embodiment of the present disclosure;
图4为本申请实施例中网络设备工作模式自动切换的方法另一个实施例示意图;4 is a schematic diagram of another embodiment of a method for automatically switching a working mode of a network device according to an embodiment of the present application;
图5为本申请实施例中网络设备工作模式自动切换的方法另一个实施例示意图;FIG. 5 is a schematic diagram of another embodiment of a method for automatically switching a working mode of a network device according to an embodiment of the present disclosure;
图6为本申请实施例中一个网络结构实施例示意图;6 is a schematic diagram of an embodiment of a network structure in an embodiment of the present application;
图7为本申请实施例中网络设备一个实施例示意图;FIG. 7 is a schematic diagram of an embodiment of a network device according to an embodiment of the present application;
图8为本申请实施例中网络设备另一个实施例示意图;FIG. 8 is a schematic diagram of another embodiment of a network device according to an embodiment of the present application;
图9为本申请实施例中网络设备另一个实施例示意图;FIG. 9 is a schematic diagram of another embodiment of a network device according to an embodiment of the present application;
图10为本申请实施例中网络设备另一个实施例示意图;FIG. 10 is a schematic diagram of another embodiment of a network device according to an embodiment of the present application;
图11为本申请实施例中网络设备另一个实施例示意图。FIG. 11 is a schematic diagram of another embodiment of a network device according to an embodiment of the present application.
本申请实施例提供了一种网络设备工作模式自动切换的方法及其网络设备,用于自动配置网络设备的工作模式,降低网络设备的维护成本。The embodiment of the present invention provides a method for automatically switching a working mode of a network device and a network device thereof, which are used to automatically configure an operating mode of the network device and reduce maintenance cost of the network device.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”
等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth" in the specification and claims of the present application and the above figures
Etc. (if present) is used to distinguish similar objects and is not necessarily used to describe a particular order or order. It is to be understood that the data so used may be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than what is illustrated or described herein. In addition, the terms "comprises" and "comprises" and "the" and "the" are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to Those steps or units may include other steps or units not explicitly listed or inherent to such processes, methods, products or devices.
随着家庭电子设备的逐步增加,特别是基于无线保真Wi-Fi的无线接入设备的增加,家庭网络的范围已经出现了逐步扩大的情况,典型的扩大场景就是Wi-Fi网络的延伸。家庭网网络中为了延伸网络的使用范围,通常情况会使用Wi-Fi中继设备(又称为AP设备)或者路由器等网络设备延伸网络使用范围。图1为级联的网络设备(本申请实施例中指路由器)以路由模式接入网关设备。With the gradual increase of home electronic devices, especially the wireless access devices based on wireless fidelity Wi-Fi, the range of home networks has gradually expanded, and the typical expansion scenario is an extension of Wi-Fi networks. In the home network, in order to extend the use of the network, a network device such as a Wi-Fi relay device (also referred to as an AP device) or a router is generally used to extend the network usage range. FIG. 1 is a cascading network device (referred to as a router in the embodiment of the present application) accessing a gateway device in a routing mode.
为了统一管理家庭网络中的所有终端设备,中国电信定义了外置AP设备的管理规范,要求家庭网络中延伸的网络设备(级联设备)的工作模式都使用桥接模式,家庭网络中的网关设备的工作模式都使用路由模式,因此,需要将家庭网络中级联设备的工作模式配置成桥接模式,将家庭网络中网关设备的工作模式配置为路由模式。In order to uniformly manage all terminal devices in the home network, China Telecom defines the management specifications of the external AP devices, and requires that the working modes of the extended network devices (cascading devices) in the home network use the bridge mode, and the gateway devices in the home network. The working mode uses the routing mode. Therefore, the working mode of the cascading device in the home network needs to be configured as a bridge mode, and the working mode of the gateway device in the home network is configured as a routing mode.
本申请实施例中的网络设备可以使用通用即插即用(Universal Plug and Play,UPnP)协议,也可以使用其他协议,例如网络设备开发商自己定义协议,具体使用的协议此处不做限定。The network device in the embodiment of the present application may use a Universal Plug and Play (UPnP) protocol, and may also use other protocols. For example, the network device developer defines the protocol. The specific protocol is not limited herein.
UPnP协议是由“通用即插即用论坛”(UPnPTM Forum)推广的一套网络协议。该协议的目标是使家庭网络(数据共享、通信和娱乐)和公司网络中的各种设备能够相互无缝连接,即即家庭网络或者公司网络中,两个或者多个终端设备之间可以直接相互通信,而不用管它们的物理位置,并简化相关网络的实现。UpnP通过定义和发布基于开放、因特网通讯网协议标准的UPnP设备控制协议来实现这一目标。The UPnP protocol is a set of network protocols promoted by the UPnP TM Forum. The goal of the agreement is to enable home networks (data sharing, communication and entertainment) and various devices in the corporate network to be seamlessly connected to each other, ie in a home network or a corporate network, between two or more terminal devices Communicate with each other regardless of their physical location and simplify the implementation of the relevant network. UpnP achieves this by defining and publishing UPnP device control protocols based on open, Internet communication network protocol standards.
目前的家庭网络发现协议一般是基于传输控制协议(Transmission Control Protocol,TCP)的广播消息实现。其中UPnP就是一种业界比较成熟的家庭网络发现协议,其中,UPnP的发现协议框架如图2所示。因为UPnP是基于超文本传送协议(HTTP HyperText Transfer Protocol,HTTP)协议扩展的,可以在HTTP的报文头中增加任意合法的字段。我们可以让家庭网络中的设备能相互看到相关的工作模式,在UPnP的发现协议与回复协议中都可以增加设备网络类型(Device Network Type,DNT)字段,该字段是可选字段,如果设备是网络设备,则用于描述设备的网络工作模式。The current home network discovery protocol is generally implemented based on a Transmission Control Protocol (TCP) broadcast message. UPnP is a relatively mature home network discovery protocol in the industry. The discovery protocol framework of UPnP is shown in Figure 2. Because UPnP is extended based on the HTTP HyperText Transfer Protocol (HTTP) protocol, any legal field can be added to the HTTP header. We can enable devices in the home network to see each other's working modes. In the UPnP discovery protocol and reply protocol, the Device Network Type (DNT) field can be added. This field is an optional field if the device It is a network device and is used to describe the network working mode of the device.
需要说明的是,在本申请的所有实施例中,网络设备的工作模式自动切换的前提是该网络设备中用户配置里记录的用户配置为自适应模式。It should be noted that, in all embodiments of the present application, the premise that the working mode of the network device is automatically switched is that the user configuration recorded in the user configuration in the network device is configured as an adaptive mode.
需要说明的是,网络设备如何确定自身的网络角色有多种方法,下面分别进行说明:It should be noted that there are multiple methods for how a network device determines its own network role.
一、家庭网络中的网络设备通过网络设备之间的协商确定自身的网络角色。1. The network device in the home network determines its own network role through negotiation between network devices.
本实施例中,需要通过家庭网络中的网络设备间的相互协商,来确定网络设备自身的网络角色,然后网络设备根据自身的网络角色对自身的工作模式进行配置。In this embodiment, the network device's own network role needs to be determined through mutual negotiation between the network devices in the home network, and then the network device configures its own working mode according to its own network role.
请参阅图3,本申请实施例中网络设备工作模式自动切换的方法一个实施例包括:
Referring to FIG. 3, an embodiment of a method for automatically switching a working mode of a network device in the embodiment of the present application includes:
301、第一网络设备向家庭网络中的网络设备发送第一请求信息。301. The first network device sends first request information to a network device in the home network.
本实施例中,当第一网络设备感应到自身的状态发生了变化时,会根据该变化向家庭网络中广播第一请求消息,该第一请求消息请求知道家庭网络中的其他网络设备的网络角色,此时,家庭网络中的第二网络设备将会接收到该第一请求消息,在本实施例中把家庭网络中除第一网络设备外的其他网络设备称为第二网络设备。In this embodiment, when the first network device senses that its state has changed, the first request message is broadcasted to the home network according to the change, and the first request message requests to know the network of other network devices in the home network. In this case, the second network device in the home network will receive the first request message. In this embodiment, other network devices except the first network device in the home network are referred to as the second network device.
其中,第一网络设备感应到自身的状态发生了变化的情景可能是,第一网络设备作为新的网络设备加入到家庭网络中、第一网络设备的状态从离线变为在线或第一网络设备在家庭网络中的网络角色被切换。The scenario in which the first network device senses that its state has changed may be that the first network device joins the home network as a new network device, and the state of the first network device changes from offline to online or the first network device. Network roles in the home network are switched.
302、第二网络设备向家庭网络中的网络设备发送第一反馈消息。302. The second network device sends a first feedback message to the network device in the home network.
本实施例中,当第二网络设备接收到第一网络设备发送的第一请求消息之后,第二网络设备将会根据该请求消息在家庭网络中广播第一反馈消息,第一网络设备将会根据这个广播接收到第二网络设备发送的第一反馈消息,其中,第一反馈消息应携带有第二网络设备的IP,第一反馈消息可以携带有第二网络设备的当前工作模式,也可以不带有,具体此处不做限定,使得第一网络设备根据该IP信息判断第二网络设备的网络角色。In this embodiment, after the second network device receives the first request message sent by the first network device, the second network device broadcasts the first feedback message in the home network according to the request message, where the first network device will The first feedback message sent by the second network device is received according to the broadcast, where the first feedback message should carry the IP of the second network device, and the first feedback message may carry the current working mode of the second network device, or The first network device determines the network role of the second network device according to the IP information.
303、第一网络设备根据第一反馈消息确定自身的网络角色,若第一网络设备为网关设备,则执行步骤304;若第一网络设备为级联设备,则执行步骤305。303. The first network device determines its own network role according to the first feedback message. If the first network device is a gateway device, step 304 is performed. If the first network device is a cascade device, step 305 is performed.
本实施例中,当第一网络设备接收到第二网络设备发送的第一反馈消息之后,第一网络设备将会根据该第一反馈消息获取第二网络设备的网络角色,具体的获取方法是,根据第一反馈消息中携带的第二网络设备的IP判断,当IP的类型是广域网类型,则第一网络设备判断该第二网络设备的网络角色为网关设备,当IP的类型是局域网类型时,则第一网络设备判断该第二网络设备的网络角色为级联设备;当第一网络设备获取到各第二网络设备的网络角色之后,将会判断获取到的第二网络设备的网络角色中网关设备的个数,当第一网络设备获取到的第二网络设备中存在网关设备,即,第二网络设备中网关设备的个数大于或等于1个时,此时,第一网络设备确定自身的网络角色为级联设备;当第一网络设备获取到的第二网络设备中不存在网关设备,即获取到的网关设备的个数为0,而且第一网络设备获取到了WAN的IP时,此时,第一网络设备则将自身的网络角色确定为网关设备;当第一网络设备获取到的第二网络设备中不存在网关设备,即获取到的网关设备的个数为0,但是第一网络设备也没有获取到WAN的IP时,此时,第一网络设备则将自身的网络角色确定为级联设备。In this embodiment, after the first network device receives the first feedback message sent by the second network device, the first network device acquires the network role of the second network device according to the first feedback message, and the specific acquiring method is According to the IP of the second network device carried in the first feedback message, when the type of the IP is a WAN type, the first network device determines that the network role of the second network device is a gateway device, and when the type of the IP is a local area network type The first network device determines that the network role of the second network device is a cascading device; after the first network device acquires the network role of each second network device, it determines the acquired network of the second network device. The number of the gateway devices in the role. When there is a gateway device in the second network device that is acquired by the first network device, that is, the number of the gateway devices in the second network device is greater than or equal to one, at this time, the first network The device determines that its own network role is a cascading device; when the second network device acquired by the first network device does not have a gateway device, that is, the obtained network The number of the device is 0, and the first network device obtains the IP of the WAN. At this time, the first network device determines its own network role as the gateway device; when the first network device acquires the second network device The gateway device does not exist, that is, the number of the obtained gateway devices is 0, but the first network device does not obtain the IP of the WAN. At this time, the first network device determines its own network role as the cascade device. .
需要说明的是,当第一网络设备获取到的第二网络设备中不存在网关设备,而且第一网络设备获取到了WAN的IP,即第一网络设备确定自身的网络角色为网关设备时,第一网络设备还将会在家庭网络中广播一个第二请求消息,其中该第二请求消息指示接收该消息的设备将工作模式配置为桥接模式,具体做法是,在第二请求消息中写入第一网络设备的IP,让家庭网络中接收到该消息的网络设备获知家庭网络中存在网关设备,然后家庭网络中的接收到该消息的网络设备将自身的网络角色定位为级联设备,然后根据自己的网络角色将自身的工作模式配置为桥接模式。It should be noted that, when the gateway device is not present in the second network device that is acquired by the first network device, and the first network device obtains the IP of the WAN, that is, the first network device determines that the network role of the network device is the gateway device, A network device will also broadcast a second request message in the home network, wherein the second request message indicates that the device receiving the message configures the working mode to be in a bridge mode, in which the second request message is written in the second request message. The IP address of a network device, so that the network device that receives the message in the home network knows that the gateway device exists in the home network, and then the network device that receives the message in the home network locates its own network role as a cascading device, and then according to Your own network role configures its working mode to bridge mode.
304、若第一网络设备的网络角色为网关设备,则第一网络设备将工作模式配置为路
由模式。304. If the network role of the first network device is a gateway device, the first network device configures the working mode as a path.
By mode.
本实施例中,当第一网络设备根据步骤303的判断,确定自身的网络角色为网关设备之后,则第一网络设备将工作模式配置为路由模式,具体做法为,如果第一网络设备当前的工作模式为桥接模式,则第一网络设备将自身的工作模式切换至路由模式;如果第一网络设备当前的工作模式就是路由模式时,则第一网络设备就维持现状。In this embodiment, after the first network device determines, according to the judgment of step 303, that the network role of the network device is the gateway device, the first network device configures the working mode as the routing mode, where the first network device is current. When the working mode is the bridge mode, the first network device switches its working mode to the routing mode; if the current working mode of the first network device is the routing mode, the first network device maintains the current status.
305、若第一网络设备的网络角色为级联设备,则第一网络设备将工作模式配置为桥接模式。305. If the network role of the first network device is a cascading device, the first network device configures the working mode as a bridging mode.
本实施例中,当第一网络设备根据步骤303的判断,确定自身的网络角色为级联设备之后,则第一网络设备将工作模式配置为桥接模式,具体做法为,如果第一网络设备当前的工作模式为路由模式,则第一网络设备将自身的工作模式切换至桥接模式;如果第一网络设备当前的工作模式就是桥接模式时,则第一网络设备就维持现状。In this embodiment, after the first network device determines that the network role of the first network device is the cascading device according to the determination of step 303, the first network device configures the working mode as the bridging mode, in which, if the first network device is currently The working mode is the routing mode, and the first network device switches its working mode to the bridging mode; if the current working mode of the first network device is the bridging mode, the first network device maintains the current status.
需要说明的是,当家庭网络中的状态发生变化不是第一网络设备,而是第一网络设备之外的设备,比如第四网络设备时,即当第四网络设备作为新的网络设备加入到家庭网络中、第四网络设备的状态从离线变为在线、第四网络设备的状态从在线变为离线或第四网络设备在家庭网络中的角色被切换时,第一网络设备确定自身的网络角色的实施例为,当第四网络设备感应到自身的状态发生变化时,将根据该状态变化信息生成并广播第三请求消息,当家庭网络中的各个第三网络设备接收到该第三请求消息之后,将会根据该第三请求消息在家庭网络中广播第二反馈消息,第二反馈消息带有第三网络设备的IP,当第一网络设备接收到该第二反馈消息之后,将会根据该第二反馈消息获取第三网络设备的网络角色,然后第一网络设备再根据该第三网络设备的网络角色去确定自身的网络角色,其中,第三网络设备为家庭网络中除第四网络设备和第一网络设备之外的其他网络设备。It should be noted that when the state change in the home network is not the first network device, but a device other than the first network device, such as the fourth network device, that is, when the fourth network device is added as a new network device, In the home network, when the state of the fourth network device changes from offline to online, the state of the fourth network device changes from online to offline, or the role of the fourth network device in the home network is switched, the first network device determines its own network. An embodiment of the role is that when the fourth network device senses that its state changes, the third request message is generated and broadcast according to the state change information, when each third network device in the home network receives the third request. After the message, the second feedback message is broadcasted in the home network according to the third request message, where the second feedback message carries the IP of the third network device, and after receiving the second feedback message, the first network device will Obtaining a network role of the third network device according to the second feedback message, and then the first network device is further configured according to the network of the third network device Color to determine their role in the network, wherein the third network device to other network devices in the home network in addition to the first and fourth network equipment network equipment.
本申请实施例提供的技术方案中,第一网络设备根据家庭网络中网络设备的状态变化和第二网络设备经过协商确定第一网络设备的网络角色,如果第一网络设备的网络角色为网关设备,则第一网络设备将工作模式配置为路由模式;如果第一网络设备的网络角色为级联设备,则第一网络设备将工作模式配置为桥接模式。本申请实施例能够使得网络设备根据自身的网络角色,自动配置网络设备的工作模式,降低了网络设备的维护成本。In the technical solution provided by the embodiment of the present application, the first network device determines, according to the state change of the network device in the home network, the second network device determines the network role of the first network device, if the network role of the first network device is the gateway device. The first network device configures the working mode as the routing mode; if the network role of the first network device is the cascading device, the first network device configures the working mode to the bridge mode. The embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
二、网络设备自身独立判断自身的网络角色。Second, the network device itself determines its own network role.
本实施例中,不需要家庭网络中的网络设备进行相互协商,即不依赖家庭网络中的其他网络设备,网络设备自身独立判断自身的网络角色,然后网络设备根据自身的网络角色对自身的工作模式进行配置。。In this embodiment, network devices in the home network are not required to negotiate with each other, that is, independent of other network devices in the home network, and the network device independently determines its own network role, and then the network device works on its own according to its own network role. Mode to configure. .
请参阅图4,本申请实施例中网络设备工作模式自动切换的方法另一个实施例包括:Referring to FIG. 4, another embodiment of a method for automatically switching a network device working mode in an embodiment of the present application includes:
401、第一网络设备根据自身的状态变化获取自身的IP。401. The first network device acquires its own IP according to its own state change.
本实施例中,当第一网络设备感应到自身上电或上线时,会主动去获取自身的IP。具体的例子为,当第一网络设备启动的时候,此时第一网络设备等待网口的上线事件,如果网口上线,则此时获取自身的IP。In this embodiment, when the first network device senses that it is powered on or goes online, it will actively acquire its own IP. A specific example is that when the first network device is started, the first network device waits for an online event of the network port. If the network port is online, the IP address is obtained.
402、第一网络设备根据自身的IP获取自身的网络角色,若第一网络设备为网关设备,则执行步骤403;若第一网络设备为级联设备,则执行步骤404。
The first network device obtains its own network role according to its own IP. If the first network device is a gateway device, step 403 is performed. If the first network device is a cascade device, step 404 is performed.
本实施例中,当第一网络设备获取到了自身的IP之后,将会对该IP进行类型判断。如果第一网络设备确定的IP的类型为广域网类型,那么就确定第一网络设备的网络角色为网关设备;如果第一网络设备确定自身的IP的类型为局域网类型,那么就确定第一网络设备的网络角色为级联设备。In this embodiment, after the first network device obtains its own IP, the IP will be type-determined. If the type of the IP determined by the first network device is a WAN type, determining that the network role of the first network device is a gateway device; if the first network device determines that the type of the IP of the first network device is a local area network type, determining the first network device The network role is a cascade device.
403、若第一网络设备的网络角色为网关设备,则第一网络设备将工作模式配置为路由模式。403. If the network role of the first network device is a gateway device, the first network device configures the working mode as a routing mode.
本实施例中,当第一网络设备根据步骤402的判断,确定自身的网络角色为网关设备之后,则第一网络设备将工作模式配置为路由模式,具体做法为,如果第一网络设备当前的工作模式为桥接模式,则第一网络设备将自身的工作模式切换至路由模式;如果第一网络设备当前的工作模式就是路由模式时,则第一网络设备就维持现状。In this embodiment, after the first network device determines, according to the judgment of step 402, that the network role of the network device is the gateway device, the first network device configures the working mode as the routing mode, where the first network device is current. When the working mode is the bridge mode, the first network device switches its working mode to the routing mode; if the current working mode of the first network device is the routing mode, the first network device maintains the current status.
404、若第一网络设备的网络角色为级联设备,则第一网络设备将工作模式配置为桥接模式。404. If the network role of the first network device is a cascading device, the first network device configures the working mode to be a bridge mode.
本实施例中,当第一网络设备根据步骤402的判断,确定自身的网络角色为级联设备之后,则第一网络设备将工作模式配置为桥接模式,具体做法为,如果第一网络设备当前的工作模式为路由模式,则第一网络设备将自身的工作模式切换至桥接模式;如果第一网络设备当前的工作模式就是桥接模式时,则第一网络设备就维持现状。In this embodiment, after the first network device determines that the network role of the first network device is the cascading device according to the judgment of step 402, the first network device configures the working mode as the bridging mode, for example, if the first network device is currently The working mode is the routing mode, and the first network device switches its working mode to the bridging mode; if the current working mode of the first network device is the bridging mode, the first network device maintains the current status.
本申请实施例提供的技术方案中,第一网络设备根据自身的IP确定第一网络设备的网络角色,如果第一网络设备的网络角色为网关设备,则第一网络设备将工作模式配置为路由模式;如果第一网络设备的网络角色为级联设备,则第一网络设备将工作模式配置为桥接模式。本申请实施例能够使得网络设备根据自身的网络角色,自动配置网络设备的工作模式,降低了网络设备的维护成本。In the technical solution provided by the embodiment of the present application, the first network device determines the network role of the first network device according to the IP address of the first network device. If the network role of the first network device is the gateway device, the first network device configures the working mode as the route. Mode; if the network role of the first network device is a cascade device, the first network device configures the working mode to the bridge mode. The embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
三、网关设备和级联设备进行协商通信。3. The gateway device and the cascade device perform negotiation communication.
本实施例,主要应用于家庭网络中网络设备较少的场景,该实施例中当第一网络设备确定自身是网关设备的时候,会将自身的工作模式配置为路由模式,并向家庭网络中的非网关网络设备(即级联设备)发送一个切换指令,使得家庭网络中的级联设备根据该切换指令将自身的工作模式配置为桥接模式。本申请实施例只要是基于传输控制协议/互连网协议(TCP/IP)的Socket消息通信来协商网络设备的工作模式,甚至是基于二层通信。例如,有一些网络设备可以简单的直接基于TCP链接来协商工作模式,将设备的路由工作模式配置成桥接模式等。此方式相对于只有少量网络设备的LAN网络来说是比较简单应用的,即不通过UPnP的广播消息来协商,而是直接通过点对点的进行通信协商。This embodiment is mainly applied to a scenario where the number of network devices in the home network is small. In this embodiment, when the first network device determines that it is a gateway device, it configures its working mode as a routing mode and sends the mode to the home network. The non-gateway network device (ie, the cascading device) sends a handover command so that the cascading device in the home network configures its own working mode to the bridge mode according to the handover instruction. The embodiments of the present application negotiate the working mode of the network device as long as it is a Socket message communication based on the Transmission Control Protocol/Internet Protocol (TCP/IP), or even based on Layer 2 communication. For example, some network devices can simply negotiate a working mode based on a TCP link, and configure a routing mode of the device into a bridge mode. This method is relatively simple to apply to a LAN network with only a small number of network devices, that is, it does not negotiate through UPnP broadcast messages, but directly communicates through peer-to-peer communication.
请参阅图5,本申请实施例中网络设备工作模式自动切换的方法另一个实施例包括:Referring to FIG. 5, another embodiment of a method for automatically switching a working mode of a network device in the embodiment of the present application includes:
501、第一网络设备根据自身IP确定自身的网络角色;当第一网络设备的网络角色为网关设备时,则执行步骤502;当第一网络设备的网络角色为级联设备时,则执行步骤503。501. The first network device determines its own network role according to its own IP. When the network role of the first network device is a gateway device, step 502 is performed. When the network role of the first network device is a cascade device, steps are performed. 503.
本实施例中,当第一网络设备判断自身的IP为广域网IP时,则确定自身的网络角色为网关设备,当第一网络设备判断自身的IP为局域网IP是,则确定自身的网络角色为级联设备。In this embodiment, when the first network device determines that its IP is a wide area network IP, it determines that its own network role is a gateway device. When the first network device determines that its own IP is a local area network IP, it determines that its own network role is Cascading equipment.
502、第一网络设备向第五网络设备发送切换指令,使得第五网络设备根据该切换指
令配置自身工作模式。502. The first network device sends a switching instruction to the fifth network device, so that the fifth network device is configured according to the switching finger.
Let configure your own working mode.
本实施例中,当确定第一网络设备为网关设备时,则第一网络设备向第五网络设备发送第一切换指令,使得第五网络设备根据该指令将自身的工作模式配置为桥接模式。其中,第一切换指令指示将第五网络设备的工作模式配置为桥接模式,第五网络设备为家庭网络中除第一网络设备外其他的网络设备。In this embodiment, when it is determined that the first network device is a gateway device, the first network device sends a first switching instruction to the fifth network device, so that the fifth network device configures its working mode as a bridge mode according to the instruction. The first switching instruction indicates that the working mode of the fifth network device is configured as a bridge mode, and the fifth network device is a network device other than the first network device in the home network.
需要说明的是,当第五网络设备接收到第一切换指令时,如果第五网络设备的当前工作模式为网关模式,则此时,第五网络设备需要将自身的工作模式切换至桥接模式;如果第五网络设备的当前工作模式为桥接模式,则第五网络设备维持现状。It should be noted that, when the fifth network device receives the first switching instruction, if the current working mode of the fifth network device is the gateway mode, then the fifth network device needs to switch its working mode to the bridge mode; If the current working mode of the fifth network device is the bridge mode, the fifth network device maintains the status quo.
503、第一网络设备接收第五网络设备中的网关设备发送的第二切换指令,并根据该第二切换指令配置自身的工作模式。503. The first network device receives a second switching instruction sent by the gateway device in the fifth network device, and configures its working mode according to the second switching instruction.
本实施例中,当第一网络的网络角色为级联设备时,即网关设备存在于第五网络设备中的时候,第五网络设备中的网关设备会向家庭网络中广播第二切换指令,第一网络设备将会接收到该第二切换指令,并根据该第二切换指令将工作模式配置为桥接模式,其中,该第二切换指令指示第一网络设备的工作模式配置为桥接模式。In this embodiment, when the network role of the first network is a cascading device, that is, when the gateway device exists in the fifth network device, the gateway device in the fifth network device broadcasts the second switching instruction to the home network. The first network device will receive the second switching instruction, and configure the working mode to be a bridge mode according to the second switching instruction, wherein the second switching instruction indicates that the working mode of the first network device is configured as a bridge mode.
需要说明的是,当第一网络设备接收到第二切换指令时,如果第一网络设备的当前工作模式为网关模式,则第一网络设备需要将自身的工作模式切换至桥接模式;如果第一网络设备的当前工作模式为桥接模式,则第一网络设备维持现状。It should be noted that, when the first network device receives the second switching instruction, if the current working mode of the first network device is the gateway mode, the first network device needs to switch its working mode to the bridge mode; The current working mode of the network device is the bridge mode, and the first network device maintains the status quo.
本申请实施例提供的技术方案中,第一网络设备根据自身的IP确定第一网络设备的网络角色之后,将会和家庭网络中的另一种网络角色进行通信,即网关设备跟级联设备进行通信,如果第一网络设备的网络角色为网关设备,则第一网络设备将工作模式配置为路由模式并且向第五网络设备发送切换指令;如果第一网络设备的网络角色为级联设备,则根据网关设备发送的切换指令将自身的工作模式配置为桥接模式。本申请实施例能够使得网络设备根据自身的网络角色,自动配置网络设备的工作模式,降低了网络设备的维护成本。In the technical solution provided by the embodiment of the present application, after the first network device determines the network role of the first network device according to its own IP, it will communicate with another network role in the home network, that is, the gateway device and the cascading device. Communicating, if the network role of the first network device is a gateway device, the first network device configures an operating mode to a routing mode and sends a switching instruction to the fifth network device; if the network role of the first network device is a cascading device, Then, according to the switching instruction sent by the gateway device, its working mode is configured as the bridge mode. The embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
在上述的本申请的所有实施例里,家庭网络设备可以根据相互协商或者自身判断等去自动配置自身的工作模式,简化了家庭网络的组网和配置流程;当家庭网络中的网络设备互换之后,网络设备也可以配置自身工作模式;当家庭网络中存在多个路由设备时,如果家庭网络中一个重要节点(网关设备)出现故障之后,用户可以拿一个次要节点(级联设备)直接替换使用,而无需手动修改工作模式。In all the embodiments of the present application, the home network device can automatically configure its working mode according to mutual negotiation or self-determination, thereby simplifying the networking and configuration process of the home network; when the network devices in the home network are interchanged After that, the network device can also configure its own working mode; when there are multiple routing devices in the home network, if a critical node (gateway device) in the home network fails, the user can take a secondary node (cascading device) directly. Replace it without having to manually modify the working mode.
在家庭网络中,还有一种使用场景:设备通过Wi-Fi上行。此时,如果设备是独立的Wi-Fi上行,则不会存在问题。但可能存在以态上行与Wi-Fi上行同时存在的情况。In the home network, there is also a usage scenario: the device is uplinked via Wi-Fi. At this point, if the device is a separate Wi-Fi uplink, there is no problem. However, there may be cases where both the uplink and the Wi-Fi uplink exist simultaneously.
在此应用场景中,级联设备与网关设备存在两条通路,如图6。如何解决网络环回问题并不在此文范围内,因此不涉及。网络设备同样可以使用UPnP报文进行网络协商,来决策是使用Wi-Fi上行还是使用以太上行。In this application scenario, there are two paths between the cascading device and the gateway device, as shown in Figure 6. How to solve the network loopback problem is not within the scope of this article, so it is not involved. Network devices can also use UPnP packets for network negotiation to decide whether to use Wi-Fi uplink or Ethernet uplink.
当网络设备启动时,同时满足以太上行和Wi-Fi上行条件时(即以态上行口有链接,同时Wi-Fi也可以链接上),在网络设备用户配置为自适应时,应该优先使用以态上行(断开Wi-Fi链接即可)。但此时有可能只是将以态口当成下行LAN侧接口使用,因此,需要进行动态识别,协商判定思路如下:
When the network device starts up, it also satisfies the Ethernet uplink and Wi-Fi uplink conditions (that is, the uplink port has a link, and Wi-Fi can also be linked). When the network device user is configured to be adaptive, it should be used preferentially. Upward (disconnect Wi-Fi link). However, at this time, it is possible to use the state port as the downlink LAN side interface. Therefore, dynamic identification is required, and the negotiation decision is as follows:
1)网络设备首次上电启动场景:1) The scenario where the network device is powered on for the first time:
i.网络设备先自动关闭或者禁用Wi-Fi;i. The network device automatically turns off or disables Wi-Fi first;
ii.网络设备向上行端口发送扩展的UPnP查询报文;Ii. The network device sends the extended UPnP query message to the uplink port;
iii.分析收到的回复报文,如果回复中有路由模式的设备(即网关设备),则表示可以切换成以态上行,在自适应模式下,设备自动切换成以太上行;Iii. Analyze the received reply message. If there is a route mode device (ie, a gateway device), it means that it can switch to the uplink state. In the adaptive mode, the device automatically switches to the Ethernet uplink.
iv.分析收到的回复报文,如果没有回复,或者回复报文中没有网关设备,则再开启Wi-Fi上行;Iv. Analyze the received reply message. If there is no reply, or if there is no gateway device in the reply message, then turn on Wi-Fi uplink;
2)网络设备通过以态上行方式加入网络的场景:2) The scenario in which the network device joins the network in the uplink mode:
i.当以太上行口上线时(链路正常),参考第1)步,向该端口发一个搜索报文;i. When the Ethernet uplink is online (the link is normal), refer to step 1) to send a search message to the port;
ii.参考第1)步,如果收到路由的网络设备,且与当前已经缓存的设备信息一致时,则表示以态上行与Wi-Fi上行可以达到同一个网络设备;Ii. Referring to step 1), if the network device that receives the route is consistent with the currently cached device information, it indicates that the uplink and the Wi-Fi uplink can reach the same network device;
iii.如果该网络设备的用户配置是自适应的,则断开或者禁用Wi-Fi网络,切换成以态上行;Iii. if the user configuration of the network device is adaptive, disconnect or disable the Wi-Fi network, and switch to the uplink;
3)Wi-Fi加入网络的场景(上行SSID可用,可以发现并链接时):3) Wi-Fi joins the network scenario (upstream SSID is available, can be found and linked):
i.此时比较简单,如果当前LAN上行是正常的,则维持现状;i. It is relatively simple at this time, if the current LAN uplink is normal, the status quo is maintained;
ii.如果此时以态上行是异常的(如链路断开),则直接链接Wi-Fi;Ii. If the uplink is abnormal at this time (such as the link is disconnected), directly link Wi-Fi;
4)网络的定期同步与状态维护:4) Regular synchronization and status maintenance of the network:
i.在网络运行过程中,可能存在网络设备变化的场景,本身UPnP协议在网络状态变化时,会发送相关的状态变化报文,此时根据状态变化报文进行处理即可,不再细述;i. During the operation of the network, there may be a scenario where the network device changes. The UPnP protocol sends a related state change packet when the network status changes. ;
ii.对于中途可能存在设备直接掉电,设备无法发出状态变化的报文时,AP可以定期发送搜索报文,以判断网络是否正常;为减少网络负担,搜索报文可以使用简单的退后策略(如延时2^n,n<=10秒的方式进行)。Ii. The AP can periodically send search packets to determine whether the network is normal. If the device is directly powered off and the device fails to send status changes, the device can use the simple backoff policy to reduce the network load. (For example, delay 2^n, n<=10 seconds).
上面对本申请实施例中网络设备工作模式自动切换的方法进行了描述,下面对本申请实施例中的网络设备进行描述,请参阅图7,本申请实施例中网络设备一个实施例包括:The method for automatically switching the working mode of the network device in the embodiment of the present application is described. The following describes the network device in the embodiment of the present application. Referring to FIG. 7, an embodiment of the network device in the embodiment of the present application includes:
图7是本申请实施例提供的一种网络设备结构示意图,该网络设备700可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)710(例如,一个或一个以上处理器)和存储器720,一个或一个以上存储应用程序733或数据732的存储介质730(例如一个或一个以上海量存储设备)。其中,存储器720和存储介质730可以是短暂存储或持久存储。存储在存储介质730的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,处理器710可以设置为与存储介质730通信,在网络设备700上执行存储介质730中的一系列指令操作。网络设备700还可以包括一个或一个以上电源740,一个或一个以上有线或无线网络接口750,一个或一个以上输入输出接口760,和/或,一个或一个以上操作系统731,例如WindoWs ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。本领域技术人员可以理解,图7中示出的网络设备结构并不构成对网络设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 7 is a schematic structural diagram of a network device according to an embodiment of the present disclosure. The network device 700 may have a large difference due to different configurations or performances, and may include one or more central processing units (CPUs) 710 ( For example, one or more processors) and memory 720, one or more storage media 730 that store application 733 or data 732 (eg, one or one storage device in Shanghai). Among them, the memory 720 and the storage medium 730 may be short-term storage or persistent storage. The program stored on storage medium 730 may include one or more modules (not shown), each of which may include a series of instruction operations in the server. Still further, the processor 710 can be configured to communicate with the storage medium 730 to perform a series of instruction operations in the storage medium 730 on the network device 700. Network device 700 may also include one or more power sources 740, one or more wired or wireless network interfaces 750, one or more input and output interfaces 760, and/or one or more operating systems 731, such as WindoWs ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more. It will be understood by those skilled in the art that the network device structure illustrated in FIG. 7 does not constitute a limitation to the network device, and may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
下面结合图7对网络设备的各个构成部件进行具体的介绍:
The following describes the components of the network device in detail with reference to FIG. 7:
存储器720可用于存储软件程序以及模块,处理器710通过运行存储在存储器720的软件程序以及模块,从而执行网络设备的各种功能应用以及数据处理。存储器720可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据网络设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器720可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。在本申请实施例中提供的速率传输调整机制的程序和接收到的数据流存储在存储器720中,当需要使用时,处理器710从存储器720中调用。The memory 720 can be used to store software programs and modules, and the processor 710 executes various functional applications and data processing of the network devices by running software programs and modules stored in the memory 720. The memory 720 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of network devices (such as audio data, phone books, etc.). Moreover, memory 720 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. The program of the rate transfer adjustment mechanism and the received data stream provided in the embodiment of the present application are stored in the memory 720, and the processor 710 calls from the memory 720 when it is needed.
处理器710是网络设备的控制中心,可以按照设置的调整机制调整传输速率。处理器710利用各种接口和线路连接整个网络设备的各个部分,通过运行或执行存储在存储器720内的软件程序和/或模块,以及调用存储在存储器720内的数据,执行网络设备的各种功能和处理数据,从而对手实现对传输速率的调整。The processor 710 is a control center of the network device, and can adjust the transmission rate according to the set adjustment mechanism. The processor 710 connects various portions of the entire network device using various interfaces and lines, performs various types of network devices by running or executing software programs and/or modules stored in the memory 720, and recalling data stored in the memory 720. Function and processing data so that the opponent can adjust the transmission rate.
可选的,处理器710可包括一个或多个处理单元。Optionally, the processor 710 can include one or more processing units.
在本申请的实施例中,处理器710用于执行图3中的步骤301至步骤305,此处不再赘述。In the embodiment of the present application, the processor 710 is configured to perform steps 301 to 305 in FIG. 3, and details are not described herein again.
本申请实施例中,输入接口750和输出接口760用来控制输入输出的外部设备,处理器710通过网络设备的内部总线和输入接口750及输出接口760连接,输入接口750与输出接口760分别与上下游的外部设备连接,最终实现处理器710和上下游的外部设备的数据传输,数据可以通过输入接口750和输出接口760实现数据在不同设备之间的传输,快速调整业务的输出速率以适应带宽按需改变需求,并减少节点数据缓存、节点处理延迟和端到端传输延迟。In the embodiment of the present application, the input interface 750 and the output interface 760 are used to control the input and output external devices, and the processor 710 is connected to the input interface 750 and the output interface 760 through the internal bus of the network device, and the input interface 750 and the output interface 760 respectively The upstream and downstream external devices are connected to finally realize the data transmission of the processor 710 and the upstream and downstream external devices. The data can be transmitted between different devices through the input interface 750 and the output interface 760, and the output rate of the service can be quickly adjusted to adapt. Bandwidth changes demand as needed, and reduces node data caching, node processing latency, and end-to-end transmission latency.
图7从硬件处理的角度分别对本申请实施例中的网络设备进行详细描述,下面从模块化功能实体的角度对本申请实施例中的网络设备进行详细描述,请参阅图8,本申请实施例中网络设备的一个实施例包括:FIG. 7 is a detailed description of the network device in the embodiment of the present application from the perspective of the hardware processing. The network device in the embodiment of the present application is described in detail from the perspective of the modular functional entity. Referring to FIG. 8 , in the embodiment of the present application, One embodiment of a network device includes:
确定单元801,用于当第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色;a determining unit 801, configured to determine, when the first network device determines that a state of the at least one network device exists in the home network, to change a network role of the first network device;
其中,确定单元801包括:The determining unit 801 includes:
发送子单元8011,用于当所述第一网络设备判断所述第一网络设备的状态发生变化时,向第二网络设备发送第一请求消息,第二网络设备为家庭网络中除第一网络设备的其他网络设备;The sending subunit 8011 is configured to: when the first network device determines that the state of the first network device changes, send a first request message to the second network device, where the second network device is a home network except the first network Other network devices of the device;
第一接收子单元8012,用于接收第二网络设备的第一反馈消息,第一反馈消息携带第二网络设备的网络之间互连的协议IP,第一反馈消息为第二网络设备根据第一请求消息发送;The first receiving sub-unit 8012 is configured to receive a first feedback message of the second network device, where the first feedback message carries the protocol IP of the interconnection between the networks of the second network device, where the first feedback message is the second network device according to the Sending a request message;
第一获取子单元8013,用于根据接收子单元接收到的第一反馈消息获取第二网络设备的网络角色;a first obtaining sub-unit 8013, configured to acquire a network role of the second network device according to the first feedback message received by the receiving subunit;
第一确定子单元8014,用于根据获取子单元获取到的第二网络设备的网络角色确定第一网络设备的网络角色。
The first determining subunit 8014 is configured to determine a network role of the first network device according to the network role of the second network device acquired by the obtaining subunit.
其中,第一确定子单元8014还包括:The first determining subunit 8014 further includes:
第一确定模块80141,用于当根据第二网络设备的网络角色获知第二网络设备中存在一个或一个以上的网关设备时,确定第一网络设备的网络角色为级联设备;The first determining module 80141 is configured to determine, when the one or more gateway devices are present in the second network device according to the network role of the second network device, that the network role of the first network device is a cascading device;
和,with,
第二确定模块80142,用于当根据第二网络设备的网络角色获知第二网络设备中不存在网关设备,且第一网络设备获取到广域网WAN口IP时,确定第一网络设备的网络角色为网关设备;The second determining module 80142 is configured to: when the network device of the second network device learns that the gateway device does not exist in the second network device, and the first network device acquires the WAN port IP of the WAN, determine that the network role of the first network device is Gateway device
发送模块80143,用于向第二网络设备发送第二请求消息,第二请求消息指示第二网络设备将工作模式配置为桥接模式。The sending module 80143 is configured to send a second request message to the second network device, where the second request message instructs the second network device to configure the working mode to the bridge mode.
和,with,
保持模块80144,用于当根据第二网络设备的网络角色获知第二网络设备中不存在网关设备,且第一网络设备未获取到WAN口IP时,则第一网络设备保持当前的网络角色。The maintaining module 80144 is configured to: when the network device of the second network device learns that the gateway device does not exist in the second network device, and the first network device does not obtain the WAN port IP, the first network device maintains the current network role.
第一配置单元802,用于当确定单元确定第一网络设备的网络角色为网关设备,则将工作模式配置为路由模式;a first configuration unit 802, configured to: when the determining unit determines that the network role of the first network device is a gateway device, configure the working mode as a routing mode;
第二配置单元803,用于当确定单元确定第一网络设备的网络角色为级联设备,则将工作模式配置为桥接模式。The second configuration unit 803 is configured to configure the working mode to be a bridge mode when the determining unit determines that the network role of the first network device is a cascading device.
本申请实施例中,确定单元801确定第一网络设备的网络角色,如果第一网络设备的网络角色为网关设备,则第一配置单元802将工作模式配置为路由模式;如果第一网络设备的网络角色为级联设备,则第二配置单元803将工作模式配置为桥接模式。本申请实施例能够使得网络设备根据自身的网络角色,自动配置网络设备的工作模式,降低了网络设备的维护成本。In the embodiment of the present application, the determining unit 801 determines a network role of the first network device. If the network role of the first network device is a gateway device, the first configuration unit 802 configures the working mode as a routing mode; if the first network device The network role is a cascade device, and the second configuration unit 803 configures the working mode to the bridge mode. The embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
请参阅图9,本申请实施例中网络设备另一个实施例包括:Referring to FIG. 9, another embodiment of the network device in this embodiment of the present application includes:
确定单元901,用于当第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色;a determining unit 901, configured to determine, when the first network device determines that a state of the at least one network device exists in the home network, to change a network role of the first network device;
其中,确定单元901还包括:The determining unit 901 further includes:
第二接收子单元9011,用于接收第二反馈消息,第二反馈消息由第三网络设备根据第三请求消息发送,第二反馈信息携带第三网络设备的IP,第三请求消息由第四网络设备生成且在家庭网络中广播,第四网络设备为家庭网络中状态发送变化的网络设备,第三网络设备为家庭网络中除第一网络设备和第四网络设备之外的网络设备;The second receiving subunit 9011 is configured to receive a second feedback message, where the second feedback message is sent by the third network device according to the third request message, the second feedback information carries the IP of the third network device, and the third request message is sent by the fourth The network device generates and broadcasts in the home network, the fourth network device is a network device whose state transmission changes in the home network, and the third network device is a network device other than the first network device and the fourth network device in the home network;
第二获取子单元9012,用于根据第二反馈消息获取第三网络设备的网络角色;a second obtaining sub-unit 9012, configured to acquire a network role of the third network device according to the second feedback message;
第二确定子单元9013,用于根据第三网络设备的网络角色确定第一网络设备的网络角色。The second determining subunit 9013 is configured to determine a network role of the first network device according to the network role of the third network device.
第一配置单元902,用于当确定单元确定第一网络设备的网络角色为网关设备,则将工作模式配置为路由模式;The first configuration unit 902 is configured to: when the determining unit determines that the network role of the first network device is a gateway device, configure the working mode as a routing mode;
第二配置单元903,用于当确定单元确定第一网络设备的网络角色为级联设备,则将工作模式配置为桥接模式。The second configuration unit 903 is configured to configure the working mode to be a bridge mode when the determining unit determines that the network role of the first network device is a cascading device.
本申请实施例中,确定单元901确定第一网络设备的网络角色,如果第一网络设备的
网络角色为网关设备,则第一配置单元902将工作模式配置为路由模式;如果第一网络设备的网络角色为级联设备,则第二配置单元903将工作模式配置为桥接模式。本申请实施例能够使得网络设备根据自身的网络角色,自动配置网络设备的工作模式,降低了网络设备的维护成本。In the embodiment of the present application, the determining unit 901 determines a network role of the first network device, if the first network device
The network role is a gateway device, and the first configuration unit 902 configures the working mode as the routing mode; if the network role of the first network device is the cascading device, the second configuration unit 903 configures the working mode as the bridge mode. The embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
请参阅图10,本申请实施例中网络设备另一个实施例包括:Referring to FIG. 10, another embodiment of the network device in this embodiment of the present application includes:
确定单元1001,用于当第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色;a determining unit 1001, configured to determine, when the first network device determines that a state of the at least one network device exists in the home network, to change a network role of the first network device;
其中,确定单元1001还包括:The determining unit 1001 further includes:
第三获取子单元10011,用于当第一网络设备判断第一网络设备的状态发生变化时,获取第一网络设备IP;The third obtaining subunit 10011 is configured to acquire the first network device IP when the first network device determines that the state of the first network device changes;
第四获取子单元10012,用于根据第一网络设备IP获取第一网络设备的网络角色。The fourth obtaining subunit 10012 is configured to acquire a network role of the first network device according to the first network device IP.
其中,第四获取子单元10012还包括:The fourth obtaining subunit 10012 further includes:
第三确定模块100121,用于当确定第一网络设备IP的类型为广域网类型时,确定第一网络设备的网络角色为网关设备;The third determining module 100121 is configured to: when determining that the type of the first network device IP is a wide area network type, determine that the network role of the first network device is a gateway device;
第四确定模块100122,用于当确定第一网络设备IP的类型为局域网类型时,确定第一网络设备的网络角色为级联设备。The fourth determining module 100122 is configured to determine that the network role of the first network device is a cascading device when determining that the type of the first network device IP is a local area network type.
第一配置单元1002,用于当确定单元确定第一网络设备的网络角色为网关设备,则将工作模式配置为路由模式;The first configuration unit 1002 is configured to: when the determining unit determines that the network role of the first network device is a gateway device, configure the working mode as a routing mode;
第二配置单元1003,用于当确定单元确定第一网络设备的网络角色为级联设备,则将工作模式配置为桥接模式。The second configuration unit 1003 is configured to configure the working mode to be a bridge mode when the determining unit determines that the network role of the first network device is a cascading device.
本申请实施例中,确定单元1001确定第一网络设备的网络角色,如果第一网络设备的网络角色为网关设备,则第一配置单元1002将工作模式配置为路由模式;如果第一网络设备的网络角色为级联设备,则第二配置单元1003将工作模式配置为桥接模式。本申请实施例能够使得网络设备根据自身的网络角色,自动配置网络设备的工作模式,降低了网络设备的维护成本。In the embodiment of the present application, the determining unit 1001 determines the network role of the first network device. If the network role of the first network device is a gateway device, the first configuration unit 1002 configures the working mode as the routing mode; if the first network device The network role is a cascading device, and the second configuration unit 1003 configures the working mode to be a bridge mode. The embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
请参阅图11,本申请实施例中网络设备另一个实施例包括:Referring to FIG. 11, another embodiment of the network device in this embodiment of the present application includes:
确定单元1101,用于当第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色;a determining unit 1101, configured to determine, when the first network device determines that a state of the at least one network device exists in the home network, to change a network role of the first network device;
其中,确定单元1101还包括:The determining unit 1101 further includes:
第三获取子单元11011,用于当所述第一网络设备判断所述第一网络设备的状态发生变化时,获取第一网络设备IP;The third obtaining sub-unit 11011 is configured to acquire the first network device IP when the first network device determines that the state of the first network device changes;
第四获取子单元11012,用于根据第一网络设备IP获取第一网络设备的网络角色。The fourth obtaining subunit 11012 is configured to acquire a network role of the first network device according to the first network device IP.
其中,第四获取子单元11012还包括:The fourth obtaining subunit 11012 further includes:
第三确定模块110121,用于当确定第一网络设备IP的类型为广域网类型时,确定第一网络设备的网络角色为网关设备;The third determining module 110121 is configured to: when determining that the type of the first network device IP is a wide area network type, determine that the network role of the first network device is a gateway device;
第四确定模块110122,用于当确定第一网络设备IP的类型为局域网类型时,确定第一网络设备的网络角色为级联设备。
The fourth determining module 110122 is configured to determine that the network role of the first network device is a cascading device when determining that the type of the first network device IP is a local area network type.
发送单元1102,用于若第一网络设备的网络角色为网关设备时,向第三网络设备发送第一切换指令,第一切换指令指示第三网络设备的工作模式配置为桥接模式,第三网络设备为家庭网络中除第一网络设备的其他网络设备;The sending unit 1102 is configured to: when the network role of the first network device is a gateway device, send a first switching instruction to the third network device, where the first switching instruction indicates that the working mode of the third network device is configured as a bridge mode, and the third network The device is another network device in the home network except the first network device;
接收模块1103,用于若第一网络设备的网络角色为级联设备时,接收第五网络设备中的网关设备发送的第二切换指令,并根据第二切换指令将工作模式配置为桥接模式,第二切换指令指示第一网络设备的工作模式配置为桥接模式。The receiving module 1103 is configured to: when the network role of the first network device is a cascading device, receive a second switching instruction sent by the gateway device in the fifth network device, and configure the working mode to be in a bridge mode according to the second switching instruction, The second switching instruction indicates that the working mode of the first network device is configured as a bridge mode.
本申请实施例中,确定单元1101确定第一网络设备的网络角色,如果第一网络设备的网络角色为网关设备,则发送单元1102向第三网络设备发送第一切换指令,指示第三网络设备将工作模式配置为路由模式;如果第一网络设备的网络角色为级联设备,则接收模块1103接收第五网络设备中的网关设备发送的第二切换指令,并根据第二切换指令将工作模式配置为桥接模式。本申请实施例能够使得网络设备根据自身的网络角色,自动配置网络设备的工作模式,降低了网络设备的维护成本。In the embodiment of the present application, the determining unit 1101 determines a network role of the first network device. If the network role of the first network device is a gateway device, the sending unit 1102 sends a first switching instruction to the third network device, indicating the third network device. The working mode is configured as a routing mode; if the network role of the first network device is a cascading device, the receiving module 1103 receives a second switching instruction sent by the gateway device in the fifth network device, and operates the mode according to the second switching instruction. Configured in bridge mode. The embodiment of the present application enables the network device to automatically configure the working mode of the network device according to its own network role, thereby reducing the maintenance cost of the network device.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of cells is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or integrated. Go to 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 in an electrical, mechanical or other form.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separate, 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 achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。An integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, can be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或
者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。
The above embodiments are only used to explain the technical solutions of the present application, and are not limited thereto; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that the foregoing embodiments can still be implemented. Modifications to the technical solutions described in the examples, or equivalent replacement of some of the technical features; and these modifications or
The alternatives do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (17)
- 一种网络设备工作模式自动切换的方法,其特征在于,包括:A method for automatically switching a working mode of a network device, comprising:第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色;Determining, by the first network device, a network role of the first network device when the state of the at least one network device in the home network changes;若所述第一网络设备的网络角色为网关设备,则所述第一网络设备将工作模式配置为路由模式;If the network role of the first network device is a gateway device, the first network device configures an operating mode as a routing mode;若所述第一网络设备的网络角色为级联设备,则所述第一网络设备将所述工作模式配置为桥接模式。If the network role of the first network device is a cascading device, the first network device configures the working mode as a bridging mode.
- 根据权利要求1所述的方法,其特征在于,所述第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色包括:(细化:第一网络设备角色的判断:根据第二网络设备判断,当状态发送变化的设备为第一网络设备时)The method according to claim 1, wherein the determining, by the first network device, that the state of the at least one network device in the home network changes, determining that the network role of the first network device comprises: (refinement: Judging by the role of the first network device: according to the second network device, when the device whose status is changed is the first network device)当所述第一网络设备判断所述第一网络设备的状态发生变化时,所述第一网络设备向第二网络设备发送第一请求消息,所述第二网络设备为所述家庭网络中除所述第一网络设备的其他网络设备;When the first network device determines that the state of the first network device changes, the first network device sends a first request message to the second network device, where the second network device is in the home network. Other network devices of the first network device;所述第一网络设备接收所述第二网络设备的第一反馈消息,所述第一反馈消息携带所述第二网络设备的网络之间互连的协议IP,所述第一反馈消息为所述第二网络设备根据所述第一请求消息发送;Receiving, by the first network device, a first feedback message of the second network device, where the first feedback message carries a protocol IP that is interconnected between networks of the second network device, where the first feedback message is Transmitting, by the second network device, according to the first request message;所述第一网络设备根据所述第一反馈消息获取所述第二网络设备的网络角色;Obtaining, by the first network device, a network role of the second network device according to the first feedback message;所述第一网络设备根据所述第二网络设备的网络角色确定所述第一网络设备的网络角色。The first network device determines a network role of the first network device according to a network role of the second network device.
- 根据权利要求2所述的方法,其特征在于,所述第一网络设备根据所述第二网络设备的网络角色确定所述第一网络设备的网络角色包括:(细化:根据第二网络设备的网络角色判断网关设备的个数,再根据第二网络设备中的网关个数决定工作模式)The method according to claim 2, wherein the determining, by the first network device, the network role of the first network device according to the network role of the second network device comprises: (refinement: according to the second network device The network role determines the number of gateway devices, and then determines the working mode according to the number of gateways in the second network device.当所述第一网络设备根据所述第二网络设备的网络角色获知所述第二网络设备中存在一个或一个以上的网关设备时,则确定所述第一网络设备的网络角色为级联设备;When the first network device learns that one or more gateway devices exist in the second network device according to the network role of the second network device, determining that the network role of the first network device is a cascading device ;当所述第一网络设备根据所述第二网络设备的网络角色获知所述第二网络设备中不存在网关设备,且所述第一网络设备获取到广域网WAN口IP时,则确定所述第一网络设备的网络角色为网关设备;When the first network device learns that the gateway device does not exist in the second network device according to the network role of the second network device, and the first network device acquires the WAN port IP of the wide area network, determine the first The network role of a network device is a gateway device;当所述第一网络设备根据所述第二网络设备的网络角色获知所述第二网络设备中不存在网关设备,且所述第一网络设备未获取到所述WAN口IP时,则所述第一网络设备保持当前的网络角色。When the first network device learns that the gateway device does not exist in the second network device according to the network role of the second network device, and the first network device does not obtain the WAN port IP, The first network device maintains the current network role.
- 根据权利要求3所述的方法,其特征在于,所述当所述第一网络设备根据所述第二网络设备的网络角色获知所述第二网络设备中不存在网关设备,且所述第一网络设备获取到广域网WAN口IP之后,所述方法还包括:(当第一网络设备被新确认为网关设备时,向第二网络设备发送请求消息)The method according to claim 3, wherein the first network device learns that the gateway device does not exist in the second network device according to the network role of the second network device, and the first After the network device acquires the WAN port IP of the WAN, the method further includes: (When the first network device is newly confirmed as the gateway device, sending a request message to the second network device)所述第一网络设备向所述第二网络设备发送第二请求消息,所述第二请求消息指示所 述第二网络设备将工作模式配置为桥接模式。The first network device sends a second request message to the second network device, where the second request message indicates The second network device configures the working mode to be in a bridge mode.
- 根据权利要求1所述的方法,其特征在于,所述第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色包括:(当状态发生变化的网络设备不是第一网络设备时)The method according to claim 1, wherein when the first network device determines that the state of the at least one network device in the home network changes, determining the network role of the first network device includes: (when the state occurs When the changed network device is not the first network device)所述第一网络设备接收第二反馈消息,所述第二反馈消息由第三网络设备根据第三请求消息发送,所述第二反馈信息携带所述第三网络设备的IP,所述第三请求消息由第四网络设备生成且在家庭网络中广播,所述第四网络设备为家庭网络中状态发送变化的网络设备,所述第三网络设备为家庭网络中除第一网络设备和第四网络设备之外的网络设备;The first network device receives a second feedback message, where the second feedback message is sent by the third network device according to the third request message, the second feedback information carries the IP of the third network device, and the third The request message is generated by the fourth network device and is broadcasted in the home network, where the fourth network device is a network device whose status is changed in the home network, and the third network device is the first network device and the fourth network in the home network. Network equipment outside the network equipment;所述第一网络设备根据所述第二反馈消息获取所述第三网络设备的网络角色;Obtaining, by the first network device, a network role of the third network device according to the second feedback message;所述第一网络设备根据所述第三网络设备的网络角色确定所述第一网络设备的网络角色。The first network device determines a network role of the first network device according to a network role of the third network device.
- 根据权利要求1所述的方法,其特征在于,所述第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色包括:(细化:通过IP判断网络角色)The method according to claim 1, wherein the determining, by the first network device, that the state of the at least one network device in the home network changes, determining that the network role of the first network device comprises: (refinement: Judging network roles by IP)当所述第一网络设备判断所述第一网络设备的状态发生变化时,所述第一网络设备获取所述第一网络设备IP;When the first network device determines that the state of the first network device changes, the first network device acquires the first network device IP;所述第一网络设备根据所述第一网络设备IP获取所述第一网络设备的网络角色。The first network device acquires a network role of the first network device according to the first network device IP.
- 根据权利要求6所述的方法,其特征在于,所述第一网络设备根据所述第一网络设备IP获取所述第一网络设备的网络角色包括:(细化:如何根据IP判断网络角色)The method according to claim 6, wherein the acquiring, by the first network device, the network role of the first network device according to the first network device IP comprises: (refinement: how to determine a network role according to the IP)若所述第一网络设备确定所述第一网络设备IP的类型为广域网类型,则确定所述第一网络设备的网络角色为网关设备;If the first network device determines that the type of the first network device IP is a wide area network type, determining that the network role of the first network device is a gateway device;若所述第一网络设备确定所述第一网络设备IP的类型为局域网类型,则确定所述第一网络设备的网络角色为级联设备。If the first network device determines that the type of the first network device IP is a local area network type, determining that the network role of the first network device is a cascading device.
- 根据权利要求6所述的方法,其特征在于,所述第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色之后,所述方法还包括:(追加:网关设备和级联设备点对点协商通信,即,网关设备向级联设备发送切换指令,使得级联设备切换工作模式)The method according to claim 6, wherein when the first network device determines that the state of the at least one network device exists in the home network, the network role of the first network device is determined, the method further Including: (addition: the gateway device and the cascading device point-to-point negotiation communication, that is, the gateway device sends a switching instruction to the cascading device, so that the cascading device switches the working mode)若所述第一网络设备的网络角色为网关设备,则所述第一网络设备向第五网络设备发送第一切换指令,所述第一切换指令指示将所述第五网络设备的工作模式配置为桥接模式,所述第五网络设备为所述家庭网络中除所述第一网络设备的其他网络设备;If the network role of the first network device is a gateway device, the first network device sends a first switching instruction to the fifth network device, where the first switching instruction indicates that the working mode of the fifth network device is configured. In the bridge mode, the fifth network device is another network device in the home network except the first network device;或,or,若所述第一网络设备的网络角色为级联设备,则所述第一网络设备接收所述第五网络设备中的网关设备发送的第二切换指令,并根据所述第二切换指令将工作模式配置为桥接模式,所述第二切换指令指示所述第一网络设备的工作模式配置为桥接模式。If the network role of the first network device is a cascading device, the first network device receives a second switching instruction sent by the gateway device in the fifth network device, and works according to the second switching instruction. The mode is configured as a bridge mode, and the second switching instruction indicates that an operating mode of the first network device is configured as a bridge mode.
- 一种网络设备,其特征在于,包括:A network device, comprising:确定单元,用于当第一网络设备判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色; a determining unit, configured to determine a network role of the first network device when the first network device determines that a state of the at least one network device exists in the home network changes;第一配置单元,用于当所述确定单元确定所述第一网络设备的网络角色为网关设备,则将工作模式配置为路由模式;a first configuration unit, configured to: when the determining unit determines that the network role of the first network device is a gateway device, configure an operating mode as a routing mode;第二配置单元,用于当所述确定单元确定所述第一网络设备的网络角色为级联设备,则将所述工作模式配置为桥接模式。And a second configuration unit, configured to configure the working mode to be a bridge mode when the determining unit determines that the network role of the first network device is a cascading device.
- 根据权利要求9所述的网络设备,其特征在于,所述确定单元包括:The network device according to claim 9, wherein the determining unit comprises:发送子单元,用于当所述第一网络设备判断所述第一网络设备的状态发生变化时,向第二网络设备发送第一请求消息,所述第二网络设备为所述家庭网络中除所述第一网络设备的其他网络设备;a sending subunit, configured to: when the first network device determines that the state of the first network device changes, send a first request message to the second network device, where the second network device is in the home network Other network devices of the first network device;第一接收子单元,用于接收所述第二网络设备的第一反馈消息,所述第一反馈消息携带所述第二网络设备的网络之间互连的协议IP,所述第一反馈消息为所述第二网络设备根据所述第一请求消息发送;a first receiving subunit, configured to receive a first feedback message of the second network device, where the first feedback message carries a protocol IP interconnected between networks of the second network device, the first feedback message Sending, by the second network device, according to the first request message;第一获取子单元,用于根据所述接收子单元接收到的所述第一反馈消息获取所述第二网络设备的网络角色;a first acquiring subunit, configured to acquire a network role of the second network device according to the first feedback message received by the receiving subunit;第一确定子单元,用于根据所述获取子单元获取到的所述第二网络设备的网络角色确定所述第一网络设备的网络角色。a first determining subunit, configured to determine a network role of the first network device according to the network role of the second network device acquired by the obtaining subunit.
- 根据权利要求10所述的网络设备,其特征在于,所述第一确定子单元包括:The network device according to claim 10, wherein the first determining subunit comprises:第一确定模块,用于当根据所述第二网络设备的网络角色获知所述第二网络设备中存在一个或一个以上的网关设备时,确定所述第一网络设备的网络角色为级联设备;a first determining module, configured to determine, according to the network role of the second network device, that one or more gateway devices are present in the second network device, determining that the network role of the first network device is a cascading device ;第二确定模块,用于当根据所述第二网络设备的网络角色获知所述第二网络设备中不存在网关设备,且所述第一网络设备获取到广域网WAN口IP时,确定所述第一网络设备的网络角色为网关设备;a second determining module, configured to determine, according to the network role of the second network device, that the gateway device does not exist in the second network device, and the first network device acquires the WAN port IP of the WAN The network role of a network device is a gateway device;保持模块,用于当根据所述第二网络设备的网络角色获知所述第二网络设备中不存在网关设备,且所述第一网络设备未获取到所述WAN口IP时,则所述第一网络设备保持当前的网络角色。a holding module, configured to: when it is learned that the gateway device is not in the second network device according to the network role of the second network device, and the first network device does not obtain the WAN port IP, A network device maintains the current network role.
- 根据权利要求11所述的网络设备,其特征在于,所述第一网络设备还包括:The network device according to claim 11, wherein the first network device further comprises:发送模块,用于向所述第二网络设备发送第二请求消息,所述第二请求消息指示所述第二网络设备将工作模式配置为桥接模式。And a sending module, configured to send a second request message to the second network device, where the second request message instructs the second network device to configure an operating mode to a bridging mode.
- 根据权利要求9所述的网络设备,其特征在于,所述确定单元包括:The network device according to claim 9, wherein the determining unit comprises:第二接收子单元,用于接收第二反馈消息,所述第二反馈消息由第三网络设备根据第三请求消息发送,所述第二反馈信息携带所述第三网络设备的IP,所述第三请求消息由第四网络设备生成且在家庭网络中广播,所述第四网络设备为家庭网络中状态发送变化的网络设备,所述第三网络设备为家庭网络中除第一网络设备和第四网络设备之外的网络设备;a second receiving subunit, configured to receive a second feedback message, where the second feedback message is sent by the third network device according to the third request message, where the second feedback information carries an IP of the third network device, The third request message is generated by the fourth network device and is broadcast in the home network, where the fourth network device is a network device whose status is changed in the home network, and the third network device is the first network device except the first network device and a network device other than the fourth network device;第二获取子单元,用于根据所述第二反馈消息获取所述第三网络设备的网络角色;a second acquiring subunit, configured to acquire a network role of the third network device according to the second feedback message;第二确定子单元,用于根据所述第三网络设备的网络角色确定所述第一网络设备的网络角色。a second determining subunit, configured to determine a network role of the first network device according to a network role of the third network device.
- 根据权利要求9所述的网络设备,其特征在于,所述确定单元包括:The network device according to claim 9, wherein the determining unit comprises:第三获取子单元,用于当所述第一网络设备判断所述第一网络设备的状态发生变化时, 获取所述第一网络设备IP;a third acquiring subunit, configured to: when the first network device determines that the state of the first network device changes, Obtaining the first network device IP;第四获取子单元,用于根据所述第一网络设备IP获取所述第一网络设备的网络角色。And a fourth acquiring subunit, configured to acquire a network role of the first network device according to the first network device IP.
- 根据权利要求14所述的网络设备,其特征在于,所述第四获取子单元包括:The network device according to claim 14, wherein the fourth obtaining subunit comprises:第三确定模块,用于当确定所述第一网络设备IP的类型为广域网类型时,确定所述第一网络设备的网络角色为网关设备;a third determining module, configured to determine, when the type of the first network device IP is a wide area network type, a network role of the first network device as a gateway device;第四确定模块,用于当确定所述第一网络设备IP的类型为局域网类型时,确定所述第一网络设备的网络角色为级联设备。The fourth determining module is configured to determine that the network role of the first network device is a cascading device when determining that the type of the first network device IP is a local area network type.
- 根据权利要求14所述的网络设备,其特征在于,当家庭网络中只有一个网关设备时,所述网络设备还包括:(The network device according to claim 14, wherein when there is only one gateway device in the home network, the network device further includes:发送单元,用于若所述第一网络设备的网络角色为网关设备时,向第三网络设备发送第一切换指令,所述第一切换指令指示所述第三网络设备的工作模式配置为桥接模式,所述第三网络设备为所述家庭网络中除所述第一网络设备的其他网络设备;a sending unit, configured to: when the network role of the first network device is a gateway device, send a first switching instruction to the third network device, where the first switching instruction indicates that the working mode of the third network device is configured as a bridge a mode, the third network device is another network device in the home network except the first network device;或,or,接收模块,用于若所述第一网络设备的网络角色为级联设备时,接收所述第五网络设备中的网关设备发送的第二切换指令,并根据所述第二切换指令将工作模式配置为桥接模式,所述第二切换指令指示所述第一网络设备的工作模式配置为桥接模式。a receiving module, configured to: when the network role of the first network device is a cascading device, receive a second switching instruction sent by the gateway device in the fifth network device, and operate the mode according to the second switching instruction The configuration is a bridge mode, and the second switching instruction indicates that the working mode of the first network device is configured as a bridge mode.
- 一种网络设备,其特征在于,包括:A network device, comprising:输入装置、输出装置、处理器和存储器;Input device, output device, processor and memory;通过调用所述存储器存储的操作指令,所述处理器,用于执行如下步骤:The processor is configured to perform the following steps by calling an operation instruction stored by the memory:判断家庭网络中存在至少一个网络设备的状态发生变化时,确定所述第一网络设备的网络角色;Determining, when the status of the at least one network device in the home network changes, determining a network role of the first network device;若所述第一网络设备的网络角色为网关设备,则将工作模式配置为路由模式;If the network role of the first network device is a gateway device, configuring the working mode to be a routing mode;若所述第一网络设备的网络角色为级联设备,则将所述工作模式配置为桥接模式。 And if the network role of the first network device is a cascading device, configuring the working mode to be a bridge mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2017/075756 WO2018161215A1 (en) | 2017-03-06 | 2017-03-06 | Network equipment working mode automatic switching method and network equipment thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2017/075756 WO2018161215A1 (en) | 2017-03-06 | 2017-03-06 | Network equipment working mode automatic switching method and network equipment thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018161215A1 true WO2018161215A1 (en) | 2018-09-13 |
Family
ID=63447175
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/075756 WO2018161215A1 (en) | 2017-03-06 | 2017-03-06 | Network equipment working mode automatic switching method and network equipment thereof |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2018161215A1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070253344A1 (en) * | 2006-04-28 | 2007-11-01 | Microsoft Corporation | Auto-configuring operation modes for network elements |
CN102571513A (en) * | 2010-11-26 | 2012-07-11 | 巴比禄股份有限公司 | Portable device and method for setting operation mode |
CN102811502A (en) * | 2011-05-31 | 2012-12-05 | 巴比禄股份有限公司 | Network connection device, method of setting an operation mode |
CN102811165A (en) * | 2011-05-31 | 2012-12-05 | 巴比禄股份有限公司 | Network system, gateway device and method of determining a forwarding path |
-
2017
- 2017-03-06 WO PCT/CN2017/075756 patent/WO2018161215A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070253344A1 (en) * | 2006-04-28 | 2007-11-01 | Microsoft Corporation | Auto-configuring operation modes for network elements |
CN102571513A (en) * | 2010-11-26 | 2012-07-11 | 巴比禄股份有限公司 | Portable device and method for setting operation mode |
CN102811502A (en) * | 2011-05-31 | 2012-12-05 | 巴比禄股份有限公司 | Network connection device, method of setting an operation mode |
CN102811165A (en) * | 2011-05-31 | 2012-12-05 | 巴比禄股份有限公司 | Network system, gateway device and method of determining a forwarding path |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Dely et al. | Openflow for wireless mesh networks | |
US8885504B2 (en) | Method, apparatus and system for bandwidth aggregation of mobile internet access node | |
US8442532B2 (en) | System and method of handling IP layer mobility in a wireless network | |
US20130242843A1 (en) | Wireless communication system, base station, and terminal | |
CN105992262B (en) | Self-adaptive mode switching method of wireless Mesh network | |
JP2003333080A (en) | Method for transitioning between link systems and mobile computing device | |
US9225551B2 (en) | Communications device | |
CN102801623B (en) | Multi-access data transmitting method and device | |
EP2749114A1 (en) | Multipath management architecture and protocols for mobile multimedia service with multiple description coding | |
JP4452283B2 (en) | Method and system for optimizing data transfer between network devices | |
KR20140017677A (en) | Multipath overlay network and its multipath management protocol | |
CN105657571A (en) | Bandwidth-saving method for video transmission in local area network | |
CN102638382A (en) | Method for realizing DLNA (Digital Living Network Alliance) and DLNA agent equipment | |
JP5367764B2 (en) | Virtual network system, configuration change method, tunnel connection apparatus, and program | |
WO2015074537A1 (en) | Method and apparatus for controlling communication protocol in smart tv device | |
JP5976956B2 (en) | Shared media bridging | |
WO2017119219A1 (en) | Communication method | |
CN114765578B (en) | Service quality control method and related equipment | |
WO2014061314A1 (en) | Content delivery method | |
Owada et al. | An Implementation of layer 2 overlay mesh network and edge computing platform for IoT | |
JP6531540B2 (en) | Network connection device, method of switching operation mode of network connection device | |
WO2018161215A1 (en) | Network equipment working mode automatic switching method and network equipment thereof | |
WO2019120188A1 (en) | Automatic communication mode switching method, terminal and smart device | |
WO2015085801A1 (en) | Fault processing method and apparatus for edge route bridge in trill network | |
TWI689183B (en) | Repeater for mesh networks |
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: 17899314 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: 17899314 Country of ref document: EP Kind code of ref document: A1 |