An intelligent gateway

CN117201397BActive Publication Date: 2026-09-25HISENSE BROADBAND MULTIMEDIA TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210611792.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2026-09-25
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

而不同lan端口之间的信息转发不经过CPU,导致CPU无法识别报文的收包以太网端口,无法实现绑定、家长控制或报文安全检查

Benefits of technology

[0016]本申请实施例提供了一种智能网关,包括:交换芯片和数据处理芯片。所述交换芯片,包括:以太网端口,与用户终端连接,包括:第一端口、第二端口和第三端口;第一级联端口,所述第一端口、第二端口与所述第一级联端口连接;第二级联端口,所述第二级联端口与所述第三端口连接。所述数据处理芯片包括:第一主端口,与所述第一级联端口连接;第二主端口,与所述第二级联端口连接;数据处理中心,与所述第一主端口、所述第二主端口连接,所述第一端口的报文流向所述第二端口,且所述第一端口的当前速率大于预设阈值上限时,配置所述第一端口与所述第二级联端口连接。本申请提供的智能网关,可通过监测以太网端口的网速,在网速超过预设阈值时,调整以太网端口与级联端口的关系,避免以太网端口拥堵,提高智能网关的网速。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117201397B_ABST
    Figure CN117201397B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of intelligent gateway, comprising: switching chip and data processing chip.Switching chip, comprising: Ethernet port: first port, second port and third port;First cascade port, first port, second port is connected with the first cascade port;Second cascade port, second cascade port is connected with the third port.Data processing chip includes: first main port, with first cascade port connection;Second main port, with second cascade port connection;Data processing center, with first main port, second main port connection, the message flow of first port to second port, and the current rate of first port is greater than the upper limit of preset threshold, when first port is configured with the second cascade port connection.The intelligent gateway provided in the application can monitor the network speed of Ethernet port, adjust the relationship between Ethernet port and cascade port when the network speed exceeds the preset threshold, avoid Ethernet port congestion and improve the network speed of intelligent gateway.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a smart gateway. Background Technology

[0002] A router is a device that connects local area networks (LANs) and wide area networks (WANs) within the Internet. It automatically selects and sets routes based on channel conditions, sending signals in the optimal path and in the correct order.

[0003] The router has multiple LAN ports, one of which is connected to the CPU. The other LAN ports first send packets to the LAN port connected to the CPU, and then send them to the CPU. However, the forwarding of information between different LAN ports bypasses the CPU, causing the CPU to be unable to identify the Ethernet port from which the packets are received, thus preventing the implementation of packet binding, parental controls, or packet security checks. Summary of the Invention

[0004] This application provides a smart gateway to improve the security of connection information between different LAN ports within a router.

[0005] To address the aforementioned technical problems, the embodiments of this application disclose the following technical solutions:

[0006] This application discloses an intelligent gateway, including: a switching chip and a data processing chip.

[0007] The switching chip includes:

[0008] Ethernet ports, for connecting to user terminals, including: port 1, port 2, and port 3;

[0009] First cascade port, the first port and the second port are connected to the first cascade port;

[0010] The second cascade port is connected to the third port;

[0011] The data processing chip includes:

[0012] The first main port is connected to the first cascaded port;

[0013] The second main port is connected to the second cascade port;

[0014] The data processing center is connected to the first main port and the second main port. When the packet flow from the first port to the second port is greater than the preset threshold limit, the first port is configured to connect to the second cascaded port.

[0015] Beneficial effects:

[0016] This application provides an intelligent gateway, including a switching chip and a data processing chip. The switching chip includes: an Ethernet port for connecting to a user terminal, comprising: a first port, a second port, and a third port; a first cascade port, with the first port, the second port, and the third port connected; and a second cascade port, with the third port connected. The data processing chip includes: a first main port connected to the first cascade port; a second main port connected to the second cascade port; and a data processing center connected to the first main port and the second main port. Packets from the first port flow to the second port, and when the current rate of the first port exceeds a preset threshold, the first port is configured to connect to the second cascade port. The intelligent gateway provided by this application can monitor the network speed of the Ethernet port and adjust the relationship between the Ethernet port and the cascade port when the network speed exceeds a preset threshold, thereby avoiding Ethernet port congestion and improving the network speed of the intelligent gateway.

[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0018] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This application provides an example of an intelligent gateway application scenario.

[0020] Figure 2 A schematic diagram of a router structure provided in an embodiment of this application;

[0021] Figure 3 The port-vlan relationship shown in this application is intended to represent an intentional statement;

[0022] Figure 4 As shown in this application Figure 2 The cascading relationship indicates intent;

[0023] Figure 5 The port-mac relationship provided in this application represents the intended meaning;

[0024] Figure 6 This is a schematic diagram of the structure of a data processing chip provided in an embodiment of this application;

[0025] Figure 7 A flowchart of a cascaded acceleration method provided in this application;

[0026] Figure 8 This is a schematic diagram of another router structure provided in an embodiment of this application;

[0027] Figure 9 For this application Figure 8 The router cascading diagram shown below;

[0028] Figure 10 A cascaded acceleration method flow provided in the embodiments of this application Figure 2 . Detailed Implementation

[0029] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of this application.

[0030] Figure 1 This application provides an example of a smart gateway application scenario. Figure 1 As shown, user terminal 100 requests access information. The smart gateway includes router 200, which selects the packet path and connects to external server 300 according to routing, bridging, or other business rules.

[0031] The external server 300 responds to the access request by sending a response message. The router 200 receives the response message and forwards it to the user terminal.

[0032] Figure 2 This is a schematic diagram of a router structure provided for an embodiment of this application. Figure 2 As shown, the router includes a switching chip and a CPU. The switching chip has Ethernet ports and cascading ports. The Ethernet ports include several LAN ports or WAN ports, or several LAN ports and a WAN port. In this example, the router has a first LAN port, a second LAN port, and a third LAN port, which are connected to user terminals. The WAN port is connected to wide area network communication equipment. The user terminal can be a mobile phone, computer, or other internet access device. For ease of explanation, the first LAN port is referred to as port1, the second LAN port as port2, the third LAN port as port3, and the WAN port as port4.

[0033] The cascading ports include the first cascading port (port5) and the second cascading port (port6). The CPU includes a first master port and a second master port. The CPU contains a cascading acceleration module that configures the connection between the cascading ports and the master ports based on the packet flow within the router. The first master port (cport1) is connected to the first cascading port (port5), and the second master port (port2) is connected to the second cascading port (port6). The CPU maintains this cascading relationship table.

[0034] In this application, the first cascade port 5 is a LAN cascade port; the second cascade port 6 is a WAN cascade port.

[0035] The CPU has a pre-defined port-VLAN table for Ethernet ports. Here, "port" refers to the Ethernet port of the switching chip. The number of ports is related to the product form. In this application, there are four Ethernet ports: port1, port2, port3, and port4.

[0036] The Ethernet port receives a packet and adds a VLAN tag field to the packet to distinguish the port. The CPU processes the tagged packet, identifies the port according to the port-VLAN relationship table, and removes or modifies the VLAN tag field in the packet to implement advanced functions such as security and binding between Ethernet ports.

[0037] Specifically, in the embodiments of this application, the VLAN tag field can be an 802.1Q tag field according to the protocol.

[0038] When a packet enters the CPU's first cascaded port (port5) from the first LAN port via the LAN cascaded port, the packet carries a VLAN tag field. The CPU identifies the port based on the port-VLAN relationship table. If the corresponding VLAN is allowed in the configuration, the CPU removes the VLAN tag field from the packet and reports the packet. If the corresponding VLAN is not allowed in the configuration, the CPU removes the VLAN tag field from the packet and discards the packet.

[0039] Figure 3 This application illustrates the intended port-vlan relationship. Figure 4 As shown in this application Figure 2 The cascading relationship indicates intent. For example... Figure 3 The port-VLAN relationship table shown in the CPU includes: port name and VLAN. The VLAN includes: identification VLAN and service VLAN. Each VLAN includes a VLAN index and a VLAN ID value. The index represents the VLAN type and port attributes, while the VLAN ID value represents the VLAN tag value, corresponding to the VLAN field in the packet.

[0040] The CPU also contains a cascading relationship table, such as Figure 4 The diagram shows the connection relationship between the cascaded ports and the Ethernet ports. Figure 2 As shown, the first LAN port, the second LAN port, and the third LAN port are connected to the LAN cascade port, and the WAN port is connected to the WAN cascade port; the LAN cascade port is connected to the first main port, and the WAN cascade port is connected to the second main port.

[0041] The router service VLAN index in this application includes: Ethernet port index, configuration type index, index of the VLAN sequence of that type configured on the Ethernet port, and conversion type index.

[0042] Specifically, the router service VLAN index in this application can be VLAN xyzt, where x represents the Ethernet port index; y represents the configuration type index, where y=0 indicates the VLAN type for adding the specified VLAN, and y=1 indicates the VLAN type that allows the specified VLAN to pass; z represents the sequence index of this type of VLAN configured on the Ethernet port; and t is the VLAN conversion mode marker, where t=0 represents the user-configured service VLAN, and t=1 represents the conversion VLAN for the corresponding service VLAN. For example, VLAN 1.0.1.0 indicates the service VLAN that needs to be added to Ethernet port 1 in the user configuration; VLAN 2.1.2.0 indicates the second VLAN that needs to be allowed to pass through Ethernet port 2 in the user configuration.

[0043] The VLAN index is identified as VLAN px, where px represents the Ethernet port index.

[0044] After receiving a packet, the Ethernet port of the switching chip adds or modifies the VLAN tag field of the packet according to the VLAN configuration, and allows or discards the packet.

[0045] The CPU can determine the type of a packet by comparing the VLAN tag field with the port-VLAN, and then process the packet accordingly.

[0046] During the application process, upon system startup, a port-VLAN relationship table is generated. VLANs are identified using `vlan_px`, with the value being an unused VLAN ID as the default value. For example, the values ​​for `vlan_p1`, `vlan_p2`, `vlan_p3`, and `vlan_p4` are 101, 102, 103, and 104, respectively. The service VLAN is empty.

[0047] Configure the identified VLANs to their corresponding ports, using the rule of adding a VLAN tag (denoted as vlanc) to untagged (uplink) packets. Based on the current hardware configuration, configure the VLAN under the Ethernet port corresponding to the first cascade port to the first cascade port; configure the VLAN under the Ethernet port corresponding to the second cascade port to the second cascade port.

[0048] As shown in the figure, the identification VLANs of the first LAN port, the second LAN port, and the third LAN port are configured to the LAN cascade port, and the identification VLAN corresponding to the WAN port is configured to the WAN cascade port.

[0049] In this application, the data processing center is equipped with a conflict handling module. When configuring service VLANs, if the value of a newly added service VLAN is the same as the value of the current VLAN, the value of the current VLAN is modified to an unused VLAN value. The unused VLAN value is selected from 1 to 4095 and must be different from all other service VLANs and identification VLANs. The modified current VLAN value is synchronously updated in the hardware configuration.

[0050] When configured in QinQ mode:

[0051] Processing of VLAN identification: Configure the identification VLAN of the Ethernet port to the corresponding port of the switching chip and the corresponding cascade port. The rule is to add the identification VLAN value corresponding to the Ethernet port to the outer VLAN tag field of the packet for all packets, which is used to mark the Ethernet port receiving the packet.

[0052] Configure the service VLAN to the corresponding service VLAN index VLAN xyz0, do not update the hardware configuration, and return directly.

[0053] When configured in VLAN translation mode:

[0054] Configure the identified VLANs to the corresponding cascading ports. As shown in the diagram, based on the current hardware configuration, configure the VLAN under the Ethernet port corresponding to the first cascading port to the first cascading port; configure the VLAN under the Ethernet port corresponding to the second cascading port to the second cascading port. The rule for identifying VLANs is to add the identified VLAN value as an outer VLAN tag field to the packet.

[0055] For service VLANs, based on the type, number, and corresponding Ethernet port of the service VLAN, save the service VLAN to the corresponding service VLAN index vlanx.yz0.

[0056] The specific configuration process for adding a new service VLAN under the VLAN translation function is as follows:

[0057] If the 'y' in the newly added service VLAN index VLAN xyz0 is of type 0, then:

[0058] Iterate through all identified VLANs. If a value is different from all other identified VLANs, do not update the hardware configuration and return directly. If a value is the same as an identified VLAN, replace that identified VLAN value with an unused VLAN value. This unused VLAN value is selected from 1 to 4095 and must be different from all other identified VLAN values ​​and service VLAN values. Simultaneously update the hardware configuration of the corresponding conversion VLAN value for this identified VLAN or service VLAN.

[0059] If the 'y' in the newly added service VLAN index VLAN xyz0 is type 1, then:

[0060] First, iterate through all identified VLANs. If the value of the newly added service VLAN is the same as the value of an identified VLAN, replace that identified VLAN with an unused VLAN value. This unused VLAN value is selected from 1 to 4095 and must be different from all other identified VLAN values ​​and service VLAN values. Simultaneously update the hardware configuration of this identified VLAN value.

[0061] Then, iterate through the service VLANs of other Ethernet ports. If the service VLANs of other Ethernet ports are all different from the newly added service VLAN value, configure the newly added service VLAN index vlanx.yz0 to the corresponding port of the switching chip and the corresponding cascaded port, and configure the rule for the newly added service VLAN to allow vlanx.yz0 to pass. If it is the same as the service VLAN of other ports, create a new VLAN xyz1 (x, y, z values ​​are the same as the newly added service VLAN xyz0), and select an unused VLAN value for it. The unused VLAN value selection range is 1-4095, and it must be different from the identification VLAN and the service VLAN. Assign the newly added service VLAN index vlanxyz0 and vlanx.yz1 to the corresponding port of the switching chip and the corresponding cascaded port. The rule is that for packets received by the corresponding port with VLAN xyz0, the VLAN tag is converted to VLAN xyz1.

[0062] When configured in other modes, the switching chip does not have VLAN switching or QinQ functionality.

[0063] If the 'y' in the newly added service VLAN index VLAN xyz0 is of type 0, then:

[0064] Iterate through all identified VLANs. If a value is different from all other identified VLANs, do not update the hardware configuration and return directly. If a value is the same as an identified VLAN, replace that identified VLAN value with an unused VLAN value. This unused VLAN value is selected from 1 to 4095 and must be different from all other identified VLAN values ​​and service VLAN values. Simultaneously update the hardware configuration of the corresponding conversion VLAN value for this identified VLAN or service VLAN.

[0065] If the 'y' in the newly added service VLAN index VLAN xyz0 is type 1, then:

[0066] First, iterate through all identified VLAN values. If the value of the newly added service VLAN is the same as the value of an identified VLAN, replace that identified VLAN with an unused VLAN value. This unused VLAN value is selected from 1 to 4095 and must be different from all other identified VLAN values ​​and service VLAN values. Simultaneously update the hardware configuration of this identified VLAN value.

[0067] Then, iterate through the service VLANs of other Ethernet ports. If the service VLANs of all other Ethernet ports are different from the newly added service VLAN value, configure the newly added service VLAN index vlanx.yz0 to the corresponding port of the switching chip and the corresponding cascaded port, and configure the rule for the newly added service VLAN to allow vlanx.yz0 to pass. If the service VLAN is the same as that of other ports, enable the port-mac relationship table, configure the newly added service VLAN index vlanx.yz0 to the corresponding port of the switching chip and the corresponding cascaded port, and configure the rule to allow vlanx.yz0 to pass; the port-mac relationship table is populated with entries as needed when receiving packets, and all entries associated with that port are cleared when the corresponding port is disconnected. Figure 5 This application provides a schematic representation of the port-mac relationship. As shown in the figure, the port-mac relationship table represents the mapping relationship between Ethernet ports and source MAC addresses.

[0068] The message processing flow is as follows:

[0069] The Ethernet port of the switching chip receives packets and adds or modifies the VLAN tag field for the packets. The CPU data processing center first parses the VLAN tag field of the received packets, identifies the port of the packets according to the port-VLAN relationship table, and then decides whether to allow or discard the packets. For packets that are allowed, the VLAN tag field is removed or modified according to the requirements of the original service VLAN.

[0070] In some embodiments of this application, the CPU data processing center first parses the VLAN tags carried in the message. When the message carries two layers of VLAN tag fields, they are identified as the outer VLAN tag field and the inner VLAN tag field, respectively. When the message carries only one layer of VLAN tags, it is identified as the outer VLAN tag field. The outer VLAN tag field is identified by VLAN 0, and the inner VLAN tag field is identified by VLAN 1.

[0071] If VLAN I exists, all identified VLAN indices are searched. VLAN O must have the same VLAN ID value as one of the identified VLANs. The port corresponding to this identified VLAN is the Ethernet port for receiving the packet. Then, all service VLAN indices under this port are traversed. If a service VLAN with the same VLAN ID value as VLAN I exists, the outer VLAN tag field of the packet is removed and the packet is allowed to pass. If no service VLAN with the same VLAN ID value as VLAN I exists, the packet is discarded.

[0072] If VLAN I does not exist, first search all identified VLAN indices. If VLAN O has the same VLAN ID value as an identified VLAN, the port corresponding to that identified VLAN is the Ethernet port for receiving the packet. Then, iterate through all service VLAN indices under that port. If an index with a y-value of type 0 exists, modify the outer VLAN tag field of the packet to the VLAN ID value corresponding to that index with a y-value of type 0.

[0073] If VLAN I does not exist, and VLAN O is different from all VLAN ID values ​​that identify VLANs, then search for all service VLAN indices with a t value of type 0. If VLAN O is the same as the VLAN ID value of one and only one VLAN index, then the port corresponding to that VLAN index is the receiving Ethernet port. No further processing of the packet VLAN tagging is performed; the packet is allowed to pass directly.

[0074] If VLAN I does not exist, and VLAN O is different from all VLAN ID values ​​that identify VLANs, and also different from all service VLAN indices with a t-value of type 0, then search for all service VLAN indices with a t-value of type 1. If VLAN O matches the VLAN ID value of a certain VLAN index, then the port corresponding to that VLAN index is the receiving Ethernet port. Then, modify the outer VLAN tag field of the packet to the VLAN ID value corresponding to the service VLAN index with a t-value of 1 but the same xyz values ​​as that VLAN index, and allow the packet to pass.

[0075] If VLAN I does not exist, and VLAN O is different from all VLAN IDs that identify VLANs, and has the same t-value as multiple service VLANs of type 0, then the source MAC address of the packet is parsed, and the software port-mac table is searched. If the search is successful, the corresponding port is the receiving Ethernet port. If the search is unsuccessful, the hardware MAC address table of the switching chip is searched. In this case, the search will definitely be successful, and the corresponding port is the receiving Ethernet port. Then, the MAC address table in the switching chip is synchronized to the software port-mac table. No further processing of the packet VLAN tagging is performed; the packet is allowed to pass directly.

[0076] When configured in QinQ mode:

[0077] The CPU data processing center first parses the VLAN tag fields carried in the message. The outer VLAN tag field is identified by vlan0, and the inner VLAN tag field is identified by vlan1. When the message carries two layers of VLAN tag fields, it is identified as vlan0 and vlan1 respectively. When the message carries only one layer of VLAN tag fields, it is identified as the outer VLAN tag field vlan0.

[0078] If the outer VLAN tag field vlanO is the same as the value of a certain identified VLAN, the port corresponding to that identified VLAN is the Ethernet port for receiving packets.

[0079] If the inner VLAN tag field vlanI does not exist in the packet, the service VLAN index corresponding to the receiving Ethernet port of the packet is looked up according to the port-VLAN relationship table. If an index vlan x.0.zt with a y-value of type 0 exists for the receiving Ethernet port of the packet, the outer VLAN tag field in the packet is modified to vlan x.0.zt; if an index vlan x.0.zt with a y-value of type 0 does not exist for the receiving Ethernet port of the packet, the outer VLAN tag field vlanO is removed from the packet.

[0080] If the packet contains an inner VLAN tag field vlanI, then look up the VLAN index vlanx.yz0 corresponding to the receiving Ethernet port of the packet. If a VLAN index vlanx.1.z.0 with the same value as vlanI exists, then the outer VLAN tag field vlanO is directly removed; if no VLAN index with the same value as the inner VLAN tag field vlanI exists, then the packet is discarded.

[0081] When configured for VLAN translation mode:

[0082] If the outer VLAN tag field vlanO is the same as the value of a certain identified VLAN, then the port corresponding to that identified VLAN is the receiving Ethernet port of the packet. Search for all service VLAN indices corresponding to the receiving Ethernet port of the current packet. If an index vlan x.0.zt with a y-value of type 0 exists for the receiving Ethernet port of this packet, then modify the outer port index vlanO in the packet to vlan x.0.zt. If vlan x.0.zt does not exist, then remove the outer VLAN tag field vlanO from the packet.

[0083] Otherwise, if the outer VLAN tag field `vlanO` has the same value as a service VLAN, then the port corresponding to that service VLAN is the Ethernet port for receiving the packet. If `t` in the index of that service VLAN is 0 (that VLAN is a service VLAN), then the packet is allowed to pass; if `t` in the index of that service VLAN is 1 (that VLAN is the translation VLAN corresponding to the service VLAN), then the outer VLAN tag field `vlanO` is modified to the index `vlanx.yz0` of the service VLAN corresponding to the translation VLAN.

[0084] Other modes:

[0085] If the outer VLAN tag field vlanO is the same as the value of a certain identified VLAN, then the port corresponding to that identified VLAN is the receiving Ethernet port of the packet. Search for all service VLAN indices corresponding to the receiving Ethernet port of the current packet. If an index vlan x.0.zt with a y-value of type 0 exists for the receiving Ethernet port of this packet, then modify the outer port index vlany in the packet to vlan x.0.zt. If vlan x.0.zt does not exist, then remove the outer VLAN tag field vlanO from the packet.

[0086] If the outer VLAN tag field vlanO has the same value for only one service VLAN, then the port corresponding to that service VLAN is the Ethernet port for receiving the packet, and the packet is allowed to pass.

[0087] If the outer VLAN tag field vlanO has the same value as at least two service VLANs, the packet is allowed, and the software port-mac relationship table is searched based on the source MAC address in the packet. If the MAC address is not found in the software port-mac relationship table, the hardware MAC address table is searched, and the found MAC address is synchronized to the software port-mac relationship table.

[0088] In this application, CPU refers to the set of functions required for processing message forwarding, including corresponding software or supporting hardware acceleration modules; CPU is also the running carrier of software configuration programs.

[0089] In this application, the total bandwidth of the first LAN port, the second LAN port, and the third LAN port is greater than the bandwidth of the first cascaded port. Because all packets from one LAN port to another must pass through the LAN cascaded port to the CPU for processing before being sent back to the corresponding LAN port, during user operation, the total bandwidth required by the first, second, and third cascaded ports may exceed the bandwidth of the first cascaded port, causing network congestion and a poor user experience. To improve network communication speed, the CPU provided in this application includes a cascaded acceleration module, a speed testing module, and a packet parsing module. The packet parsing module analyzes the received packets and generates packet flow information. The speed testing module tests the corresponding Ethernet ports based on the packet flow information. If the packet flow is from one LAN port to another, the speed testing module measures the speed of the Ethernet port that generated the packet flow to obtain the current rate of that flow. The cascade acceleration module receives the current rate, adjusts the cascade status according to the current rate, marks the current system as being in acceleration state when acceleration is needed, records the acceleration port, and changes the connection relationship between the LAN port and the cascade port in the cascade relationship table.

[0090] Figure 6 This is a schematic diagram of the structure of a data processing chip provided in an embodiment of this application. Figure 7 A flowchart of a cascaded acceleration method provided in this application is shown. Figure 6 and Figure 7 As shown, the CPU includes a cascading acceleration module, a speed measurement module, and a packet parsing module. The packet parsing module analyzes received packets and generates packet flow information. The speed measurement module performs network speed tests on the corresponding Ethernet ports based on the packet flow information. If the packet flow is from one LAN port to another, the speed measurement module measures the speed of the LAN port that generated the packet flow to obtain its current speed. The cascading acceleration module receives the current speed, adjusts the cascading state accordingly, marks the current system as being in acceleration mode when acceleration is needed, records the acceleration port, and modifies the connection relationship between the LAN ports and the cascading ports in the cascading relationship table.

[0091] In this application, cascading status refers to the connection relationship between LAN ports and cascading ports. In this application, the cascading acceleration module, speed measurement module, and message parsing module can be located within the data processing center.

[0092] Figure 8 This is a schematic diagram of another router structure provided in an embodiment of this application. Figure 9 For this application Figure 8 The diagram shows the router cascading relationships.

[0093] If the current rate of an Ethernet port exceeds a preset threshold, the LAN port that generates the packet flow will be connected to another cascaded port. For example, if the packet parsing module parses the current packet flow as first LAN port → third LAN port, the speed measurement module measures the packet flow corresponding to the first and third LAN ports. If the current rate of the packet flow exceeds the preset threshold, one of the first or third LAN ports will be added to the WAN cascaded port (either the first or third LAN port), and the current system will be marked as accelerated. The connection relationship between the LAN port and the cascaded port in the cascaded relationship table will be changed. For instance, if the third LAN port is added to the WAN cascaded port in this application, the original cascaded relationship table will be changed to... Figure 8 , Figure 9 As shown.

[0094] In some embodiments of this application, global variables are created in the CPU software to record the acceleration status and acceleration port.

[0095] Figure 10 A cascaded acceleration method flow provided in the embodiments of this application Figure 2 .like Figure 10 As shown, the cascade acceleration module compares the received current rate with the preset threshold upper limit. If the current rate is greater than the preset threshold upper limit, it performs cascade switching.

[0096] In this application, the selection of the preset threshold upper limit can be set according to actual needs or experience. Typically, half of the physical bandwidth of the cascaded port is considered its actual bandwidth, and 70%, 80%, or 85% of the actual bandwidth can be chosen as the preset threshold upper limit. For example, if the physical bandwidth of the cascaded port is 1000Mbps and its actual bandwidth is 500Mbps, then the preset threshold upper limit can be 80% of its actual bandwidth, i.e., 400Mbps. Of course, the preset threshold upper limit can also be other required values ​​or empirical values.

[0097] During accelerated switching, the CPU looks up the port-vlan relationship table, configures the VLAN to which the LAN port to be changed belongs to on the WAN cascade port to allow passage, and removes the VLAN configuration from the LAN cascade port.

[0098] During the recovery switchover, the port-vlan relationship table is searched to configure the VLAN to which the LAN port to be changed belongs to, and the VLAN configuration is removed from the WAN cascade port.

[0099] In this application, the message parsing module analyzes the received messages and generates message flow information. The speed measurement module tests the corresponding Ethernet ports based on the message flow information. In accelerated mode, the speed measurement module measures the accelerated data stream to obtain the current rate. The cascade acceleration module receives the current rate; if the current rate is less than a preset lower threshold, the cascade acceleration module cancels the cascade state based on the current rate, removes the cascade state flag, and changes the connection relationship between LAN ports in the cascade relationship table.

[0100] In this application, the selection of the preset threshold lower limit can be set according to actual needs or experience. Typically, half of the physical bandwidth of the cascaded port is considered its actual bandwidth, and 10%, 20%, or 15% of the actual bandwidth can be chosen as the preset threshold lower limit. For example, if the physical bandwidth of the cascaded port is 1000Mbps and its actual bandwidth is 500Mbps, then the preset threshold lower limit can be 10% of its actual bandwidth, i.e., 50Mbps. Of course, the preset threshold lower limit can also be other required values ​​or empirical values.

[0101] In some embodiments of this application, the speed measurement module measures the speed of the LAN port that generates the packet flow to obtain the current speed and measurement time of the LAN port. The cascading acceleration module has preset upper and lower thresholds, as well as a time threshold. If the current speed is less than the lower threshold and the duration is greater than the time threshold, the cascading state is canceled, the cascading state flag is removed, and the connection relationship between the LAN port and the cascading port in the cascading relationship table is changed.

[0102] Since the above embodiments are all described in conjunction with other methods, and different embodiments have the same parts, the same or similar parts between the various embodiments in this specification can be referred to mutually. They will not be described in detail here.

[0103] It should be noted that, in this specification, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a circuit structure, article, or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a circuit structure, article, or device. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the circuit structure, article, or device that includes said element.

[0104] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the content of the claims.

[0105] The embodiments described above do not constitute a limitation on the scope of protection of this application.

Claims

1. A smart gateway, characterized in that, include: Switching chips and data processing chips, The switching chip includes: Ethernet ports, for connecting to user terminals, including: port 1, port 2, and port 3; First cascade port, the first port and the second port are connected to the first cascade port; The second cascade port is connected to the third port; The data processing chip includes: The first main port is connected to the first cascaded port; The second main port is connected to the second cascade port; The data processing center is connected to the first main port and the second main port. When the packet flow from the first port to the second port is greater than the preset threshold limit, the first port is configured to connect to the second cascaded port.

2. The smart gateway according to claim 1, characterized in that, The data processing center includes: The message analysis module receives the message, parses the message, and generates message flow information; The speed measurement module measures the current rate of the Ethernet port that generated the packet flow based on the packet flow direction information. The cascading acceleration module adjusts the connection relationship between the Ethernet port and the cascading port based on the current rate and a preset threshold.

3. The smart gateway according to claim 2, characterized in that, The cascading acceleration module has a port-vlan relationship table that maps the Ethernet port to the VLAN. When the connection relationship between the Ethernet port and the cascading port changes, the port-vlan relationship table is modified.

4. The smart gateway according to claim 3, characterized in that, The cascading acceleration module is also equipped with a cascading status flag, which is modified when the connection relationship between the Ethernet port and the cascading port changes.

5. The smart gateway according to claim 4, characterized in that, The cascaded acceleration module is further configured as follows: If the current rate is greater than the preset threshold limit and the cascading status is marked as not accelerated, and the packet flows from the first port to the second port, then the second port is connected to the second cascading port; If the current rate is less than the preset threshold lower limit and the cascading status is marked as an acceleration status, and the message flows from the first port to the second port, then the second port is connected to the first cascading port.

6. The smart gateway according to claim 1, characterized in that, The first port and the second port are LAN ports, and the third port is a WAN port; the Ethernet port is used to add or modify the VLAN tag field of the received packets; The data processing center has a port-vlan relationship table that represents the mapping relationship between the Ethernet port and the VLAN. It identifies the receiving Ethernet port of the packet based on the VLAN tag field, and removes, modifies, or discards the VLAN tag field.

7. The smart gateway according to claim 6, characterized in that, The data processing center is equipped with a conflict handling module, which, when the value of a newly added service VLAN is equal to the value of the current VLAN, modifies the value of the current VLAN to an unused VLAN value and synchronously updates the configuration of the switching chip.

8. The smart gateway according to claim 6, characterized in that, The VLAN includes the identification VLAN and the service VLAN; The identified VLAN index is vlan_px; The service VLAN index includes vlanx.yzt, where x is the Ethernet port index; y is the configuration type index. y = 0 means adding the specified VLAN type, and y = 1 means allowing the specified VLAN to pass through. z is the index of this type of VLAN sequence; t is the conversion type index. t=0 represents the configured service VLAN, and t=1 represents the conversion VLAN of the corresponding service VLAN.

9. The smart gateway according to claim 6, characterized in that, Identifying the Ethernet port for receiving packets based on the VLAN tag field, and removing, modifying, or discarding the VLAN tag field, including: The data processing center parses the packet to obtain the VLAN tag field of the packet; the VLAN tag field includes: an outer VLAN tag field and an inner VLAN tag field; The receiving Ethernet port of the packet is identified based on the outer VLAN tag field, and the packet is then stripped of the VLAN tag field, modified, or discarded.

Citation Information

Patent Citations

  • Communication device and implementation method with the LAN / WAN port switching function

    CN101009618A

  • Network switch chip and method for cascading the same

    US20040174890A1