Message transmission method, electronic equipment and system
By tunneling multicast messages in a multi-router networking environment and relying on FDB table entry transmission, the problem of network topology changes caused by WiFi signal interference is solved, and faster message transmission link updates and user experience are achieved promote.
Patent Information
- Application Number
- CN202310948106.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-02-14
AI Technical Summary
In a multi-router networking environment, WiFi signal interference causes changes in network topology, affecting the normal transmission of video streams, and causing IPTV program playback to be paused for a long time.
Faster message transmission link updates are achieved by tunneling multicast messages and relying on FDB table entries for transmission instead of IGMP SNOOPING table entries.
When the message transmission link changes, the FDB table entry can be updated faster, restore the message transmission process, reduce the time for video playback pause, and improve the user experience.
Smart Images

Figure CN119449681A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of message transmission, and more specifically, to a message transmission method, electronic device, and system. Background Art
[0002] Large-sized or villa-based families usually use multiple routers for wireless networking to ensure that there is a stable WiFi signal in every corner of the house. For example, an Internet Protocol Television (IPTV) set-top box usually needs to be connected to an optical modem or router to play TV programs. However, the video streams of many programs are usually carried by multicast messages. When these routers are wirelessly networked, if the WiFi signal is interfered with, the network topology may change, causing the transmission link of the message to change, which in turn affects the normal transmission of the video stream, causing the video (for example: IPTV program) to be suspended for a long time, thus affecting the user's viewing experience. Summary of the invention
[0003] The present application provides a method, electronic device and system for message transmission. Through this method, electronic device or system, the transmission of multicast messages between multiple routes no longer relies on IGMP SNOOPING table items, but relies on FDB table items. The update cycle of FDB table items is shorter than the update cycle of IGMP SNOOPING table items. When the message transmission link changes, the FDB table items can be updated faster, and the message transmission process returns to normal after the FDB table items are updated. For example, if the multicast message carries a video stream, the video playback pause caused by the change of the message transmission link can be restored in a shorter time, thereby significantly improving the user experience.
[0004] In a first aspect, a method for message transmission is provided, the method comprising: a first router performs tunnel encapsulation on a received first message, the first message being a multicast message, wherein a destination media access control MAC address of the first message after tunnel encapsulation is a MAC address of a target router; according to the destination MAC address of the first message after tunnel encapsulation, a sending interface is determined by querying a forwarding database FDB table entry in the first router; and sending the first message after tunnel encapsulation to the target router through the sending interface.
[0005] Optionally, the tunnel encapsulation may be a User Datagram Protocol UDP tunnel encapsulation, an Internet Protocol IP tunnel encapsulation, or a Transmission Control Protocol TCP tunnel encapsulation. The tunnel encapsulation may also be other types of tunnel encapsulation, which is not limited in the present application.
[0006] In some implementations, the destination MAC address is the MAC address of the layer-3 virtual network card of the target router.
[0007] In some embodiments, the first router determines the target router according to the destination IP address of the first message.
[0008] Among them, the destination MAC address of the first message after tunnel encapsulation is the MAC address of the target router, which can also be described as: the destination MAC address encapsulated when the first message is tunnel encapsulated is the MAC address of the target router, and the destination MAC address encapsulated when the first message is tunnel encapsulated is included in the tunnel MAC header encapsulated in the upper layer of the first message.
[0009] In an embodiment of the present application, multicast messages are transmitted in a tunnel-encapsulated format between multi-level router networks. The transmission process relies on FDB entries and no longer relies on IGMP SNOOPING entries. Since the update cycle of FDB entries is shorter than that of IGMP SNOOPING entries, when the message transmission link changes, the FDB entries can be updated faster, and the message transmission process returns to normal after the FDB entries are updated. For example, if the multicast message carries a video stream, the video playback pause caused by the switching of the message transmission link can be restored in a shorter time, thereby significantly improving the user experience.
[0010] In combination with the first aspect, in a possible implementation manner, the method further includes: when a path between the first router and the target router changes, updating an FDB table entry in the first router within a first time threshold, where the first time threshold is less than or equal to 5 seconds.
[0011] In some embodiments, the first time threshold is less than or equal to 2 seconds.
[0012] In some embodiments, the first time threshold is 1 second, or the first time threshold is 500 milliseconds.
[0013] In an embodiment of the present application, the update period of the FDB table items is limited to a range of less than or equal to 5 seconds or even shorter, which is much shorter than the update period of the IGMP SNOOPING table items. This enables the FDB table items to be updated more promptly when the message transmission link changes. For example, if the multicast message carries a video stream, the recovery time of the video playback pause caused by the switching of the message transmission link can be further shortened, and even the user can achieve no perception, thereby further improving the user experience.
[0014] In combination with the first aspect, in a possible implementation, a super network is established between the first router and multiple routers, the multiple routers are other routers in the network where the first router is located, and the multiple routers include the target router, wherein the tunnel encapsulation is any tunnel encapsulation type other than IP tunnel encapsulation, for example: UDP tunnel encapsulation, TCP tunnel encapsulation, etc.
[0015] In an embodiment of the present application, a method for timely updating of FDB table entries is provided. When a super networking function is established between multiple routers in a network, when a message transmission link changes, the FDB table entries can be updated in a timely manner based on the super networking function. For example, if the multicast message carries a video stream, the recovery time of the video playback pause caused by the change of the message transmission link can be further shortened, and the user can even achieve no perception of the recovery time, which can significantly improve the user experience.
[0016] In combination with the first aspect, in a possible implementation, the method also includes: the first router receives Address Resolution Protocol ARP messages broadcast by multiple routers respectively, and the ARP messages broadcast by the multiple routers are used to update the FDB table entries in the first router when the path between the first router and the target router changes, wherein the period for each of the multiple routers to broadcast the ARP message is a first time period, and the first time period is less than or equal to 5 seconds. The multiple routers are other routers in the network where the first router is located, and the multiple routers include the target router.
[0017] In an embodiment of the present application, another method for timely updating FDB table entries is provided. Multiple routers in the network can periodically send Address Resolution Protocol ARP messages through broadcasting to timely update FDB table entries in the routers in the network. In this way, when the message transmission link changes, the FDB table entries can be updated in a timely manner. For example, if the multicast message carries a video stream, the recovery time of the video playback pause caused by the change of the message transmission link can be further shortened, and even the user can achieve no perception, which can significantly improve the user experience.
[0018] In combination with the first aspect, in a possible implementation, the method further includes: the first router broadcasts an ARP message every first time period, and the ARP message broadcast by the first router is used to update the FDB table entries in the multiple routers when the path between the first router and the target router changes.
[0019] In some embodiments, the first time period is less than or equal to 2 seconds.
[0020] In some embodiments, the first time period is 1 second, or the first time period is 500 milliseconds.
[0021] In an embodiment of the present application, multiple routers in a network can periodically send Address Resolution Protocol ARP messages through broadcasting to timely update FDB entries in the routers in the network. In this way, when the message transmission link changes, the FDB entries can be updated in a timely manner. For example, if the multicast message carries a video stream, the recovery time of the video playback pause caused by the change of the message transmission link can be further shortened, and even the user can achieve no perception, which can significantly improve the user experience.
[0022] In combination with the first aspect, in a possible implementation manner, the path between the first router and the target router changes, including: a router in the path between the first router and the target router switches, and / or a network between two routers in the path between the first router and the target router switches.
[0023] In combination with the first aspect, in a possible implementation, the method also includes: the first router performs tunnel encapsulation on the received second message, the second message is a unicast message, wherein the destination MAC address of the second message after tunnel encapsulation is the MAC address of the target router; according to the destination MAC address of the second message after tunnel encapsulation, the sending interface of the second message after tunnel encapsulation is determined by querying the FDB table entry of the first router; the first router sends the second message after tunnel encapsulation to the target router through the sending interface of the second message after tunnel encapsulation.
[0024] The transmission of the second message between the first router and the target router depends on the FDB table entry.
[0025] In the embodiment of the present application, the transmission of unicast messages and multicast messages depends on FDB table entries, but not on IGMPSNOOPING table entries. Since the update period of FDB table entries is shorter than that of IGMP SNOOPING table entries, when the message transmission link changes, the FDB table entries can be updated faster, and the message transmission process returns to normal after the FDB table entries are updated. For example, if the message carries a video stream, the video playback pause caused by the switching of the message transmission link can be restored in a shorter time, thereby significantly improving the user experience.
[0026] In a second aspect, a method for message transmission is provided, the method comprising: a second router receives a first message after tunnel encapsulation sent by a first router, the first message being a multicast message; when a destination media access control MAC address of the first message after tunnel encapsulation is the same as a MAC address of a layer-3 virtual network card of the second router, the second router decapsulates the first message after tunnel encapsulation to obtain the first message; and the second router sends the first message.
[0027] Optionally, the tunnel encapsulation may be a User Datagram Protocol UDP tunnel encapsulation, an Internet Protocol IP tunnel encapsulation, or a Transmission Control Protocol TCP tunnel encapsulation. The tunnel encapsulation may also be other types of tunnel encapsulation, which is not limited in the present application.
[0028] In an embodiment of the present application, multicast messages are transmitted in a tunnel-encapsulated format between multi-level router networks. The transmission process relies on FDB entries and no longer relies on IGMP SNOOPING entries. Since the update cycle of FDB entries is shorter than that of IGMP SNOOPING entries, when the message transmission link changes, the FDB entries can be updated faster, and the message transmission process returns to normal after the FDB entries are updated. For example, if the multicast message carries a video stream, the video playback pause caused by the switching of the message transmission link can be restored in a shorter time, thereby significantly improving the user experience.
[0029] In combination with the second aspect, in a possible implementation, the method further includes: when a path between the first router and the second router changes, updating the FDB table entry in the second router within a first time threshold, where the first time threshold is less than or equal to 5 seconds.
[0030] In some embodiments, the first time threshold is less than or equal to 2 seconds.
[0031] In some embodiments, the first time threshold is 1 second, or the first time threshold is 500 milliseconds.
[0032] In an embodiment of the present application, the update period of the FDB table items is limited to a range of less than or equal to 5 seconds or even shorter, which is much shorter than the update period of the IGMP SNOOPING table items. This enables the FDB table items to be updated more promptly when the message transmission link changes. For example, if the multicast message carries a video stream, the recovery time of the video playback pause caused by the switching of the message transmission link can be further shortened, and even the user can achieve no perception, thereby further improving the user experience.
[0033] In conjunction with the second aspect, in a possible implementation, a super network is established between the second router and a plurality of routers, the plurality of routers are other routers in the network where the second router is located, and the plurality of routers include the first router.
[0034] In an embodiment of the present application, a method for timely updating of FDB table entries is provided. When a super networking function is established between multiple routers in a network, when a message transmission link changes, the FDB table entries can be updated in a timely manner based on the super networking function. For example, if the multicast message carries a video stream, the recovery time of the video playback pause caused by the change of the message transmission link can be further shortened, and the user can even achieve no perception of the recovery time, which can significantly improve the user experience.
[0035] In combination with the second aspect, in a possible implementation, the method further includes: the second router receives address resolution protocol ARP messages broadcasted by multiple routers respectively, and the ARP messages broadcasted by the multiple routers are used to update the FDB table entries in the second router when the path between the first router and the second router changes, wherein the period for each of the multiple routers to broadcast the ARP message is a first time period, and the first time period is less than or equal to 5 seconds, and the multiple routers are other routers in the network where the second router is located, and the multiple routers include the first router. In an embodiment of the present application, another method for timely updating FDB table entries is provided, and multiple routers in the network can periodically send address resolution protocol ARP messages by broadcasting, which is used to timely update the FDB table entries in the routers in the network. In this way, when the message transmission link changes, the FDB table entries can be updated in time. For example, if the multicast message carries a video stream, the recovery time of the video playback pause caused by the change of the message transmission link can be further shortened, and even the user can be made unaware, which can significantly improve the user experience.
[0036] In combination with the second aspect, in a possible implementation, the method further includes: the second router broadcasts an ARP message every first time period, and the ARP message broadcast by the second router is used to update the FDB table entries in the multiple routers when the path between the first router and the second router changes.
[0037] The first time period is less than or equal to 5 seconds, the multiple routers are other routers in the network where the second router is located, and the multiple routers include the first router.
[0038] In some embodiments, the first time period is less than or equal to 2 seconds.
[0039] In some embodiments, the first time period is 1 second, or the first time period is 500 milliseconds.
[0040] In an embodiment of the present application, multiple routers in a network can periodically send Address Resolution Protocol ARP messages through broadcasting to timely update FDB entries in the routers in the network. In this way, when the message transmission link changes, the FDB entries can be updated in a timely manner. For example, if the multicast message carries a video stream, the recovery time of the video playback pause caused by the change of the message transmission link can be further shortened, and even the user can achieve no perception, which can significantly improve the user experience.
[0041] In combination with the second aspect, in a possible implementation manner, the path between the first router and the second router changes, including: a router in the path between the first router and the second router switches, and / or a network between two routers in the path between the first router and the second router switches.
[0042] In combination with the second aspect, in a possible implementation, the method also includes: the second router receives a second message encapsulated by the tunnel sent by the first router, and the second message is a unicast message; when the destination MAC address of the second message encapsulated by the tunnel is the same as the MAC address of the three-layer virtual network card of the second router, the second router decapsulates the second message encapsulated by the tunnel to obtain the second message; and the second router sends the second message.
[0043] The transmission of the second message between the first router and the second router depends on the FDB table entry.
[0044] In the embodiment of the present application, the transmission of unicast messages and multicast messages depends on FDB table entries, but not on IGMPSNOOPING table entries. Since the update period of FDB table entries is shorter than that of IGMP SNOOPING table entries, when the message transmission link changes, the FDB table entries can be updated faster, and the message transmission process returns to normal after the FDB table entries are updated. For example, if the message carries a video stream, the video playback pause caused by the switching of the message transmission link can be restored in a shorter time, thereby significantly improving the user experience.
[0045] According to a third aspect, a system for message transmission is provided, the system comprising a first router and a second router, wherein the first router is used to: perform tunnel encapsulation on a received first message, the first message being a multicast message, wherein the destination media access control MAC address of the first message after tunnel encapsulation is the MAC address of the target router; determine a sending interface by querying a forwarding database FDB table entry in the first router according to the destination MAC address of the first message after tunnel encapsulation; send the first message after tunnel encapsulation to the second router through the sending interface; the second router is used to: receive the first message after tunnel encapsulation sent by the first router; when the destination media access control MAC address of the first message after tunnel encapsulation is the same as the MAC address of the third-layer virtual network card of the second router, decapsulate the first message after tunnel encapsulation to obtain the first message; and send the first message.
[0046] Optionally, the tunnel encapsulation may be a User Datagram Protocol UDP tunnel encapsulation, an Internet Protocol IP tunnel encapsulation, or a Transmission Control Protocol TCP tunnel encapsulation. The tunnel encapsulation may also be other types of tunnel encapsulation, which is not limited in the present application.
[0047] In some implementations, the destination MAC address is the MAC address of the layer-3 virtual network card of the target router.
[0048] In an embodiment of the present application, multicast messages are transmitted in a tunnel-encapsulated format between multi-level routing networks. The transmission process relies on FDB table entries and no longer relies on IGMP SNOOPING table entries. Since the update cycle of FDB table entries is shorter than that of IGMPSNOOPING table entries, when the message transmission link changes, the FDB table entries can be updated faster, and the message transmission process returns to normal after the FDB table entries are updated. For example, if the multicast message carries a video stream, the video playback pause caused by the switching of the message transmission link can be restored in a shorter time, thereby significantly improving the user experience.
[0049] In a fourth aspect, a system for message transmission is provided, the system comprising a first router and a second router, wherein the first router is used to implement the method in the above-mentioned first aspect or any possible implementation of the first aspect; the second router is used to implement the method in the above-mentioned second aspect or any possible implementation of the second aspect.
[0050] In a fifth aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store computer program code, and the processor is used to execute the computer program code stored in the memory to implement the method in the above-mentioned first aspect or any possible implementation of the first aspect, and / or to implement the above-mentioned second aspect or any possible implementation of the second aspect.
[0051] In a sixth aspect, a computer-readable storage medium is provided, in which a computer program or instruction is stored. When the computer program or instruction is executed, the method in the first aspect or any possible implementation of the first aspect is implemented, and / or the method in the second aspect or any possible implementation of the second aspect is implemented.
[0052] In the seventh aspect, a chip is provided, in which instructions are stored. When the chip is executed on a device, the chip executes the method in the above-mentioned first aspect or any possible implementation of the first aspect, and / or executes the above-mentioned second aspect or any possible implementation of the second aspect.
[0053] In an eighth aspect, a computer program product is provided, comprising: a computer program code, which, when executed, implements the method in the first aspect or any possible implementation of the first aspect, and / or implements the method in the second aspect or any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a schematic diagram of a message forwarding path in a multi-level networking scenario of routers in the prior art;
[0055] Figure 2 This is a schematic diagram of a scenario in which a message forwarding link changes, provided in an embodiment of the present application;
[0056] Figure 3 This is another schematic diagram of a scenario in which a message forwarding link changes, provided in an embodiment of the present application;
[0057] Figure 4 It is a schematic flow chart of a method for message transmission provided in an embodiment of the present application;
[0058] Figure 5 This is a schematic diagram of a message transmission path provided by an embodiment of the present application;
[0059] Figure 6 is a schematic flow chart of UDP tunnel encapsulation and decapsulation of a first message provided by an embodiment of the present application;
[0060] Figure 7is a schematic flowchart of IP tunnel encapsulation and decapsulation of a first message provided by an embodiment of the present application;
[0061] Figure 8 It is a schematic flow chart of a method for message transmission provided in an embodiment of the present application;
[0062] Fig. 9 is a schematic flow chart of another message transmission method provided in an embodiment of the present application;
[0063] Fig.10 It is a schematic diagram of functional modules corresponding to a system for message transmission provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The technical solution in the present application will be described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0065] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" or "multiple" refers to two or more than two.
[0066] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0067] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0068] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "one embodiment", "some embodiments", "another embodiment", "some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0069] The method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), routers, etc. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0070] Below, some terms involved in the embodiments of the present application are first introduced in detail.
[0071] 1. Router
[0072] A router is a hardware device that connects two or more networks and acts as a gateway between networks. It is a dedicated intelligent network device that reads the address in each data packet and then decides how to transmit it. It can understand different protocols, such as the Ethernet protocol used by a local area network. The router involved in the embodiment of the present application can be a home router.
[0073] 2. Optical modem
[0074] Optical modem is the abbreviation of optical modem, also known as single-port optical terminal, which is a three-piece optical fiber transmission device developed for special user environments. The device uses large-scale integrated chips, has simple circuits, low power consumption, high reliability, and has complete alarm status indication and perfect network management functions.
[0075] 3. Internet Group Management Protocol (IGMP)
[0076] IGMP protocol is a multicast protocol in the Internet protocol family. This protocol runs between hosts and multicast routers and is used to establish and maintain multicast membership between hosts and multicast routers. Internet group management protocol snooping (IGMP SNOOPING) maintains a forwarding table of multicast members and corresponding forwarding interfaces by listening to and analyzing IGMP control messages between layer 3 multicast devices and hosts. By querying the forwarding table, the router only needs to forward multicast messages to the specified interface, avoiding flooding forwarding to all interfaces and saving network bandwidth.
[0077] 4. Super Networking
[0078] Super networking is different from traditional distributed routers. Super networking supports simultaneous networking of three high-speed channels: power lines, network cables, and wifi (2.4GHz and 5G Hz), which can greatly improve medium and long-distance signal coverage and performance.
[0079] The technical solution of the embodiment of the present application can be applied to the playback scenario of Internet protocol television (or network television) (internet protocol television, IPTV).
[0080] It should be noted that in the embodiments of the present application, "router" may be referred to as "route".
[0081] For example, Figure 1 A schematic diagram of a message forwarding path in a multi-level networking scenario of routers in the prior art is shown.
[0082] like Figure 1As shown, the multi-level networking scenario includes a main route, sub-route 1, sub-route 2, sub-route 3 and a set-top box. When there is an IPTV service multicast message, the main route forwards the multicast stream to sub-route 1 through Ethernet (or wifi) according to the IGMP SNOOPING table entry; after sub-route 1 receives the multicast stream, it forwards the multicast stream to sub-route 2 through wifi (or Ethernet) according to the IGMP SNOOPING table entry; after sub-route 2 receives the multicast stream, it forwards the multicast stream to the set-top box through Ethernet according to the IGMP SNOOPING table entry.
[0083] It can be seen that in the forwarding process of the existing IPTV service multicast message, the forwarding of the IPTV service multicast message depends on the IGMP SNOOPING table items in each router on the forwarding path. This will cause the network topology to change when the wireless mesh network is formed between multiple routers if the WiFi signal is interfered with. In the case of a change in the network topology, if the forwarding link between the optical modem and the router connected to the set-top box changes, the IPTV program playback will be suspended for a long time, thereby greatly affecting the user's viewing experience.
[0084] Below, illustratively, in combination Figure 2 and Figure 3 , an exemplary description is given of the scenario in which the message transmission link between the optical modem and the set-top box changes in a multi-level networking scenario.
[0085] Figure 2 A schematic diagram of a scenario in which a message forwarding link changes in a multi-level networking scenario provided in an embodiment of the present application is shown.
[0086] like Figure 2 As shown, the multi-level networking scenario includes an optical modem, a main router, sub-router 1 (first-level networking), sub-router 2 (second-level networking) and a set-top box. The original message forwarding link is: the optical modem forwards the message to the main router via Ethernet, the main router forwards the message to sub-router 1 via Ethernet, sub-router 1 forwards the message to sub-router 2 via 2.4G wifi network, and sub-router 2 forwards the message to the set-top box via Ethernet; on this basis, the link between sub-router 1 and sub-router 2 is switched from the 2.4G wifi network to the 5G wifi network, and the message forwarding link after the switch is: the optical modem forwards the message to the main router via Ethernet, the main router forwards the message to sub-router 1 via Ethernet, sub-router 1 forwards the message to sub-router 2 via the 5G wifi network, and sub-router 2 forwards the message to the set-top box via Ethernet.
[0087] It should be noted that: in the existing solution, the multicast message between sub-router 1 and sub-router 2 relies on the IGMPSNOOPING table entry for transmission. When the link between sub-router 1 and sub-router 2 switches from the 2.4G wifi network to the 5G wifi network, the IGMP SNOOPING table entry on sub-router 1 will not be updated, and the message will still be forwarded to sub-router 2 via the 2.4G wifi network link before the switch, which will cause message forwarding errors and cause the set-top box playback to pause.
[0088] Figure 3 A schematic diagram of a scenario in which a message forwarding link changes in another multi-stage networking scenario provided in an embodiment of the present application is shown.
[0089] like Figure 3 As shown, the multi-level networking scenario includes an optical modem, a main router, sub-router 1, sub-router 2, sub-router 3 and a set-top box. The original message forwarding link is: the optical modem forwards the message to the main router via Ethernet, the main router forwards the message to sub-router 1 via Ethernet, sub-router 1 forwards the message to sub-router 2 via the wifi network, and sub-router 2 forwards the message to the set-top box via Ethernet; on this basis, the sub-route connected to sub-router 2 is switched from sub-route 1 to sub-route 3, and the message forwarding link after the switch is: the optical modem forwards the message to the main router via Ethernet, the main router forwards the message to sub-router 3 via Ethernet, sub-router 3 forwards the message to sub-router 2 via the wifi network, and sub-router 2 forwards the message to the set-top box via Ethernet.
[0090] It should be noted that: in the existing solution, the multicast message between sub-route 1 and sub-route 2 relies on the IGMPSNOOPING table entry for transmission. When the sub-route accessing sub-route 2 switches from sub-route 1 to sub-route 3, the IGMP SNOOPING table entries in other routes in the network (such as the main route) will not be updated, and the message will still be forwarded along the path before the switch (that is, the main route forwards to sub-route 1), which will cause message forwarding errors, and then cause the set-top box playback to pause.
[0091] It should be understood that: Figure 2 and Figure 3 The schematic diagram of the scenario in which the message transmission link between the optical modem and the set-top box changes in the multi-level networking scenario is shown. The scenario in which the message transmission link between the optical modem and the set-top box changes may also be other scenarios, such as: a network switching scenario between any two or more routes in the transmission link, or: a scenario in which any one or more routes in the transmission link are switched to other routes, which is not limited in the present application.
[0092] In response to the problem that IPTV playback is easily paused for a long time during the message forwarding process, the embodiments of the present application provide a message transmission method, electronic device and system. Through the message transmission method, electronic device and system, when the message transmission link between the optical modem and the set-top box changes, the paused IPTV playback can be resumed in a short time, for example, within 5 seconds, and can also be resumed within 2 seconds, so that the user is almost unaware of the IPTV playback pause phenomenon.
[0093] For example, Figure 4 FIG. 4 is a schematic flow chart of a method 400 for message transmission provided in an embodiment of the present application. Figure 4 As shown, the method 400 includes:
[0094] S401: The optical modem sends a first message to the primary router.
[0095] Among them, the optical modem can send a first message to the main router through Ethernet, the first message is a message related to the IPTV service, and the first message is a multicast message.
[0096] S402: After receiving the first message, the primary router performs tunnel encapsulation on the first message.
[0097] Among them, the type of tunnel encapsulation can be user datagram protocol (UDP) tunnel encapsulation, transmission control protocol (TCP) tunnel encapsulation, Internet protocol (IP) tunnel encapsulation, or other types of tunnel encapsulation, which is not limited in this application.
[0098] The destination media access control (MAC) address of the first message after tunnel encapsulation is the MAC address of the target router. Alternatively, it can be described as follows: the destination MAC address encapsulated when the first message is tunnel encapsulated is the MAC address of the target router, and the destination MAC address encapsulated when the first message is tunnel encapsulated is included in the tunnel MAC header encapsulated in the upper layer of the first message (see below). Figure 6 Tunnel MAC header in the illustrated embodiment).
[0099] The method may further include the step of: the main router determining the target route according to the destination IP address of the first message.
[0100] S403: The main router queries its own forwarding database (FDB) table entry, and forwards the first message after tunnel encapsulation to the sub-router according to the FDB table entry.
[0101] Specifically, the main router determines the sending interface by querying its own FDB table entry according to the destination MAC address of the encapsulated first message; then sends the first message after tunnel encapsulation to the sub-router through the sending interface, and the FDB table entry includes the correspondence between the destination MAC address and the sending interface.
[0102] S404: After receiving the first message encapsulated by the tunnel, the sub-router decapsulates the first message encapsulated by the tunnel to obtain the first message.
[0103] Specifically, after the sub-router receives the first message after tunnel encapsulation, it determines whether the destination MAC address of the first message after tunnel encapsulation is the same as the MAC address of the three-layer virtual network card of the sub-router. When it is determined that the destination MAC address of the first message after tunnel encapsulation is the same as the MAC address of the three-layer virtual network card of the sub-router, the sub-router decapsulates the first message after tunnel encapsulation.
[0104] More specifically, after receiving the first message after tunnel encapsulation, the sub-router determines whether the destination MAC address of the first message after tunnel encapsulation is the same as the MAC address of one of the one or more three-layer virtual network cards of the sub-router. When it is determined that the destination MAC address of the first message after tunnel encapsulation is the same as the MAC address of one of the one or more three-layer virtual network cards of the sub-router, the three-layer virtual network card with the same destination MAC address as the encapsulated first message decapsulates the first message after tunnel encapsulation.
[0105] S405: The sub-router sends the first message to the set-top box.
[0106] In some embodiments, the main route and the sub-route may also rely on FDB entries to transmit unicast messages.
[0107] After receiving the unicast message sent by the main router, the sub-router determines the first sending interface of the unicast message by querying its own FDB table entry, and then sends the unicast message to the set-top box corresponding to the first sending interface through the sending interface of the unicast message.
[0108] After the sub-router receives the first message sent by the main router, it determines the second sending interface of the first message by querying its own IGMP SNOOPING table entry, and then sends the first message to the set-top box corresponding to the second sending interface through the second sending interface of the first message, wherein the first sending interface and the second sending interface can be the same.
[0109] It should be understood that since FDB entries have a shorter update cycle compared to IGMP SNOOPING entries, when the message transmission link between the optical modem and the set-top box changes, the FDB entries in the main route and sub-route can be updated more promptly.
[0110] In one feasible method, a "super networking" function is established between the main route and one or more sub-routes. When the message transmission link between the optical modem and the set-top box changes, the "super networking" function can move the flow (for example, multicast flow, unicast flow, etc.) within two seconds based on the five-tuple (source IP, destination IP, source port, destination port, protocol type) (that is, move the first message to the switched link for transmission), thereby enabling the FDB table entries in the main route and one or more sub-routes to be updated in a timely manner.
[0111] In another achievable manner, the main route and one or more sub-routes in the network broadcast an address resolution protocol (ARP) every M seconds (which can also be described as a periodic broadcast), and the ARP is used to timely update the FDB table entries in other routes in the network, where M is less than or equal to 5 seconds, or M is less than or equal to 2 seconds, or M is less than or equal to 1 second, for example, M = 500 milliseconds. In this way, the FDB table entries in the main route and one or more sub-routes can also be updated in a timely manner.
[0112] In an embodiment of the present application, multicast messages are transmitted in a tunnel-encapsulated format between multi-level routing networks. The transmission process relies on FDB table entries and no longer relies on IGMP SNOOPING table entries. Since the update cycle of FDB table entries is shorter than that of IGMPSNOOPING table entries, when the message transmission link changes, the FDB table entries can be updated faster, and the message transmission process returns to normal after the FDB table entries are updated. For example, if the multicast message carries a video stream, the video playback pause caused by the switching of the message transmission link can be restored in a shorter time, thereby significantly improving the user experience.
[0113] For example, Figure 5 A schematic diagram of a message transmission path provided in an embodiment of the present application is shown.
[0114] like Figure 5 As shown, the components involved in message transmission include an optical modem, a main router, sub-router 1, sub-router 2, set-top box 1, set-top box 2, and set-top box 3.
[0115] Among them, the main route, sub-route 1 and sub-route 2 are all equipped with bridge 1 (br1) and bridge 0 (br0). Bridge 1 represents the bridge for processing IPTV services, and bridge 0 represents the bridge for processing Internet access services. The settings of bridge 1 and bridge 0 can isolate the messages of IPTV services and Internet access services. In bridge 1, the forwarding of unicast messages depends on the FDB table forwarding mechanism, and the forwarding of multicast messages depends on the IGMP SNOOPING table forwarding mechanism.
[0116] In the main route, sub-route 1 and sub-route 2, a three-layer virtual network card (tun) is created in bridge 0, and a two-layer virtual network card (tap) is created in bridge 1. The three-layer virtual network card and the two-layer virtual network card in each router correspond one to one; sub-route 1 and sub-route 2 correspond to the three-layer virtual network card 1 and the three-layer virtual network card 2 on the main route respectively; sub-route 1 is configured to access set-top box 1 and set-top box 2, and sub-route 2 is configured to access set-top box 3; among them, the two-layer virtual network card is a two-layer interface and does not need to be configured with an IP address; the three-layer virtual network card is a three-layer interface and needs to be configured with an IPv4 address and the IPv4 address of the other end of the tunnel; the main route, sub-route 1 and sub-route 2 are all equipped with an upstream interface and a downstream interface.
[0117] Should Figure 5 The transmission paths of the IPTV messages corresponding to the set-top box 1, the set-top box 2 and the set-top box 3 are shown respectively. Specifically:
[0118] The transmission process of the first message from the optical modem to the set-top box 1 is:
[0119] (1) The optical modem transmits the first message to the primary router.
[0120] (2) The primary router receives a first message through interface 1, where the first message is a multicast message.
[0121] The main router can also receive a second message through interface 1, where the second message is a unicast message.
[0122] (3) For the first message, based on the destination IP address of the first message, the primary router queries the IGMPSNOOPING entry in bridge 1, and sends the first message to the corresponding layer 2 virtual network card according to the IGMP SNOOPING entry. For example, in this embodiment, the first message is sent to layer 2 virtual network card 1 according to the IGMP SNOOPING entry, wherein the IGMP SNOOPING entry includes the correspondence between the destination IP address and the layer 2 virtual network card. In this embodiment, the IGMP SNOOPING entry in bridge 1 In the SNOOPING table item, the destination IP address of the first message corresponds to the layer-2 virtual network card 1; for the second message, based on the destination MAC address of the second message, the main router queries the FDB table item in the bridge 1, and sends the second message to the corresponding layer-2 virtual network card according to the FDB table item. For example, in this embodiment, the message is sent to the layer-2 virtual network card 1 according to the FDB table item, wherein the FDB table item includes the correspondence between the destination MAC address and the layer-2 virtual network card. In this embodiment, in the FDB table item in the bridge 1, the destination MAC address of the second message corresponds to the layer-2 virtual network card 1.
[0123] (4) Inside the main router, after receiving the first message, the Layer 2 virtual network card 1 forwards the first message to the corresponding Layer 3 virtual network card 1 in bridge 0.
[0124] (5) The layer-3 virtual network card 1 performs tunnel encapsulation on the first message to obtain the tunnel-encapsulated first message.
[0125] (6) Based on the destination MAC address of the first message after tunnel encapsulation, the main router queries the FDB table entry in bridge 0, and sends the first message after tunnel encapsulation to downstream interface 2.1 according to the FDB table entry, wherein the FDB table entry in bridge 0 includes the correspondence between the destination MAC address and the sending interface. In this embodiment, in the FDB table entry in bridge 0, the destination MAC address of the first message after tunnel encapsulation corresponds to the sending interface 2.1, and is sent by interface 2.1 to interface 3 in sub-router 1.
[0126] In this embodiment, the destination MAC address of the first message after tunnel encapsulation is the MAC address of the three-layer virtual network card 3 of the sub-router 1.
[0127] It should be understood that the main route is determined according to the FDB table entry to send the first message after tunnel encapsulation to the sub-route 1.
[0128] (7) Based on the destination MAC address of the first message after tunnel encapsulation, sub-router 1 queries the FDB table entry in its own bridge 0, and sends the first message after tunnel encapsulation from interface 3 to the corresponding three-layer virtual network card according to the FDB table entry. For example, in this embodiment, the message is sent to the three-layer virtual network card 3 according to the FDB table entry, wherein the FDB table entry in the bridge 0 includes the correspondence between the destination MAC address and the three-layer virtual network card. In this embodiment, in the FDB table entry in the bridge 0, the destination MAC address of the first message after tunnel encapsulation corresponds to the three-layer virtual network card 3.
[0129] (8) The layer-3 virtual network card 3 decapsulates the first message encapsulated by the tunnel to obtain the first message.
[0130] (9) Inside sub-router 1, the layer-3 virtual network card 3 forwards the first message to the corresponding layer-2 virtual network card 3.
[0131] (10) For the first message, based on the destination IP address of the first message, sub-router 1 queries the IGMPSNOOPING table entry in bridge 1, and sends the first message to interface 4 according to the IGMP SNOOPING table entry, wherein the IGMPSNOOPING table entry in bridge 1 includes the correspondence between the destination IP address and the sending interface. In this embodiment, in the IGMPSNOOPING table entry in bridge 1, the destination IP address of the first message corresponds to the sending interface 4; for the second message, based on the destination MAC address of the first message, sub-router 1 queries the FDB table entry in its own bridge 1, and sends the second message to interface 4 according to the FDB table entry, wherein the FDB table entry in bridge 1 includes the correspondence between the destination MAC address and the sending interface. In this embodiment, in the FDB table entry in bridge 1, the destination MAC address of the first message corresponds to the sending interface 4.
[0132] It should be understood that the sub-route is determined according to the FDB table entry or the IGMP SNOOPING table entry to send the first message to the interface 4 (which can also be extended to the set-top box 1).
[0133] (11) Sub-router 1 transmits the first message to set-top box 1 connected to interface 4 through interface 4. Set-top box 1 and interface 4 have a corresponding relationship.
[0134] In some embodiments, the main route, sub-route 1, sub-route 2 and other routes in the network broadcast ARP messages every first time threshold. The ARP messages are used for the main route, sub-route 1, sub-route 2 and other routes in the network to update their own FDB entries. For example, when the transmission path of the first message between the main route and sub-route 1 changes, the ARP message received by the main route through interface 2.2 carries the MAC address of sub-route 1, then the main route updates the FDB entry in bridge 0, that is, the correspondence between the MAC address of sub-route 1 and the sending interface 2.1 is updated to the correspondence between the MAC address of sub-route 1 and the sending interface 2.2. Among them, the first time threshold is less than or equal to 5 seconds, or the first time threshold is less than or equal to 2 seconds, or the first time threshold is less than or equal to 1 second, for example, equal to 500 milliseconds. The transmission process of the first message from the optical modem to the set-top box 2 is:
[0135] (1) The optical modem transmits the first message to the primary router.
[0136] (2) The primary router receives a first message through interface 1, where the first message is a multicast message.
[0137] The main router can also receive a second message through interface 1, where the second message is a unicast message.
[0138] (3) For the first message, based on the destination IP address of the first message, the primary router queries the IGMPSNOOPING entry in bridge 1, and sends the first message to the corresponding layer 2 virtual network card according to the IGMP SNOOPING entry. For example, in this embodiment, the first message is sent to layer 2 virtual network card 1 according to the IGMP SNOOPING entry, wherein the IGMP SNOOPING entry includes the correspondence between the destination IP address and the layer 2 virtual network card. In this embodiment, the IGMP SNOOPING entry in bridge 1 In the SNOOPING table item, the destination IP address of the first message corresponds to the layer-2 virtual network card 1; for the second message, based on the destination MAC address of the second message, the main router queries the FDB table item in the bridge 1, and sends the second message to the corresponding layer-2 virtual network card according to the FDB table item. For example, in this embodiment, the message is sent to the layer-2 virtual network card 1 according to the FDB table item, wherein the FDB table item includes the correspondence between the destination MAC address and the layer-2 virtual network card. In this embodiment, in the FDB table item in the bridge 1, the destination MAC address of the second message corresponds to the layer-2 virtual network card 1.
[0139] (4) Inside the main router, after receiving the first message, the Layer 2 virtual network card 1 forwards the first message to the corresponding Layer 3 virtual network card 1 in bridge 0.
[0140] (5) The layer-3 virtual network card 1 performs tunnel encapsulation on the first message to obtain the tunnel-encapsulated first message.
[0141] (6) Based on the destination MAC address of the first message after tunnel encapsulation, the main router queries the FDB table entry in bridge 0, and sends the first message after tunnel encapsulation to downstream interface 2.1 according to the FDB table entry, wherein the FDB table entry in bridge 0 includes the correspondence between the destination MAC address and the sending interface. In this embodiment, in the FDB table entry in bridge 0, the destination MAC address of the first message after tunnel encapsulation corresponds to the sending interface 2.1, and is sent by interface 2.1 to interface 3 in sub-router 1.
[0142] In this embodiment, the destination MAC address of the first message after tunnel encapsulation is the MAC address of the three-layer virtual network card 3 of the sub-router 1.
[0143] It should be understood that the main route is determined according to the FDB table entry to send the first message after tunnel encapsulation to the sub-route 1.
[0144] (7) Based on the destination MAC address of the first message after tunnel encapsulation, sub-router 1 queries the FDB table entry in its own bridge 0, and sends the first message after tunnel encapsulation from interface 3 to the corresponding three-layer virtual network card according to the FDB table entry. For example, in this embodiment, the message is sent to the three-layer virtual network card 3 according to the FDB table entry, wherein the FDB table entry in the bridge 0 includes the correspondence between the destination MAC address and the three-layer virtual network card. In this embodiment, in the FDB table entry in the bridge 0, the destination MAC address of the first message after tunnel encapsulation corresponds to the three-layer virtual network card 3.
[0145] (8) The layer-3 virtual network card 3 decapsulates the first message encapsulated by the tunnel to obtain the first message.
[0146] (9) Inside sub-router 1, the layer-3 virtual network card 3 forwards the first message to the corresponding layer-2 virtual network card 3.
[0147] (10) For the first message, based on the destination IP address of the first message, sub-router 1 queries the IGMPSNOOPING table entry in bridge 1, and sends the first message to interface 5 according to the IGMP SNOOPING table entry, wherein the IGMPSNOOPING table entry in bridge 1 includes the correspondence between the destination IP address and the sending interface. In this embodiment, in the IGMPSNOOPING table entry in bridge 1, the destination IP address of the first message corresponds to the sending interface 5; for the second message, based on the destination MAC address of the second message, sub-router 1 queries the FDB table entry in its own bridge 1, and sends the second message to interface 5 according to the FDB table entry, wherein the FDB table entry in bridge 1 includes the correspondence between the destination MAC address and the sending interface. In this embodiment, in the FDB table entry in bridge 1, the destination MAC address of the first message corresponds to the sending interface 5.
[0148] It should be understood that the sub-route is determined according to the FDB table entry or the IGMP SNOOPING table entry to send the first message to the interface 5 (which can also be extended to the set-top box 2).
[0149] (11) Sub-router 1 transmits the first message to set-top box 2 connected to interface 5 through interface 5. The set-top box 2 and interface 5 have a corresponding relationship.
[0150] The transmission process of the first message from the optical modem to the set-top box 3 is as follows:
[0151] (1) The optical modem transmits the first message to the primary router.
[0152] (2) The primary router receives a first message through interface 1, where the first message is a multicast message.
[0153] The main router can also receive a second message through interface 1, where the second message is a unicast message.
[0154] (3) For the first message, based on the destination IP address of the first message, the primary router queries the IGMPSNOOPING entry in bridge 1, and sends the first message to the corresponding layer 2 virtual network card according to the IGMP SNOOPING entry. For example, in this embodiment, the first message is sent to layer 2 virtual network card 2 according to the IGMP SNOOPING entry, wherein the IGMP SNOOPING entry includes the correspondence between the destination IP address and the layer 2 virtual network card. In this embodiment, the IGMP SNOOPING entry in bridge 1 In the SNOOPING table item, the destination IP address of the first message corresponds to the layer-2 virtual network card 2; for the second message, based on the destination MAC address of the second message, the main router queries the FDB table item in the bridge 1, and sends the second message to the corresponding layer-2 virtual network card according to the FDB table item. For example, in this embodiment, the message is sent to the layer-2 virtual network card 2 according to the FDB table item, wherein the FDB table item includes the correspondence between the destination MAC address and the layer-2 virtual network card. In this embodiment, in the FDB table item in the bridge 1, the destination MAC address of the second message corresponds to the layer-2 virtual network card 2.
[0155] (4) Inside the main router, after receiving the first message, the layer 2 virtual network card 2 forwards the first message to the corresponding layer 3 virtual network card 2 in bridge 0.
[0156] (5) The layer-3 virtual network card 2 performs tunnel encapsulation on the first message to obtain the tunnel-encapsulated first message.
[0157] (6) Based on the destination MAC address of the first message after tunnel encapsulation, the main router queries the FDB table entry in bridge 0, and sends the first message after tunnel encapsulation to downstream interface 2.2 according to the FDB table entry, wherein the FDB table entry in bridge 0 includes the correspondence between the destination MAC address and the sending interface. In this embodiment, in the FDB table entry in bridge 0, the destination MAC address of the first message after tunnel encapsulation corresponds to the sending interface 2.2, and is sent by interface 2.2 to interface 6 in sub-router 2.
[0158] In this embodiment, the destination MAC address of the first message after tunnel encapsulation is the MAC address of the three-layer virtual network card 4 of the sub-router 2.
[0159] It should be understood that the main route is determined according to the FDB table entry to send the first message after tunnel encapsulation to the sub-route 2.
[0160] (7) Based on the destination MAC address of the first message after tunnel encapsulation, sub-router 2 queries the FDB table entry in its own bridge 0, and sends the first message after tunnel encapsulation from interface 6 to the corresponding three-layer virtual network card according to the FDB table entry. For example, in this embodiment, the message is sent to the three-layer virtual network card 4 according to the FDB table entry, wherein the FDB table entry in the bridge 0 includes the correspondence between the destination MAC address and the three-layer virtual network card. In this embodiment, in the FDB table entry in the bridge 0, the destination MAC address of the first message after tunnel encapsulation corresponds to the three-layer virtual network card 4.
[0161] (8) The layer-3 virtual network card 4 decapsulates the first message encapsulated by the tunnel to obtain the first message.
[0162] (9) Inside sub-router 2, the layer-3 virtual network card 4 forwards the first message to the corresponding layer-2 virtual network card 4.
[0163] (10) For the first message, based on the destination IP address of the first message, sub-router 2 queries the IGMPSNOOPING table entry in bridge 1, and sends the first message to interface 7 according to the IGMP SNOOPING table entry, wherein the IGMPSNOOPING table entry in bridge 1 includes the correspondence between the destination IP address and the sending interface. In this embodiment, in the IGMPSNOOPING table entry in bridge 1, the destination IP address of the first message corresponds to the sending interface 7; for the second message, sub-router 2 queries the FDB table entry in its own bridge 1, and sends the second message to interface 7 according to the FDB table entry, wherein the FDB table entry in bridge 1 includes the correspondence between the destination MAC address and the sending interface. In this embodiment, in the FDB table entry in bridge 1, the destination MAC address of the first message corresponds to the sending interface 7.
[0164] It should be understood that the sub-route is determined according to the FDB table entry or the IGMP SNOOPING table entry to send the first message to the interface 7 (which can also be extended to the set-top box 3).
[0165] (11) Sub-router 2 transmits the first message to set-top box 3 connected to interface 7 through interface 7. There is a corresponding relationship between set-top box 3 and interface 7. In order to more clearly understand the process of tunnel encapsulation and decapsulation of the first message by the router through its own three-layer virtual network card, for example, Figure 5 Taking the transmission process of the first message from the optical modem to the set-top box 3 as an example, Figure 6 A schematic flowchart of UDP tunnel encapsulation and decapsulation of a first message provided by an embodiment of the present application is shown.
[0166] like Figure 6 As shown, the components involved in the transmission process of the first message from the optical modem to the set-top box 3 include the optical modem, the main router, the sub-router 2 and the set-top box 3.
[0167] Among them, bridge 1 (br1) and bridge 0 (br0) are set in the main route and sub-route 2. Bridge 1 represents the bridge used to process IPTV services, and bridge 0 represents the bridge used to process Internet access services. The settings of bridge 1 and bridge 0 can isolate the messages of IPTV services and Internet access services. In bridge 1, the forwarding of unicast messages depends on the FDB table forwarding mechanism, and the forwarding of multicast messages depends on the IGMP SNOOPING table forwarding mechanism.
[0168] In the main route and sub-route 2, a three-layer virtual network card (tun) is created in bridge 0, and a two-layer virtual network card (tap) is created in bridge 1. The three-layer virtual network card and the two-layer virtual network card in each router correspond one to one; sub-route 2 corresponds to the three-layer virtual network card 2 on the main route; sub-route 2 is configured to access set-top box 3; among them, the two-layer virtual network card is a two-layer interface and does not need to be configured with an IP address; the three-layer virtual network card is a three-layer interface and needs to be configured with an IPv4 address and the IPv4 address of the other end of the tunnel; both the main route and sub-route 2 are equipped with an upstream interface and a downstream interface.
[0169] Depend on Figure 6 It can be seen that the process of transmitting the first message from the optical modem to the set-top box 3 is specifically as follows:
[0170] (1) The optical modem transmits the first message to interface 1 in the primary router. The message transmitted to interface 1 includes: an original MAC header, an original IP header, an original UDP / TCP header, and a data portion. The first message is a multicast message.
[0171] The optical modem can also transmit the second message to interface 1 in the main router, and the second message is a unicast message.
[0172] (2) For the first message, based on the destination IP address of the first message, the main router queries the IGMPSNOOPING table item in bridge 1, and forwards the first message to the second-layer virtual network card 2 according to the IGMP SNOOPING table item, wherein the IGMPSNOOPING table item includes the correspondence between the destination IP address and the second-layer virtual network card. In this embodiment, in the IGMP SNOOPING table item in bridge 1, the destination IP address of the first message corresponds to the second-layer virtual network card 2; For the second message, based on the destination MAC address of the second message, the main router queries the FDB table item in bridge 1, and forwards the second message to the second-layer virtual network card 2 according to the FDB table item, wherein the FDB table item includes the correspondence between the destination MAC address and the second-layer virtual network card. In this embodiment, in the FDB table item in bridge 1, the destination MAC address of the second message corresponds to the second-layer virtual network card 2.
[0173] It should be noted that in this step, the main router determines which layer 2 virtual network card in bridge 1 to transmit the first message to based on the IGMP SNOOPING table entry in bridge 1. This process occurs during the internal transmission of the first message in the main router. Since the internal transmission process does not involve changes in the message transmission path, the IGMP SNOOPING table entry used in this step usually does not need to be updated. (3) Inside the main router, layer 2 virtual network card 2 forwards the first message to the corresponding layer 3 virtual network card 2 in bridge 0, and the layer 3 virtual network card 2 performs UDP tunnel encapsulation on the first message. The first message after UDP tunnel encapsulation includes: tunnel MAC header, tunnel IP header, tunnel UDP header, original MAC header, original IP header, original UDP / TCP header and data part.
[0174] That is to say, after the first message is encapsulated through the UDP tunnel, compared with the original message, additional tunnel headers are added: tunnel MAC header, tunnel IP header, and tunnel UDP header.
[0175] It should be understood that there is a one-to-one correspondence between the layer-2 virtual network card and the layer-3 virtual network card. In this embodiment, the layer-2 virtual network card 2 corresponds to the layer-3 virtual network card 2.
[0176] In some embodiments, UDP encapsulation of the first message may be performed by: encapsulating a tunnel UDP header, a tunnel IP header, and a tunnel MAC header on the first message, wherein the tunnel UDP header includes a source port number and a destination port number, the source port number refers to the port number of the source router (the main router in this embodiment), and the destination port number refers to the port number of the target router (sub-route 2 in this embodiment); the tunnel IP header includes a source IP address and a destination IP address, the source IP address refers to the IP address of the source router (the main router in this embodiment), and the destination IP address refers to the IP address of the target router (sub-route 2 in this embodiment); the tunnel MAC header includes a source MAC address and a destination MAC address, the source MAC address refers to the MAC address of the source router (the main router in this embodiment), and the destination MAC address refers to the MAC address of the target router (sub-route 2 in this embodiment). (4) Based on the destination MAC address of the first message after tunnel encapsulation, the main router queries the FDB table entry in bridge 0, and forwards the first message after UDP tunnel encapsulation to interface 2.2 according to the FDB table entry, wherein the FDB table entry in bridge 0 includes the correspondence between the destination MAC address and the sending interface. In this embodiment, in the FDB table entry in bridge 0, the destination MAC address of the first message after tunnel encapsulation corresponds to the sending interface 2.2, and the first message after UDP tunnel encapsulation is forwarded by interface 2.2 to interface 6 in sub-router 2.
[0177] In this embodiment, the destination MAC address of the first message after tunnel encapsulation is the MAC address of the layer-3 virtual network card 4 of the sub-router 2. (5) Based on the destination MAC address of the first message after tunnel encapsulation, the sub-router 2 queries the FDB table entry in the bridge 0, and forwards the first message after UDP tunnel encapsulation to the layer-3 virtual network card 4 according to the FDB table entry, and the layer-3 virtual network card 4 decapsulates the first message after UDP tunnel encapsulation to obtain the first message, wherein the FDB table entry in the bridge 0 includes the correspondence between the destination MAC address and the layer-3 virtual network card. In this embodiment, in the FDB table entry in the bridge 0, the destination MAC address of the first message after tunnel encapsulation corresponds to the layer-3 virtual network card 4, and the decapsulated first message includes: the original MAC header, the original IP header, the original UDP / TCP header and the data part.
[0178] That is to say, after the first message is decapsulated through the UDP tunnel, compared with the first message after being encapsulated through the UDP tunnel, the extra tunnel headers are removed: tunnel MAC header, tunnel IP header, and tunnel UDP header.
[0179] (6) Inside sub-router 2, the layer-3 virtual network card 4 forwards the decapsulated first message to the corresponding layer-2 virtual network card 4 in bridge 1.
[0180] (7) For the first message, based on the destination IP address of the first message, sub-router 2 queries the IGMPSNOOPING table entry in bridge 1, and forwards the first message to interface 7 according to the IGMP SNOOPING table entry, wherein the IGMP SNOOPING table entry in bridge 1 includes the correspondence between the destination IP address and the sending interface. In this embodiment, in the IGMP SNOOPING table entry in bridge 1, the destination IP address of the first message corresponds to the sending interface 7; for the second message, based on the destination MAC address of the first message, sub-router 2 queries the FDB table entry in bridge 1, and forwards the second message to interface 7 according to the FDB table entry, wherein the FDB table entry in bridge 1 includes the correspondence between the destination MAC address and the sending interface. In this embodiment, in the FDB table entry in bridge 1, the destination MAC address of the first message corresponds to the sending interface 7.
[0181] (8) Sub-router 2 forwards the first message to set-top box 3 through interface 7. The set-top box 3 and interface 7 have a corresponding relationship.
[0182] In one implementation, a "super networking" is established between the main route and the sub-router 2 in the embodiment of the present application. When the link between the optical modem and the set-top box 3 is switched, the "super networking" function can move the flow (for example: multicast flow, unicast flow) within two seconds based on the five-tuple (source IP, destination IP, source port, destination port, protocol type) (i.e., move the first message to the switched link for transmission).
[0183] Among them, the target router (in this embodiment, it refers to sub-route 2) can be determined according to the destination IP address of the first message. The determination process can be specifically understood as follows: the IGMP SNOOPING table item in bridge 1 in the main route includes the correspondence between the destination IP address and the layer-2 virtual network card in bridge 1. In this embodiment, the destination IP address of the first message corresponds to the layer-2 virtual network card 2 in bridge 1; and the layer-2 virtual network card in bridge 1 has a one-to-one correspondence with the layer-3 virtual network card in bridge 0 in the main route. In this embodiment, the layer-2 virtual network card 2 in bridge 1 corresponds to the layer-3 virtual network card 2 in bridge 0 in the main route; the FDB table item in bridge 0 of the main route includes the relationship between the layer-3 virtual network card and the sending interface. In this embodiment, the layer-3 virtual network card 2 corresponds to the sending interface 2.2; the downlink interface 2.2 in the main route has a corresponding relationship with the receiving interface (i.e., interface 6) of the target router (i.e., sub-route 2). Therefore, as long as the main route obtains the destination IP address of the first message, the target router can be determined.
[0184] For example, Figure 5 Taking the transmission process of the first message from the optical modem to the set-top box 3 as an example, Figure 7A schematic flowchart of IP tunnel encapsulation and decapsulation of a first message provided by an embodiment of the present application is shown.
[0185] like Figure 7 As shown, the difference between the process of performing IP tunnel encapsulation on the first message and the process of performing UDP tunnel encapsulation on the first message is:
[0186] The first message after UDP tunnel encapsulation includes: tunnel MAC header, tunnel IP header, tunnel UDP header, original MAC header, original IP header, original UDP / TCP header and data part; and the first message after IP tunnel encapsulation includes: tunnel MAC header, tunnel IP header, original MAC header, original IP header, original UDP / TCP header and data part.
[0187] That is to say, after the first message is encapsulated through the UDP tunnel, compared with the original message, additional tunnel headers are added: tunnel MAC header, tunnel IP header, and tunnel UDP header; after the first message is encapsulated through the IP tunnel, compared with the original message, additional tunnel headers are added: tunnel MAC header and tunnel IP header.
[0188] In some embodiments, IP encapsulation of the first message may be performed by: encapsulating a tunnel IP header and a tunnel MAC header on the first message, wherein the tunnel IP header includes a source IP address and a destination IP address, the source IP address refers to the IP address of the source router (the main router in this embodiment), and the destination IP address refers to the IP address of the target router (sub-router 2 in this embodiment); the tunnel MAC header includes a source MAC address and a destination MAC address, the source MAC address refers to the MAC address of the source router (the main router in this embodiment), and the destination MAC address refers to the MAC address of the target router (sub-router 2 in this embodiment).
[0189] In one implementation, in an embodiment of the present application, the three-layer virtual network card 2 located in the main route and the three-layer virtual network card 4 located in the sub-route 2 will broadcast the address resolution protocol (ARP) every M seconds (which can also be described as a periodic broadcast), and the ARP is used to timely update the FDB table items in the bridge 0 in other routes in the network, where M is less than or equal to 5 seconds, or M is less than or equal to 2 seconds, or M is less than or equal to 1 second, for example, M = 500ms. That is to say, the three-layer virtual network card 2 broadcasts the address resolution protocol (ARP) every M seconds, and the three-layer virtual network card 4 updates the FDB table items in the bridge 0 of the sub-route 2 after receiving the ARP through broadcast; the three-layer virtual network card 4 broadcasts the ARP every M seconds, and the three-layer virtual network card 2 updates the FDB table items in the bridge 0 of the main route after receiving the ARP through broadcast.
[0190] For example, Figure 5 Based on the embodiment shown, taking the transmission of the first message from the optical modem to the set-top box 1 as an example, Figure 8 FIG. 8 is a schematic flow chart of a method 800 for message transmission provided in an embodiment of the present application. Figure 8 As shown, the method 800 includes:
[0191] S801: The message sent by the optical modem arrives at the bridge 1 in the main router, wherein the message may include a first message and a second message, the first message is a multicast message, and the second message is a unicast message.
[0192] Among them, the message sent by the optical modem can reach the bridge 1 in the main router through the interface 1 in the main router. The interface 1 is located in the bridge 1 of the main router. The interface 1 can be eth0.2, for example.
[0193] S802: Determine whether the message is a unicast message (ie, determine whether the message is the first message or the second message). If so, execute step S803; if not, execute step S804.
[0194] S803: Based on the destination MAC address of the second message, the main router queries the FDB table entry in the bridge 1 on the local side, and sends the second message to the corresponding layer 2 virtual network card 1 according to the FDB table entry, which includes the correspondence between the destination MAC address and the layer 2 virtual network card.
[0195] Among them, the FDB table entry records the downlink path information of the second message, that is, in this embodiment, the downlink address of the second message recorded in the FDB table entry is the layer 2 virtual network card 1, so the second message is sent to the corresponding layer 2 virtual network card 1.
[0196] In one achievable manner, if the downlink address of the second message recorded in the FDB table entry is the layer-2 virtual network card A, the second message is sent to the corresponding layer-2 virtual network card A.
[0197] S804: Based on the destination IP address of the first message, the main router queries the IGMP SNOOPING table entry in the bridge 1 on the local side, and sends the first message to the corresponding layer 2 virtual network card 1 according to the IGMP SNOOPING table entry, wherein the IGMP SNOOPING table entry includes the correspondence between the destination IP address and the layer 2 virtual network card.
[0198] The IGMP SNOOPING entry records the downstream path information of the first message, that is, in this embodiment, the downstream address of the first message recorded in the IGMP SNOOPING entry is the layer 2 virtual network card 1, so the first message is sent to the corresponding layer 2 virtual network card 1.
[0199] In one achievable manner, if the downstream address of the first message recorded in the IGMP SNOOPING entry is the layer-2 virtual network card A, the first message is sent to the corresponding layer-2 virtual network card A.
[0200] The following steps S805 to S810 are the tunnel encapsulation transmission process of the message. This embodiment takes the message being the first message as an example for explanation. The tunnel encapsulation transmission process of the second message is the same as the tunnel encapsulation transmission process of the first message.
[0201] S805: Layer 2 virtual network card 1 forwards the first message to the corresponding layer 3 virtual network card 1 in bridge 0.
[0202] S806: Layer 3 virtual network card 1 performs tunnel encapsulation on the first message.
[0203] Among them, the type of tunnel encapsulation can be UDP tunnel encapsulation, TCP tunnel encapsulation, IP tunnel encapsulation, or other types of tunnel encapsulation, which is not limited in this application.
[0204] S807: Based on the destination MAC address of the encapsulated first message, the main router queries the FDB table entry in the local bridge 0, and forwards the encapsulated first message to the corresponding downstream interface 2.1 according to the FDB table entry, wherein the FDB table entry in the bridge 0 includes the correspondence between the destination MAC address and the sending interface. In this embodiment, in the FDB table entry in the bridge 0, the destination MAC address of the first message after tunnel encapsulation corresponds to the sending interface 2.1.
[0205] Among them, the FDB table entry records the downlink path information of the first message, that is, in this embodiment, the downlink address of the first message recorded in the FDB table entry is sub-route 1, so the first message is sent to sub-route 1 through the downlink interface 2.1.
[0206] Among them, the interface 2.1 is located in the bridge 0 of the main router, and the interface 2.1 corresponds to the receiving interface (interface 3) of the target router (sub-router 1). The interface 2.1 can be wl / eth, for example.
[0207] S808: The main router forwards the encapsulated first message to the interface 3 in the bridge 0 of the sub-router 1 through the interface 2.1.
[0208] The interface 3 may be bond0, for example.
[0209] S809: Based on the destination MAC address of the encapsulated first message, sub-router 1 queries the FDB table entry in the local bridge 0, and forwards the encapsulated first message to the three-layer virtual network card 3 in the bridge 0 of sub-router 1 according to the FDB table entry, wherein the FDB table entry in the bridge 0 includes the correspondence between the destination MAC address and the three-layer virtual network card. In this embodiment, in the FDB table entry in the bridge 0, the destination MAC address of the first message after tunnel encapsulation corresponds to the three-layer virtual network card 3.
[0210] Among them, the FDB table entry records the downlink path information of the first message, that is, in this step, the downlink address of the first message recorded in the FDB table entry is the three-layer virtual network card 3, so the first message is sent to the corresponding three-layer virtual network card 3.
[0211] S810: The layer-3 virtual network card 3 decapsulates the encapsulated first message to obtain the first message, and sends the first message to the corresponding layer-2 virtual network card 3 in the bridge 1.
[0212] In one implementation, in step S806, the encapsulation method of the tunnel encapsulation of the first message by the three-layer virtual network card 1 is non-IP tunnel encapsulation, and a "super networking" function is established between the main route and the sub-route 1. When the link between the optical modem and the set-top box 1 is switched, the "super networking" function can move the flow (for example: multicast flow, unicast flow) within two seconds based on the five-tuple (source IP, destination IP, source port, destination port, protocol type) (that is, move the message to the switched link for transmission). In other words, based on the "super networking" function, the FDB table entries in the bridge 0 of the main route and the FDB table entries in the bridge 0 of the sub-route 1 can be updated in time.
[0213] In another implementation, in step S806, ARP is broadcast between the three-layer virtual network card 1 and the three-layer virtual network card 3 every M seconds (which can also be described as a periodic broadcast), and the ARP is used to timely update the FDB table entries in the bridge 0 in other routers in the network, where M is less than or equal to 2 seconds, or M is less than or equal to 2 seconds, or M is less than or equal to 1 second, for example, M = 500ms.
[0214] S811: Determine whether the message is a unicast message (ie, determine whether the message is the first message or the second message). If so, execute step S812; if not, execute step S813.
[0215] It should be understood that for the same message, the judgment result of step S811 is consistent with the judgment result of step S802.
[0216] S812: Based on the destination MAC address of the second message, sub-router 1 queries the FDB table entry in the local bridge 1, and sends the second message to the corresponding interface 4 according to the FDB table entry, which includes the correspondence between the destination MAC address and the sending interface.
[0217] Among them, the FDB table entry records the downlink path information of the second message, that is, in this step, the downlink address of the second message recorded in the FDB table entry in bridge 1 is interface 4 (which can also be understood as set-top box 1), so the second message is sent to set-top box 1 through interface 4.
[0218] The interface 4 is located in the bridge 1 of the sub-router 1. The interface 4 is an interface connected to the set-top box 1. The interface 4 may be eth0.2, for example.
[0219] S813: Based on the destination IP address of the first message, sub-router 1 queries the IGMP SNOOPING table entry in bridge 1, and sends the first message to the corresponding interface 4 according to the IGMP SNOOPING table entry, which includes the correspondence between the destination IP address and the sending interface.
[0220] In one implementation, if the set-top box 2 is connected to the interface 5 in the bridge 1 of the sub-router 1, when the downlink address of the first message recorded in the FDB table entry in the bridge 1 is interface 5 (which can also be understood as set-top box 5), the first message is sent to the set-top box 2 through interface 5, where the interface 5 can be eth0.3, for example.
[0221] S814: Sub-router 1 forwards the message to set-top box 1 through interface 4.
[0222] For example, taking the first message transmitted from the set-top box 1 to the optical modem as an example, Fig. 9 FIG. 9 is a schematic flow chart of another message transmission method 900 provided in an embodiment of the present application. Fig. 9 As shown, the method 900 includes:
[0223] S901: The message sent by set-top box 1 enters sub-router 1 through interface 4.
[0224] Among them, the explanation of interface 4 is in Figure 8 The illustrated embodiment has been described in detail and will not be described again for the sake of brevity.
[0225] S902: Determine whether the message is a unicast message (i.e., determine whether the message is a first message or a second message, where the first message refers to a multicast message and the second message refers to a unicast message). If yes, execute step S903; if not, execute step S904.
[0226] Explanation of this step and Figure 8 The explanation of step S802 in the illustrated embodiment is similar and will not be repeated here for the sake of brevity.
[0227] S903: Based on the destination MAC address of the second message, sub-router 1 queries the FDB table entry in the local bridge 1, and sends the second message to the corresponding layer 2 virtual network card 3 according to the FDB table entry, which includes the correspondence between the destination MAC address and the layer 2 virtual network card.
[0228] Among them, the uplink path information of the second message is recorded in the FDB table entry, that is, in this step, the uplink address of the second message recorded in the FDB table entry is the layer 2 virtual network card 3, so the second message is sent to the corresponding layer 2 virtual network card 3.
[0229] In one achievable manner, if the uplink address of the second message recorded in the FDB table entry is the layer-2 virtual network card A, the second message is sent to the corresponding layer-2 virtual network card A.
[0230] S904: Based on the destination IP address of the first message, sub-router 1 queries the IGMP SNOOPING table entry in the local bridge 1, and sends the first message to the corresponding layer 2 virtual network card 3 according to the IGMP SNOOPING table entry, wherein the IGMP SNOOPING table entry includes the correspondence between the destination IP address and the layer 2 virtual network card.
[0231] The IGMP SNOOPING entry records the uplink path information of the first message, that is, in this step, the uplink address of the first message recorded in the IGMP SNOOPING entry is the layer 2 virtual network card 3, so the first message is sent to the corresponding layer 2 virtual network card 3.
[0232] The following steps S905 to S910 are the tunnel encapsulation transmission process of the message. This embodiment takes the message being the first message as an example for explanation. The tunnel encapsulation transmission process of the second message is the same as the tunnel encapsulation transmission process of the first message.
[0233] S905: Layer 2 virtual network card 3 forwards the first message to the corresponding layer 3 virtual network card 3 in bridge 0.
[0234] S906: Layer 3 virtual network card 3 performs tunnel encapsulation on the first message.
[0235] Among them, the explanation of this step is Figure 8 The explanation of step S806 in the illustrated embodiment is similar and will not be repeated here for the sake of brevity.
[0236] S907: Based on the destination MAC address of the encapsulated first message, sub-router 1 queries the FDB table entry in the local bridge 0, and forwards the encapsulated first message to the corresponding uplink interface 3 according to the FDB table entry, wherein the FDB table entry in the bridge 0 includes the correspondence between the destination MAC address and the sending interface. In this embodiment, in the FDB table entry in the bridge 0, the destination MAC address of the first message after tunnel encapsulation corresponds to the sending interface 3.
[0237] The FDB entry records the uplink path information of the first message, that is, in this step, the uplink address of the first message recorded in the FDB entry is the main route, so the first message is sent to the main route through interface 3.
[0238] S908: Sub-router 1 forwards the encapsulated first message to interface 2.1 or interface 2.2 in bridge 0 of the main router through interface 3.
[0239] S909: Based on the destination MAC address of the encapsulated first message, the main router queries the FDB table entry in the local bridge 0, and forwards the encapsulated first message to the three-layer virtual network card 1 in the bridge 0 of the main router according to the FDB table entry, wherein the FDB table entry in the bridge 0 includes the correspondence between the destination MAC address and the three-layer virtual network card. In this embodiment, in the FDB table entry in the bridge 0, the destination MAC address of the first message after tunnel encapsulation corresponds to the three-layer virtual network card 1.
[0240] Among them, the FDB table entry records the uplink path information of the first message, that is, in this step, the uplink address of the first message recorded in the FDB table entry is the three-layer virtual network card 1, so the first message is sent to the corresponding three-layer virtual network card 1.
[0241] S910: Layer 3 virtual network card 1 decapsulates the encapsulated first message to obtain the first message, and sends the first message to the corresponding layer 2 virtual network card 1 in bridge 1.
[0242] In one implementation, in step S906, the encapsulation method of the tunnel encapsulation of the first message by the three-layer virtual network card 3 is non-IP tunnel encapsulation, and a "super networking" function is established between the main route and the sub-route 1. When the link between the optical modem and the set-top box 1 is switched, the "super networking" function can move the flow (for example: multicast flow, unicast flow) within two seconds based on the five-tuple (source IP, destination IP, source port, destination port, protocol type) (that is, move the message to the switched link for transmission). In other words, based on the "super networking" function, the FDB table entries in the bridge 0 of the main route and the FDB table entries in the bridge 0 of the sub-route 1 can be updated in time.
[0243] In another implementation, in step S906, ARP is broadcast between the three-layer virtual network card 1 and the three-layer virtual network card 3 every M seconds (which can also be described as a periodic broadcast), and the ARP is used to timely update the FDB table entries in the bridge 0 in other routers in the network, where M is less than or equal to 2 seconds, or M is less than or equal to 2 seconds, or M is less than or equal to 1 second, for example, M = 500ms.
[0244] S911: Determine whether the message is a unicast message (ie, determine whether the message is the first message or the second message). If so, execute step S912; if not, execute step S913.
[0245] It should be understood that for the same message, the judgment result of step S911 is consistent with the judgment result of step S902.
[0246] Explanation of this step and Figure 8 The explanation of step S811 in the illustrated embodiment is similar and will not be repeated here for the sake of brevity.
[0247] S912: Based on the destination MAC address of the second message, the primary router queries the FDB table entry in the local bridge 1, and sends the second message to the corresponding interface 1 according to the FDB table entry, which includes the correspondence between the destination MAC address and the sending interface.
[0248] Among them, the FDB table entry records the uplink path information of the second message, that is, in this step, the uplink address of the second message recorded in the FDB table entry in bridge 1 is interface 1 (which can also be understood as the optical modem), so the second message is sent to the optical modem through interface 1.
[0249] S913: Based on the destination IP address of the first message, the primary router queries the IGMP SNOOPING table entry in bridge 1, and sends the first message to the corresponding interface 1 according to the IGMP SNOOPING table entry, which includes the correspondence between the destination IP address and the sending interface.
[0250] S914: The primary router forwards the message to the optical modem through interface 1.
[0251] In an embodiment of the present application, by tunneling multicast messages, both unicast messages and multicast messages can be forwarded relying on FDB entries, and no longer relying on IGMP SNOOPING entries. Since the update period of FDB entries is shorter than that of IGMP SNOOPING entries, when the message transmission link changes, the FDB entries can be updated faster, and the message transmission process returns to normal after the FDB entries are updated. For example, if the multicast message carries a video stream, the video playback pause caused by the switching of the message transmission link can be restored in a shorter time, thereby significantly improving the user experience.
[0252] For example, taking the tunnel encapsulation of the message as UDP encapsulation as an example, Fig.10 FIG. 1 is a schematic diagram showing the functional modules corresponding to a message transmission system 1000 provided in an embodiment of the present application. Fig.10 As shown, the system 1000 includes an optical modem (IPTV source), a main router, a sub-router and a set-top box, wherein the optical modem and the main router are connected via an Ethernet port; the main router includes a first message forwarding module 1001, a first UDP tunnel encapsulation module 1002 and a first UDP tunnel decapsulation module 1003, and the main router and the sub-router 1 are connected via an Ethernet port or a wifi network; the sub-router includes a second message forwarding module 1004, a second UDP tunnel decapsulation module 1002 and a second UDP tunnel decapsulation module 1003; the sub-router and the set-top box are connected via an Ethernet port. Specifically:
[0253] The optical modem (IPTV source) is used to send downlink messages to the main router through the Ethernet port.
[0254] Among them, the downlink message provides the video source for the set-top box.
[0255] The first message forwarding module 1001 is used to receive downlink messages sent by the optical modem through the Ethernet port.
[0256] Specifically, when the downlink message is a unicast message, the first message forwarding module 1001 uses the FDB table entry to forward the downlink message between the internal interfaces of the main route; when the downlink message is a multicast message, the first message forwarding module 1001 uses the IGMPSNOOPING table entry to forward the downlink message between the internal interfaces of the main route.
[0257] The first UDP tunnel encapsulation module 1002 is used to perform UDP tunnel encapsulation on the downlink message.
[0258] Specifically, the first UDP tunnel encapsulation module 1002 is used to sequentially encapsulate an additional tunnel UDP header, a tunnel IP header, and a tunnel MAC header on the outer layer of the original message media access control (MAC) header.
[0259] The first message forwarding module 1001 is also used to forward the downlink message encapsulated by the UDP tunnel to the sub-router through the Ethernet port or the WiFi network.
[0260] Specifically, the first message forwarding module 1001 forwards the downlink message encapsulated by the UDP tunnel to the sub-router according to the FDB table entry.
[0261] The second message forwarding module 1004 is used to receive the UDP tunnel-encapsulated downlink message sent by the main router through the Ethernet port or the WiFi network.
[0262] The second UDP tunnel decapsulation module 1005 is used to decapsulate the downlink message encapsulated by the UDP tunnel to obtain the downlink message.
[0263] Specifically, the second UDP tunnel decapsulation module 1005 is used to decapsulate the additional tunnel MAC header, tunnel IP header, and tunnel UDP header in the UDP encapsulated message.
[0264] The second message forwarding module 1004 is further configured to send downlink messages to the set-top box via the Ethernet port.
[0265] Specifically, after the downlink message encapsulated by the UDP tunnel is decapsulated, when the downlink message is a unicast message, the second message forwarding module 1004 uses the FDB table entry to forward the downlink message between the internal interfaces of the sub-route; when the downlink message is a multicast message, the second message forwarding module 1004 uses the IGMP SNOOPING table entry to forward the downlink message between the internal interfaces of the sub-route, and finally forwards it to the same interface of the sub-route, and then sends it to the set-top box through the same interface.
[0266] The set-top box is used to receive downlink messages sent by the sub-router through the Ethernet port.
[0267] In one implementation, the set-top box includes a video playing module, which is used to convert the downlink message sent from the IPTV source into a video signal and play the IPTV video after connecting to the display screen.
[0268] The set-top box is also used to send uplink messages to the sub-router through the Ethernet port.
[0269] The second message forwarding module 1004 is further configured to receive an uplink message sent by the set-top box through the Ethernet port.
[0270] The second UDP tunnel encapsulation module 1005 is used to perform UDP tunnel encapsulation on the uplink message.
[0271] The second message forwarding module 1004 is also used to send the UDP tunnel-encapsulated uplink message to the main router through the Ethernet port or the WiFi network.
[0272] The first message forwarding module 1001 is also used to receive the UDP tunnel-encapsulated uplink message sent by the sub-router through the Ethernet port or the WiFi network.
[0273] The first UDP tunnel decapsulation module 1006 is used to decapsulate the uplink message encapsulated by the UDP tunnel to obtain the uplink message.
[0274] The first message forwarding module 1001 is also used to send uplink messages to the optical modem through the Ethernet port.
[0275] In one implementation, a "super networking" function is established between the main route and one or more sub-routes. When the message transmission link between the optical modem and the set-top box changes, the "super networking" function can move the flow (for example, multicast flow, unicast flow, etc.) within two seconds based on the five-tuple (source IP, destination IP, source port, destination port, protocol type) (that is, move the first message to the switched link for transmission), thereby enabling the FDB table entries in the main route and one or more sub-routes to be updated in a timely manner.
[0276] In an embodiment of the present application, each route in a multi-level routing network is provided with a tunnel encapsulation module and a tunnel decapsulation module, which can enable multicast messages to be transmitted between multiple routes in the network in a tunnel-encapsulated format. The transmission process depends on FDB table items and no longer depends on IGMP SNOOPING table items. Since the update cycle of FDB table items is shorter than that of IGMPSNOOPING table items, when the message transmission link changes, the FDB table items can be updated faster, and the message transmission process returns to normal after the FDB table items are updated. For example, if the multicast message carries a video stream, the video playback pause caused by the switching of the message transmission link can be restored in a shorter time, thereby significantly improving the user experience.
[0277] The present application also provides a router system, which includes one or more Fig.10 The main route described in the above also includes one or more Fig.10 The subroutes described in .
[0278] One or more of the modules or units described herein can be implemented by software, hardware or a combination of the two. When any of the above modules or units are implemented in software, the software exists in the form of computer program instructions and is stored in a memory, and a processor can be used to execute the program instructions and implement the above method flow. The processor may include but is not limited to at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller (MCU), or an artificial intelligence processor and other types of computing devices that run software, each computing device may include one or more cores for executing software instructions to perform operations or processing. The processor may be built into an SoC (system on chip) or an application specific integrated circuit (ASIC), or it may be an independent semiconductor chip. In addition to the core used to execute software instructions for operations or processing in the processor, necessary hardware accelerators may be further included, such as a field programmable gate array (FPGA), a PLD (programmable logic device), or a logic circuit that implements a dedicated logic operation.
[0279] When the modules or units described in this document are implemented in hardware, the hardware can be any one or any combination of a CPU, a microprocessor, a DSP, an MCU, an artificial intelligence processor, an ASIC, a SoC, an FPGA, a PLD, a dedicated digital circuit, a hardware accelerator, or a non-integrated discrete device, which can run the necessary software or be independent of the software to execute the above method flow.
[0280] When the modules or units described herein are implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium with a configuration capability similar to a cache that a computer can access, or a server, a data center, or other data storage device that includes one or more available media integrated with a configuration capability similar to a cache.
[0281] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0282] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0283] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0284] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0285] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0286] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0287] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for message transmission, characterized in that: The method comprises: The first router performs tunnel encapsulation on the received first message, where the first message is a multicast message, wherein the destination media access control MAC address of the first message after the tunnel encapsulation is the MAC address of the target router; Determine the sending interface by querying a forwarding database FDB table entry in the first router according to the destination MAC address of the first message after the tunnel encapsulation; The tunnel-encapsulated first message is sent to the target router through the sending interface.
2. The method according to claim 1, characterized in that The method further comprises: When a path between the first router and the target router changes, an FDB table entry in the first router is updated within a first time threshold, where the first time threshold is less than or equal to 5 seconds.
3. The method according to claim 2, characterized in that The first time threshold is less than or equal to 2 seconds.
4. The method according to claim 2 or 3, characterized in that: The first time threshold is 1 second, or the first time threshold is 500 milliseconds.
5. The method according to any one of claims 2 to 4, characterized in that The method further comprises: The first router receives Address Resolution Protocol ARP messages broadcasted by multiple routers respectively, and the ARP messages broadcasted by the multiple routers are used to update the FDB table entries in the first router when the path between the first router and the target router changes, wherein the period for each of the multiple routers to broadcast the ARP message is a first time period, and the first time period is less than or equal to 5 seconds. The multiple routers are other routers in the network where the first router is located, and the multiple routers include the target router.
6. The method according to claim 5, characterized in that The method further comprises: The first router broadcasts an ARP message every first time period, and the ARP message broadcast by the first router is used to update the FDB table entries in the multiple routers when the path between the first router and the target router changes.
7. The method according to claim 5 or 6, characterized in that: The first time period is less than or equal to 2 seconds.
8. The method according to any one of claims 5 to 7, characterized in that The first time period is 1 second, or the first time period is 500 milliseconds.
9. The method according to any one of claims 2 to 8, characterized in that The path between the first router and the target router changes, including: A router in the path between the first router and the target router is switched, and / or a network between two routers in the path between the first router and the target router is switched.
10. The method according to any one of claims 1 to 9, characterized in that The destination MAC address is the MAC address of the layer-3 virtual network card of the target router.
11. The method according to any one of claims 1 to 10, characterized in that The method further comprises: The first router performs tunnel encapsulation on the received second message, where the second message is a unicast message, wherein the destination MAC address of the second message after tunnel encapsulation is the MAC address of the target router; according to the destination MAC address of the second message after tunnel encapsulation, determining the sending interface of the second message after tunnel encapsulation by querying the FDB table entry of the first router; The first router sends the second message after tunnel encapsulation to the target router through the sending interface of the second message after tunnel encapsulation.
12. The method according to any one of claims 1 to 11, characterized in that The tunnel encapsulation is User Datagram Protocol UDP tunnel encapsulation, Internet Protocol IP tunnel encapsulation or Transmission Control Protocol TCP tunnel encapsulation.
13. A method for message transmission, characterized in that: The method comprises: The second router receives the first message after tunnel encapsulation sent by the first router, where the first message is a multicast message; When the destination media access control MAC address of the first message encapsulated by the tunnel is the same as the MAC address of the layer-3 virtual network card of the second router, the second router decapsulates the first message encapsulated by the tunnel to obtain the first message; The second router sends the first message.
14. The method according to claim 13, characterized in that The method further comprises: The second router broadcasts an Address Resolution Protocol ARP message every first time period, and the ARP message broadcast by the second router is used to update the FDB table entries in multiple routers when the path between the first router and the second router changes, wherein the first time period is less than or equal to 5 seconds, and the multiple routers are other routers in the network where the second router is located, and the multiple routers include the first router.
15. The method according to claim 14, characterized in that The first time period is less than or equal to 2 seconds.
16. The method according to claim 14 or 15, characterized in that The first time period is 1 second, or the first time period is 500 milliseconds.
17. The method according to any one of claims 14 to 16, characterized in that The path between the first router and the second router changes, including: A router in the path between the first router and the second router is switched, and / or a network between two routers in the path between the first router and the second router is switched.
18. A message transmission system, characterized in that: The system comprises a first router and a second router, wherein: The first router is used for: Performing tunnel encapsulation on the received first message, where the first message is a multicast message, wherein a destination media access control MAC address of the first message after tunnel encapsulation is a MAC address of a target router; Determine the sending interface by querying a forwarding database FDB table entry in the first router according to the destination MAC address of the first message after the tunnel encapsulation; Sending the tunnel-encapsulated first message to the second router through the sending interface; The second router is used for: Receiving a tunnel-encapsulated first message sent by the first router; When the destination media access control MAC address of the first message after tunnel encapsulation is the same as the MAC address of the layer-3 virtual network card of the second router, decapsulating the first message after tunnel encapsulation to obtain the first message; Send the first message.
19. A message transmission system, characterized in that: The system comprises a first router and a second router, wherein: The first router is used to implement the method according to any one of claims 1 to 12; The second router is used to implement the method according to any one of claims 13-17.
20. An electronic device, characterized in that: include: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions, which, when executed by the one or more processors, enable the electronic device to perform the method as described in any one of claims 1 to 12, or, to perform the method as described in any one of claims 13 to 17.
21. A computer-readable storage medium, characterized in that: The storage medium stores a program or an instruction. When the program or the instruction is executed, the method according to any one of claims 1 to 12 is implemented, or the method according to any one of claims 13 to 17 is implemented.
22. A chip, characterized in that: include: one or more processors; One or more memories, the one or more processors are coupled to the one or more memories, and are used to read and execute instructions in the one or more memories to perform the method as claimed in any one of claims 1 to 12, or to perform the method as claimed in any one of claims 13 to 17.
23. A computer program product, characterized in that The computer program product comprises: Computer program code, when the computer program code is executed, implements the method according to any one of claims 1 to 12, or implements the method according to any one of claims 13 to 17.