Network configuration method, router, storage medium and program product

Through the automatic detection and bridging technology of the router, the authentication request is transmitted using VLAN identifiers, the complexity of IPTV equipment networking is solved, the automatic configuration of the equipment and multi-service support is realized, user operations are simplified, and networking is improved. reliability.

CN115883349BActive Publication Date: 2025-01-03HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111129053.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-26
Publication Date
2025-01-03
Estimated Expiration
2041-09-26

AI Technical Summary

Technical Problem

During the networking process, users need to spend a lot of time and cost to master the network configuration methods of different types of devices, especially the configuration of IPTV devices is complex and prone to connection errors, resulting in the failure of Internet access or IPTV functions to operate normally.

Method used

When the router detects the device connection, it automatically detects the device and supports the automatic configuration of the device through the bridge. It uses VLAN identification to transmit authentication requests to realize automatic detection and configuration of different types of devices, supports communication between multi-level routers, and automatically identify. And configure the IP address.

Benefits of technology

It enables users to automatically detect and connect IPTV devices without additional configuration, supports the transmission of different types of services, simplifies the networking process, improves the flexibility and reliability of device connections, and reduces the complexity of user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883349B_ABST
    Figure CN115883349B_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure provides a method, a router, a storage medium and a program product for network configuration. In the method, when the router detects that the first device is connected to the downstream port of the router, a first bridge is established, and the first bridge is used to connect the network port and the upstream port of the router. Further, the router sends the authentication request of the first device received from the network port to the authentication device through the first bridge and via the upstream port. When receiving a confirmation message for the authentication request from the authentication device, the router sends the confirmation message to the first device through the first bridge, wherein the confirmation message includes the IP address assigned by the authentication device to the first device. In this way, the embodiment of the present disclosure enables the router to automatically detect that a device (e.g., a digital video conversion box STB) is connected to the downstream port, and supports automatic configuration for the device by establishing a first bridge for connecting the network port and the upstream port.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of network communications, and more particularly to a method of network configuration, a router, a computer storage medium, and a computer program product. Background Art

[0002] With the development of network communication technology, the networking environment in people's daily life has become more and more complicated. In the networking process, different types of equipment may have different configuration requirements. For example, the set-top box (STB) used to provide IPTV (Internet Protocol Television) needs to be connected in a predetermined manner to complete the networking configuration. For example, the set-top box needs to be connected to a specific interface of the router, and in addition, the IPTV interface of the gateway device needs to be connected to the specific interface of the router through a connecting line. In addition, the user may also need to perform additional configuration on the router. As a result, the user needs to spend more time cost to master the networking configuration method of devices such as STB. Summary of the invention

[0003] The embodiments of the present disclosure relate to a technical solution for network configuration, and specifically provide a network configuration method, a router, a storage medium, and a program product.

[0004] In a first aspect of the present disclosure, a method for network configuration is provided. In the method, when a router detects that a first device is connected to a downlink port of the router, a first bridge is established, and the first bridge is used to connect the network port and the uplink port of the router. Further, the router sends the authentication request of the first device received from the network port to the authentication device through the first bridge and via the uplink port. When receiving a confirmation message for the authentication request from the authentication device, the router sends the confirmation message to the first device through the first bridge, wherein the confirmation message includes the IP address assigned by the authentication device to the first device.

[0005] In some embodiments, the router executing the network configuration method can be directly connected to the authentication device (e.g., a gateway device or an optical modem), which can also be referred to as a "main router." Accordingly, a first bridge in the "main router" can be established to connect the network port and the uplink port connected to the authentication device.

[0006] In some embodiments, the router executing the network configuration method may not be directly connected to the authentication device, for example, it may establish a communication connection with the authentication device via one or more routers. In this case, the router may be referred to as a "slave router" or a "lower-level router". Accordingly, a first bridge in the "slave router" may be established to connect the network port and the uplink port connected to the upper-level router.

[0007] In this way, the embodiment of the present disclosure enables the router to automatically detect that a device (eg, a digital video converter box STB) is connected to a downstream port, and supports automatic configuration of the device by establishing a first bridge for connecting the network port to the upstream port.

[0008] In some embodiments, the router is used as a slave router, the uplink port is a virtual uplink port corresponding to a physical uplink port of the router, and the virtual uplink port is associated with a first virtual local area network VLAN identifier.

[0009] In this way, the embodiments of the present disclosure can utilize VLAN identification to support the transmission of different types of network data (e.g., Internet access data and IPTV data) on the same uplink port, thereby enabling the router to provide different types of services (e.g., Internet access service and IPTV service) simultaneously.

[0010] In some embodiments, sending an authentication request of a first device received from a network port to an authentication device through a first bridge and via an upstream port includes: constructing a request message based on the authentication request and a first VLAN identifier; and sending the request message to an upper-level router connected to the router through the first bridge and via a virtual upstream port, so as to send the authentication request to the authentication device via the upper-level router.

[0011] In this way, the embodiment of the present disclosure can add a VLAN tag to the authentication request received from the network port so as to transmit it through the corresponding bridge, thereby transmitting the authentication request to the corresponding uplink port.

[0012] In some embodiments, sending a request message to an upper-level router connected to the router through a first bridge and via a virtual uplink port includes: sending a request message to a first downlink port of the upper-level router used to connect to the router, the request message triggering the upper-level router: determining a first VLAN identifier and an authentication request from the request message; and sending an authentication request to an authentication device based on the first VLAN identifier and via the uplink port of the upper-level router.

[0013] In this way, the embodiments of the present disclosure enable the slave router to transmit the authentication request to the corresponding authentication device based on the identification of the VLAN identifiers between the multi-stage routers, thereby achieving automatic detection of unknown devices.

[0014] In some embodiments, the first downstream port is a first virtual downstream port having a first VLAN identifier, wherein the upper-level router sends an authentication request to the authentication device based on the first VLAN identifier and via the upper-level router's upstream port, including: the upper-level router sends the authentication request to the authentication device via a second bridge, and the second bridge is used to connect the first virtual downstream port of the upper-level router with the upper-level router's upstream port.

[0015] In this way, the embodiment of the present disclosure can further establish a second bridge in the upper-level routing, thereby transmitting the authentication request with a specific VLAN identifier to the authentication device to complete the automatic detection of unknown devices.

[0016] In some embodiments, the network port is a first network port, and the method further includes: receiving an Internet message via a physical uplink port; and in response to the Internet message not indicating a first VLAN identifier, sending the Internet message to a second device (e.g., a mobile terminal, a computer, or other Internet access device) connected to a second network port of the router through a third bridge of a router (used as a slave router), the third bridge being used to connect the physical uplink port and the second network port. In some embodiments, the third bridge is an initial bridge of the router, and the method further includes: stripping the first network port from the initial bridge.

[0017] In this way, by utilizing VLAN ID-based message isolation, the embodiments of the present disclosure enable the router to support Internet access services and IPTV services simultaneously.

[0018] In some embodiments, the router is directly connected to the authentication device, the uplink port includes at least one candidate uplink port, and the method further includes: determining a target uplink port for receiving a confirmation message from the authentication device from the at least one candidate uplink port; and determining the target uplink port as a port for direct connection with the authentication device.

[0019] In this way, the embodiments of the present disclosure can also automatically detect the port directly connected to the authentication device, so that the user can connect the router and the authentication device at will.

[0020] In some embodiments, the router includes a physical downstream port, and the first bridge is further used to connect to a second virtual downstream port corresponding to the physical downstream port, and the second virtual downstream port is associated with a second VLAN identifier.

[0021] In this way, the embodiment of the present disclosure can achieve: a router as a slave router can enable its next-level router to support IPTV services.

[0022] In some embodiments, the authentication request includes a Dynamic Host Configuration Protocol DHCP message, and the confirmation message includes a DHCP confirmation message; or the authentication request includes a Point-to-Point Protocol PPP message, and the confirmation message includes a PPPoE activation discovery session confirmation packet message.

[0023] In some embodiments of the first aspect, the first device is a set-top box STB, and the authentication device is an optical modem or a gateway device.

[0024] In a second aspect of the present disclosure, a router is provided. The router includes a processor and a memory storing instructions. When the instructions are executed by the processor, the router executes any method according to the first aspect and its implementation.

[0025] In a third aspect of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions, and when the instructions are executed by an electronic device, the electronic device executes any method of the first aspect and its implementation manner.

[0026] In a fourth aspect of the present disclosure, a computer program product is provided, wherein the computer program product includes instructions, and when the instructions are executed by an electronic device, the electronic device executes any method of the first aspect and its implementation manner.

[0027] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The above and other objects, features and advantages of the embodiments of the present disclosure will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner.

[0029] Figure 1 A schematic diagram of traditional IPTV networking is shown.

[0030] Figure 2A and Figure 2B A schematic diagram of an IPTV networking environment according to an embodiment of the present disclosure is shown.

[0031] FIG. 3A to FIG. 3C An example process of network configuration according to an embodiment of the present disclosure is shown.

[0032] Figure 4 A flowchart of an example process of a network configuration method according to some embodiments of the present disclosure is shown.

[0033] Figure 5A block diagram illustrating a computing device capable of implementing various embodiments of the present disclosure is shown.

[0034] The same or similar reference numerals are used throughout the drawings to designate the same or similar components. DETAILED DESCRIPTION

[0035] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments shown in the accompanying drawings. It should be understood that the description of these specific embodiments is only to enable those skilled in the art to better understand and implement the present disclosure, and does not limit the scope of the present disclosure in any way. In the following description and claims, unless otherwise defined, all technical and scientific terms used herein have the meanings commonly understood by those of ordinary skill in the art.

[0036] As used herein, the term "including" and similar terms should be understood as open inclusion, i.e., "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. can refer to different or identical objects, and are only used to distinguish the objects referred to, without implying a specific spatial order, temporal order, order of importance, etc. of the objects referred to. In some embodiments, values, processes, selected items, determined items, equipment, devices, means, components, assemblies, etc. are referred to as "best", "lowest", "highest", "minimum", "maximum", etc. It should be understood that such descriptions are intended to indicate that a selection can be made among many available functional options, and such selections do not need to be better, lower, higher, smaller, larger or otherwise preferred than other options in other aspects or all aspects. As used herein, the term "determine" can cover a variety of actions. For example, "determine" can include calculation, calculation, processing, export, investigation, search (e.g., search in a table, database or another data structure), ascertainment, etc. Additionally, "determining" may include receiving (eg, receiving information), accessing (eg, accessing data in a memory), etc. Furthermore, "determining" may include resolving, selecting, choosing, establishing, etc.

[0037] IPTV Networking

[0038] With the development of network technology, IPTV has become an important way for people to obtain information content. Different from traditional digital TV and analog TV, IPTV provides a more flexible way to obtain content, for example, it can support users to watch specific programs on demand.

[0039] In order to obtain IPTV services normally, users usually need to complete IPTV networking. Figure 1A schematic diagram of a traditional IPTV networking is shown 100. Generally speaking, an IPTV networking environment includes a home gateway 110 (in some scenarios, it may also be an optical modem, also known as an optical modem), a router 120 and a set-top box STB 130 (also known as a digital video conversion box).

[0040] like Figure 1 As shown, during the networking process, the user needs to use a connection cable to correctly connect the corresponding ports of the router 120 and the home gateway 110. For example, the IPTV port of the home gateway 110 needs to be connected to the IPTV port of the router 120, and the local area network (LAN) port of the home gateway 110 needs to be connected to the wide area network (WAN) port of the router 120. In addition, the STB 130, for example, also needs to be connected to a LAN port of the router 120. In addition, the user also needs to log in to the configuration interface of the router 120 to specify a specific port currently connected to the STB 130 as an IPTV-enabled port.

[0041] On the one hand, such an IPTV networking configuration process is complicated. Once a connection error occurs, it may cause the Internet access function of the router or the IPTV function of the set-top box to fail to operate normally.

[0042] On the other hand, as the home networking structure becomes more and more complex, the configuration of master and slave routers has gradually been applied to people's daily lives. For example, due to the location limitations of the home gateway, people may need to deploy the master router directly connected to the home gateway near the home gateway. However, the traditional slave router can only provide a single network port mode, that is, it can only provide IPTV services or Internet services, which brings great inconvenience to people's lives.

[0043] In view of this, according to various embodiments of the present disclosure, a scheme for network configuration is provided. In an embodiment of the present disclosure, when a router detects that a first device (e.g., STB) is connected to a downstream port of the router, a bridge is established between the downstream port and the upstream port of the router. Further, the router causes the authentication request of the first device received from the downstream port to be sent to the authentication device (e.g., home gateway) via the upstream port based on the bridge. When a confirmation message for the authentication request from the authentication device is received, the router sends the confirmation message to the first device, wherein the confirmation message includes the IP address assigned by the authentication device to the first device. In this way, an embodiment of the present disclosure enables the router to automatically detect that a device (e.g., a digital video conversion box STB) is connected to a downstream port, and supports automatic configuration for the device by establishing a first bridge for connecting the network port and the upstream port.

[0044] The specific solutions of the present disclosure will be described below in conjunction with the accompanying drawings.

[0045] IPTV Network Configuration

[0046] In view of the fact that the network configuration scheme of the present disclosure can automatically detect unknown devices (e.g., STB), the embodiments of the present disclosure may not limit the connection mode between the home gateway, the router, and the STB, thereby supporting users to connect these devices arbitrarily. In the case where the network device connection mode is unknown, the embodiments of the present disclosure can automatically implement network configuration according to the network configuration method of the present disclosure to support the normal operation of the router and the STB.

[0047] Figure 2A FIG. 2 is a schematic diagram showing an exemplary IPTV networking environment 200A according to an embodiment of the present disclosure. Figure 2A As shown, similar to traditional IPTV networking, the networking environment 200A may include a home gateway 210, which may be connected to a router 220-1 via a connection line.

[0048] Unlike traditional IPTV networking, in the networking environment 200A, the mobile device 250-1 and the STB 230-1 can be arbitrarily connected to any LAN port of the router 220-1. In addition, the user does not need to perform additional configuration on the router 220-1. For example, the mobile device 250-1 can be connected to the router 220-1 via a wireless network to obtain Internet access. The STB 230-1 can be connected to the router 220-1 via a connection line, for example, to provide IPTV content through the TV 240-1.

[0049] In some embodiments, Figure 2A As shown, the networking environment 200A may also include one or more slave routers. For example, the router 220-2 may be connected to the router 220-1 via a wired connection or a wireless connection. Different from the traditional slave routers, the router 220-2 may also be connected to the STB 230-2 and the computer 250-2 at the same time, so as to provide Internet access services to the computer 250-2 and IPTV services to the TV 240-2 at the same time.

[0050] In some embodiments, Figure 2A As shown, the router 220 - 3 may also be connected to the router 220 - 2 , and similar to the router 220 - 2 , the router 220 - 3 may also be connected to the STB 230 - 3 to provide IPTV content, for example, through the TV 240 - 3 .

[0051] Figure 2BA schematic diagram 200B of port connections of an exemplary IPTV networking environment 200A according to an embodiment of the present disclosure is further shown. Figure 2B As shown, the home gateway 210 can be connected to the router 220-1 via two network cables. For example, the IPTV port of the home gateway 210 can be connected to any LAN port of the router 220-1 via a connecting cable, and the LAN port of the home gateway 210 can be connected to the WAN port of the router 220-1 via a connecting cable.

[0052] Exemplarily, the smartphone 250 - 1 may be connected to the router 220 - 1 wirelessly, and the set-top box 230 - 1 may be connected to the LAN 3 port of the router 220 - 1 via a connection line, for example.

[0053] Illustratively, router 220-2 may be connected to the LAN 2 port of router 220-1 via a connection line, computer 250-2 may be connected to the LAN 1 port of router 220-2 via a connection line, and set-top box 230-2 may be connected to the LAN 3 port of router 220-2 via a connection line.

[0054] For example, the router 220 - 3 may be connected to the wireless network port of the router 220 - 2 via a wireless network, and it is connected to the set-top box 230 - 3 via a LAN 2 port.

[0055] It should be understood that Figure 2A The example networking environment 200A and Figure 2B The specific port connection method shown in the figure is only exemplary, and the type and number of entities (eg, routers, STBs, etc.) in the networking environment 200A, and the specific connection method of each entity are not intended to constitute limitations on the present disclosure.

[0056] The following will be combined FIG. 3A to FIG. 3C This article introduces the automatic network configuration under the networking environment 200A.

[0057] Example 1

[0058] First, refer to Figure 2B and Figure 3A The automatic configuration process of STB 230-1 connected to router 220-1 is described below. Figure 3A As shown, at 302, in response to detecting that an unknown device (e.g., STB 230-1) is connected to LAN 3 port, router 220-1 establishes a new bridge (also referred to as a bridge) to connect LAN 3 port with LAN 4 port. It should be understood that although the unknown device is connected to LAN 3 port, the router 220-1 can establish a new bridge to connect LAN 3 port with LAN 4 port. Figure 3AThe device is shown as STB 230-1, but the router 220-1 cannot confirm the device type of STB 230-1 at this time, so it is also called an unknown device.

[0059] In some embodiments, when multiple unknown devices are connected to multiple ports of router 220-1, router 220-1 may establish a new bridge, and the new bridge is used to connect multiple ports connected to these unknown devices. Exemplarily, a bridge (new bridge) identified as "iptvbr" may be created by command "brctl addbr iptvbr", and a LAN 3 port identified as "eth0.3" may be added to the new bridge by command "brctl addif iptvbr eth0.3".

[0060] In some embodiments, if it is determined that the LAN 4 port of the router 220-1 is connected to the IPTV port of the gateway device 210, the router 220-1 can also add the LAN 4 port to the new bridge. For example, the router 220-1 can add the LAN 4 port identified as "eth0.4" to the new bridge through the command "brctl addif iptvbr eth0.4".

[0061] In some embodiments, if it is uncertain which port of the router 220 - 1 is connected to the IPTV port, the port actually connected to the IPTV port will also be regarded by the router 220 - 1 as a port connected to an unknown device, which will also be added to the new bridge.

[0062] In some embodiments, the router 220-1 may have a default bridge for connecting the WAN port and multiple network ports. When creating a new bridge, the router 220-1 may also remove multiple ports added to the new bridge from the default bridge. Exemplarily, the router 220-1 may remove the LAN 3 port identified as "eth0.3" from the default bridge (identified as "br0") by "brctl delif br0 eth0.3", so that the LAN 3 port identified as "eth0.3" is isolated from the port communication in the default bridge.

[0063] At 304, STB 230-1 sends an authentication request to the LAN 3 port of router 220-1. In some embodiments, the authentication request may include a Dynamic Host Configuration Protocol (DHCP) request or a Point-to-Point Protocol (PPP) message, depending on the specific protocol used.

[0064] At 306 , the router 220 - 1 uses a bridge (eg, a bridge identified as “iptvbr”) for connecting the LAN 3 port and the LAN 4 port, and sends the received authentication request to the gateway device 210 via the LAN 4 port.

[0065] If the device sending the authentication request is a STB, the gateway device 210 may generate a confirmation message for the authentication request, and the confirmation message includes the IP address assigned to the STB. At 308, the gateway device 210 sends a confirmation message for the authentication request to the router 220-1. In some embodiments, the confirmation message may include a DHCP ACK (confirmation) message or a PPPoE Active Discovery Session-confirmation (PADS) message.

[0066] Further, at 310, the router 220-1 may send the received confirmation message to the STB 230-1 via the LAN 3 port through the established new bridge (e.g., the bridge identified as "iptvbr"). And, at 312, the STB 230-1 may complete the network configuration based on the IP address included in the confirmation message, so as to be able to obtain IPTV services.

[0067] In some embodiments, if the router 220-1 does not know which LAN port is connected to the gateway device 210, the router 220-1 may determine the port (i.e., the LAN 4 port) that receives the confirmation message as the port that is wired to the IPTV port of the gateway device 210. In some embodiments, the router 220-1 may also determine that the unknown device currently connected to the LAN 3 port is an STB based on the port from which the confirmation message is transmitted.

[0068] Through the automatic detection mechanism of the router, the embodiment of the present disclosure can automatically identify the port connected to the gateway device 210 and the port connected to the set-top box STB. Thus, the embodiment of the present disclosure can support the user to connect the gateway device or STB in any LAN of the router.

[0069] In addition, some non-STB devices may not be identified from the router 220-1, which may also be detected based on the process discussed above, but the non-STB device will not be able to configure an IP address. In some embodiments, the router 220-1 may set an expiration time, and when the non-STB device cannot be configured by the new bridge created within the expiration time, the router 220-1 may strip the port connected to the non-STB device from the new bridge and add it back to the default bridge.

[0070] Example 2

[0071] The following will refer to Figure 2B and Figure 3B The automatic configuration process of the STB 230-2 connected to the router 220-2 (the router 220-2 is used as a slave router; correspondingly, the router 220-1 is used as a master router 220-1) is described. Figure 3B As shown, at 322, in response to detecting that an unknown device (eg, STB 230-2) is connected to the LAN 3 port, the router 220-2 may establish a new bridge for connecting the LAN 3 port and the uplink port.

[0072] In some embodiments, in order to enable the router 220-2 (used as a slave router) to support both IPTV services and Internet access services, the router 220-2 can construct a virtual uplink port corresponding to the WAN port used to connect to the router 220-1, which can be assigned a specific VLAN ID (virtual local area network identifier). For example, the router 220-2 can create a virtual uplink port "eth0.4.4093" with a VLAN ID of "4093" by using the command "vconfig add eth0.4 4093".

[0073] In some embodiments, when multiple unknown devices are connected to multiple ports of router 220-2, router 220-2 can establish a new bridge (for convenience of description, referred to as a first bridge) to connect multiple ports connected to these unknown devices. Exemplarily, router 220-2 can create a bridge identified as "iptvbr" through the command "brctl addbr iptvbr", and add the LAN 3 port identified as "eth0.3" to the first bridge through the command "brctl addif iptvbr eth0.3".

[0074] Further, the router 220-2 may add the created virtual uplink port to the first bridge. For example, the router 220-2 may add the virtual uplink port "eth0.4.4093" to the first bridge by using the command "brctl addif iptvbr eth0.4.4093".

[0075] In some embodiments, the router 220-2 may have a default bridge for connecting the WAN port and multiple network ports. When creating a new bridge, the router 220-2 may also remove multiple ports added to the new bridge from the default bridge. Exemplarily, the router 220-2 may remove the port identified as "eth0.3" from the default bridge (identified as "br0") by "brctl delif br0 eth0.3", so that the port identified as "eth0.3" is isolated from the port communication in the default bridge.

[0076] Thus, the LAN 3 port "eth0.3" of the router 220-2 and the created virtual uplink port "eth0.4.4093" will be connected through the first bridge identified as "iptvbr" and isolated from the default bridge communication.

[0077] At 324, STB 230-2 sends an authentication request to the LAN 3 port of router 220-2. In some embodiments, the authentication request may include a DHCP request or a PPP message, depending on the specific protocol used.

[0078] At 326, router 220-2 can determine that it points to the virtual upstream port by connecting the bridge between the LAN 3 port and the virtual upstream port, and accordingly construct a request message based on the VLAN ID and authentication request corresponding to the virtual upstream port. Specifically, router 220-2 can add the VLAN ID of the virtual upstream port (e.g., "4093") to the "vtag payload" portion of the request message.

[0079] At 328, the router 220-2 may send a request message to the LAN 2 port of the router 220-1 through the WAN port. In some embodiments, the router 220-1 may similarly construct a virtual downstream port corresponding to the LAN 2 port, which may be assigned the same VLAN ID. Exemplarily, the router 220-1 may create a first virtual downstream port "eth0.2.4093" corresponding to the LAN 2 port of the router 220-1 through the command "vconfig add eth0.2 4093", and its VLAN ID is also "4093".

[0080] At 330, based on the specific VLAN ID indicated in the request message from router 220-2, router 220-1 can parse the authentication request in the request message and determine that it should be directed to the first virtual downstream port with the VLAN ID. Exemplarily, based on the "vtag payload" portion in the request message indicating that the VLAN ID is 4093, router 220-1 can determine that the request message is directed to the first virtual downstream port "eth0.2.4093".

[0081] In some embodiments, as shown in reference Figure 3A In the process discussed, the router 220-1 can establish a second bridge to connect the first virtual downstream port with the LAN 4 port. It should be understood that the router 220-1 has determined that the LAN 4 port is a wired connection with the IPTV port, or the router 220-1 can be connected to an unknown device based on the LAN 4 port and also add it to the established second bridge. The configuration command for establishing the second bridge can refer to the configuration process of the first bridge, which will not be described in detail here.

[0082] At 332 , based on the second bridge for connecting the first virtual downstream port and the LAN 4 port, the router 220 - 1 may send an authentication request to the gateway device 210 through the LAN 4 port.

[0083] If the device sending the authentication request is a STB, the gateway device 210 may generate a confirmation message for the authentication request, the confirmation message including the IP address assigned to the STB. At 334, the gateway device 210 sends a confirmation message for the authentication request to the router 220-1. In some embodiments, the confirmation message may include a DHCP ACK message or a PADS message.

[0084] Further, the router 220-1 may determine that the confirmation message is directed to the first virtual downstream port based on the second bridge for connecting the LAN 4 port to the first virtual downstream port. At 336, the router 220-1 may append the VLAN ID of the first virtual downstream port to the confirmation message. For example, the router 220-1 may add the VLAN ID "4093" of the first virtual downstream port "eth0.2.4093" to the "vtag payload" portion of the confirmation message.

[0085] At 338, router 220-1 sends the confirmation message to the WAN port of router 220-2 through the LAN 2 port. At 340, router 220-2 can determine that the confirmation message is directed to the virtual uplink port corresponding to the VLAN ID indicated in the confirmation message. Exemplarily, since the "vtag payload" portion of the confirmation message indicates that the VLAN ID is "4093", router 220-2 can determine that the confirmation message is directed to the created virtual uplink port "eth0.4.4093".

[0086] At 342, the router 220-2 may send the received confirmation message to the STB 230-2 via the LAN 3 port through the first bridge for connecting the virtual uplink port and the LAN 3 port. Further, at 344, the STB 230-2 may complete the network configuration based on the IP address included in the confirmation message, thereby being able to obtain IPTV services.

[0087] In some embodiments, if the router 220-1 does not know which LAN port is connected to the gateway device 210, the router 220-1 may determine the port (i.e., the LAN 4 port) that receives the confirmation message as the port that is wired to the IPTV port of the gateway device 210. In some embodiments, the router 220-1 (or the router 220-2) may also determine that the unknown device currently connected to the LAN 3 port is the STB based on the port from which the confirmation message is transmitted.

[0088] By the automatic detection mechanism of the router, the embodiment of the present disclosure can support the free network configuration under the multi-stage router. By automatically identifying the port that the router (as the router of the main router) is connected to the gateway device 210 and the port that the router (as the router of the main router or as the router of the slave router) is connected to the set-top box STB, the embodiment of the present disclosure can support the user to connect the gateway device or STB in any LAN of any router (as the main router or as the slave router).

[0089] In addition, some non-STB devices may not be recognized by the router 220-1, which may also be detected based on the process discussed above, but the non-STB device will not be able to configure an IP address. In some embodiments, the router 220-1 can set an expiration time, and when the non-STB device cannot be configured by the created new bridge within the expiration time, the router 220-1 can strip the port connected to the non-STB device from the new bridge and add it back to the default bridge.

[0090] Furthermore, if Figure 2BAs shown, router 220-2 can also be used as the upper router of router 220-3. In some embodiments, in order to allow router 220-3 to support IPTV services and Internet services at the same time as router 220-2, and to support STB to be connected to any LAN port, similar to the configuration of router 220-1, router 220-2 can also build a virtual downstream port (for the convenience of description, referred to as the second virtual downstream port) corresponding to the downstream wireless network port connected to router 220-3, and add the second virtual downstream port to the created first bridge. In some embodiments, the second virtual downstream port can, for example, have the same or different VLAN ID as that corresponding to the virtual upstream port.

[0091] For example, the router 220-2 can establish a second virtual downstream port "wl0.2.4093" corresponding to the wireless network port "wl0.2" by using the command "vconfig add wl0.2 4093", whose VLAN ID is "4093". In addition, the router 220-2 can also add the second virtual downstream port "wl0.2.4093" to the first bridge identified as "iptvbr" by using the command "brctl addif iptvbr wl0.2.4093".

[0092] Therefore, based on the above approach, the embodiments of the present disclosure can provide good scalability of networking, thereby being able to support more complex networking environments.

[0093] Example 3

[0094] The following will refer to Figure 2B and Figure 3C The transmission process of Internet data is described below. Take the computer 250-2 connected to the LAN 1 port of the router 220-2 as an example. During the uplink transmission of Internet data of the computer 250-2, at 352, the computer 250-2 can send an Internet message to the LAN 1 port of the router 220-2. At 354, the router 220-2 can send the Internet message to the LAN 2 port of the router 220-1 via the WAN port through the default bridge (e.g., the bridge identified as "br0") for connecting the LAN 1 port and the WAN port.

[0095] In some embodiments, the router 220-2 may also construct another virtual uplink port corresponding to the WAN port, which may not be assigned a VLAN ID, or may have a VLAN ID different from the virtual uplink port corresponding to the WAN port for transmitting IPTV data. Further, the router 220-2 may add the virtual uplink port to the default bridge of the router.

[0096] At 356, router 220-1 may determine that the Internet message does not indicate a VLAN ID corresponding to IPTV transmission, and further determine that the Internet message should be directed to the WAN port. At 358, router 220-1 may send the Internet message to gateway device 210 via the WAN, thereby implementing uplink transmission of Internet access data.

[0097] For downlink transmission of Internet access data, at 360, router 220-1 may receive an Internet message from gateway device 210. At 362, router 220-1 may send the Internet message to the WAN port of router 220-2 via its own LAN 2 port.

[0098] In some embodiments, the router 220-1 may also construct another virtual downstream port corresponding to the LAN 2 port, which may not be assigned a VLAN ID, or may have a VLAN ID different from the virtual downstream port for transmitting IPTV data corresponding to the LAN 2 port. Further, the router 220-1 may add the virtual downstream port to the default bridge of the router.

[0099] At 364, router 220-2 may determine that the Internet message does not indicate a VLAN ID corresponding to IPTV transmission, and further determine that the Internet message should be directed to port LAN 1. At 366, router 220-2 may send the Internet message to computer 250-2 via port LAN 1, thereby implementing downstream transmission of Internet access data.

[0100] based on Figure 3C It can be seen from the process shown that, based on the automatic network configuration solution disclosed in the present invention, in a multi-level router networking structure, each router can provide IPTV services and Internet access services at the same time.

[0101] Example Procedure and Equipment

[0102] Figure 4 FIG. 4 is a flowchart of a method 400 for network configuration according to an embodiment of the present disclosure. The method 400 may be, for example, Figure 2A and Figure 2B The router 220 in is implemented.

[0103] In block 410, in response to the first device being connected to the network port of the router, a first bridge is established, the first bridge being used to connect the network port and the uplink port of the router. In block 420, an authentication request of the first device received from the network port is sent to the authentication device via the first bridge and the uplink port. In block 430, in response to receiving a confirmation message for the authentication request from the authentication device, a confirmation message is sent to the first device via the first bridge, the confirmation message including the IP address assigned by the authentication device to the first device.

[0104] In some embodiments, the router is used as a slave router, the uplink port is a virtual uplink port corresponding to a physical uplink port of the router, and the virtual uplink port is associated with a first virtual local area network VLAN identifier.

[0105] In some embodiments, sending an authentication request of a first device received from a network port to an authentication device through a first bridge and via an upstream port includes: constructing a request message based on the authentication request and a first VLAN identifier; and sending the request message to an upper-level router connected to the router through the first bridge and via a virtual upstream port, so as to send the authentication request to the authentication device via the upper-level router.

[0106] In some embodiments, sending a request message to an upper-level router connected to the router through a first bridge and via a virtual uplink port includes: sending a request message to a first downlink port of the upper-level router used to connect to the router, the request message triggering the upper-level router: determining a first VLAN identifier and an authentication request from the request message; and sending an authentication request to an authentication device based on the first VLAN identifier and via the uplink port of the upper-level router.

[0107] In some embodiments, the first downstream port is a first virtual downstream port having a first VLAN identifier, wherein the upper-level router sends an authentication request to the authentication device based on the first VLAN identifier and via the upper-level router's upstream port, including: the upper-level router sends the authentication request to the authentication device via a second bridge, and the second bridge is used to connect the first virtual downstream port of the upper-level router with the upper-level router's upstream port.

[0108] In some embodiments, the router is used as a slave router, the network port is a first network port, and the method further includes: receiving an Internet message via a physical uplink port; and in response to the Internet message not indicating a first VLAN identifier, sending the Internet message to a second device connected to a second network port of the router through a third bridge of the router, the third bridge being used to connect the physical uplink port and the second network port.

[0109] In some embodiments, the router is used as a slave router, the third bridge is an initial bridge of the router, and the method further includes: separating the first network port from the initial bridge.

[0110] In some embodiments, the router is directly connected to the authentication device, the uplink port includes at least one candidate uplink port, and the method further includes: determining a target uplink port for receiving a confirmation message from the authentication device from the at least one candidate uplink port; and determining the target uplink port as a port for direct connection with the authentication device.

[0111] In some embodiments, the router includes a physical downstream port, and the first bridge is further used to connect to a second virtual downstream port corresponding to the physical downstream port, and the second virtual downstream port is associated with a second VLAN identifier.

[0112] In some embodiments, the authentication request includes a Dynamic Host Configuration Protocol DHCP message, and the confirmation message includes a DHCP confirmation message; or the authentication request includes a Point-to-Point Protocol PPP message, and the confirmation message includes a PPPoE activation discovery session confirmation packet message.

[0113] In some embodiments, the first device is a set-top box STB, and the authentication device is an optical modem or a gateway device.

[0114] Figure 5 A schematic block diagram of an example device 500 that can be used to implement an embodiment of the present disclosure is shown. For example, a computing device 130 and / or a cloud device 140 according to an embodiment of the present disclosure can be implemented by the device 500. As shown, the device 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 502 or computer program instructions loaded from a storage unit 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0115] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0116] The various processes and processing described above, such as method 400, may be performed by processing unit 501. For example, in some embodiments, method 400 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on device 500 via ROM 502 and / or communication unit 505. When the computer program is loaded into RAM 503 and executed by CPU 501, one or more actions of method 400 described above may be performed.

[0117] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.

[0118] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0119] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and sends the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.

[0120] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0121] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0122] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0123] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0124] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0125] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A network configuration method, applied to a router, the method comprising: In response to a first device being connected to a network port of the router, establishing a first bridge, the first bridge being used to connect the network port and an uplink port of the router, wherein a port added to the first bridge is removed from a default bridge of the router; sending the authentication request of the first device received from the network port to the authentication device through the first bridge and via the uplink port; as well as In response to receiving a confirmation message for the authentication request from the authentication device, the confirmation message is sent to the first device through the first bridge, the confirmation message including the IP address allocated by the authentication device to the first device.

2. The method according to claim 1, wherein the router is used as a slave router, the uplink port is a virtual uplink port corresponding to a physical uplink port of the router, and the virtual uplink port is associated with a first virtual local area network VLAN identifier.

3. The method according to claim 2, wherein the step of sending the authentication request of the first device received from the network port to the authentication device through the first bridge and via the uplink port comprises: Constructing a request message based on the authentication request and the first VLAN identifier; as well as The request message is sent through the first bridge and via the virtual uplink port to an upper-level router connected to the router, so as to send the authentication request to the authentication device via the upper-level router.

4. The method according to claim 3, sending the request message to an upper-level router connected to the router through the first bridge and via the virtual uplink port comprises: Sending the request message to the first downlink port of the upper-level router used to connect to the router, wherein the request message triggers the upper-level router: Determine the first VLAN identifier and the authentication request from the request message; as well as The authentication request is sent to the authentication device via the uplink port of the upper-level router based on the first VLAN identifier.

5. The method according to claim 4, wherein the first downlink port is a first virtual downlink port having the first VLAN identifier, The upper-level router sending the authentication request to the authentication device based on the first VLAN identifier via the uplink port of the upper-level router includes: The upper-level router sends the authentication request to the authentication device through a second bridge, where the second bridge is used to connect the first virtual downlink port of the upper-level router with an uplink port of the upper-level router.

6. The method according to claim 2, wherein the network port is a first network port, and the method further comprises: Receiving Internet messages via the physical uplink port; as well as In response to the Internet message not indicating the first VLAN identifier, the Internet message is sent to a second device connected to a second network port of the router through a third bridge of the router, wherein the third bridge is used to connect the physical uplink port and the second network port.

7. The method according to claim 6, wherein the third bridge is an initial bridge of the router, and the method further comprises: The first network port is peeled off from the initial bridging.

8. The method according to claim 1, wherein the router is directly connected to the authentication device, the uplink port includes at least one candidate uplink port, and the method further comprises: Determine a target upstream port for receiving the confirmation message from the authentication device from the at least one candidate upstream port; as well as The target uplink port is determined as a port for direct connection with the authentication device.

9. The method according to any one of claims 1 to 8, wherein the router comprises a physical downstream port, the first bridge is further used to connect a second virtual downstream port corresponding to the physical downstream port, and the second virtual downstream port is associated with a second VLAN identifier.

10. The method according to any one of claims 1 to 9, wherein the authentication request comprises a Dynamic Host Configuration Protocol DHCP message, and the confirmation message comprises a DHCP confirmation message; or The authentication request includes a Point-to-Point Protocol (PPP) message, and the confirmation message includes a PPPoE activation discovery session confirmation packet message.

11. The method according to any one of claims 1 to 10, wherein the first device is a set-top box (STB), and the authentication device is an optical modem or a gateway device.

12. A router, comprising: A processor, and a memory storing instructions, wherein when the instructions are executed by the processor, the router performs the method according to any one of claims 1 to 11. 13 . A computer-readable storage medium storing instructions, which, when executed by an electronic device, cause the electronic device to execute the method according to claim 1 .

14. A computer program product, comprising instructions, which, when executed by an electronic device, cause the electronic device to perform the method according to any one of claims 1 to 11.