EP-4742609-A1 - ROUTING DEVICE CONFIGURATION METHOD AND ROUTING DEVICE
Abstract
A routing device configuration method and a routing device are disclosed, and relate to the field of communication technologies. The method includes: when first configuration information received by a routing device indicates to configure N downlink interfaces of the routing device to be in a bridge mode, creating N virtual bridge interfaces, configuring the N downlink interfaces and N uplink interfaces of the routing device on the N virtual bridge interfaces, and configuring wide area network IP addresses of the N uplink interfaces on the N downlink interfaces. A plurality of virtual bridge interfaces are set to bridge each of the N downlink interfaces to a corresponding uplink interface, so that the routing device can connect a plurality of devices to the Internet in the bridge mode.
Inventors
- YAN, Haoran
Assignees
- Huawei Technologies Co., Ltd.
Dates
- Publication Date
- 20260513
- Application Date
- 20240904
Claims (15)
- A routing device configuration method, applied to a routing device, and comprising: receiving first configuration information, wherein the first configuration information indicates to configure N downlink interfaces of the routing device to be in a bridge mode, and N is a positive integer greater than 1; creating N virtual bridge interfaces based on the first configuration information; configuring the N downlink interfaces and N uplink interfaces of the routing device on the N virtual bridge interfaces, wherein one uplink interface and one downlink interface are configured on each of the N virtual bridge interfaces, uplink interfaces configured on different virtual bridge interfaces are different, and downlink interfaces configured on different virtual bridge interfaces are different; and configuring wide area network IP addresses of the N uplink interfaces on the N downlink interfaces, wherein wide area network IP addresses configured on different downlink interfaces are different.
- The method according to claim 1, further comprising: separately configuring routing rules corresponding to the N virtual bridge interfaces, wherein the N virtual bridge interfaces comprise a first virtual bridge interface, and data transmission between an uplink interface and a downlink interface that are configured on the first virtual bridge interface complies with a routing rule corresponding to the first virtual bridge interface.
- The method according to any one of claims 1 to 2, wherein the first configuration information further indicates to configure M downlink interfaces of the routing device to be in a routing mode, the M downlink interfaces are different from the N downlink interfaces, and M is a positive integer; creating a second virtual bridge interface based on the first configuration information, wherein the second virtual bridge interface is different from the N virtual bridge interfaces; configuring the M downlink interfaces and a first uplink interface on the second virtual bridge interface, wherein the first uplink interface is an uplink interface corresponding to the M downlink interfaces; and configuring a local area network IP address for each of the M downlink interfaces.
- The method according to claim 3, further comprising: configuring an address mapping rule on the second virtual bridge interface, wherein the address mapping rule indicates a mapping relationship between local area network IP addresses configured on the M downlink interfaces and a wide area network IP address configured on the first uplink interface.
- The method according to claim 3 or 4, further comprising: receiving second configuration information, wherein the second configuration information indicates to modify a bridge mode of a first downlink interface of the N downlink interfaces to a routing mode, and the first downlink interface is configured on the first virtual bridge interface of the N virtual bridge interfaces; deleting configuration information of the first downlink interface from the first virtual bridge based on the second configuration information, and configuring the first downlink interface on the second virtual bridge interface; deleting a wide area network IP address configured on the first downlink interface, and configuring a local area network IP address for the first downlink interface; and configuring, on the second virtual bridge interface, a mapping relationship between the local area network IP address configured on the first downlink interface and the wide area network IP address configured on the first uplink interface.
- The method according to any one of claims 1 to 5, wherein the N downlink interfaces comprise N local area network LAN interfaces, or the N downlink interfaces comprise N Wi-Fi interfaces, or the N downlink interfaces comprise at least one LAN interface and at least one W-Fi interface.
- A routing device configuration method, comprising: receiving first configuration information, wherein the first configuration information indicates to configure N downlink interfaces of a routing device to be in a bridge mode, and configure M other downlink interfaces of the routing device to be in a routing mode, wherein both N and M are positive integers; creating N virtual bridge interfaces and a second virtual bridge interface based on the first configuration information; configuring the N downlink interfaces and N uplink interfaces of the routing device on the N virtual bridge interfaces, and configuring the M downlink interfaces and a first uplink interface on the second virtual bridge interface, wherein the first uplink interface is an uplink interface corresponding to the M downlink interfaces, one uplink interface and one downlink interface are configured on each of the N virtual bridge interfaces, uplink interfaces configured on different virtual bridge interfaces are different, and downlink interfaces configured on different virtual bridge interfaces are different; and configuring wide area network IP addresses of the N uplink interfaces on the N downlink interfaces, wherein wide area network addresses configured on different downlink interfaces are different, and configuring a local area network IP address for each of the M downlink interfaces.
- The method according to claim 7, further comprising: separately configuring routing rules corresponding to the N virtual bridge interfaces, wherein the N virtual bridge interfaces comprise a first virtual bridge interface, and data transmission between an uplink interface and a downlink interface that are configured on the first virtual bridge interface complies with a routing rule corresponding to the first virtual bridge interface.
- The method according to claim 7 or 8, further comprising: configuring an address mapping rule on the second virtual bridge interface, wherein the address mapping rule indicates a mapping relationship between local area network IP addresses configured on the M downlink interfaces and a wide area network IP address configured on the first uplink interface.
- The method according to any one of claims 7 to 9, wherein the N downlink interfaces comprise N local area network LAN interfaces, or the N downlink interfaces comprise N Wi-Fi interfaces, or the N interfaces comprise at least one LAN interface and at least one W-Fi interface.
- A routing device, comprising a unit or a module for performing the method according to any one of claims 1 to 6, or comprising a unit or a module for performing the method according to any one of claims 7 to 10.
- A routing device, comprising at least one processor, wherein the at least one processor is coupled to at least one memory, and the at least one processor is configured to read a program stored in the at least one memory, to perform the method according to any one of claims 1 to 6, or perform the method according to any one of claims 7 to 10.
- A chip system, comprising at least one processor, wherein the at least one processor is coupled to at least one memory, and the at least one processor is configured to read a program stored in the at least one memory, to perform the method according to any one of claims 1 to 6, or implement the method according to any one of claims 7 to 10.
- A readable storage medium, wherein the readable storage medium stores a program, and when the program is executed by a routing device, the method according to any one of claims 1 to 6 is implemented, or the method according to any one of claims 7 to 10 is implemented.
- A program product, wherein when the program product is run on a routing device, the routing device is enabled to perform the method according to any one of claims 1 to 6, or perform the method according to any one of claims 7 to 10.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to Chinese Patent Application No. 202311532343.8, filed with the China National Intellectual Property Administration on November 15, 2023 and entitled "ROUTING DEVICE CONFIGURATION METHOD AND ROUTING DEVICE", which is incorporated herein by reference in its entirety. TECHNICAL FIELD Embodiments of this application relate to the field of communication technologies, and in particular, to a routing device configuration method and a routing device. BACKGROUND A routing device, for example, customer premise equipment (customer premise equipment, CPE), may be used to establish a home or office network connection. The routing device supports two networking modes: a routing mode and a bridge mode. In the routing mode, the routing device allocates a new IP address to a device connected to the routing device, and data exchange between the device and an upper-layer server is forwarded by the routing device. In the bridge mode, the routing device directly forwards, to a device connected to the routing device, a public IP address allocated to the routing device by a server connected to the routing device, and the device directly exchanges data with the server. In the bridge mode, the routing device serves only as a transit device without processing data. Only one device connected to the routing device is able to connect to the Internet at a time. This cannot meet a requirement for access of a plurality of devices when the routing device is in the bridge mode. SUMMARY Embodiments of this application provide a routing device configuration method and a routing device, to connect to a plurality of devices in a bridge mode. According to a first aspect, a routing device configuration method is provided. The method may be performed by a routing device, or may be performed by a module, a unit, or a chip in a routing device. The method includes: receiving first configuration information, where the first configuration information indicates to configure N downlink interfaces of the routing device to be in a bridge mode, and N is a positive integer greater than 1; creating N virtual bridge interfaces based on the first configuration information; configuring the N downlink interfaces and N uplink interfaces of the routing device on the N virtual bridge interfaces, where one uplink interface and one downlink interface are configured on each of the N virtual bridge interfaces, uplink interfaces configured on different virtual bridge interfaces are different, and downlink interfaces configured on different virtual bridge interfaces are different; and configuring wide area network IP addresses of the N uplink interfaces on the N downlink interfaces, where wide area network IP addresses configured on different downlink interfaces are different. Optionally, the first configuration information indicates an access point name (APN) corresponding to each of the N downlink interfaces, APNs corresponding to different downlink interfaces are different, and each APN corresponds to one uplink interface. A first downlink interface of the N downlink interfaces is used as an example. Configuring the N uplink interfaces of the routing device on the N virtual bridge interfaces includes: configuring, on a first virtual bridge interface based on an APN corresponding to the first downlink interface, a first uplink interface corresponding to the APN. In the foregoing implementation, a plurality of virtual bridge interfaces (bridge) are set on the routing device, one uplink interface is set on each virtual bridge interface, and one downlink interface (for example, a LAN interface or a Wi-Fi interface) is mounted to the virtual bridge interface, so that the uplink interface is bridged to the downlink interface, and the routing device can be connected to a plurality of devices of CPE in the bridge mode. In a possible implementation, the N downlink interfaces include N local area network LAN interfaces, or the N downlink interfaces include N Wi-Fi interfaces, or the N downlink interfaces include at least one LAN interface and at least one W-Fi interface. In a possible implementation, the routing device includes CPE. In a possible implementation, the method further includes: separately configuring routing rules corresponding to the N virtual bridge interfaces, where the N virtual bridge interfaces include a first virtual bridge interface, and data transmission between an uplink interface and a downlink interface that are configured on the first virtual bridge interface complies with a routing rule corresponding to the first virtual bridge interface. In a possible implementation, the first configuration information further indicates to configure M downlink interfaces of the routing device to be in a routing mode, where the M downlink interfaces are different from the N downlink interfaces, and M is a positive integer. A second virtual bridge interface is created based on the first configura