CN115883349A - Network configuration method, router, storage medium, and program product - Google Patents

Network configuration method, router, storage medium, and program product Download PDF

Info

Publication number
CN115883349A
CN115883349A CN202111129053.XA CN202111129053A CN115883349A CN 115883349 A CN115883349 A CN 115883349A CN 202111129053 A CN202111129053 A CN 202111129053A CN 115883349 A CN115883349 A CN 115883349A
Authority
CN
China
Prior art keywords
router
port
bridge
message
authentication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111129053.XA
Other languages
Chinese (zh)
Inventor
黄汉清
谢峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202111129053.XA priority Critical patent/CN115883349A/en
Publication of CN115883349A publication Critical patent/CN115883349A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Embodiments of the present disclosure provide a method of network configuration, a router, a storage medium, and a program product. In the method, when a router detects that a first device is connected to a downstream port of the router, a first bridge is established, and the first bridge is used for connecting a network port and an upstream port of the router. Further, the router sends an 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 comprises the IP address allocated to the first device by the authentication device. In this manner, embodiments of the present disclosure enable a router to automatically detect that a device (e.g., a digital video converter box STB) is connected to a downstream port and support automatic configuration of the device by establishing a first bridge for connecting between the network port and an upstream port.

Description

Network configuration method, router, storage medium, and program product
Technical Field
The present disclosure relates generally 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
With the development of network communication technology, networking environments in daily life of people become more and more complex. Different types of devices may have different configuration requirements during the networking process. For example, a Set Top Box (STB) for providing IPTV (Internet Protocol Television) needs to complete networking configuration according to a predetermined connection manner. For example, the set-top box needs to be accessed to a specific interface of the router, and furthermore, an IPTV interface of the gateway device needs to be connected to the specific interface of the router through a connection line. In addition, the user may need to perform additional configuration on the router. Thus, it takes a lot of time and cost for the user to know the networking configuration method of the device such as the STB.
Disclosure of Invention
Embodiments of the present disclosure relate to a technical solution of network configuration, and in particular provide a method of network configuration, a router, a storage medium, and a program product.
In a first aspect of the disclosure, a method of network configuration is provided. In the method, when a router detects that a first device is connected to a downstream port of the router, a first bridge is established, and the first bridge is used for connecting a network port and an upstream port of the router. Further, the router sends an 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 comprises an IP address allocated to the first device by the authentication device.
In some embodiments, the router performing the network configuration method may be directly connected with an authentication device (e.g., a gateway device or an optical modem), which may also be referred to as a "master router. Accordingly, a first bridge in the "master router" may be established to connect the network port and the upstream port connected with the authentication device.
In some embodiments, the router performing the network configuration method may not be directly connected with the authentication device, e.g. 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 a "slave router" may be established to connect the network port and an upstream port connected to an upper level router.
In this manner, embodiments of the present disclosure enable a router to automatically detect that a device (e.g., a digital video converter box STB) is connected to a downstream port and support automatic configuration of the device by establishing a first bridge for connecting between the network port and an upstream port.
In some embodiments, the router is used as a slave router, the upstream port being a virtual upstream port corresponding to a physical upstream port of the router, the virtual upstream port being associated with a first virtual local area network, VLAN, identity.
In this way, embodiments of the present disclosure can support transmission of different types of network data (e.g., internet data and IPTV data) at the same upstream port using VLAN identification, thereby enabling a router to provide different types of services (e.g., internet service and IPTV service) simultaneously.
In some embodiments, sending 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 comprises: constructing a request message based on the authentication request and the first VLAN identification; and transmitting the request message through the first bridge and via the virtual upstream port to an upper level router connected to the router to transmit the authentication request to the authentication device via the upper level router.
In this way, the embodiments of the present disclosure can add the VLAN identifier to the authentication request received from the network port to be transmitted through the corresponding bridge, thereby implementing transmission of the authentication request to the corresponding upstream port.
In some embodiments, sending the request message through the first bridge and via the virtual upstream port to an upper level router connected to the router comprises: sending a request message to a first downstream port of an upper router for connecting a router, the request message triggering the upper router to: determining a first VLAN identification and an authentication request from the request message; and sending an authentication request to the authentication device via the upstream port of the upper level router based on the first VLAN identification.
In this way, embodiments of the present disclosure can enable a slave router to transmit an authentication request to a corresponding authentication device based on identification of VLAN identification between multiple levels of routers, thereby enabling automatic detection of unknown devices.
In some embodiments, the first downstream port is a first virtual downstream port having a first VLAN identification, wherein the upper level router sending the authentication request to the authentication device via the upstream port of the upper level router based on the first VLAN identification comprises: and the upper-level router sends the authentication request to the authentication equipment through a second bridge, and the second bridge is used for connecting the first virtual downlink port of the upper-level router and the uplink port of the upper-level router.
In this way, embodiments of the present disclosure can further establish a second bridge in the upper level route, thereby enabling transmission of an authentication request with a specific VLAN identification to an authentication device to complete automatic detection of an unknown device.
In some embodiments, the network port is a first network port, and the method further comprises: receiving an Internet message via a physical uplink port; and in response to the Internet message not indicating the first VLAN identification, sending the Internet message to a second device (e.g., a mobile terminal, a computer, etc.) connected to a second network port of the router via a third bridge of the router (used as a slave router), the third bridge for connecting the physical upstream port and the second network port. In some embodiments, the third bridge is an initial bridge of the router, and the method further comprises: the first network port is stripped from the initial bridge.
In this way, by utilizing VLAN identification based message isolation, embodiments of the present disclosure enable routers to support both internet access services and IPTV services.
In some embodiments, the router is directly connected to the authentication device, the upstream port comprises at least one candidate upstream port, and the method further comprises: determining a target upstream port for receiving an acknowledgement message from the authentication device from the at least one candidate upstream port; and determining the target uplink port as a port for direct connection with the authentication device.
In this way, the embodiments of the present disclosure can also automatically detect a port directly connected to the authentication device, so that a user can freely connect the router and the authentication device.
In some embodiments, the router comprises a physical downstream port, and the first bridge is further configured to connect to a second virtual downstream port corresponding to the physical downstream port, the second virtual downstream port being associated with the second VLAN identification.
In this way, embodiments of the present disclosure can achieve: the router as the slave router enables the router at its next stage to support the IPTV service.
In some embodiments, the authentication request comprises a dynamic host configuration protocol, DHCP, message and the acknowledgement message comprises a DHCP acknowledgement message; or the authentication request comprises a point-to-point protocol PPP message, and the confirmation message comprises a PPPoE activation discovery session confirmation packet message.
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 gateway device.
In a second aspect of the disclosure, a router is provided. The router includes a processor and a memory storing instructions. The instructions, when executed by the processor, cause the router to perform any of the methods according to the first aspect and implementations thereof.
In a third aspect of the disclosure, a computer-readable storage medium is provided. The computer readable storage medium has stored instructions that, when executed by the electronic device, cause the electronic device to perform any of the methods of the first aspect and its implementations.
In a fourth aspect of the disclosure, a computer program product is provided. The computer program product comprises instructions which, when executed by the electronic device, cause the electronic device to perform any of the methods of the first aspect and its implementations.
It should be understood that what is described in this summary section is not intended to limit key or critical features of the disclosure, nor is it intended to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other objects, features and advantages of the embodiments of the present disclosure will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. In the drawings, several embodiments of the present disclosure are shown by way of example and not limitation.
Fig. 1 shows a schematic diagram of a conventional IPTV networking.
Fig. 2A and 2B illustrate schematic diagrams of an IPTV networking environment according to an embodiment of the present disclosure.
Fig. 3A-3C illustrate an example process of network configuration according to an embodiment of the present disclosure.
Fig. 4 illustrates a flow chart of an example process of a network configuration method according to some embodiments of the present disclosure.
Fig. 5 illustrates a block diagram that shows a computing device capable of implementing multiple embodiments of the present disclosure.
Throughout the drawings, the same or similar reference numerals are used to designate the same or similar components.
Detailed Description
The principles and spirit of the present disclosure will be described below with reference to a number of exemplary embodiments shown in the drawings. It is understood that these specific embodiments are described only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. In the following description and claims, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art.
As used herein, the terms "comprises," comprising, "and the like are to be construed as open-ended inclusions, 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," and the like may refer to different or the same objects, and are used merely to distinguish the referenced objects, without implying any particular spatial order, temporal order, order of importance, or the like, between the referenced objects. In some embodiments, values, processes, selected items, determined items, devices, apparatuses, means, components, etc. are referred to as "best," "lowest," "highest," "smallest," "largest," and so forth. It should be understood that such descriptions are intended to indicate that a selection may be made among many available functional choices, and that such selections need not be better, lower, higher, smaller, larger, or otherwise preferred in additional or all respects over other selections. As used herein, the term "determining" can encompass a wide variety of actions. For example, "determining" can include calculating, computing, processing, deriving, investigating, looking up (e.g., looking up in a table, a database or another data structure), ascertaining and the like. Further, "determining" can include receiving (e.g., receiving information), accessing (e.g., accessing data in a memory), and the like. Further, "determining" may include resolving, selecting, choosing, establishing, and the like.
IPTV networking
With the development of network technology, IPTV has become an important way for people to obtain information content. Unlike conventional digital and analog televisions, IPTV provides a more flexible way of content acquisition, e.g., it can support a user's on-demand of a particular program.
In order to normally acquire IPTV services, a user generally needs to complete IPTV networking. Fig. 1 shows a schematic diagram 100 of a conventional IPTV networking. Generally, a home gateway 110 (which may also be an optical modem, also referred to as a light cat in some scenarios), a router 120, and a set top box STB 130 (also referred to as a digital video converter box) are included in an IPTV networking environment.
As shown in fig. 1, during the networking process, a user needs to correctly connect corresponding ports of the router 120 and the home gateway 110 using a connection line. For example, the IPTV port of the home gateway 110 needs to be connected to the IPTV port of the router 120, and a Local Area Network (LAN) port of the home gateway 110 needs to be connected to a Wide Area Network (WAN) port of the router 120. The STB 130 also needs to be connected to a LAN port of the router 120, for example. In addition, the user needs to log into the configuration interface of the router 120 to designate a particular port currently connected to the STB 130 as an IPTV-enabled port.
On one hand, such an IPTV networking configuration process is complex, and once a connection error occurs, the internet access function of the router or the IPTV function of the set-top box may not operate normally.
On the other hand, as the home networking structure becomes more and more complex, the configuration of the master-slave router has been gradually applied to the daily life of people. For example, due to limitations in the location of the in-home gateway, one may need to deploy a master router directly connected to the in-home gateway near the in-home gateway. However, the conventional slave routing can only provide a single portal mode, that is, only IPTV service or internet access service, which brings great inconvenience to people's lives.
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, a router establishes a bridge between a downstream port of the router and an upstream port of the router when detecting that a first device (e.g., a STB) is connected to the downstream port. Further, the router causes an authentication request of the first device received from the downstream port to be transmitted to an authentication device (e.g., a home gateway) via the upstream port based on the bridging. When receiving a confirmation message for the authentication request from the authentication device, the router sends the confirmation message to the first device, wherein the confirmation message comprises the IP address allocated to the first device by the authentication device. In this manner, embodiments of the present disclosure enable a router to automatically detect that a device (e.g., a digital video converter box STB) is connected to a downstream port and support automatic configuration of the device by establishing a first bridge for connecting between the network port and an upstream port.
Specific aspects of the present disclosure will be described below with reference to the accompanying drawings.
IPTV network configuration
Whereas the network configuration scheme of the present disclosure may automatically detect unknown devices (e.g., STBs), embodiments of the present disclosure may not define the manner of connection between home gateways, routers, and STBs, thereby enabling users to arbitrarily connect these devices. In the case that the network device connection mode is unknown, the embodiment of the disclosure can automatically implement network configuration according to the network configuration method of the disclosure to support the normal operation of the router and the STB.
Fig. 2A illustrates a schematic diagram of an example IPTV networking environment 200A, according to an embodiment of the present disclosure. As shown in fig. 2A, similar to conventional IPTV networking, a home gateway 210 may be included in the networking environment 200A, which may be connected to a router 220-1 by a connection line.
Unlike conventional IPTV networking, in networking environment 200A, mobile device 250-1 and STB 230-1 may be arbitrarily connected to any LAN port of router 220-1. In addition, the user does not need to perform additional configuration for router 220-1. For example, mobile device 250-1 may connect to router 220-1 over a wireless network to obtain internet services. The STB 230-1 may be connected to the router 220-1 by a connection line, for example to provide IPTV content through the television 240-1.
In some embodiments, as shown in FIG. 2A, one or more slave routers may also be included in networking environment 200A. For example, router 220-2 may be connected to router 220-1 via a wired connection or wirelessly. Unlike a conventional slave router, the router 220-2 may also be connected to both the STB 230-2 and the computer 250-2 to provide internet access services to the computer 250-2 and IPTV services to the television 240-2 simultaneously.
In some embodiments, as shown in fig. 2A, router 220-3 may also be connected to router 220-2, for example, and similar to router 220-2, router 220-3 may also be connected to STB 230-3 to provide IPTV content, for example, via television 240-3.
Fig. 2B further illustrates a schematic diagram 200B of port connections of an example IPTV networking environment 200A according to embodiments of the present disclosure. As shown in fig. 2B, the home gateway 210 may be connected to the router 220-1 through two network lines, for example, an IPTV port of the home gateway 210 may be connected to any LAN port of the router 220-1 through a connection line, and the LAN port of the home gateway 210 may be connected to a WAN port of the router 220-1 through a connection line.
Illustratively, the smartphone 250-1 may be connected to the router 220-1 by wireless, and the set-top box 230-1 may be connected to the LAN 3 port of the router 220-1 by a connection line, for example.
Illustratively, router 220-2 may be connected to a LAN 2 port of router 220-1 by a connection line, and computer 250-2 may be connected to a LAN 1 port of router 220-2 by a connection line, and set-top box 230-2 may be connected to a LAN 3 port of router 220-2 by a connection line.
Illustratively, the router 220-3 may be connected to a wireless network port of the router 220-2 through a wireless network, and it is connected to the set-top box 230-3 through a LAN 2 port.
It should be understood that the example networking environment 200A shown in fig. 2A and the particular manner of port connections shown in fig. 2B are merely exemplary, and the type and number of entities (e.g., routers, STBs, etc.) in networking environment 200A, as well as the particular manner of connection of the entities, are not intended to constitute a limitation of the present disclosure.
The automatic network configuration in the networking environment 200A will be described below with reference to fig. 3A to 3C.
Example 1
The automatic configuration process of the STB 230-1 connected to the router 220-1 will be described first with reference to fig. 2B and 3A. As shown in fig. 3A, router 220-1 establishes a new bridge, at 302, to connect LAN 3 ports with LAN 4 ports in response to detecting that an unknown device (e.g., STB 230-1) is connected to the LAN 3 ports. It should be appreciated that although the unknown device is shown as STB 230-1 in FIG. 3A, the router 220-1 is unable to ascertain the device type of STB 230-1 at this time, and is therefore also referred to as an unknown device.
In some embodiments, when there are multiple unknown devices connected to multiple ports of router 220-1, router 220-1 may establish a new bridge connecting the multiple ports connected to these unknown devices. Illustratively, a bridge identified as "iptvbr" may be created by a command "ctl addbr (new bridge), and a LAN 3 port identified as" eth0.3 "may be added to the new bridge by a command" ctl addif iptvbr eth0.3 ".
In some embodiments, if it is determined that the LAN 4 port of router 220-1 is connected to the IPTV port of gateway device 210, router 220-1 may also add the LAN 4 port to the new bridge as well. For example, router 220-1 may add a LAN 4 port identified as "eth0.4" to the new bridge by commanding "brctl addif iptvbr eth 0.4".
In some embodiments, if it is not certain which port of router 220-1 is connected to the IPTV port, the port actually connected to the IPTV port will also be seen by router 220-1 as a port connected to an unknown device, which will likewise be added to the new bridge.
In some embodiments, router 220-1 will have a default bridge for connecting the WAN port and the plurality of network ports. When creating a new bridge, router 220-1 may also strip the ports added to the new bridge from the default bridge. Illustratively, router 220-1 may strip the LAN 3 port identified as "eth0.3" from the default bridge (identified as "br 0") by "brctl delay br0 eth0.3" so that the LAN 3 port identified as "eth0.3" is isolated from port communication in the default bridge.
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 particular Protocol used.
At 306, the router 220-1 sends the received authentication request to the gateway device 210 via the LAN 4 port via a bridge (e.g., a bridge identified as "iptvbr") connecting the LAN 3 port and the LAN 4 port.
If the device sending the authentication request is an STB, the gateway device 210 may generate an acknowledgement message for the authentication request that includes the assigned IP address for the STB. At 308, gateway device 210 sends an acknowledgement message to router 220-1 for the authentication request. In some embodiments, the acknowledgement message may include a DHCP ACK (acknowledgement) message or a PPPoE Active Discovery Session-configuration (PADS) message.
Further, at 310, router 220-1 may send the received confirmation message to STB 230-1 via the LAN 3 port over the established new bridge (e.g., the bridge identified as "iptvbr"). And, at 312, the stb 230-1 may complete network configuration based on the IP address included in the confirmation message, thereby enabling acquisition of the IPTV service.
In some embodiments, if router 220-1 does not know which LAN port is connected to gateway device 210, router 220-1 may determine the port on which the acknowledgement message was received (i.e., the LAN 4 port) to be: a port wired to an IPTV port of gateway device 210. In some embodiments, router 220-1 may also determine that the unknown device currently connected to LAN 3 port is an STB based on the port through which the acknowledgement message was transmitted.
Through the automatic detection mechanism of the router, the embodiments 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, embodiments of the present disclosure may support any LAN-connected gateway device or STB where the user is at a router.
Furthermore, some non-STB devices may also not be identifiable by the slave router 220-1, which may also be detectable based on the process discussed above, but the non-STB devices will not be able to configure an IP address. In some embodiments, router 220-1 may set an expiration time, and when the non-STB device cannot be configured with the new bridge created within the expiration time, 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.
Example two
The auto-configuration process of the STB 230-2 connected with 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) will be described below with reference to FIGS. 2B and 3B. As shown in fig. 3B, in response to router 220-2 detecting that an unknown device (e.g., STB 230-2) is connected to LAN 3 port, router 220-2 may establish a new bridge at 322 that connects LAN 3 port and the upstream port.
In some embodiments, to enable router 220-2 (used as a slave router) to support both IPTV services and internet services, router 220-2 may construct a virtual upstream port corresponding to the WAN port for connecting to router 220-1, which may be assigned a particular VLAN ID (virtual local area network identification), for example. Illustratively, router 220-2 may create a virtual upstream port "eth0.4.4093" with a VLAN ID of "4093" by commanding "vconfig add eth0.4 4093".
In some embodiments, when there are multiple unknown devices connected to multiple ports of router 220-2, router 220-2 may establish a new bridge (referred to as a first bridge for ease of description) for connecting the multiple ports connected to these unknown devices. Illustratively, router 220-2 may create a bridge identified as "iptvbr" by commanding "ctl addbr iptvbr" and add a LAN 3 port identified as "eth0.3" to the first bridge by commanding "ctl addif iptbr eth 0.3".
Further, router 220-2 may add the created virtual upstream port to the first bridge. Illustratively, router 220-2 may add virtual upstream port "eth0.4.4093" to the first bridge by commanding "brctl addif iptbr eth0.4.4093".
In some embodiments, router 220-2 will have a default bridge for connecting the WAN port and the plurality of network ports. When creating a new bridge, router 220-2 may also strip multiple ports added to the new bridge from the default bridge. Illustratively, router 220-2 may strip the port identified as "eth0.3" from the default bridge (identified as "br 0") by "brctl delay br0 eth0.3" so that the port identified as "eth0.3" is isolated from port communication in the default bridge.
Thus, LAN 3 port "eth0.3" and the created virtual upstream port "eth0.4.4093" of router 220-2 will be connected by the first bridge identified as "iptvbr" and isolated from default bridging communications.
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 comprise a DHCP request or a PPP message, depending on the particular protocol used.
At 326, router 220-2 may 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 corresponding to the virtual upstream port and the authentication request. In particular, router 220-2 may add the VLAN ID of the virtual upstream port (e.g., "4093") to the "vtag payload" portion of the request message.
At 328, router 220-2 may send a request message to the LAN 2 port of router 220-1 through the WAN port. In some embodiments, router 220-1 may similarly construct a virtual downstream port corresponding to LAN 2 port, which may be assigned the same VLAN ID. Illustratively, router 220-1 may create a first virtual downstream port "eth0.2.4093" corresponding to the LAN 2 port of router 220-1 by commanding "vconfig add eth0.2 4093", again with a VLAN ID of "4093".
Based on the particular VLAN ID indicated in the request message from router 220-2, router 220-1 may parse the authentication request in the request message and determine that it should point to the first virtual downstream port with that VLAN ID, at 330. Illustratively, based on the "vtag payload" section in the request message indicating a VLAN ID of 4093, router 220-1 may determine that the request message is directed to the first virtual downstream port "eth0.2.4093".
In some embodiments, router 220-1 may establish a second bridge to connect the first virtual downstream port with the LAN 4 port, as discussed with reference to the process of fig. 3A. It should be appreciated that the router 220-1 has determined that the LAN 4 port is a wired connection to the IPTV port, or the router 220-1 may connect with an unknown device based on the LAN 4 port, also adding it to the established second bridge. The configuration command for establishing the second bridge may refer to a configuration procedure of the first bridge, which will not be described in detail herein.
At 332, based on the second bridging connecting the first virtual downstream port with the LAN 4 port, the router 220-1 may send an authentication request to the gateway device 210 through the LAN 4 port.
If the device sending the authentication request is an STB, the gateway device 210 may generate an acknowledgement message for the authentication request that includes the assigned IP address for the STB. At 334, gateway device 210 sends an acknowledgement message to router 220-1 for the authentication request. In some embodiments, the acknowledgement message may comprise a DHCP ACK message or a PADS message.
Further, router 220-1 may determine that the acknowledgement message is directed to the first virtual downstream port based on the second bridge connecting the LAN 4 port with the first virtual downstream port. At 336, router 220-1 may append the VLAN ID for the first virtual downstream port to the acknowledgement message. For example, 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 acknowledgement message.
At 338, router 220-1 sends the acknowledgement message to the WAN port of router 220-2 through the LAN 2 port. At 340, router 220-2 may determine that the acknowledgement message points to the virtual upstream port corresponding to the VLAN ID indicated in the acknowledgement message. Illustratively, since the "vtag payload" portion of the acknowledgement message indicates a VLAN ID of "4093," router 220-2 may determine that the acknowledgement message is directed to the created virtual upstream port of "eth0.4.4093.
At 342, router 220-2 may send the received acknowledgement message to STB 230-2 via the LAN 3 port through the first bridge connecting the virtual upstream 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 enabling acquisition of the IPTV service.
In some embodiments, if router 220-1 does not know which LAN port is connected to gateway device 210, router 220-1 may determine the port on which the acknowledgement message was received (i.e., the LAN 4 port) as the port that is wired to the IPTV port of gateway device 210. In some embodiments, router 220-1 (or router 220-2) may also determine that the unknown device currently connected to the LAN 3 port is an STB based on the port from which the acknowledgement message was transmitted.
Through an automatic detection mechanism of the router, the embodiment of the disclosure can support free network configuration under a multi-level router. Embodiments of the present disclosure may support a user connecting to any LAN of any router (as a master router or as a slave router) to a gateway device or STB by automatically identifying the port at which the router (as a master router) connects to the gateway device 210 and the port at which the router (as a master router or as a slave router) connects to the set-top box STB.
Furthermore, some non-STB devices may also not be identifiable by router 220-1, which may also be detectable based on the process discussed above, but the non-STB devices will not be able to configure an IP address. In some embodiments, router 220-1 may set an expiration time, and when the non-STB device cannot be configured with the new bridge created within the expiration time, 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.
Further, as shown in FIG. 2B, router 220-2 may also serve as an upper level route for router 220-3. In some embodiments, in order for router 220-3 to also support both IPTV services and internet access services as router 220-2 and to be able to support STBs being connected to any LAN port, similar to the configuration of router 220-1, router 220-2 may also construct a virtual downstream port (referred to as a second virtual downstream port for ease of description) corresponding to the downstream wireless network port connected to router 220-3 and add this second virtual downstream port to the created first bridge as well. In some embodiments, the second virtual downstream port may have, for example, the same or a different VLAN ID than the VLAN ID corresponding to the virtual upstream port.
Illustratively, router 220-2 may establish a second virtual downstream port "wl0.2.4093" corresponding to wireless network port "wl0.2" with a VLAN ID of "4093" by commanding "vconfig add wl0.2 4093". In addition, router 220-2 may also add a second virtual downstream port "wl0.2.4093" to the first bridge identified as "iptvbr" by commanding "brctl addif iptvbr wl 0.2.4093".
Therefore, based on the above manner, the embodiments of the present disclosure can provide good scalability of networking, thereby being able to support a more complex networking environment.
Example three
The transmission flow of the internet data will be described below with reference to fig. 2B and 3C. Take computer 250-2, as an example, connected to a LAN 1 port of router 220-2. During the upstream transmission of the network data of computer 250-2, computer 250-2 may send 352 an Internet message to LAN 1 port of router 220-2. At 354, router 220-2 may send an Internet message to the LAN 2 port of router 220-1 via the WAN port via a default bridge (e.g., a bridge identified as "br 0") connecting the LAN 1 port and the WAN port.
In some embodiments, router 220-2 may also construct another virtual upstream port corresponding to a WAN port, which may not be assigned a VLAN ID, for example, or have a different VLAN ID than the virtual upstream port corresponding to the WAN port for transmitting IPTV data. Further, router 220-2 may add the virtual upstream port to the router's default bridge.
At 356, router 220-1 may determine that the Internet packet does not indicate a VLAN ID corresponding to the IPTV transmission, and further determine that the Internet packet should be directed to a WAN port. At 358, router 220-1 may send an Internet message to gateway device 210 via the WAN to enable upstream transmission of Internet data.
For downstream transmission of Internet data, the router 220-1 may receive an Internet message from the gateway device 210 at 360. At 362, router 220-1 may send the Internet message to the WAN port of router 220-2 via its LAN 2 port.
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, for example, or have a different VLAN ID than the virtual downstream port corresponding to the LAN 2 port for transmitting IPTV data. Further, router 220-1 may add the virtual downstream port to the router's default bridge.
At 364, router 220-2 may determine that the Internet packet does not indicate a VLAN ID corresponding to the IPTV transmission and further determine that the Internet packet should be directed to a LAN 1 port. At 366, router 220-2 may send an Internet message to computer 250-2 via LAN 1 port, thereby enabling downstream transmission of the Internet data.
Based on the process shown in fig. 3C, it can be seen that, based on the automatic network configuration scheme of the present disclosure, in a multi-level router networking structure, each router can provide an IPTV service and an internet service at the same time.
Example Processes and apparatus
Fig. 4 shows a flow diagram of a method 400 of network configuration according to an embodiment of the disclosure. Method 400 may be implemented, for example, by router 220 in fig. 2.
At block 410, in response to the first device connecting to a network port of a router, a first bridge is established, the first bridge connecting the network port and an upstream port of the router. At block 420, an authentication request of the first device received from the network port is sent to the authentication device through the first bridge and via the upstream port. At block 430, in response to receiving a confirmation message from the authentication device for the authentication request, the confirmation message is sent to the first device over the first bridge, the confirmation message including the IP address assigned by the authentication device for the first device.
In some embodiments, the router is used as a slave router, the upstream port being a virtual upstream port corresponding to a physical upstream port of the router, the virtual upstream port being associated with a first virtual local area network, VLAN, identity.
In some embodiments, sending 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 comprises: constructing a request message based on the authentication request and the first VLAN identification; and transmitting the request message to an upper level router connected to the router through the first bridge and via the virtual uplink port to transmit the authentication request to the authentication device via the upper level router.
In some embodiments, sending the request message through the first bridge and via the virtual upstream port to an upper level router connected to the router comprises: sending a request message to a first downstream port of an upper router for connecting a router, the request message triggering the upper router to: determining a first VLAN identification and an authentication request from the request message; and sending an authentication request to the authentication device via the upstream port of the upper level router based on the first VLAN identification.
In some embodiments, the first downstream port is a first virtual downstream port having a first VLAN identification, wherein the upper level router sending the authentication request to the authentication device via the upstream port of the upper level router based on the first VLAN identification comprises: and the upper-level router sends the authentication request to the authentication equipment through a second bridge, and the second bridge is used for connecting the first virtual downlink port of the upper-level router and the uplink port of the upper-level router.
In some embodiments, the router is used as a slave router, the network port is a first network port, and the method further comprises: receiving an Internet message via a physical uplink port; and responding to the Internet message not indicating the first VLAN identification, sending the Internet message to a second device connected with a second network port of the router through a third bridge of the router, wherein the third bridge is used for connecting the physical uplink port and the second network port.
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 comprises: the first network port is stripped from the initial bridge.
In some embodiments, the router is directly connected to the authentication device, the upstream port comprises at least one candidate upstream port, and the method further comprises: determining a target upstream port for receiving an acknowledgement message from the authentication device from the at least one candidate upstream port; and determining the target uplink port as a port for direct connection with the authentication device.
In some embodiments, the router includes a physical downstream port, and the first bridge is further configured to connect to a second virtual downstream port corresponding to the physical downstream port, the second virtual downstream port being associated with the second VLAN identification.
In some embodiments, the authentication request comprises a dynamic host configuration protocol, DHCP, message, and the confirmation message comprises a DHCP confirmation message; or the authentication request comprises a point-to-point protocol PPP message, and the confirmation message comprises a PPPoE activation discovery session confirmation packet message.
In some embodiments, the first device is a set-top box, STB, and the authentication device is an optical modem or gateway device.
Fig. 5 illustrates a schematic block diagram of an example device 500 that may be used to implement embodiments of the present disclosure. For example, computing device 130 and/or cloud device 140 according to embodiments of the present disclosure may be implemented by device 500. As shown, device 500 includes a Central Processing Unit (CPU) 501 that may perform various appropriate actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM) 502 or loaded from a storage unit 508 into 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, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
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, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508, such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, 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.
The various processes and processes described above, such as method 400, may be performed by processing unit 501. For example, in some embodiments, the method 400 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 500 via ROM 502 and/or communications unit 505. When the computer program is loaded into RAM 503 and executed by CPU 501, one or more of the acts of method 400 described above may be performed.
The present disclosure may be methods, apparatus, systems, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for carrying out various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, 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 disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or 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 may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and transmits the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
Computer program instructions for carrying out operations of the present disclosure may be assembler instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (14)

1. A network configuration method is applied to a router, and the method comprises the following steps:
responding to a first device connected to a network port of the router, and establishing a first bridge, wherein the first bridge is used for connecting the network port and an upstream port of the router;
sending an authentication request of the first device received from the network port to an authentication device through the first bridge and via the upstream port; and
in response to receiving a confirmation message from the authentication device for the authentication request, sending the confirmation message to the first device through the first bridge, the confirmation message including an IP address assigned by the authentication device to the first device.
2. The method of claim 1, wherein the router is used as a slave router, the upstream port being a virtual upstream port corresponding to a physical upstream port of the router, the virtual upstream port being associated with a first virtual local area network, VLAN, identification.
3. The method of claim 2, sending the authentication request of the first device received from the network port to an authentication device through the first bridge and via the upstream port comprising:
constructing a request message based on the authentication request and the first VLAN identification; and
and sending the request message to an upper-level router connected with the router through the first bridge and the virtual uplink port so as to send the authentication request to the authentication device through the upper-level router.
4. The method of claim 3, sending the request message through the first bridge and via the virtual upstream port to an upper level router connected to the router comprises:
sending the request message to a first downstream port of the upper level router for connecting to the router, the request message triggering the upper level router to:
determining the first VLAN identification and the authentication request from the request message; and
sending the authentication request to the authentication device via an upstream port of the upper level router based on the first VLAN identification.
5. The method of claim 4, wherein the first downstream port is a first virtual downstream port having the first VLAN identification,
wherein the upper level router sending the authentication request to the authentication device via an upstream port of the upper level router based on the first VLAN identification comprises: and the upper-level router sends the authentication request to the authentication equipment through a second bridge, and the second bridge is used for connecting the first virtual downlink port of the upper-level router and the uplink port of the upper-level router.
6. The method of claim 2, wherein the network port is a first network port, and the method further comprises:
receiving an Internet message through the physical uplink port; and
and responding to the Internet message without indicating the first VLAN identification, sending the Internet message to a second device connected with a second network port of the router through a third bridge of the router, wherein the third bridge is used for connecting the physical uplink port and the second network port.
7. The method of claim 6, wherein the third bridge is an initial bridge of the router, and the method further comprises: stripping the first network port from the initial bridge.
8. The method of claim 1, wherein the router is directly connected with the authentication device, the upstream port comprises at least one candidate upstream port, and the method further comprises:
determining a target upstream port for receiving the acknowledgement message from the authentication device from the at least one candidate upstream port; and
and determining the target uplink port as a port directly connected with the authentication equipment.
9. The method of any of claims 1 to 8, wherein the router comprises a physical downstream port, the first bridge further being configured to connect a second virtual downstream port corresponding to the physical downstream port, the second virtual downstream port being associated with a second VLAN identification.
10. The method according to any of claims 1 to 9, wherein the authentication request comprises a dynamic host configuration protocol, DHCP, message, the acknowledgement message comprising a DHCP acknowledgement message; or alternatively
The authentication request comprises a point-to-point protocol PPP message, and the confirmation message comprises a PPPoE activation discovery session confirmation packet message.
11. The method of any of claims 1-10, wherein the first device is a Set Top Box (STB) and the authentication device is an optical modem or gateway device.
12. A router, comprising: a processor, and a memory storing instructions that, when executed by the processor, cause the router to perform the method of any of claims 1-11.
13. A computer-readable storage medium storing instructions that, when executed by an electronic device, cause the electronic device to perform the method of any of claims 1-11.
14. A computer program product comprising instructions which, when executed by an electronic device, cause the electronic device to perform the method of any of claims 1 to 11.
CN202111129053.XA 2021-09-26 2021-09-26 Network configuration method, router, storage medium, and program product Pending CN115883349A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111129053.XA CN115883349A (en) 2021-09-26 2021-09-26 Network configuration method, router, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111129053.XA CN115883349A (en) 2021-09-26 2021-09-26 Network configuration method, router, storage medium, and program product

Publications (1)

Publication Number Publication Date
CN115883349A true CN115883349A (en) 2023-03-31

Family

ID=85762521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111129053.XA Pending CN115883349A (en) 2021-09-26 2021-09-26 Network configuration method, router, storage medium, and program product

Country Status (1)

Country Link
CN (1) CN115883349A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125128A (en) * 2014-08-12 2014-10-29 烽火通信科技股份有限公司 Method for supporting VLAN (virtual local area network) by aid of Linux soft bridge
CN107241255A (en) * 2017-06-09 2017-10-10 上海斐讯数据通信技术有限公司 A kind of network merging method and system and router
CN108989114A (en) * 2018-07-25 2018-12-11 新华三技术有限公司 A kind of method and device configuring router
CN111277925A (en) * 2020-01-17 2020-06-12 中国电信股份有限公司成都分公司 Terminal full-port blind plugging method for activating multiple services based on gigabit network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125128A (en) * 2014-08-12 2014-10-29 烽火通信科技股份有限公司 Method for supporting VLAN (virtual local area network) by aid of Linux soft bridge
CN107241255A (en) * 2017-06-09 2017-10-10 上海斐讯数据通信技术有限公司 A kind of network merging method and system and router
CN108989114A (en) * 2018-07-25 2018-12-11 新华三技术有限公司 A kind of method and device configuring router
CN111277925A (en) * 2020-01-17 2020-06-12 中国电信股份有限公司成都分公司 Terminal full-port blind plugging method for activating multiple services based on gigabit network

Similar Documents

Publication Publication Date Title
US11611471B2 (en) Virtual gateway control and management
US9369448B2 (en) Network security parameter generation and distribution
US10516666B2 (en) Authentication method, apparatus, and system
US8386603B2 (en) Information processing terminal device and network connection method
CN107113892B (en) Method and device for automatically networking gateway equipment
US10499311B2 (en) Method and apparatus for implementing network sharing
CN107809386B (en) IP address translation method, routing device and communication system
CN102763373A (en) Method and apparatus for using service of home network device based on remote access
CN110177010B (en) Link switching method and device
JP2012083891A (en) Failover system, storage processor, and failover control method
CN111614476A (en) Equipment configuration method, system and device
KR102310027B1 (en) Determination method and corresponding terminal, computer program product and storage medium
US10158587B2 (en) Communication between a web application instance connected to a connection server and a calling entity other than said connection server
CN105338089A (en) Remote content sharing method, server and terminal
US11153118B2 (en) Technique for executing a service in a local area network through a wide area communication network
KR20150002934A (en) Method for Selecting Network Mode, Mobile Router Therefor
CN109981324B (en) Fault positioning method, device, equipment and medium for interactive network television
CN115883349A (en) Network configuration method, router, storage medium, and program product
CN103283185A (en) Prioritization of data communication
KR102066241B1 (en) A device and a method at the device for configuring a wireless interface
CN105376835A (en) Portable equipment and method for connecting mobile terminal with portable equipment
US10404652B2 (en) Communication device, communication method, and program
KR20170025550A (en) Gateway and control method thereof
CN113472907A (en) Network access method, router, electronic device and computer readable medium
JP2006072853A (en) Position information system, and equipment, line concentrator and equipment management device used in this system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination