COMMUNICATION METHOD AND SYSTEM, ELECTRONIC DEVICE, AND COMPUTER-READABLE MEDIUM
By realizing direct transmission of GEM frames between the master gateway and the slave gateway of the fiber-to-room (PON) network, the port ID is used to communicate between ONUs, which solves the problem of large communication time delay between ONUs in traditional PON networks and improves network performance.
Patent Information
- Application Number
- JP2024560532
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-08-25
- Filing Date
- 2023-07-21
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2043-07-21
AI Technical Summary
In traditional fiber-to-room (PON) networks, the communication time delay between FTTR ONUs is large, resulting in a degradation of network performance.
By realizing direct transmission of GEM frames between the master gateway and the slave gateway, communication between ONUs is performed using the port ID, complex traffic forwarding of Ethernet or IP layers on the master gateway is avoided, and processing is only performed at the PON protocol layer.
Reduces communication time delay between ONUs and improves network response speed and efficiency.
Smart Images

Figure 2025513076000001_ABST
Abstract
Description
[Technical field]
[0001] TECHNICAL FIELD The present application relates to the field of passive optical networks (PON), and in particular to a communication method and system, an electronic device, and a computer-readable medium. [Background technology]
[0002] With the application and development of PON technology, it has gradually advanced from the introduction of optical fiber to the home (FTTH, Fiber to the Home) to the home, and all domestic and international standards have begun to be correspondingly standardized, gradually evolving into the reach of optical fiber to the remote end node (FTTR, Fiber to the Room). FTTR can access the Internet through the access network, and can also build a local area network to realize interconnected communication within the home. Summary of the Invention [Problem to be solved by the invention]
[0003] In practical applications, as shown in Figure 1, a general FTTH optical network unit (ONU, Optical Network Unit) and an FTTR optical line terminal (OLT, Optical Line Terminal) are integrated into one device, which can be called a main gateway. The main gateway has an upper optical port and a lower optical port, the main gateway is connected to the FTTH OLT through the upper optical port and operates according to the FTTH ONU, and the main gateway is connected to the FTTR ONU through the lower optical port and operates according to the FTTR OLT.
[0004] The FTTR ONU and the access point (AP) are also integrated into one device and can be called a slave gateway. The slave gateway has an upper optical port and a wireless interface, the slave gateway is connected to the FTTR OLT via the upper optical port and operates according to the FTTR ONU, and the slave gateway is connected to the terminal via the wireless interface and operates according to the access point (AP). In conventional PON, the time lag during communication between FTTR ONUs is relatively large. [Means for solving the problem]
[0005] SUMMARY OF THE DISCLOSURE Embodiments of the present application provide a communication method and system, an electronic device, and a computer-readable medium.
[0006] In a first aspect, an embodiment of the present application provides a communication method applied to a first slave gateway, the communication method including the steps of receiving an Ethernet frame transmitted by a first terminal, packaging a first port ID of the first slave gateway and the Ethernet frame as a first Gigabit Passive Optical Network Package Mode GEM frame, and transmitting the first GEM frame to a main gateway, where the first port ID is a port ID used when communicating between optical network units.
[0007] In a second aspect, an embodiment of the present application provides a communication method applied to a main gateway, the communication method including: receiving a first Gigabit Passive Optical Network package mode GEM frame transmitted by a first slave gateway, the first GEM frame including a port ID; and transmitting the first GEM frame to all slave gateways if it is determined that the port ID in the first GEM frame is a port ID used when communicating between optical network units.
[0008] In a third aspect, an embodiment of the present application provides a communication method applied to a third slave gateway, the communication method including: receiving a first Gigabit Passive Optical Network package mode GEM frame transmitted by a main gateway, the first GEM frame including a port ID; and determining whether to perform corresponding processing on the first GEM frame based on the port ID in the first GEM frame.
[0009] In a fourth aspect, an embodiment of the present application provides an electronic device including at least one processor and a memory having at least one program stored therein, the at least one program, when executed by the at least one processor, causing the at least one processor to realize any one of the communication methods described above.
[0010] In a fifth aspect, an embodiment of the present application provides a computer readable medium having a computer program stored thereon, the computer program, when executed by a processor, causing the processor to implement any one of the communication methods described above.
[0011] In a sixth aspect, an embodiment of the present application provides a communication system including a first slave gateway, a main gateway, and a third slave gateway, the first slave gateway is used to receive an Ethernet frame transmitted by a first terminal, packages a first port ID of the first slave gateway and the Ethernet frame as a first Gigabit Passive Optical Network Package Mode GEM frame, and transmits the first GEM frame to the main gateway, the first port ID being a port ID used when communicating between optical network units, the main gateway is used to receive the first GEM frame transmitted by the first gateway, the first GEM frame includes a port ID, and if it is determined that the port ID in the first GEM frame is a port ID used when communicating between optical network units, transmits the first GEM frame to all slave gateways, and the third slave gateway is used to receive the first GEM frame transmitted by the main gateway, the first GEM frame includes a port ID, and determines whether to perform corresponding processing on the first GEM frame based on the port ID in the first GEM frame. Effect of the Invention
[0012] The communication method provided by the embodiments of the present application performs communication between ONUs based on the port ID used when communicating between the ONUs, rather than on the port ID used when communicating between the ONUs and the OLT. This eliminates the need for the main gateway to analyze the first GEM frame when forwarding. In other words, it is not necessary to realize traffic forwarding between ONUs via the Ethernet layer or IP layer of the main gateway, but it only needs to be realized at the PON protocol layer of the main gateway, thereby reducing the time lag. [Brief description of the drawings]
[0013] [Figure 1] FIG. 1 is a conceptual diagram of a PON system structure in the related art. [Diagram 2] 4 is a flowchart of a communication method applied to a first slave gateway provided by an embodiment of the present application; [Diagram 3] FIG. 2 is a conceptual diagram of a frame structure of a GEM frame according to an embodiment of the present invention. [Figure 4] 4 is a flowchart of a communication method applied to a main gateway provided by another embodiment of the present application; [Diagram 5] 11 is a flowchart of a communication method applied to a third slave gateway provided by another embodiment of the present application; [Figure 6] FIG. 2 is a block diagram of a communication system provided by another embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] In order to make those skilled in the art better understand the technical solutions of the present application, the following describes in detail the communication method and system, electronic device, and computer-readable medium provided in the present application in combination with the drawings.
[0015] Exemplary embodiments will be described more fully below with reference to the drawings, but the exemplary embodiments should not be construed as being limited to the embodiments described herein, and may be embodied in different forms. On the contrary, the purpose of providing these embodiments is to make the present application clear and complete, and to allow those skilled in the art to fully understand the scope of the present application.
[0016] Where not inconsistent, the embodiments and features of the embodiments of the present application may be combined with each other.
[0017] As used herein, the term "and / or" includes any and all combinations of at least one of the associated listed items.
[0018] The terms used herein are used only to describe specific embodiments and are not intended to limit the present application. As used herein, singular forms such as "a," "an," and "the" are also intended to include the plural unless the context clearly indicates otherwise. It will also be understood that the use of the terms "comprising" and / or "consisting of" herein refers to the presence of such features, wholes, steps, operations, elements, and / or assemblies, but does not exclude the presence or addition of at least one other feature, whole, step, operation, element, assembly, and / or group thereof.
[0019] Unless otherwise specified, the meaning of all terms (including technical and scientific terms) used herein is the same as that commonly understood by those skilled in the art. It will also be understood that terms defined in common dictionaries, unless otherwise specified herein, are to be interpreted as having a meaning consistent with the meaning in the context of the relevant art and this application, and are not to be interpreted as having an ideal or excessively formal meaning.
[0020] In a conventional PON, interconnection communication between FTTR ONUs can be realized by main gateway relay. The general implementation method is to place a Gigabit-Capable Passive Optical Network (GPON, Gigabit-Capable Passive Optical Network) packaging mode (GEM, GPON Encapsulation Method) Port ID (Port-ID, Port IDentification) between the FTTR OLT and the FTTR ONU to realize communication between the FTTR OLT and the FTTR ONU, and then the FTTR OLT forwards the communication between the FTTR ONUs.
[0021] Currently, traffic forwarding between FTTR ONUs is required via the Ethernet layer or Internet Protocol (IP) layer of the main gateway, which will result in a large time lag. For example, one way of realizing communication between FTTR ONUs is that the FTTR OLT parses the Ethernet frame from the GEM frame, obtains the target Media Access Control (MAC) address from the Ethernet frame, maps the target MAC address to the target GEM Port-ID, repackages the Ethernet frame with the target GEM Port-ID to obtain a new GEM frame, and transmits the new GEM frame. In this process, in addition to parsing the GEM frame at the PON protocol layer and repackaging the Ethernet frame into a GEM frame, it is necessary to complete the parsing of the target MAC address and the mapping of the target MAC address and the GEM Port-ID at the Ethernet layer, which will result in a large time lag. In some scenarios, it is necessary to further realize the mapping between the target IP address and the target GEM Port-ID, i.e., it needs to be realized at the IP layer, which will also result in a large time lag in bandwidth.
[0022] FIG. 2 is a flowchart of a communication method applied to a first slave gateway provided by an embodiment of the present application.
[0023] In a first aspect, referring to FIG. 2, an embodiment of the present application provides a communication method applied to a first slave gateway, the method including the following steps:
[0024] Step 200: receiving an Ethernet frame transmitted by a first terminal.
[0025] Step 201: package a first port ID of a first slave gateway and an Ethernet frame as a first GEM frame, and send the first GEM frame to a main gateway, where the first port ID is a port ID used when communicating between ONUs.
[0026] In some demonstrative embodiments, as shown in FIG. 3, a GEM frame includes a GEM frame header and a GEM frame payload area.
[0027] In some demonstrative embodiments, the GEM frame header includes a Payload Length Indication (PLI), a Key Index (Key Index), a Port ID (Port ID), a reserved field (Options), a Last Fragment (LF), and a Hybrid Error Correction (HEC).
[0028] In some exemplary embodiments, the port ID may be a first port ID of the slave gateway, or a second port ID of the slave gateway, where the first port ID is a port ID used when communicating between ONUs, and the second port ID is a port ID used when communicating between ONUs and OLTs.
[0029] In some exemplary embodiments, the LF is used to indicate whether it is the last fragment.
[0030] In some demonstrative embodiments, packaging the first port ID of the first slave gateway and the Ethernet frame as a first GEM frame includes packaging the Ethernet frame in a payload area in the first GEM frame and packaging the first port ID of the first slave gateway in a GEM frame header in the first GEM frame.
[0031] In some demonstrative embodiments, packaging the first port ID of the first slave gateway into a GEM frame header in the first GEM frame includes packaging the first port ID of the first slave gateway into a port ID field in the GEM frame header.
[0032] In some demonstrative embodiments, packaging the first port ID of the first slave gateway and the Ethernet frame as the first GEM frame includes packaging the first port ID of the first slave gateway, the first ID, and the Ethernet frame as the first GEM frame.
[0033] In some exemplary embodiments, the first ID may be a User Network Interface (UNI) Node ID (Node ID, Node IDentification) of a first slave gateway, and may be a UNI Node ID of a second slave gateway, where the second slave gateway is a slave gateway connected to a second terminal, and the second terminal is a terminal to which the target MAC address in the Ethernet frame belongs.
[0034] In some demonstrative embodiments, the first ID may be a device ID of the second slave gateway.
[0035] In some exemplary embodiments, the UNI Node ID is used to indicate two communicating terminals, for example, ONU1 is represented by 1, ONU2 is represented by 0, and so on, two communicating ONUs are represented by 0 and 1.
[0036] In some demonstrative embodiments, packaging the first port ID, the first ID, and the Ethernet frame as a first GEM frame includes packaging the Ethernet frame into a payload area in the first GEM frame and packaging the first port ID and the first ID of the first slave gateway into a GEM frame header in the first GEM frame.
[0037] In some demonstrative embodiments, packaging the first port ID and the first ID of the first slave gateway into a GEM frame header in the first GEM frame includes packaging the first port ID of the first slave gateway into a port ID field in the GEM frame header and packaging the first ID into a reserved field in the GEM frame header.
[0038] In some demonstrative embodiments, if the first ID is a UNI Node ID of the first slave gateway or if the first ID is a UNI Node ID of the second slave gateway, packaging the first ID into a reserved field in the GEM frame header includes packaging the first ID into any one bit in the reserved field.
[0039] In some demonstrative embodiments, packaging the first ID into any one bit in the reserved field includes packaging the first ID into a most significant bit in the reserved field.
[0040] In some demonstrative embodiments, if the first ID is a device ID of the second slave gateway, packaging the first ID into a reserved field in the GEM frame header includes packaging the first ID into at least one bit in the reserved field.
[0041] In some demonstrative embodiments, packaging the first port ID and the first ID of the first slave gateway into a GEM frame header in the first GEM frame includes packaging the first port ID, the first ID, and the second ID of the first slave gateway into a GEM header in the first GEM frame, where the second ID is used to characterize whether the first GEM frame is a GEM frame communicated between ONUs or a GEM frame communicated between an ONU and an OLT.
[0042] In some demonstrative embodiments, packaging the first port ID, the first ID, and the second ID of the first slave gateway into a GEM frame header in the first GEM frame includes packaging the first port ID of the first slave gateway into a port ID field in the GEM frame header and packaging the first ID and the second ID into reserved fields in the GEM frame header.
[0043] In some exemplary embodiments, the first ID and the second ID are packaged in different bits in a reserved field in the GEM frame header.
[0044] In some exemplary embodiments, if the first ID is the UNI Node ID of the first slave gateway, or if the first ID is the UNI Node ID of the second slave gateway, the first ID is packaged in any one bit in the reserved field, and the second ID is packaged in any one bit other than the bit occupied by the first ID in the reserved field. For example, the first ID is packaged in the most significant bit in the reserved field, and the second ID is packaged in any one bit other than the most significant bit in the reserved field.
[0045] In some demonstrative embodiments, if the first ID is a device ID of a second slave gateway, the first ID is packaged in at least one bit in the reserved field, and the second ID is packaged in any other bit in the reserved field except the bit occupied by the first ID.
[0046] In some exemplary embodiments, if the second ID is not packaged in the first GEM frame, the values of the first port ID and the second port ID of the same slave gateway are different to distinguish whether the first GEM frame is a GEM frame communicated between ONUs or a GEM frame communicated between an ONU and an OLT.
[0047] When the second ID is packaged in the first GEM frame, the first and second port IDs of the same slave gateway may have the same or different values. The second ID distinguishes whether the first GEM frame is a GEM frame communicated between ONUs or a GEM frame communicated between an ONU and an OLT. When the first and second port IDs of the same gateway have the same values, port ID resources are saved.
[0048] In some demonstrative embodiments, if the first ID is not packaged in the first GEM frame, after receiving the Ethernet frame transmitted by the first terminal, the method further includes obtaining the first port ID of the first slave gateway before packaging the Ethernet frame as the first GEM frame.
[0049] In some exemplary embodiments, the step of obtaining the first port ID of the first slave gateway includes the steps of obtaining a device ID of the second slave gateway by a target MAC address in the Ethernet frame, where the second slave gateway is a slave gateway connected to a second terminal to which the target MAC address belongs, and obtaining the first port ID of the first slave gateway by the device ID of the second slave gateway.
[0050] In some demonstrative embodiments, the step of obtaining the first port ID of the first slave gateway by the device ID of the second slave gateway includes the steps of obtaining first configuration information in which the peer device ID is the device ID of the second slave gateway, and obtaining the port ID in the first configuration information as the first port ID of the first slave gateway.
[0051] In some demonstrative embodiments, when the first ID is packaged in the first GEM frame, and the first ID is the UNI Node ID of the first slave gateway, or the first ID is the UNI Node ID of the second slave gateway, after the step of receiving the Ethernet frame transmitted by the first terminal and before the step of packaging the Ethernet frame as the first GEM frame, the method further includes a step of obtaining the first port ID and the first ID of the first slave gateway.
[0052] In some exemplary embodiments, the step of obtaining the first port ID and the first ID of the first slave gateway includes the steps of obtaining a device ID of the second slave gateway by a target MAC address in the Ethernet frame, where the second slave gateway is a slave gateway connected to a second terminal to which the target MAC address belongs, and obtaining the first port ID and the first ID of the first slave gateway by the device ID of the second slave gateway.
[0053] In some exemplary embodiments, the step of obtaining the device ID of the second slave gateway by the target MAC address in the Ethernet frame includes the step of searching for a device ID corresponding to the target media access control address in a first mapping relationship between the device ID and the MAC address of the slave gateway stored in advance, and the device ID found by the search is the device ID of the second slave gateway.
[0054] In some demonstrative embodiments, the device ID of the slave gateway may be the ONU ID.
[0055] In some illustrative embodiments, for each slave gateway, such as the first slave gateway and the second slave gateway referred to in the embodiments of the present application, after a terminal connected to the slave gateway (e.g., the first terminal and the second terminal referred to in the embodiments of the present application) accesses the slave gateway, the slave gateway can learn the MAC address of the terminal, and further store a first mapping relationship between the learned MAC address and the device ID of the slave gateway.
[0056] In some demonstrative embodiments, before the step of searching for a device ID corresponding to the target MAC address, the method further includes a step of obtaining a second mapping relationship shared by other slave gateways, and storing or updating the first mapping relationship with the second mapping relationship.
[0057] In some demonstrative embodiments, the second mapping relationship is a mapping relationship between a MAC address stored after the other slave gateway learns the MAC address of a terminal connected to the other slave gateway and a device ID of the other slave gateway.
[0058] In some exemplary embodiments, the other slave gateways may adopt multiple methods to share the second mapping relationship, for example, the other slave gateways may share the second mapping relationship after learning the MAC addresses of the terminals connected to the other slave gateways, specifically, the second mapping relationship may be shared with the main gateway, and the second mapping relationship may be shared among different slave gateways.
[0059] In some exemplary embodiments, the step of obtaining a device ID of the second slave gateway by a target MAC address in the Ethernet frame includes the steps of: sending an obtaining request to the main gateway, where the obtaining request is used to obtain a first mapping relationship corresponding to the target media access control address, the first mapping relationship being a mapping relationship between the device ID and the media access control address of the slave gateway; and receiving the first mapping relationship corresponding to the target media access control address sent from the main gateway, and obtaining the device ID in the first mapping relationship corresponding to the target media access control address.
[0060] In some demonstrative embodiments, the acquisition request includes a target MAC address.
[0061] In some exemplary embodiments, the step of obtaining a device ID of the second slave gateway by the target MAC address in the Ethernet frame includes the steps of: sending an obtaining request to another gateway, where the obtaining request is used to obtain a first mapping relationship corresponding to the target media access control address, the first mapping relationship being a mapping relationship between the device ID and the media access control address of the slave gateway; and receiving the first mapping relationship corresponding to the target media access control address sent from the other gateway, and obtaining the device ID in the first mapping relationship corresponding to the target media access control address.
[0062] In some demonstrative embodiments, the step of obtaining the first port ID and the first ID of the first slave gateway by the device ID of the second slave gateway includes the steps of obtaining first configuration information in which the peer device ID is the device ID of the second slave gateway, obtaining the port ID in the first configuration information as the first port ID of the first slave gateway, if the first ID is the UNI Node ID of the first slave gateway, obtaining the UNI Node ID in the first configuration information, where the obtained UNI Node ID is the first ID, and if the first ID is the UNI Node ID of the second slave gateway, obtaining the first ID by the UNI Node ID in the first configuration information.
[0063] For example, if the two ONUs communicating with each other are represented by 0 and 1, and if the UNI Node ID in the first configuration information is 0, the first ID can be identified as 1, and if the UNI Node ID in the first configuration information is 1, the first ID can be identified as 0.
[0064] In some demonstrative embodiments, the peer device ID may be a peer ONU ID.
[0065] In some example embodiments, communication between any two slave gateways is associated with one configuration information, namely, a GEM Port Network Connection Terminal Point (CTP) Maintenance Entity (ME), which is associated with a Transmission Container (T-CONT) and a GEM IW TP ME.
[0066] In some demonstrative embodiments, the GEM Port Network CTP ME includes the following attributes:
[0067] Managed Entity ID. This attribute is an example for uniquely identifying a GEM Port Network CTP ME.
[0068] Port ID: This attribute is used to indicate the port ID of the GEM port associated with the GEM Port Network CTP ME.
[0069] A T-CONT Pointer, this attribute points to an instance of a T-CONT.
[0070] Direction, this attribute describes whether the GEM port is used for UNI-to-ANNI, ANI-to-UNI, bidirectional connection, or bidirectional UNI-to-UNI. For example, if this attribute value is 1, it indicates that the GEM port is used for UNI-to-ANN, if this attribute value is 2, it indicates that the GEM port is used for ANI-to-UNI. If this attribute value is 3, it indicates that the GEM port is used for bidirectional connection. If this attribute value is 4, it indicates that the GEM port is used for bidirectional UNI-to-UNI.
[0071] Peer Device ID: This attribute is used to indicate the device ID of another slave gateway to communicate with.
[0072] Here, UNI-to-UNI is a communication type newly added to the embodiment of the present application, and represents communication between ONUs.
[0073] Here, the UNI Node ID is a new attribute added to the embodiment of the present application.
[0074] Here, the peer device ID is a new attribute added in the embodiment of the present application.
[0075] In some exemplary embodiments, the GEM Port Network CTP ME further includes an associated port ID, and this attribute is used to describe the first port ID of the slave gateway to which the ONU that communicates with the main gateway belongs.
[0076] In some exemplary embodiments, the GEM Port Network CTP ME further includes a UNI Node ID, which attribute represents the two terminals communicating.
[0077] In some demonstrative embodiments, when the first ID is the device ID of the second slave gateway, after the step of receiving an Ethernet frame transmitted by the first terminal and before the step of packaging the first port ID, the first ID, and the Ethernet frame as a first GEM frame, the method includes the steps of obtaining the device ID of the second slave gateway by a target MAC address, and obtaining the first port ID of the first slave gateway by the device ID of the second slave gateway.
[0078] In some demonstrative embodiments, the step of obtaining the first port ID of the first slave gateway by the device ID of the second slave gateway includes the steps of obtaining first configuration information in which the peer device ID is the device ID of the second slave gateway, and obtaining the port ID in the first configuration information as the first port ID of the first slave gateway.
[0079] In some demonstrative embodiments, if the device ID of the second slave gateway cannot be obtained, the method includes packaging the port ID and the Ethernet frame for the uplink broadcast as a second GEM frame and sending the second GEM frame to the main gateway.
[0080] In some demonstrative embodiments, packaging the port ID for the uplink broadcast and the Ethernet frame as a second GEM frame includes packaging the port ID for the uplink broadcast in a port ID field in a GEM frame header of the second GEM frame and packaging the Ethernet frame in a payload area of the second GEM frame.
[0081] The communication method provided by the embodiments of the present application performs communication between ONUs based on the port ID used when communicating between the ONUs, rather than on the port ID used when communicating between the ONUs and the OLT. This eliminates the need for the main gateway to analyze the first GEM frame when forwarding. In other words, it is not necessary to realize traffic forwarding between ONUs via the Ethernet layer or IP layer of the main gateway, but it only needs to be realized at the PON protocol layer of the main gateway, thereby reducing the time lag.
[0082] FIG. 4 is a flowchart of a communication method applied to a main gateway provided according to another embodiment of the present application.
[0083] In a second aspect, referring to FIG. 4, another embodiment of the present application provides a communication method applied to a main gateway, including the following steps:
[0084] Step 400, receiving a first GEM frame sent by a first slave gateway, where the first GEM frame includes a port ID.
[0085] In some demonstrative embodiments, as shown in FIG. 3, the first GEM frame includes a GEM frame header and a GEM frame payload area.
[0086] In some exemplary embodiments, the GEM frame header includes a PLI, a Key Index, a Port ID, a reserved field (Options), an LF, and an HEC.
[0087] In some example embodiments, the port ID may be a first port ID of the slave gateway, or a second port ID of the slave gateway, where the first port ID is a port ID used when communicating between ONUs, and the second port ID is a port ID used when communicating between ONUs and OLTs.
[0088] In some exemplary embodiments, the LF is used to indicate whether it is the last fragment.
[0089] In some demonstrative embodiments, the first GEM frame further includes a first ID.
[0090] In some exemplary embodiments, the first ID may be a UNI Node ID of a first slave gateway or a UNI Node ID of a second slave gateway, where the second slave gateway is a slave gateway connected to a second terminal, and the second terminal is a terminal to which the target MAC address in the Ethernet frame belongs.
[0091] In some demonstrative embodiments, the first ID may be a device ID of the second slave gateway.
[0092] In some exemplary embodiments, the UNI Node ID is used to indicate two communicating terminals, for example, ONU1 is represented by 1, ONU2 is represented by 0, and so on, two communicating ONUs are represented by 0 and 1.
[0093] In some demonstrative embodiments, the GEM frame header of the first GEM frame includes a port ID and a first ID.
[0094] In some demonstrative embodiments, a port ID field of the GEM frame header includes the port ID and a reserved field of the GEM frame header includes the first ID.
[0095] In some demonstrative embodiments, if the first ID is a device ID of the second slave gateway, at least one bit of the reserved field of the GEM frame header contains the first ID.
[0096] In some demonstrative embodiments, if the first ID is the UNI Node ID of the first slave gateway, or if the first ID is the UNI Node ID of the second slave gateway, a bit of the reserved field of the GEM frame header contains the first ID.
[0097] In some demonstrative embodiments, the most significant bits of the reserved field contain the first ID.
[0098] In some demonstrative embodiments, the first GEM frame further includes a second ID used to characterize whether the first GEM frame is a GEM frame communicated between ONUs or a GEM frame communicated between an ONU and an OLT.
[0099] In some demonstrative embodiments, the GEM frame header of the first GEM frame further includes a second ID.
[0100] In some demonstrative embodiments, the reserved field of the GEM frame header further includes a second ID.
[0101] In some demonstrative embodiments, the second ID is located in a bit in the reserved field other than the bits occupied by the first ID.
[0102] In some exemplary embodiments, when the first ID is the UNI Node ID of the first slave gateway, or when the first ID is the UNI Node ID of the second slave gateway, the second ID is located in the reserved field at any bit other than the most significant bit.
[0103] Step 401: if it is determined that the port ID in the first GEM frame is the port ID used for communication between ONUs, the first GEM frame is transmitted to all slave gateways.
[0104] In some demonstrative embodiments, determining that the port ID in the first GEM frame is a port ID used when communicating between ONUs includes obtaining second configuration information that the port ID is the port ID in the first GEM frame, and determining that the peer device ID in the second configuration information is not a special value.
[0105] In some illustrative embodiments, if it is determined that the peer device ID in the second configuration information is a special value, it is determined that the port ID in the first GEM frame is the port ID used when communicating between the ONU and the OLT.
[0106] In some example embodiments, communication between any two slave gateways corresponds to one configuration information, namely, a GEM Port Network CTP ME, which is associated with a T-CONT and a GEM IW TP ME.
[0107] In some demonstrative embodiments, the GEM Port Network CTP ME includes the following attributes:
[0108] Managed Entity ID. This attribute is an example for uniquely identifying a GEM Port Network CTP ME.
[0109] Port ID: This attribute is used to indicate the port ID of the GEM port associated with the GEM Port Network CTP ME.
[0110] A T-CONT Pointer, this attribute points to an instance of a T-CONT.
[0111] Direction: This attribute describes whether the GEM port is used for UNI-to-ANNI, ANI-to-UNI, bidirectional connection, or bidirectional UNI-to-UNI. For example, if this attribute value is 1, it indicates that the GEM port is used for UNI-to-ANN, if this attribute value is 2, it indicates that the GEM port is used for ANI-to-UNI, if this attribute value is 3, it indicates that the GEM port is used for bidirectional connection, if this attribute value is 4, it indicates that the GEM port is used for bidirectional UNI-to-UNI.
[0112] Peer device ID: this attribute is used to indicate the device ID of another slave gateway to communicate with. If this attribute value is a special value, it indicates that communication is performed between an ONU and an OLT.
[0113] Here, UNI-to-UNI is a communication type newly added to the embodiment of the present application, and represents communication between ONUs.
[0114] Here, the peer device ID is a new attribute added in the embodiment of the present application.
[0115] In some exemplary embodiments, the GEM Port Network CTP ME further includes an associated port ID, and this attribute is used to describe the first port ID of the slave gateway to which the ONU communicating with it belongs.
[0116] In some exemplary embodiments, the GEM Port Network CTP ME further includes a UNI Node ID, which attribute represents the two terminals communicating.
[0117] Here, the UNI Node ID is a new attribute added to the embodiment of the present application.
[0118] In some exemplary embodiments, determining that the port ID in the first GEM frame is a port ID used when communicating between ONUs includes determining that third configuration information exists in which the port ID is the port ID in the first GEM frame and the peer device ID is the first ID in the first GEM frame.
[0119] In some demonstrative embodiments, if it is determined that the third configuration information is not present, it is determined that the port ID in the first GEM frame is the port ID used when communicating between the ONU and the OLT.
[0120] In some demonstrative embodiments, determining that the port ID in the first GEM frame is a port ID used in communicating between optical network units includes obtaining a second ID in the first GEM frame and determining that the second ID is used to characterize the first GEM frame as a GEM frame communicated between ONUs.
[0121] In some exemplary embodiments, when the values of the first port IDs assigned to the slave gateways between which two ONUs communicate are different, before the step of transmitting the first GEM frame, the step includes a step of acquiring the first port ID of the second slave gateway, and replacing the port ID in the first GEM frame with the first port ID of the second slave gateway acquired and updated, and accordingly, the step of transmitting the first GEM frame to all slave gateways includes a step of transmitting the updated first GEM frame to all slave gateways.
[0122] In some exemplary embodiments, if the values of the first port ID assigned to the slave gateways in which two ONUs communicate are present are different, the first GEM frame may be transmitted directly, and the port ID in the first GEM frame may not be replaced with the first GEM frame obtained and updated by the first port ID of the second slave gateway.
[0123] In some demonstrative embodiments, the step of obtaining a first port ID of the second slave gateway includes the steps of obtaining second configuration information, where the port ID is a port ID in the first GEM frame, and obtaining an associated port ID in the second configuration information, where the associated port ID is the first port ID of the second slave gateway.
[0124] In some demonstrative embodiments, the step of obtaining a first port ID of the second slave gateway includes the steps of obtaining third configuration information, where the port ID is the port ID in the first GEM frame and the peer device ID is the first ID in the first GEM frame, and obtaining an associated port ID in the third configuration information, where the associated port ID is the first port ID of the second slave gateway.
[0125] In some exemplary embodiments, before the step of receiving a first GEM frame sent by the first slave gateway, the method further includes the steps of receiving an acquisition request sent by the first slave gateway, the acquisition request being used for acquiring a first mapping relationship corresponding to the target media access control address, the first mapping relationship being a mapping relationship between a device ID of the slave gateway and a media access control address; and searching for a first mapping relationship corresponding to the target MAC address from a pre-stored first mapping relationship, and sending the first mapping relationship corresponding to the target MAC address to the first slave gateway.
[0126] In some demonstrative embodiments, the acquisition request includes a target MAC address.
[0127] In some demonstrative embodiments, before the step of receiving the acquisition request sent by the first slave gateway, the method further includes a step of receiving a second mapping relationship shared by the first slave gateway or another slave gateway, and storing or updating the first mapping relationship with the second mapping relationship.
[0128] In some demonstrative embodiments, the second mapping relationship is a mapping relationship between a MAC address stored after the slave gateway learns the MAC address of a terminal connected to the slave gateway and a device ID of another slave gateway.
[0129] In some demonstrative embodiments, before the step of receiving the first GEM frame transmitted by the first slave gateway, the method further includes a step of receiving a second mapping relationship shared by the first slave gateway or other slave gateways, and transmitting the second mapping relationship to all slave gateways or other slave gateways except for the slave gateway of the shared second mapping relationship.
[0130] In some demonstrative embodiments, the method further includes receiving a second GEM frame transmitted by the first slave gateway, determining that a port ID in the second GEM frame is for uplink broadcast, and broadcasting the second GEM frame to the FTTH OLT and all slave gateways.
[0131] FIG. 5 is a flowchart of a communication method applied to a third slave gateway provided by another embodiment of the present application.
[0132] In a third aspect, referring to FIG. 5, another embodiment of the present application provides a communication method applied to a third gateway, including the following steps:
[0133] Step 500: receiving a first GEM frame sent by a main gateway, where the first GEM frame includes a port ID.
[0134] In some demonstrative embodiments, as shown in FIG. 3, a GEM frame includes a GEM frame header and a GEM frame payload area.
[0135] In some exemplary embodiments, the GEM frame header includes a PLI, a Key Index, a Port ID, a reserved field (Options), an LF, and an HEC.
[0136] In some example embodiments, the port ID may be a first port ID of the slave gateway, or a second port ID of the slave gateway, where the first port ID is a port ID used when communicating between ONUs, and the second port ID is a port ID used when communicating between ONUs and OLTs.
[0137] In some exemplary embodiments, the LF is used to indicate whether it is the last fragment.
[0138] In some demonstrative embodiments, the first GEM frame further includes a first ID.
[0139] In some exemplary embodiments, the first ID may be a UNI Node ID of a first slave gateway or may be a UNI Node ID of a second slave gateway, where the second slave gateway is a slave gateway connected to a second terminal, and the second terminal is a terminal to which the target MAC address in the Ethernet frame belongs.
[0140] In some demonstrative embodiments, the first ID may be a device ID of the second slave gateway.
[0141] In some exemplary embodiments, the UNI Node ID is used to indicate two communicating terminals, for example, ONU1 is represented by 1, ONU2 is represented by 0, and so on, two communicating ONUs are represented by 0 and 1.
[0142] In some demonstrative embodiments, the GEM frame header of the first GEM frame includes a port ID and a first ID.
[0143] In some demonstrative embodiments, a port ID field of the GEM frame header includes the port ID and a reserved field of the GEM frame header includes the first ID.
[0144] In some demonstrative embodiments, if the first ID is a device ID of the second slave gateway, at least one bit of the reserved field of the GEM frame header contains the first ID.
[0145] In some demonstrative embodiments, if the first ID is the UNI Node ID of the first slave gateway, or if the first ID is the UNI Node ID of the second slave gateway, a bit of the reserved field of the GEM frame header includes the first ID, e.g., the most significant bit of the reserved field includes the first ID.
[0146] In some demonstrative embodiments, the first GEM frame further includes a second ID used to characterize whether the first GEM frame is a GEM frame communicated between ONUs or a GEM frame communicated between an ONU and an OLT.
[0147] In some demonstrative embodiments, the GEM frame header of the first GEM frame further includes a second ID.
[0148] In some demonstrative embodiments, the reserved field of the GEM frame header further includes a second ID.
[0149] In some demonstrative embodiments, the second ID is located in a bit in the reserved field other than the bits occupied by the first ID.
[0150] In some exemplary embodiments, when the first ID is the UNI Node ID of the first slave gateway, or when the first ID is the UNI Node ID of the second slave gateway, the second ID is located in the reserved field at any bit other than the most significant bit.
[0151] Step 501: Determine whether to perform a corresponding process on the first GEM frame according to the port ID in the first GEM frame and the first ID in the first GEM frame.
[0152] In some exemplary embodiments, the port ID in the first GEM frame determines whether to perform corresponding processing on the first GEM frame, and whether the port ID in the first GEM frame is the first port ID of the third slave gateway determines whether to perform corresponding processing on the first GEM frame.
[0153] In some exemplary embodiments, the step of determining whether to perform a corresponding process on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway includes: determining that the port ID in the first GEM frame is the first port ID of the third slave gateway, and performing a corresponding process on the first GEM frame; and determining not to perform corresponding processing on the first GEM frame if the port ID in the first GEM frame is not the first port ID of the third slave gateway.
[0154] In some demonstrative embodiments, the step of determining whether to perform appropriate processing on the first GEM frame based on the port ID in the first GEM frame includes a step of determining whether to perform appropriate processing on the first GEM frame based on whether fourth configuration information exists in which the associated port ID is the port ID in the first GEM frame.
[0155] In some exemplary embodiments, the step of determining whether to perform a corresponding process on the first GEM frame according to whether there is fourth configuration information that the associated port ID is a port ID in the first GEM frame includes: If the fourth configuration information exists, determining to perform a corresponding process on the first GEM frame; and if the fourth configuration information does not exist, determining not to perform corresponding processing on the first GEM frame.
[0156] In some demonstrative embodiments, the step of determining whether to perform appropriate processing on the first GEM frame based on the port ID in the first GEM frame includes the step of determining whether to perform appropriate processing on the first GEM frame based on the port ID in the first GEM frame and the first ID in the first GEM frame.
[0157] In some demonstrative embodiments, if the first ID is the UNI Node ID of the first slave gateway or the first ID is the UNI Node ID of the second slave gateway, the step of determining whether to perform corresponding processing on the first GEM frame based on the port ID in the first GEM frame and the first ID in the first GEM frame includes the step of determining whether to perform corresponding processing on the first GEM frame based on whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the UNI Node ID of the third slave gateway.
[0158] In some exemplary embodiments, when the first ID is the UNI Node ID of the first slave gateway, determining whether to perform corresponding processing on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the UNI Node ID of the third slave gateway includes: determining that the port ID in the first GEM frame is the first port ID of the third slave gateway, and the first ID in the first GEM frame is not the UNI Node ID of the third slave gateway, to perform corresponding processing on the first GEM frame; and determining not to perform corresponding processing on the first GEM frame if the port ID in the first GEM frame is not the first port ID of the third slave gateway or if the first ID in the first GEM frame is the UNI Node ID of the third slave gateway.
[0159] In some exemplary embodiments, when the first ID is the UNI Node ID of the second slave gateway, determining whether to perform corresponding processing on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the UNI Node ID of the third slave gateway includes: If the port ID in the first GEM frame is the first port ID of the third slave gateway, and the first ID in the first GEM frame is the UNI Node ID of the third slave gateway, determine to perform corresponding processing on the first GEM frame; and determining not to perform corresponding processing on the first GEM frame if the port ID in the first GEM frame is not the first port ID of the third slave gateway or if the first ID in the first GEM frame is not the UNI Node ID of the third slave gateway.
[0160] In some demonstrative embodiments, when the first ID is the device ID of the second slave gateway, the step of determining whether to perform corresponding processing on the first GEM frame based on the port ID in the first GEM frame and the first ID in the first GEM frame includes the step of determining whether to perform corresponding processing on the first GEM frame based on whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the device ID of the third slave gateway.
[0161] In some exemplary embodiments, the step of determining whether to perform corresponding processing on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the device ID of the third slave gateway includes: If the port ID in the first GEM frame is the first port ID of the third slave gateway, and the first ID in the first GEM frame is the device ID of the third slave gateway, determining to perform corresponding processing on the first GEM frame; and determining not to perform corresponding processing on the first GEM frame if the port ID in the first GEM frame is not the first port ID of the third slave gateway or if the first ID in the first GEM frame is not the device ID of the third slave gateway.
[0162] In some demonstrative embodiments, when the first ID is the device ID of the second slave gateway, the step of determining whether to perform corresponding processing on the first GEM frame based on the port ID in the first GEM frame and the first ID in the first GEM frame includes a step of determining whether to perform corresponding processing on the first GEM frame based on whether fourth configuration information exists in which the associated port ID is the port ID in the first GEM frame, and whether the first ID in the first GEM frame is the device ID of the third slave gateway.
[0163] In some exemplary embodiments, the step of determining whether to perform corresponding processing on the first GEM frame according to whether there is fourth configuration information that the associated port ID is the port ID in the first GEM frame, and whether the first ID in the first GEM frame is the device ID of the third slave gateway includes: determining that the fourth configuration information exists and the first ID in the first GEM frame is the device ID of the third slave gateway, to perform corresponding processing on the first GEM frame; and if the fourth configuration information does not exist or the first ID in the first GEM frame is not the device ID of the third slave gateway, determining not to perform corresponding processing on the first GEM frame.
[0164] In some example embodiments, the corresponding processing of the first GEM frame may be any processing performed after receiving the first GEM frame, for example, parsing the first GEM frame to obtain an Ethernet frame.
[0165] In some demonstrative embodiments, not performing appropriate processing on the first GEM frame includes discarding the first GEM frame.
[0166] In some exemplary embodiments, before the step of receiving the first GEM frame sent by the main gateway, the method further includes a step of receiving an acquisition request sent by a first slave gateway, where the acquisition request is used to acquire a first mapping relationship corresponding to the target MAC address, the first mapping relationship being a mapping relationship between a device ID and a MAC address of the slave gateway, searching for the first mapping relationship corresponding to the target MAC address from the pre-stored first mapping relationship, and sending the first mapping relationship corresponding to the target MAC address to the first slave gateway.
[0167] In some demonstrative embodiments, before the step of receiving the first GEM frame transmitted by the main gateway, the method further includes a step of receiving a second mapping relationship shared by the first slave gateway or another slave gateway, and storing or updating the first mapping relationship with the second mapping relationship.
[0168] In some demonstrative embodiments, the second mapping relationship is a mapping relationship between a MAC address stored after the slave gateway learns the MAC address of a terminal connected to the slave gateway and a device ID of another slave gateway.
[0169] In some demonstrative embodiments, the method further includes receiving a second GEM frame broadcast by the main gateway.
[0170] In order to more clearly express the communication method of the embodiment of the present application, the following provides some specific examples to describe the specific implementation process of the communication method of the embodiment of the present application, which are not used to limit the scope of protection of the embodiment of the present application.
[0171] Example 1 In this example, we will explain the process of achieving communication between ONUs when the slave gateway has not learned the MAC address of the terminal connected to the slave gateway at the start of ONU interaction, and the slave gateway connected to the transmitting terminal cannot obtain the device ID of the slave gateway of the receiving terminal.
[0172] The main gateway sends configuration information to each slave gateway via the GEM Port Network CTP ME, where the port ID in the configuration information is the port ID for uplink broadcast, and the communication type in the configuration information is UNI-to-ANI, that is, the value of the direction attribute is 1.
[0173] When the slave gateway receives an Ethernet frame transmitted by a terminal connected to the slave gateway, it packages the Ethernet frame into a payload area in a second GEM frame, packages the uplink broadcast port ID of the slave gateway into the port ID field of the GEM frame header of the second GEM frame, and transmits the second GEM frame to the main gateway.
[0174] The main gateway receives the second GEM frame, determines that the port ID in the second GEM frame is for uplink broadcast, and broadcasts the second GEM frame to the FTTH OLT and all slave gateways.
[0175] The slave gateway receives the second GEM frame.
[0176] Example 2 In this example, a process will be described in which the slave gateway learns the MAC address of a terminal connected to the slave gateway and shares with the main gateway the mapping relationship between the MAC address and the device ID of the slave gateway.
[0177] Let us assume that three slave gateways, slave gateway 1, slave gateway 2, and slave gateway 3, are connected to the main gateway; two terminals, terminal 1 and terminal 2, are connected to slave gateway 1; three terminals, terminal 3, terminal 4, and terminal 5, are connected to slave gateway 2; and two terminals, terminal 6 and terminal 7, are connected to slave gateway 3.
[0178] After terminal 1 and terminal 2 access the slave gateway 1, the MAC address of terminal 1 learned by the slave gateway 1 is MAC address 1, and the MAC address of terminal 2 learned by the slave gateway 1 is MAC address 2. The slave gateway 1 locally stores the mapping relationship between MAC address 1 and the device ID of the slave gateway 1 and the mapping relationship between MAC address 2 and the device ID of the slave gateway 1 and shares the stored mapping relationship with the main gateway as a second mapping relationship, and the main gateway stores or updates the local first mapping relationship with the second mapping relationship shared by the slave gateway 1.
[0179] After terminal 3, terminal 4, and terminal 5 access the slave gateway 2, the MAC address of terminal 3 learned by the slave gateway 2 is MAC address 3, the MAC address of terminal 4 learned by the slave gateway 2 is MAC address 4, and the MAC address of terminal 5 learned by the slave gateway 2 is MAC address 5. The slave gateway 2 locally stores the mapping relationship between MAC address 3 and the device ID of the slave gateway 2, the mapping relationship between MAC address 4 and the device ID of the slave gateway 2, and the mapping relationship between MAC address 5 and the device ID of the slave gateway 2, and shares the stored mapping relationships with the main gateway as second mapping relationships, and the main gateway stores or updates the local first mapping relationship with the second mapping relationship shared by the slave gateway 2.
[0180] After terminal 6 and terminal 7 access the slave gateway 3, the MAC address of terminal 6 learned by the slave gateway 3 is MAC address 6, and the MAC address of terminal 7 learned by the slave gateway 3 is MAC address 7. The slave gateway 3 locally stores the mapping relationship between MAC address 6 and the device ID of the slave gateway 3, and the mapping relationship between MAC address 7 and the device ID of the slave gateway 3, and shares the stored mapping relationship with the main gateway as a second mapping relationship, and the main gateway stores or updates the local first mapping relationship with the second mapping relationship shared by the slave gateway 3.
[0181] Example 3 In this example, a first port ID is assigned to FTTR ONU1 and FTTR ONU2 which communicate with each other, and the communication process between ONU1 and ONU2 is described when the value of the first port ID assigned to ONU1 is the same as the value of the first port ID assigned to ONU2.
[0182] In this example, the first port ID is a port ID used when communicating between ONUs, the value of the first port ID of ONU1 is different from the value of the second port ID of ONU1, the value of the first port ID of ONU2 is different from the value of the second port ID of ONU2, and the second port ID is a port ID used when communicating between the ONUs and the OLT.
[0183] In this example, the main gateway sends configuration information to the slave gateway 1 in which ONU1 exists via the GEM Port Network CTP ME, and the port ID in the configuration information is the assigned first port ID Port-ID1, the communication type is ONU-to-ONU or UNI-to-UNI, i.e., the value of the direction attribute is 4, the UNI Node ID is 0, and the peer device ID is the device ID of the slave gateway 2 in which ONU2 exists.
[0184] In this example, the main gateway sends configuration information to the slave gateway 2 in which ONU2 exists via the GEM Port Network CTP ME, and the port ID in the configuration information is the assigned first port ID Port-ID1, the communication type is ONU-to-ONU or UNI-to-UNI, i.e., the value of the direction attribute is 4, the UNI Node ID is 1, and the peer device ID is the device ID of the slave gateway 1 in which ONU1 exists.
[0185] The process in which ONU1 initiates communication with ONU2 includes the following:
[0186] Slave gateway 1 in which ONU 1 resides receives the Ethernet frame sent by terminal 1.
[0187] The slave gateway 1 sends an acquisition request to the main gateway, where the acquisition request includes the target MAC address in an Ethernet frame.
[0188] The main gateway searches for a first mapping relationship corresponding to the target MAC address in the pre-stored first mapping relationships, and sends the first mapping relationship corresponding to the target MAC address to the slave gateway 1.
[0189] The slave gateway 1 receives the first mapping relationship corresponding to the target MAC address sent by the main gateway, and obtains the device ID in the first mapping relationship corresponding to the target MAC address as the device ID of the slave gateway 2.
[0190] The slave gateway 1 obtains the port ID Port-ID1 in the configuration information in which the peer device ID is the device ID of the slave gateway 2, and sets it as the first port ID of the slave gateway 1, and obtains the UNI Node ID in the configuration information in which the peer device ID is the device ID of the slave gateway 2.
[0191] The slave gateway 1 packages the Ethernet frame into the payload area of a first GEM frame, packages the first port ID of the slave gateway 1 into the port ID field in the GEM frame header of the first GEM frame, packages the UNI Node ID into the most significant bits in the Option field in the GEM frame header of the first GEM frame, and sends the packaged first GEM frame to the main gateway.
[0192] The main gateway receives the first GEM frame, acquires configuration information indicating that the port ID is the port ID in the first GEM frame, determines that the peer device ID in the acquired configuration information is not a special value, identifies the port ID in the first GEM frame as the port ID used when communicating between ONUs, and broadcasts the first GEM frame to all slave gateways.
[0193] The slave gateway 2 receives the first GEM frame, and if the port ID in the first GEM frame is the first port ID of the slave gateway 2 and the UNI Node ID in the first GEM frame is not the UNI Node ID of the slave gateway 2, the slave gateway 2 receives the first GEM frame, analyzes the first GEM frame to obtain an Ethernet frame, and sends the Ethernet frame to the terminal 2.
[0194] Example 4 In this example, a first port ID is assigned to FTTR ONU1 and FTTR ONU2 which communicate with each other, and the communication process between ONU1 and ONU2 is described when the value of the first port ID assigned to ONU1 is not the same as the value of the first port ID assigned to ONU2.
[0195] In this example, the first port ID is a port ID used when communicating between ONUs, the value of the first port ID of ONU1 is different from the value of the second port ID of ONU1, the value of the first port ID of ONU2 is different from the value of the second port ID of ONU2, and the second port ID is a port ID used when communicating between the ONUs and the OLT.
[0196] In this example, the main gateway sends configuration information to the slave gateway 1 in which ONU1 resides via the GEM Port Network CTP ME, the port ID in the configuration information is the assigned first port ID Port-ID1, the communication type is ONU-to-ONU or UNI-to-UNI, i.e., the value of the direction attribute is 4, the peer device ID is the device ID of the slave gateway 2 in which ONU2 resides, and the related port ID is the first port ID Port-ID2 assigned by the slave gateway 2 in which ONU2 resides.
[0197] In this example, the main gateway sends configuration information to the slave gateway 2 in which ONU2 resides via the GEM Port Network CTP ME, the port ID in the configuration information is the assigned first port ID Port-ID2, the communication type is ONU-to-ONU or UNI-to-UNI, i.e., the value of the direction attribute is 4, the peer device ID is the device ID of the slave gateway 1 in which ONU1 resides, and the related port ID is the first port ID Port-ID1 assigned by the slave gateway 1 in which ONU1 resides.
[0198] The process in which ONU1 initiates communication with ONU2 includes the following:
[0199] Slave gateway 1 in which ONU 1 resides receives the Ethernet frame sent by terminal 1.
[0200] The slave gateway 1 sends an acquisition request to the main gateway, where the acquisition request includes the target MAC address in an Ethernet frame.
[0201] The main gateway searches for a first mapping relationship corresponding to the target MAC address in the pre-stored first mapping relationships, and sends the first mapping relationship corresponding to the target MAC address to the slave gateway 1.
[0202] The slave gateway 1 receives the first mapping relationship corresponding to the target MAC address sent by the main gateway, and obtains the device ID in the first mapping relationship corresponding to the target MAC address as the device ID of the slave gateway 2.
[0203] The slave gateway 1 acquires the port ID Port-ID1 in the configuration information in which the peer device ID is the device ID of the slave gateway 2, and sets this as the first port ID of the slave gateway 1.
[0204] The slave gateway 1 packages the Ethernet frame into the payload area of a first GEM frame, packages the first port ID of the slave gateway 1 into the port ID field in the GEM frame header of the first GEM frame, packages the device ID of the slave gateway 2 as the first ID into the Option field in the GEM frame header of the first GEM frame, and transmits the packaged first GEM frame to the main gateway.
[0205] The main gateway receives the first GEM frame, determines that configuration information exists in which the port ID is the port ID in the first GEM frame and the peer device ID is the device ID of the slave gateway 2, and identifies the port ID in the first GEM frame as the port ID used when communicating between ONUs.
[0206] The main gateway obtains the associated port ID in the configuration information, in which the port ID is the port ID in the first GEM frame and the peer device ID is the device ID of the slave gateway 2, as Port-ID2 of the first port ID of the slave gateway 2, replaces the port ID in the first GEM frame with Port-ID2 of the first port ID of the slave gateway 2 to obtain an updated first GEM frame, and broadcasts the updated first GEM frame to all slave gateways.
[0207] The slave gateway 2 receives the updated first GEM frame, and if the port ID in the updated first GEM frame is the first port ID of the slave gateway 2 and the first ID in the first GEM frame is the device ID of the slave gateway 2, the slave gateway 2 receives the updated first GEM frame, analyzes the updated first GEM frame to obtain an Ethernet frame, and sends the Ethernet frame to the terminal 2.
[0208] Example 5 In this example, a first port ID is assigned to FTTR ONU1 and FTTR ONU2 which communicate with each other, and the communication process between ONU1 and ONU2 is described when the value of the first port ID assigned to ONU1 is not the same as the value of the first port ID assigned to ONU2.
[0209] In this example, the first port ID is a port ID used when communicating between ONUs, the value of the first port ID of ONU1 is different from the value of the second port ID of ONU1, the value of the first port ID of ONU2 is different from the value of the second port ID of ONU2, and the second port ID is a port ID used when communicating between the ONUs and the OLT.
[0210] In this example, the main gateway sends configuration information to the slave gateway 1 in which ONU1 resides via the GEM Port Network CTP ME, the port ID in the configuration information is the assigned first port ID Port-ID1, the communication type is ONU-to-ONU or UNI-to-UNI, i.e., the value of the direction attribute is 4, the peer device ID is the device ID of the slave gateway 2 in which ONU2 resides, and the related port ID is the first port ID Port-ID2 assigned by the slave gateway 2 in which ONU2 resides.
[0211] In this example, the main gateway sends configuration information to the slave gateway 2 in which ONU2 resides via the GEM Port Network CTP ME, the port ID in the configuration information is the assigned first port ID Port-ID2, the communication type is ONU-to-ONU or UNI-to-UNI, i.e., the value of the direction attribute is 4, the peer device ID is the device ID of the slave gateway 1 in which ONU1 resides, and the related port ID is the first port ID Port-ID1 assigned by the slave gateway 1 in which ONU1 resides.
[0212] The process in which ONU1 initiates communication with ONU2 includes the following:
[0213] Slave gateway 1 in which ONU 1 resides receives the Ethernet frame sent by terminal 1.
[0214] The slave gateway 1 sends an acquisition request to the main gateway, where the acquisition request includes the target MAC address in an Ethernet frame.
[0215] The main gateway searches for a first mapping relationship corresponding to the target MAC address in the pre-stored first mapping relationships, and sends the first mapping relationship corresponding to the target MAC address to the slave gateway 1.
[0216] The slave gateway 1 receives the first mapping relationship corresponding to the target MAC address sent by the main gateway, and obtains the device ID in the first mapping relationship corresponding to the target MAC address as the device ID of the slave gateway 2.
[0217] The slave gateway 1 acquires the port ID Port-ID1 in the configuration information in which the peer device ID is the device ID of the slave gateway 2, and sets this as the first port ID of the slave gateway 1.
[0218] The slave gateway 1 packages the Ethernet frame into the payload area of a first GEM frame, packages the first port ID of the slave gateway 1 into the port ID field in the GEM frame header of the first GEM frame, packages the device ID of the slave gateway 2 as the first ID into the Option field in the GEM frame header of the first GEM frame, and transmits the packaged first GEM frame to the main gateway.
[0219] The main gateway receives the first GEM frame, determines that configuration information exists in which the port ID is the port ID in the first GEM frame and the peer device ID is the device ID of the slave gateway 2, identifies the port ID in the first GEM frame as the port ID used when communicating between ONUs, and broadcasts the first GEM frame to all slave gateways.
[0220] The slave gateway 2 receives the first GEM frame, and if the port ID in the first GEM frame is the first port ID of the slave gateway 2 and the first ID in the first GEM frame is the device ID of the slave gateway 2, the slave gateway 2 receives the first GEM frame, analyzes the first GEM frame to obtain an Ethernet frame, and sends the Ethernet frame to the terminal 2.
[0221] Example 6 In this example, a first port ID is assigned to FTTR ONU1 and FTTR ONU2 which communicate with each other, and the communication process between ONU1 and ONU2 is described when the value of the first port ID assigned to ONU1 is not the same as the value of the first port ID assigned to ONU2.
[0222] In this example, the first port ID is a port ID used when communicating between ONUs, the value of the first port ID of ONU1 is the same as the value of the second port ID of ONU1, the value of the first port ID of ONU2 is the same as the value of the second port ID of ONU2, and the second port ID is a port ID used when communicating between the ONUs and the OLT.
[0223] In this example, the main gateway sends configuration information to the slave gateway 1 in which ONU1 resides via the GEM Port Network CTP ME, the port ID in the configuration information is the assigned first port ID Port-ID1, the communication type is ONU-to-ONU or UNI-to-UNI, i.e., the value of the direction attribute is 4, the peer device ID is the device ID of the slave gateway 2 in which ONU2 resides, and the related port ID is the first port ID Port-ID2 assigned by the slave gateway 2 in which ONU2 resides.
[0224] In this example, the main gateway sends configuration information to the slave gateway 2 in which ONU2 resides via the GEM Port Network CTP ME, the port ID in the configuration information is the assigned first port ID Port-ID2, the communication type is ONU-to-ONU or UNI-to-UNI, i.e., the value of the direction attribute is 4, the peer device ID is the device ID of the slave gateway 1 in which ONU1 resides, and the related port ID is the first port ID Port-ID1 assigned by the slave gateway 1 in which ONU1 resides.
[0225] The process in which ONU1 initiates communication with ONU2 includes the following:
[0226] Slave gateway 1 in which ONU 1 resides receives the Ethernet frame sent by terminal 1.
[0227] The slave gateway 1 sends an acquisition request to the main gateway, where the acquisition request includes the target MAC address in an Ethernet frame.
[0228] The main gateway searches for a first mapping relationship corresponding to the target MAC address in the pre-stored first mapping relationships, and sends the first mapping relationship corresponding to the target MAC address to the slave gateway 1.
[0229] The slave gateway 1 receives the first mapping relationship corresponding to the target MAC address sent by the main gateway, and obtains the device ID in the first mapping relationship corresponding to the target MAC address as the device ID of the slave gateway 2.
[0230] The slave gateway 1 acquires the port ID Port-ID1 in the configuration information in which the peer device ID is the device ID of the slave gateway 2, and sets this as the first port ID of the slave gateway 1.
[0231] The slave gateway 1 packages the Ethernet frame into the payload area of the first GEM frame, packages the first port ID of the slave gateway 1 into the port ID field in the GEM frame header of the first GEM frame, packages the device ID of the slave gateway 2 as the first ID into the Option field in the GEM frame header of the first GEM frame, packages the second ID into the second most significant bit in the Option field in the frame header of the first GEM frame, and sends the packaged first GEM frame to the main gateway, where the value of the second ID is 1 and is used to characterize the first GEM frame as communication between ONUs.
[0232] The main gateway receives the first GEM frame, obtains the second ID in the first GEM frame, determines that the second ID is used to characterize the first GEM frame as a GEM frame communicated between ONUs, and identifies the port ID in the first GEM frame as the port ID used when communicating between ONUs.
[0233] The main gateway obtains the associated port ID in the configuration information, in which the port ID is the port ID in the first GEM frame and the peer device ID is the device ID of the slave gateway 2, as Port-ID2 of the first port ID of the slave gateway 2, replaces the port ID in the first GEM frame with Port-ID2 of the first port ID of the slave gateway 2 to obtain an updated first GEM frame, and broadcasts the updated first GEM frame to all slave gateways.
[0234] The slave gateway 2 receives the updated first GEM frame, and if the port ID in the updated first GEM frame is the first port ID of the slave gateway 2 and the first ID in the first GEM frame is the device ID of the slave gateway 2, the slave gateway 2 receives the updated first GEM frame, analyzes the updated first GEM frame to obtain an Ethernet frame, and sends the Ethernet frame to the terminal 2.
[0235] In a fourth aspect, another embodiment of the present application provides an electronic device including at least one processor and a memory having at least one program stored therein, the at least one program, when executed by the at least one processor, causing the at least one processor to realize any one of the communication methods described above.
[0236] Here, the processor is a device having a data processing capability, including but not limited to a central processor (CPU), etc. The memory is a device having a data storage capability, including but not limited to a random access memory (RAM, more specifically SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), and a flash memory (FLASH).
[0237] In some embodiments, the processor and memory are interconnected via a bus, and further connected to other components of the computing device.
[0238] In a fifth aspect, another embodiment of the present application provides a computer readable medium having a computer program stored thereon, the computer program, when executed by a processor, causing the processor to implement any one of the communication methods described above.
[0239] FIG. 6 is a block diagram of a communication system provided according to another embodiment of the present application.
[0240] In a sixth aspect, referring to FIG. 6, another embodiment of the present application includes a first slave gateway 601, a main gateway 602, and a third slave gateway 603, the first slave gateway 601 is used for receiving an Ethernet frame sent by a first terminal, and packages the Ethernet frame with a first port ID of the first slave gateway as a first gigabit passive optical network package mode GEM frame, and sends the first GEM frame to the main gateway, the first port ID is a port ID used when communicating between optical network units, and the main gateway 602 is used for receiving the Ethernet frame sent by the first gateway. and receiving a first GEM frame transmitted by a main gateway, the first GEM frame including a port ID and a first ID, and if it is determined that the port ID in the first GEM frame is a port ID used when communicating between optical network units, transmitting the first GEM frame to all slave gateways, and the third slave gateway 603 is used to receive the first GEM frame transmitted by the main gateway, the first GEM frame including a port ID and a first ID, and determining whether or not to perform corresponding processing on the first GEM frame based on the port ID in the first GEM frame and the first ID in the first GEM frame.
[0241] In some demonstrative embodiments, packaging the first port ID of the first slave gateway and the Ethernet frame as a first Gigabit Passive Optical Network Package Mode GEM frame includes packaging the first port ID of the first slave gateway, the first ID, and the Ethernet frame as the first GEM frame.
[0242] In some exemplary embodiments, the first ID is a user network interface node ID of a first slave gateway, or the first ID is a user network interface node ID of a second slave gateway, the second slave gateway is a slave gateway connected to a second terminal, and the second terminal is a terminal to which the target media access control address in the Ethernet frame belongs.
[0243] In some demonstrative embodiments, the first slave gateway 601 is further used to obtain a first port ID and a first ID of the first slave gateway.
[0244] In some exemplary embodiments, the first slave gateway 601 is specifically used to realize obtaining the first port ID and the first ID of the first slave gateway by adopting the following method: obtaining the device ID of the second slave gateway by the target media access control address in the Ethernet frame; and obtaining the first port ID and the first ID of the first slave gateway by the device ID of the second slave gateway.
[0245] In some exemplary embodiments, the first slave gateway 601 is specifically used to realize obtaining the device ID of the second slave gateway by the target media access control address in the Ethernet frame by adopting a method of searching for a device ID corresponding to the target media access control address in a first mapping relationship between the device ID and media access control address of the slave gateway pre-stored, and the device ID found by the searching is the device ID of the second slave gateway.
[0246] In some exemplary embodiments, the first slave gateway 601 is further used to obtain a second mapping relationship shared by other slave gateways, and store or update the first mapping relationship with the second mapping relationship.
[0247] In some exemplary embodiments, the first slave gateway 601 is specifically used to realize obtaining the device ID of the second slave gateway by the target media access control address in the Ethernet frame by adopting the following steps: sending an acquisition request to the main gateway, the acquisition request is used to obtain a first mapping relationship corresponding to the target media access control address, the first mapping relationship being a mapping relationship between the device ID and the media access control address of the slave gateway; and receiving the first mapping relationship corresponding to the target media access control address sent from the main gateway, and obtaining the device ID in the first mapping relationship corresponding to the target media access control address.
[0248] The main gateway 602 is further used for receiving an acquisition request sent by the first slave gateway, searching for a first mapping relationship corresponding to the target media access control address from a pre-stored first mapping relationship, and sending the first mapping relationship corresponding to the target media access control address to the first slave gateway.
[0249] In some exemplary embodiments, the first slave gateway 601 is specifically used to realize obtaining the device ID of the second slave gateway by the target media access control address in the Ethernet frame by adopting the following steps: sending an acquisition request to another gateway, the acquisition request is used to obtain a first mapping relationship corresponding to the target media access control address, the first mapping relationship being a mapping relationship between the device ID and the media access control address of the slave gateway; and receiving the first mapping relationship corresponding to the target media access control address sent from the other gateway, and obtaining the device ID in the first mapping relationship corresponding to the target media access control address.
[0250] The third slave gateway 603 is further used for receiving an acquisition request sent by the first slave gateway, searching for a first mapping relationship corresponding to the target media access control address from a pre-stored first mapping relationship, and sending the first mapping relationship corresponding to the target media access control address to the first slave gateway.
[0251] In some exemplary embodiments, the first slave gateway 601 is specifically used to realize obtaining the first port ID and the first ID of the first slave gateway by the device ID of the second slave gateway by adopting the following steps: obtaining first configuration information in which a peer device ID is the device ID of the second slave gateway; obtaining a port ID in the first configuration information as the first port ID of the first slave gateway; and obtaining the user network interface node ID in the first configuration information if the first ID is the user network interface node ID of the first slave gateway, and obtaining the first ID by the user network interface node ID in the first configuration information if the first ID is the user network interface node ID of the second slave gateway.
[0252] In some demonstrative embodiments, the first ID is a device ID of a second slave gateway, the second slave gateway is a slave gateway connected to a second terminal, and the second terminal is a terminal to which the target media access control address in the Ethernet frame belongs.
[0253] In some exemplary embodiments, the first slave gateway 601 is further used for obtaining a device ID of the second slave gateway by the target media access control address, and obtaining a first port ID of the first slave gateway by the device ID of the second slave gateway.
[0254] In some exemplary embodiments, the first slave gateway 601 is specifically used to realize packaging the first port ID, first ID and the Ethernet frame as a first gigabit passive optical network package mode GEM frame by adopting the following steps: packaging the Ethernet frame into a payload area in the first GEM frame, and packaging the first port ID and first ID of the first slave gateway into a GEM frame header in the first GEM frame.
[0255] In some exemplary embodiments, the first slave gateway 601 is specifically used to realize packaging the first port ID and the first ID of the first slave gateway into the GEM frame header in the first GEM frame by adopting a method of packaging the first port ID of the first slave gateway into a port ID field in the GEM frame header and packaging the first ID into a reserved field in the GEM frame header.
[0256] In some exemplary embodiments, the first slave gateway 601 is specifically used to realize packaging of the first ID into a reserved field in the GEM frame header by adopting a method of packaging the first ID into any one bit in the reserved field.
[0257] In some exemplary embodiments, the first slave gateway 601 is specifically used to realize packaging of the first ID into any one bit in the reserved field by adopting a method of packaging the first ID into the most significant bit in the reserved field.
[0258] In some exemplary embodiments, the first slave gateway 601 is specifically used to realize packaging of the first port ID and the first ID of the first slave gateway into a GEM frame header in the first GEM frame by adopting a scheme in which the first port ID, the first ID, and the second ID of the first slave gateway are packaged into a GEM frame header in the first GEM frame, and the second ID is used to characterize whether the first GEM frame is a GEM frame communicated between optical network units or a GEM frame communicated between an optical network unit and an optical line terminal.
[0259] In some exemplary embodiments, the first slave gateway 601 is specifically used to realize packaging the first port ID, the first ID, and the second ID of the first slave gateway into the GEM frame header in the first GEM frame by adopting a method of packaging the first port ID of the first slave gateway into a port ID field in the GEM frame header, and packaging the first ID and the second ID into a reserved field in the GEM frame header.
[0260] In some exemplary embodiments, the main gateway 602 is specifically used to realize determining that the port ID in the first GEM frame is the port ID used when communicating between optical network units by adopting a method including the steps of obtaining second configuration information, in which the port ID is the port ID in the first GEM frame, and determining that the peer device ID in the second configuration information is not a special value.
[0261] In some exemplary embodiments, the main gateway 602 is specifically used to realize determining that the port ID in the first GEM frame is the port ID used when communicating between optical network units by adopting a method of determining that there exists third configuration information in which the port ID is the port ID in the first GEM frame and the peer device ID is the first ID in the first GEM frame.
[0262] In some exemplary embodiments, the first GEM frame further includes a second ID used to characterize whether the first GEM frame is a GEM frame communicated between optical network units or a GEM frame communicated between an optical network unit and an optical line terminal, and the main gateway 602 is specifically used to realize determining that the port ID in the first GEM frame is a port ID used when communicating between optical network units by adopting a method including a step of obtaining a second ID and a step of determining that the preset ID is used to characterize the first GEM frame as a GEM frame communicated between optical network units.
[0263] In some demonstrative embodiments, the main gateway 602 is further used for obtaining a first port ID of a second slave gateway, replacing the port ID in the first GEM frame with the first port ID of the second slave gateway obtained and updated in the first GEM frame, and transmitting the updated first GEM frame.
[0264] In some exemplary embodiments, the main gateway 602 is specifically used to realize obtaining the first port ID of the second slave gateway by adopting the following steps: obtaining second configuration information, where the port ID is the port ID in the first GEM frame; and obtaining an associated port ID in the second configuration information, where the associated port ID is the first port ID of the second slave gateway.
[0265] In some exemplary embodiments, the third slave gateway 603 is specifically used to realize whether to perform corresponding processing on the first GEM frame according to the port ID in the first GEM frame by adopting a method of determining whether to perform corresponding processing on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway.
[0266] In some exemplary embodiments, the third slave gateway 603 determines that if the port ID in the first GEM frame is the first port ID of the third slave gateway, to perform corresponding processing on the first GEM frame; If the port ID in the first GEM frame is not the first port ID of the third slave gateway, determining not to perform corresponding processing on the first GEM frame is specifically used to realize determining whether to perform corresponding processing on the first GEM frame depending on whether the port ID in the first GEM frame is the first port ID of the third slave gateway.
[0267] In some exemplary embodiments, the third slave gateway 603 is specifically used to realize determining whether to perform corresponding processing on the first GEM frame based on the port ID in the first GEM frame by adopting a method of determining whether to perform corresponding processing on the first GEM frame based on whether there is fourth configuration information that the associated port ID is the port ID in the first GEM frame.
[0268] In some exemplary embodiments, the third slave gateway 603 determines that the fourth configuration information exists and performs a corresponding process on the first GEM frame; If the fourth configuration information does not exist, determining not to perform corresponding processing on the first GEM frame is specifically used to realize whether or not to perform corresponding processing on the first GEM frame depending on whether or not there is fourth configuration information in which the associated port ID is a port ID in the first GEM frame.
[0269] In some exemplary embodiments, the third slave gateway 603 is specifically used to realize determining whether to perform corresponding processing on the first GEM frame based on the port ID in the first GEM frame and the first ID in the first GEM frame by adopting a method of determining whether to perform corresponding processing on the first GEM frame based on the port ID in the first GEM frame and the first ID in the first GEM frame.
[0270] In some exemplary embodiments, the third slave gateway 603 is specifically used to realize determining whether to perform corresponding processing on the first GEM frame according to the port ID in the first GEM frame and the first ID in the first GEM frame by adopting a method of determining whether to perform corresponding processing on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the user network interface node ID of the third slave gateway.
[0271] In some exemplary embodiments, the third slave gateway 603 determines that the port ID in the first GEM frame is the first port ID of the third slave gateway, and the first ID in the first GEM frame is not the user network interface node ID of the third slave gateway, and performs corresponding processing on the first GEM frame; If the port ID in the first GEM frame is not the first port ID of the third slave gateway or the first ID in the first GEM frame is the user network interface node ID of the third slave gateway, determining not to perform corresponding processing on the first GEM frame. This is specifically used to realize determining whether to perform corresponding processing on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the user network interface node ID of the third slave gateway.
[0272] In some exemplary embodiments, the third slave gateway 603 is specifically used to realize determining whether to perform corresponding processing on the first GEM frame based on the port ID in the first GEM frame and the first ID in the first GEM frame by adopting a method of determining whether to perform corresponding processing on the first GEM frame based on whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the device ID of the third slave gateway.
[0273] In some exemplary embodiments, the third slave gateway 603 determines that if the port ID in the first GEM frame is the first port ID of the third slave gateway, and the first ID in the first GEM frame is the device ID of the third slave gateway, to perform corresponding processing on the first GEM frame; If the port ID in the first GEM frame is not the first port ID of the third slave gateway, or if the first ID in the first GEM frame is not the device ID of the third slave gateway, determining to perform corresponding processing on the first GEM frame. This is specifically used to realize determining whether to perform corresponding processing on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the device ID of the third slave gateway.
[0274] In some exemplary embodiments, the third slave gateway 603 determines that if the port ID in the first GEM frame is the first port ID of the third slave gateway, and the first ID in the first GEM frame is the user network interface node ID of the third slave gateway, perform corresponding processing on the first GEM frame; If the port ID in the first GEM frame is not the first port ID of the third slave gateway, or if the first ID in the first GEM frame is not the user network interface node ID of the third slave gateway, determining not to perform corresponding processing on the first GEM frame. This is specifically used to realize determining whether to perform corresponding processing on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the device ID of the third slave gateway.
[0275] In some exemplary embodiments, the third slave gateway 603 is specifically used to realize determining whether to perform corresponding processing on the first GEM frame based on the port ID in the first GEM frame and the first ID in the first GEM frame by adopting a method of determining whether to perform corresponding processing on the first GEM frame based on whether there is fourth configuration information that the associated port ID is the port ID in the first GEM frame and whether the first ID in the first GEM frame is the device ID of the third slave gateway.
[0276] The specific implementation process of the above communication system is the same as the specific implementation process of the communication method of the above embodiment, so no further description will be given here.
[0277] Those skilled in the art will understand that all or some of the steps of the methods, systems, and functional modules / units in the devices disclosed above can be realized as software, firmware, hardware, and appropriate combinations thereof. In hardware embodiments, the division between the functional modules / units described above does not necessarily correspond to the division of physical components, for example, one physical component may have multiple functions, and one function or step may be performed by multiple physical components in cooperation. Some or all of the physical components can be realized as software executed by a processor, such as a central processor, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as a dedicated integrated circuit. Such software can be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (e.g., computer-readable instructions, data structures, program modules, or other data, etc.). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk memory, magnetic cassettes, magnetic tape, magnetic disk memory or other magnetic memory, or any other medium used to store the desired information and accessible by a computer. Those skilled in the art will also know that communication media typically include computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism and can include any information delivery media.
[0278] Although exemplary embodiments are disclosed herein and specific terms are used, they should be used and interpreted in a general illustrative sense only and not for the purpose of limitation. In some instances, it will be apparent to those skilled in the art that the features, characteristics and / or elements described in combination with a particular embodiment may be used alone or in combination with the features, characteristics and / or elements described in combination with other embodiments, unless otherwise specified. Thus, those skilled in the art will appreciate that various modifications in form and detail are possible without departing from the scope of the present disclosure as defined by the appended claims.
Claims
1. A communication method applied to a first slave gateway, comprising: receiving an Ethernet frame transmitted by a first terminal; packaging a first port ID of a first slave gateway and the Ethernet frame as a first Gigabit Passive Optical Network Package Mode GEM frame, and sending the first GEM frame to a main gateway; The first port ID is a port ID used when communicating between optical network units.
2. The step of packaging a first port ID of a first slave gateway and the Ethernet frame as a first Gigabit Passive Optical Network Packaging Mode GEM frame includes:
2. The method of claim 1, further comprising packaging the first port ID of the first slave gateway, a first ID, and the Ethernet frame as a first GEM frame.
3. The first ID is a user network interface node ID of the first slave gateway; Alternatively, the first ID is a user network interface node ID of a second slave gateway, the second slave gateway is a slave gateway connected to a second terminal, and the second terminal is a terminal to which a target media access control address in the Ethernet frame belongs. The communication method according to claim 2,
4. After the step of receiving an Ethernet frame transmitted by a first terminal, a first port ID of a first slave gateway, a first ID, and before the step of packaging the Ethernet frame as a first GEM frame; The method of claim 3 , further comprising the step of obtaining a first port ID and a first ID of the first slave gateway.
5. The step of obtaining a first port ID and a first ID of the first slave gateway includes: obtaining a device ID of a second slave gateway according to the target media access control address, the second slave gateway being a slave gateway connected to the second terminal; and obtaining a first port ID and a first ID of the first slave gateway by a device ID of the second slave gateway.
6. The step of obtaining a device ID of the second slave gateway by the target media access control address includes:
6. The communication method according to claim 5, further comprising: searching for a device ID corresponding to the target media access control address in a first mapping relationship between device IDs and media access control addresses of pre-stored slave gateways, and the device ID found by the searching is the device ID of the second slave gateway.
7. 7. The communication method according to claim 6, further comprising the step of obtaining a second mapping relationship shared by other slave gateways and storing or updating the first mapping relationship with the second mapping relationship before the step of searching for a device ID corresponding to the target media access control address.
8. The step of obtaining a device ID of the second slave gateway by a target media access control address in the Ethernet frame includes: sending an acquisition request to the main gateway, the acquisition request being used to acquire a first mapping relationship corresponding to the target media access control address, the first mapping relationship being a mapping relationship between a device ID of a slave gateway and a media access control address; 6. The communication method of claim 5, further comprising: receiving a first mapping relationship corresponding to the target media access control address sent from the main gateway; and obtaining a device ID in the first mapping relationship corresponding to the target media access control address.
9. The step of obtaining a device ID of the second slave gateway by a target media access control address in the Ethernet frame includes: sending an acquisition request to another gateway, the acquisition request being used to acquire a first mapping relationship corresponding to the target media access control address, the first mapping relationship being a mapping relationship between a device ID of a slave gateway and a media access control address; receiving a first mapping relationship corresponding to the target media access control address transmitted from the other gateway; and acquiring a device ID in the first mapping relationship corresponding to the target media access control address.
10. The step of obtaining a first port ID and a first ID of the first slave gateway by a device ID of the second slave gateway includes: obtaining first configuration information in which a peer device ID is a device ID of the second slave gateway; Obtaining a port ID in the first configuration information as a first port ID of the first slave gateway; 6. The communication method according to claim 5, further comprising: if the first ID is a user network interface node ID of the first slave gateway, acquiring a user network interface node ID in the first configuration information; and if the first ID is a user network interface node ID of the second slave gateway, acquiring the first ID by a user network interface node ID in the first configuration information.
11. 3. The communication method according to claim 2, wherein the first ID is a device ID of a second slave gateway, the second slave gateway is a slave gateway connected to a second terminal, and the second terminal is a terminal to which a target media access control address in the Ethernet frame belongs.
12. After the step of receiving an Ethernet frame transmitted by a first terminal, a first port ID of a first slave gateway, a first ID, and before the step of packaging the Ethernet frame as a first GEM frame; obtaining a device ID of the second slave gateway according to the target media access control address; and obtaining a first port ID of the first slave gateway by a device ID of the second slave gateway.
13. The step of packaging the Ethernet frame as a first GEM frame includes:
3. The communication method of claim 2, further comprising packaging the Ethernet frame into a payload area in the first GEM frame, and packaging a first port ID and the first ID of the first slave gateway into a GEM frame header in the first GEM frame.
14. The step of packaging a first port ID of the first slave gateway and the first ID into a GEM frame header in the first GEM frame includes:
14. The method of claim 13, comprising packaging a first port ID of the first slave gateway into a port ID field in the GEM frame header, and packaging the first ID into a reserved field in the GEM frame header.
15. The step of packaging the first ID into a reserved field in the GEM frame header comprises:
15. The method of claim 14, further comprising packaging the first ID into any one bit in the reserved field.
16. The step of packaging the first ID into any one bit in the reserved field comprises:
15. The method of claim 14, further comprising packaging said first ID into most significant bits in said reserved field.
17. The step of packaging a first port ID of the first slave gateway and the first ID into a GEM frame header in the first GEM frame includes:
14. The communication method according to claim 13, further comprising packaging a first port ID, the first ID, and a second ID of the first slave gateway into a GEM frame header in the first GEM frame, the second ID being used to characterize whether the first GEM frame is a GEM frame communicated between optical network units or a GEM frame communicated between an optical network unit and an optical line terminal.
18. The step of packaging a first port ID, the first ID, and a second ID of the first slave gateway into a GEM frame header in the first GEM frame includes:
20. The method of claim 17, further comprising packaging a first port ID of the first slave gateway into a port ID field in the GEM frame header, and packaging the first ID and the second ID into a reserved field in the GEM frame header.
19. A communication method applied to a main gateway, comprising: receiving a first gigabit passive optical network package mode GEM frame transmitted by a first slave gateway, the first GEM frame including a port ID; and transmitting the first GEM frame to all slave gateways when it is determined that the port ID in the first GEM frame is a port ID used when communicating between optical network units.
20. The step of determining that the port ID in the first GEM frame is a port ID used when communicating between optical network units includes: obtaining second configuration information, the port ID being the port ID in the first GEM frame; and determining that the peer device ID in the second configuration information is not a special value.
21. The first GEM frame further includes a first ID; The first ID is a user network interface node ID of the first slave gateway; Or, the first ID is a user network interface node ID of a second slave gateway, the second slave gateway is a slave gateway connected to a second terminal, and the second terminal is a terminal to which a target media access control address in an Ethernet frame in the first GEM frame belongs; Alternatively, the first ID is a device ID of the second slave gateway.
22. The step of determining that the port ID in the first GEM frame is a port ID used when communicating between optical network units includes:
22. The method of claim 21, further comprising determining that third configuration information exists in which a port ID is the port ID in the first GEM frame and a peer device ID is the first ID in the first GEM frame.
23. The first GEM frame further includes a second ID used to characterize whether the first GEM frame is a GEM frame communicated between optical network units or a GEM frame communicated between an optical network unit and an optical line terminal; The step of determining that the port ID in the first GEM frame is a port ID used when communicating between optical network units includes: obtaining the second ID; 20. The method of claim 19, further comprising: determining that the second ID is used to characterize the first GEM frame as a GEM frame communicated between optical network units.
24. Prior to the step of transmitting the first GEM frame, obtaining a first port ID of a second slave gateway; and replacing the port ID in the first GEM frame with the first port ID of the second slave gateway obtained and updated in the first GEM frame; 20. The communication method of claim 19, wherein the step of transmitting the first GEM frame to all slave gateways includes the step of transmitting the updated first GEM frame to all slave gateways.
25. The step of obtaining a first port ID of a second slave gateway includes: obtaining second configuration information, the port ID being the port ID in the first GEM frame; The communication method of claim 24, further comprising: obtaining an associated port ID in the second configuration information, the associated port ID being a first port ID of the second slave gateway.
26. A communication method applied to a third slave gateway, receiving a first gigabit passive optical network package mode GEM frame transmitted by a main gateway, the first GEM frame including a port ID; determining whether to perform appropriate processing on the first GEM frame based on a port ID in the first GEM frame.
27. The step of determining whether to perform a corresponding process on the first GEM frame based on a port ID in the first GEM frame includes: The communication method according to claim 26, comprising a step of determining whether to perform corresponding processing on the first GEM frame depending on whether a port ID in the first GEM frame is the first port ID of the third slave gateway.
28. The step of determining whether to perform a corresponding process on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway, determining to perform corresponding processing on the first GEM frame if the port ID in the first GEM frame is the first port ID of the third slave gateway; and determining not to perform corresponding processing on the first GEM frame if the port ID in the first GEM frame is not the first port ID of the third slave gateway.
29. The step of determining whether to perform a corresponding process on the first GEM frame based on a port ID in the first GEM frame includes: The communication method according to claim 26, further comprising a step of determining whether to perform corresponding processing on the first GEM frame depending on whether there is fourth configuration information that an associated port ID is a port ID in the first GEM frame.
30. The step of determining whether to perform a corresponding process on the first GEM frame according to whether there is a fourth configuration information that the associated port ID is the port ID in the first GEM frame includes: If the fourth configuration information exists, determining to perform a corresponding process on the first GEM frame; and if the fourth configuration information is not present, determining not to perform a corresponding process on the first GEM frame.
31. The first GEM frame further includes a first ID, and the step of determining whether to perform a corresponding process on the first GEM frame based on a port ID in the first GEM frame includes: The communication method according to claim 26, further comprising a step of determining whether to perform corresponding processing on the first GEM frame based on a port ID in the first GEM frame and a first ID in the first GEM frame.
32. The first ID is a user network interface node ID of a first slave gateway; Alternatively, the first ID is a user network interface node ID of a second slave gateway, the second slave gateway is a slave gateway connected to a second terminal, and the second terminal is a terminal to which a target media access control address in an Ethernet frame in the first GEM frame belongs.
33. The step of determining whether to perform a corresponding process on the first GEM frame based on a port ID in the first GEM frame and a first ID in the first GEM frame includes: The communication method according to claim 32, comprising a step of determining whether to perform corresponding processing on the first GEM frame according to whether a port ID in the first GEM frame is a first port ID of the third slave gateway and whether a first ID in the first GEM frame is a user network interface node ID of the third slave gateway.
34. The first ID is a user network interface node ID of the first slave gateway; The step of determining whether to perform a corresponding process on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the user network interface node ID of the third slave gateway, If the port ID in the first GEM frame is the first port ID of the third slave gateway, and the first ID in the first GEM frame is not the user network interface node ID of the third slave gateway, determine to perform corresponding processing on the first GEM frame; and determining not to perform corresponding processing on the first GEM frame if the port ID in the first GEM frame is not the first port ID of the third slave gateway or if the first ID in the first GEM frame is the user network interface node ID of the third slave gateway.
35. The first ID is a user network interface node ID of the second slave gateway; The step of determining whether to perform a corresponding process on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the user network interface node ID of the third slave gateway, If the port ID in the first GEM frame is the first port ID of the third slave gateway, and the first ID in the first GEM frame is the user network interface node ID of the third slave gateway, determine to perform corresponding processing on the first GEM frame; 33. The communication method of claim 32, further comprising at least one of the steps of: determining not to perform corresponding processing on the first GEM frame if the port ID in the first GEM frame is not the first port ID of the third slave gateway, or if the first ID in the first GEM frame is not the user network interface node ID of the third slave gateway.
36. 32. The communication method according to claim 31, wherein the first ID is a device ID of a second slave gateway, the second slave gateway being a slave gateway connected to a second terminal, and the second terminal being a terminal to which a target media access control address in an Ethernet frame in the first GEM frame belongs.
37. The step of determining whether to perform a corresponding process on the first GEM frame based on the port ID in the first GEM frame and the first ID in the first GEM frame includes: The communication method according to claim 36, comprising a step of determining whether to perform corresponding processing on the first GEM frame depending on whether a port ID in the first GEM frame is a first port ID of the third slave gateway and whether a first ID in the first GEM frame is a device ID of the third slave gateway.
38. The step of determining whether to perform a corresponding process on the first GEM frame according to whether the port ID in the first GEM frame is the first port ID of the third slave gateway and whether the first ID in the first GEM frame is the device ID of the third slave gateway, If the port ID in the first GEM frame is the first port ID of the third slave gateway, and the first ID in the first GEM frame is the device ID of the third slave gateway, determining to perform corresponding processing on the first GEM frame; 38. The communication method of claim 37, further comprising at least one of the steps of: determining not to perform corresponding processing on the first GEM frame if the port ID in the first GEM frame is not the first port ID of the third slave gateway, or if the first ID in the first GEM frame is not the device ID of the third slave gateway.
39. The step of determining whether to perform a corresponding process on the first GEM frame based on the port ID in the first GEM frame and the first ID in the first GEM frame includes: The communication method according to claim 31, further comprising a step of determining whether to perform corresponding processing on the first GEM frame according to whether there is fourth configuration information that an associated port ID is a port ID in a first GEM frame, and whether the first ID in the first GEM frame is a device ID of the third slave gateway.
40. At least one processor; and a memory having at least one program stored therein, the at least one program causing the at least one processor to realize the communication method according to any one of claims 1 to 39 when the at least one program is executed by the at least one processor.
41. A computer readable medium having a computer program stored thereon, the computer program causing a processor to implement the communication method according to any one of claims 1 to 39 when executed by the processor.
42. A first slave gateway, a main gateway, and a third slave gateway, The first slave gateway is used for receiving an Ethernet frame sent by a first terminal, packaging a first port ID of the first slave gateway and the Ethernet frame as a first gigabit passive optical network package mode (GEM) frame, and sending the first GEM frame to a main gateway, where the first port ID is a port ID used when communicating between optical network units; The main gateway is used to receive a first GEM frame transmitted by a first gateway, the first GEM frame includes a port ID, and when it is determined that the port ID in the first GEM frame is a port ID used when communicating between optical network units, the main gateway transmits the first GEM frame to all slave gateways; A communication system, wherein the third slave gateway is used to receive a first GEM frame sent by a main gateway, the first GEM frame including a port ID, and the port ID in the first GEM frame determines whether to perform corresponding processing on the first GEM frame.
Citation Information
Patent Citations
Optical communication system, and method of operating the same
JP2010161672A
Methods, systems, and apparatus for passive optical network data transmission
JP2010537600A
Communication device and communication method
WO2021009853A1