Packet forwarding method and apparatus
By assigning unique Locators to gateway devices and APs in Layer 3 networks, SRv6 deployment is automated, enhancing traffic control and quality of service through SRv6 tunnels.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2026-04-01
AI Technical Summary
In Layer 3 networks, the introduction of SRv6 is hindered by the inability to assign distinct Locators to different access points (APs), leading to inefficient deployment and automation issues due to the distribution of the same AP settings.
Automatically assign different Locators to gateway devices and connected APs, establishing SRv6 tunnels based on these Locators to facilitate packet forwarding, utilizing SRv6's advantages in Layer 3 networks.
Enhances SRv6 deployment automation and utilization in Layer 3 networks by ensuring distinct Locators are assigned to APs, improving traffic control, scheduling, and quality of service.
Smart Images

Figure 0007839278000006 
Figure 0007839278000007 
Figure 0007839278000008
Abstract
Description
Technical Field
[0001] The present invention relates to network communication technologies, and in particular, to packet transfer methods and apparatuses.
Background Art
[0002] IPv6 Segment Routing (SRv6) is segment routing (SR) realized based on the IPv6 forwarding plane. In SRv6, the segment routing identifier (SID) takes the form of an IPv6 address, but does not correspond to the interface address of any device.
[0003] As shown in FIG. 1, the SID includes at least a Locator, a Function, and Arguments.
[0004] Locator: The Locator is unique within the SR domain. In a specific application, the Locator may include a common prefix and a network node identifier (Node ID).
[0005] Function: It is used to identify the operation instruction bound to the SID. Within the SR domain, after a node receives a packet, it executes related operations based on the Function in the SID added to the packet. In a specific application, the Function may include an operation instruction type and an operation instruction value for indicating the operation instruction.
[0006] Arguments: Define information such as the flow or service of the packet.
Summary of the Invention
[0007] Embodiments of the present invention provide a packet forwarding method and apparatus that realize packet forwarding applicable to a Layer 3 network in which SRv6 has been introduced.
[0008] An embodiment of the present invention is a packet forwarding method applied to a gateway device in a Layer 3 network, wherein an SRv6 tunnel exists between the gateway device and an access point AP connected to the gateway device, and different locators are assigned to the gateway device and different APs connected to the gateway device. Steps include: when a first packet is received via the SRv6 tunnel, decapsulating the IPv6 encapsulation header of the first packet to obtain a second packet, and forwarding the second packet based on the destination IP address of the second packet, wherein the destination IP address in the IPv6 encapsulation header attached to the first packet includes at least a Locator and a Function assigned to the gateway device, and the destination MAC address of the second packet is the MAC address of the Layer 3 gateway interface associated with the VSI instance bound to the Function on the gateway device; The present invention provides a packet forwarding method comprising the steps of: receiving a third packet from the network side, performing IPv6 decapsulation on the third packet to obtain a fourth packet, and forwarding the fourth packet based on the destination IP address of the fourth packet, wherein the destination IPv6 address in the IPv6 encapsulation header attached to the third packet includes at least a Locator assigned to the gateway device.
[0009] Embodiments of the present invention further relate to a packet forwarding method applicable to an access point AP connected to a gateway device in a Layer 3 network, wherein an SRv6 tunnel exists between the gateway device and the AP, and each of the AP, the gateway device, and other APs connected to the gateway device is assigned a different locator. When it is necessary to forward a packet to the gateway device, the steps include: adding an IPv6 encapsulation header to the packet and forwarding the packet via an SRv6 tunnel from this AP to the gateway device, wherein the destination IP address in the IPv6 encapsulation header includes at least a Locator and Function assigned to the gateway device, and the source IP address in the IPv6 encapsulation header includes at least a Locator and Function assigned to this AP; The present invention provides another packet forwarding method, which includes the steps of: when a packet is received from this AP via the SRv6 tunnel to the gateway device, decapsulating the received packet and forwarding the packet based on the destination MAC address of the decapsulated packet.
[0010] An embodiment of the present invention is a packet forwarding device applied to a gateway device in a Layer 3 network, wherein an SRv6 tunnel exists between the gateway device and an access point AP connected to the gateway device, and different locators are assigned to the gateway device and different APs connected to the gateway device. A packet receiving unit for receiving a first packet via the SRv6 tunnel or a third packet from the network side, When a first packet is received via the SRv6 tunnel, the IPv6 encapsulation header of the first packet is decapsulated to obtain a second packet, and the second packet is forwarded based on the destination IP address of the second packet. A packet processing unit that, upon receiving a third packet from the network side, performs IPv6 decapsulation on the third packet to obtain a fourth packet, and forwards the fourth packet based on the destination IP address of the fourth packet, is included. The packet forwarding device provides a packet forwarding device in which the destination IP address in the IPv6 encapsulation header attached to the first packet includes at least a Locator and a Function assigned to the gateway device, the destination MAC address of the second packet is the MAC address of the Layer 3 gateway interface associated with the VSI instance bound to the Function on the gateway device, and the destination IPv6 address in the IPv6 encapsulation header attached to the third packet includes at least a Locator assigned to the gateway device.
[0011] An embodiment of the present invention further relates to a packet forwarding device applied to an access point AP connected to a gateway device in a Layer 3 network, wherein an SRv6 tunnel exists between the gateway device and the AP, and the AP, the gateway device, and other APs connected to the gateway device are each assigned a different Locator. A receiving unit for receiving packets via an SRv6 tunnel from this AP to the gateway device, When it is necessary to forward a packet to the gateway device, an IPv6 encapsulation header is added to the packet, and the packet is forwarded via the SRv6 tunnel from this AP to the gateway device. A forwarding unit that, upon receiving a packet via the SRv6 tunnel from this AP to the gateway device, decapsulates the received packet and forwards the packet based on the destination MAC address of the decapsulated packet, is included. The packet forwarding device is provided in which the destination IP address in the IPv6 encapsulation header includes at least a Locator and Function assigned to the gateway device, and the source IP address in the IPv6 encapsulation header includes at least a Locator and Function assigned to this AP.
[0012] Embodiments of the present invention further provide a network device comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is used to execute the machine-executable instructions in order to carry out any of the above methods.
[0013] As can be seen from the technical solutions described above, in the embodiment of the present invention, the automation of SRv6 deployment in a Layer 3 network is achieved by automatically assigning different locators to the gateway device and different APs connected to the gateway device, in order to fully utilize the advantages that SRv6 brings to a Layer 3 network.
[0014] Furthermore, in this embodiment, an SRv6 tunnel is introduced between the gateway device and the AP based on the Locator assigned to the gateway device and the AP, and packets are transmitted between the gateway device and the AP via the SRv6 tunnel, thereby realizing a packet forwarding method applicable to a Layer 3 network where SRv6 is deployed. [Brief explanation of the drawing]
[0015] The drawings herein are incorporated into the specification, form a part of the specification, show embodiments that conform to the present invention, and are used to explain the principles of the present invention together with the specification. [Figure 1] It is a schematic diagram of the structure of the SID according to an embodiment of the present invention. [Figure 2] It is a schematic diagram of the networking of a campus network with SRv6 introduced according to an embodiment of the present invention. [Figure 3] It is a flowchart of a method according to an embodiment of the present invention. [Figure 4] It is a flowchart of Locator assignment according to an embodiment of the present invention. [Figure 5] It is a schematic diagram of the structure of the Locator according to an embodiment of the present invention. [Figure 6] It is a flowchart of another method according to an embodiment of the present invention. [Figure 7] It is a structural diagram of a device according to an embodiment of the present invention. [Figure 8] It is a structural diagram of another device according to an embodiment of the present invention. [Figure 9] It is a structural diagram of an electronic device according to an embodiment of the present invention.
Modes for Carrying Out the Invention
[0016] Exemplary embodiments are described in detail herein, and the examples are shown in the accompanying drawings. When the following description relates to the drawings, unless otherwise specified, the same numerals in different drawings indicate the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments that conform to the present invention. On the contrary, they are merely examples of devices and methods that conform to some aspects of the present invention.
[0017] The terms used in the present invention are only for explaining specific embodiments and do not limit the present invention. The singular forms "a kind", "the foregoing", and "said" used in the present invention are also intended to include the plural form unless the context clearly indicates otherwise.
[0018] SRv6 provides flexible and efficient traffic control means for the network, better realizes traffic scheduling and path optimization, guarantees the quality of important services, balances the quality distribution, and can improve the utilization rate of dedicated lines. Currently, SRv6 can be introduced into layer three networks such as campus networks. Figure 2 exemplifies a campus network into which SRv6 is introduced. In Figure 2, the thick black line indicates the SRv6 path. When SRv6 is introduced into a campus network, traffic monitoring and scheduling, etc. can be realized based on SRv6 between the gateway device (the gateway device may be a Leaf node in the Spine-Leaf topology structure) and the wireless access point (AP: Access Point).
[0019] However, in the conventional layer three network environment, in order to simplify the introduction, the same AP settings are often distributed to a series of different APs based on the AP template (that is, multiple different APs have the same settings). However, when SRv6 is applied to a layer three network such as a campus network, in order to facilitate the distinction of APs, it is necessary to assign different Locators to different APs, so the same AP settings cannot be distributed to a series of different APs based on the AP template. In addition to the inability to distribute the same AP settings to a series of different APs based on the AP template, there are a large number of APs in the layer three network, which is disadvantageous for the introduction of SRv6 into the layer three network and the automation of network introduction.
[0020] To solve the above technical problems, embodiments of the present invention provide a packet forwarding method applicable to a Layer 3 network in which SRv6 is deployed. In order for those skilled in the art to better understand the technical solutions according to embodiments of the present invention, and to make the above-mentioned objectives, features, and advantages of embodiments of the present invention more apparent and understandable, the technical solutions in embodiments of the present invention will be described in more detail below with reference to the drawings.
[0021] The following describes the method according to an embodiment of the present invention, starting from the perspective of a gateway device in a Layer 3 network.
[0022] Referring to Figure 3, which is a flowchart of the method according to an embodiment of the present invention, the method is applied to a gateway device in a Layer 3 network. Optionally, when applied to a Spine-Leaf network topology, the gateway device here may be a Leaf node.
[0023] In this embodiment, a different Locator is assigned to the gateway device and to each AP connected to the gateway device. Optionally, in this embodiment, one network device may be designated as the Locator Manager, which assigns a different Locator to the gateway device and to each AP connected to the gateway device.
[0024] For example, when a gateway device is designated as a Locator Manager, the gateway device, acting as the Locator Manager, assigns a different Locator to itself and each AP connected to it (in this case, the AP can be called a Locator Client). Figure 4 shows an example of how a gateway device, when acting as a Locator Manager, assigns a different Locator to itself and each AP connected to it. The explanation is omitted here.
[0025] As another example, a non-gateway device such as an Access Controller (AC) may be designated as the Locator Manager, and the Locator Manager may assign different locators to the gateway device and different APs connected to the gateway device (in this case, both the gateway device and the different APs connected to the gateway device can be called Locator Clients). The specific assignment method is similar to the assignment shown in Figure 4, so it will not be explained here.
[0026] In this embodiment, the gateway device and the AP establish an SRv6 tunnel between the gateway device and the AP based on the assigned Locator (the SRv6 tunnel here may be, for example, an SRv6 PW, and is not particularly limited in this embodiment). Optionally, the SRv6 tunnel may be dynamically established or statically configured, and is not particularly limited in this embodiment.
[0027] Based on the above description, the flow may include the following steps, as shown in Figure 3.
[0028] In step 301, when the first packet is received via the SRv6 tunnel, step 302 is executed, and when the third packet is received from the network side, step 303 is executed, wherein the destination IP address in the IPv6 encapsulation header attached to the first packet includes at least a Locator and Function assigned to the gateway device, and the destination IPv6 address in the IPv6 encapsulation header attached to the third packet includes at least a Locator assigned to the gateway device.
[0029] In this embodiment, the first packet and the third packet are named for the sake of clarity and are not limiting.
[0030] In this embodiment, with respect to the SRv6 tunnel between the gateway device and the AP, receiving the first packet via the SRv6 tunnel means that the gateway device has received the first packet forwarded by the AP via the SRv6 tunnel. When the gateway device receives the first packet forwarded by the AP via the SRv6 tunnel, it performs the following step 302.
[0031] In step 302, the IPv6 encapsulation header of the first packet is decapsulated to obtain the second packet, the second packet is forwarded based on the destination IP address of the second packet, and the destination MAC address of the second packet is the MAC address of the Layer 3 gateway interface associated with the VSI instance bound to the Function on the gateway device.
[0032] Step 302 is performed on the premise that the gateway device has received the first packet via the SRv6 tunnel.
[0033] Optionally, in this embodiment, the Local SID corresponding to the gateway device may be determined based on the Locator and Function (including the Opcode and Function type) assigned to the gateway device, with each Local SID having a different Function. Table 1 shows two example Local SIDs corresponding to a gateway device (examples of Local SIDs are described later). [Table 1]
[0034] In Table 1, end-dt2u is used to decapsulate the packet and, if the decapsulated destination MAC address is the MAC address of the Layer 3 gateway interface associated with the VSI instance bound to the Function on the gateway device, to instruct the device to forward the packet based on the packet's destination IP address.
[0035] Based on each Local SID shown in Table 1, a corresponding FIB6 entry can be added to the FIB6 (IPv6 Forwarding Information Base) table. The FIB6 entry contains at least the corresponding Local SID, and based on this, when the gateway device receives the first packet via the SRv6 tunnel, as in step 302, the gateway device searches the FIB6 table based on the destination IP address attached to the first packet. If a corresponding FIB6 entry is found, the gateway device decapsulates the IPv6 encapsulation header of the first packet according to the instructions of end-dt2u in the Local SID in the FIB6 entry to obtain the second packet. If the destination MAC address of the second packet is found to be the MAC address of the Layer 3 gateway interface associated with the VSI instance bound to the above Function on the gateway device, the second packet is forwarded based on the destination IP address of the second packet. An example of how to forward the second packet based on the destination IP address of the second packet will be described later, so it will not be explained here.
[0036] In step 303, the third packet is deencapsulated to obtain the fourth packet, and the fourth packet is forwarded based on the destination IP address of the fourth packet.
[0037] Step 303 is performed on the premise that a third packet has been received from the network side. When the gateway device receives the third packet, it performs the corresponding operation based on the Function contained in the destination IPv6 address in the IPv6 encapsulation header attached to the packet. If the Function instructs IPv6 decapsulation and a lookup in the corresponding IP routing forwarding instance routing table, Step 303 decapsulates the third packet to obtain a fourth packet, looks up the corresponding IP routing forwarding instance routing entry in the IP routing forwarding instance routing table based on the destination IP address of the fourth packet, and forwards the packet based on the IP routing forwarding instance routing entry. Details of the packet forwarding will be explained later with examples, so the explanation is omitted here.
[0038] To ensure that the gateway device performs the corresponding operation based on the Function included in the destination IPv6 address in the IPv6 encapsulation header attached to the packet, optionally, in this embodiment, if the gateway device learns the IP address of a terminal connected to any AP, it determines a Function that matches the terminal IP address and reports the Function and the terminal IP address to the network side, so that the destination IPv6 address in the IPv6 encapsulation header attached to packets subsequently sent from the network side to the terminal includes at least the above Function. Here, the Function is used to instruct IPv6 decapsulation and a lookup in the IP routing forwarding instance routing table that matches the terminal IP address. Here, if the terminal IP address is IPv4, the IP routing forwarding instance routing table is the IPv4 VPN routing table, and if the terminal IP address is IPv6, the IP routing forwarding instance routing table is the IPv6 VPN routing table.
[0039] The flow shown in Figure 3 has now been completed.
[0040] As can be seen from the flow shown in Figure 3, this embodiment automates the deployment of SRv6 in a Layer 3 network by automatically assigning different locators to the gateway device and different APs connected to the gateway device, in order to fully utilize the advantages that SRv6 brings to a Layer 3 network.
[0041] Furthermore, in this embodiment, an SRv6 tunnel is introduced between the gateway device and the AP based on the Locator assigned to the gateway device and the AP, and packets are transmitted between the gateway device and the AP via the SRv6 tunnel, thereby realizing a packet forwarding method applicable to a Layer 3 network where SRv6 is deployed.
[0042] The following describes the flow shown in Figure 4.
[0043] Referring to Figure 4, which is a flowchart of Locator assignment according to an embodiment of the present invention. In the flow shown in Figure 4, the Locator Manager assigns a different Locator to the gateway device and each AP connected to the gateway device.
[0044] In this embodiment, the Locator Manager manages a Locator resource pool (the Locator resource pool contains multiple Locators). For ease of management and compatibility with the conventional Locator structure (Common prefix + Node ID structure), the Locator in this embodiment may be Common prefix + Manager ID + Node ID, as specifically shown in Figure 5. The reason for configuring Locators in this way is to ensure that Locators assigned by different Locator Managers do not overlap when multiple Locator Managers exist within the same network, and to ensure that each Locator is unique across the entire network.
[0045] In Figure 5, the value and length of the Common prefix may be specified in advance, for example, A0:B0:: / 40 (where the value of the Common prefix is A0:B0:: and the length is 40 bits).
[0046] In Figure 5, the value and length of the Manager ID may be specified in advance. For example, the Manager ID value is 1 and the length is 8 bits.
[0047] In Figure 5, the Node ID value is not pre-specified and may be selected from the Node ID resource pool. Optionally, in this embodiment, Node 0 (i.e., Node ID 0) may be held in the Node ID resource pool. In other words, in this embodiment, A0:B0:01:00:: / 64 may be held in combination with the Common prefix and Manager ID described above, and may not be pre-assigned.
[0048] Optionally, in this embodiment, if the gateway device functions as a Locator Manager, it may select the smallest non-zero Node ID from the Node ID resource pool when assigning a Locator to itself. Taking the selected Node ID as an example, in combination with the Common prefix and Manager ID described above, in this embodiment, if the gateway device functions as a Locator Manager, the Locator assigned to itself may be A0:B0:01:01:: / 64.
[0049] If the gateway device functions as a Locator Manager, it assigns locators to each AP acting as a Locator Client according to the flow shown in Figure 4. Of course, if the gateway device does not function as a Locator Manager, the Locator Manager assigns locators to the gateway device and each AP connected to the gateway device, according to the flow shown in Figure 4.
[0050] As shown in Figure 4, the flow may include the following steps.
[0051] In step 401, the Locator assignment request sent by the Locator Client is received.
[0052] In this embodiment, after the Locator Client comes online (for example, after coming online and being assigned an IPv6 address), it sends a Locator assignment request to the Locator Manager as a Locator Client. Here, the Locator assignment request may include at least the Locator Client's IPv6 address, MAC address, and Locator Client identifier.
[0053] In step 402, a corresponding locator is assigned to the Locator Client based on the locator assignment request.
[0054] Optionally, in this embodiment, a protocol connection exists between the Locator Manager and the Locator Client for Locator assignment, and this protocol connection may be a TCP (transmission control protocol) connection or a UDP (user datagram protocol) connection.
[0055] As one embodiment, if the above protocol connection is a TCP connection, one available Node ID may be selected from the available Node IDs in the Node ID resource pool, and a Locator may be configured by combining the selected available Node ID with the above Common prefix and Manager ID, and this Locator may be attached to the Locator allocation response and sent to the Locator Client via the TCP connection.
[0056] Optionally, there are various ways to select one available Node ID from the available Node IDs in the Node ID resource pool described above. For example, one can directly select the smallest Node ID in order from the available Node IDs in the Node ID resource pool. Taking the direct selection of the smallest Node ID in order from the available Node IDs in the Node ID resource pool as an example, if Node 1 (i.e., Node ID is 1) has already been selected, combined with the retention of Node 0 described above, the currently available Node IDs in the Node ID resource pool are Node 2 (i.e., Node ID is 2), Node 3 (i.e., Node ID is 3)...Node k (i.e., Node ID is k), and one could then select Node 2 from the currently available Node IDs in the Node ID resource pool. The selected single available Node ID is then combined with the Common prefix and Manager ID described above to form a Locator, namely A0:B0:01:02:: / 64.
[0057] In another embodiment, if the protocol connection described above is a UDP connection, compared to TCP, UDP does not require the establishment and maintenance of complex TCP connections between the Locator Manager and the Locator Client, and the Locator Manager does not incur excessive system (e.g., CPU) overhead by maintaining a large number of TCP connections. If the protocol connection described above is a UDP connection, Locator allocation is not achieved simply by sending a Locator allocation response as in a TCP connection. Optionally, in this embodiment, if the protocol connection described above is a UDP connection, the step in step 402 above of assigning a corresponding Locator to the AP as a Locator Client based on the Locator allocation request may include the following:
[0058] In step a1, the Locator assignment response is sent back to the Locator Client via the UDP connection.
[0059] Here, the Locator assignment response includes at least the Locator assigned to the Locator Client. There are various ways to assign a Locator to a Locator Client. For example, one can select one available Node ID from the available Node IDs in the Node ID resource pool, and then combine the selected available Node ID with the Common prefix and Manager ID mentioned above to configure the Locator to be assigned to the Locator Client.
[0060] Optionally, in this embodiment, the Locator allocation response may further include the IPv6 address and MAC address of the Locator Client, and the device ID of the Locator Manager.
[0061] In step a2, the specified Locator assignment request, which the Locator Client has sent back based on the Locator assignment response, is received via the UDP connection.
[0062] Optionally, in this embodiment, the specified Locator allocation request includes at least the Locators attached to the Locator allocation response. The reason for sending the specified Locator allocation request is to confirm whether or not the Locator attached to the Locator allocation response can be occupied.
[0063] Optionally, in this embodiment, the specified Locator assignment request may further include the Locator Client's IPv6 address, MAC address, Locator Client identifier, and Locator Manager's device ID.
[0064] Step a3: To confirm that a Locator has been assigned to the Locator Client, a Locator assignment confirmation message is sent back to the Locator Client via a UDP connection.
[0065] Optionally, in this embodiment, the Locator allocation confirmation message is used to confirm that the Locator Client can occupy the Locator attached to the specified Locator allocation request.
[0066] Optionally, in this embodiment, the Locator assignment confirmation message may further include the IPv6 address and MAC address of the Locator Client and the device ID of the Locator Manager.
[0067] Up to this point, steps a1 to a3 above allow us to implement how to assign a Locator to a Locator Client when the protocol connection is a UDP connection.
[0068] In this embodiment, if the protocol connection is a UDP connection, it is also necessary to assign a corresponding Locator to the Locator Client based on the characteristics of the UDP connection, and then manage the assigned Locator to the Locator Client in a timely manner. The specific management method is implemented by the following steps a4 to a5.
[0069] In Step a4, if the Locator occupancy request sent by the Locator Client is received via UDP connection and the Locator Client is permitted to continue occupying the assigned Locator, a Locator occupancy confirmation message is sent back to the Locator Client via UDP connection to confirm that the Locator Client continues to occupy the assigned Locator.
[0070] In this embodiment, after a Locator is assigned, the Locator Client sends a Locator occupancy request (similar to the above-mentioned designated Locator assignment request) at a periodic T, and confirms whether the assigned Locator has been added to the Locator Client and whether it can continue to occupy the Locator.
[0071] When the Locator Manager receives a Locator occupancy request sent by the Locator Client, it typically allows the Locator Client to continue occupying the assigned Locator. Therefore, it sends a Locator occupancy confirmation message back to the Locator Client via UDP, confirming that the Locator Client will continue occupying the assigned Locator. Of course, in some special cases, if the Locator Manager does not allow the Locator Client to continue occupying the assigned Locator, it releases the Locator and triggers the Locator Client to request the Locator again, following the flow shown in Figure 4 above.
[0072] In step a5, if a Locator occupancy request sent by the Locator Client is not received within a predetermined time, the Locator assigned to the Locator Client is released.
[0073] For example, if the Locator Manager does not receive a Locator occupancy request sent by a Locator Client within three of the above-mentioned periods T, it will assume that the Locator Client has gone offline and release the Locator assigned to the Locator Client (i.e., at this time, the Node ID of that Locator becomes an available Node ID).
[0074] Up to this point, steps a4 to a5 have enabled the timely management of the locators assigned to Locator Clients after assigning them to Locator Clients.
[0075] Optionally, in this embodiment, the Locator Manager assigns a Locator to a Locator Client and records this in an entry. Table 2 shows an example of a Locator assignment entry. [Table 2]
[0076] Optionally, in this embodiment, the Locator Manager generates Locator routes based on Locator assignment entries. Continuing with Table 2 as an example, the corresponding Locator routes are shown in Table 3. [Table 3]
[0077] In Table 3, Interface VLAN 4092 is a Layer 3 interface on the Locator Manager for forwarding SRv6 services to the AP, and may also be a Layer 3 interface that receives the Locator allocation request mentioned above. Optionally, if a non-gateway device functions as a Locator Manager, the Locator Manager distributes the Locator route to the gateway device so that the gateway device can subsequently forward packets based on the Locator route. An example of how packet forwarding is performed is described later.
[0078] The following is an analysis and explanation of the Local SIDs shown in Table 1 above.
[0079] Optionally, in this embodiment, the Local SID may be generated based on the service Virtual Local Area Network (VLAN) identifier (ID). Under this premise, the Function operation command value (Opcode) in the above Local SID may be represented by the service VLAN ID. For example, if a gateway device acting as a Locator Manager distributes WLAN services corresponding to service VLANs 3502 and 3503, the Local SID shown in Table 1 can be transformed as shown in Table 4 below. [Table 4]
[0080] As can be seen from Table 4, in this embodiment, by setting the Function operation command value (Opcode) to the service VLAN ID, it is possible to realize that the Function operation command value represents the service VLAN ID on the one hand and the corresponding network operation command on the other hand, thereby improving the data plane forwarding matching efficiency.
[0081] Note that the above Local SID may also be implemented by a configuration command. For example, the configuration command corresponding to Table 4 is: Segment routing IPv6 Locator Leaf1 ipv6-prefix 1 A0:B0:01:02::64 static 32 opcode 3502 end-dt2u VSI service-vlan-3502 opcode 3503 end-dt2u VSI service-vlan-3503 That's fine.
[0082] In this embodiment, the gateway device may decapsulate the IPv6 encapsulation header of the first packet to obtain the second packet, and then perform source MAC learning to generate a MAC entry. Table 5 shows examples of MAC entries. [Table 5]
[0083] In particular, in this embodiment, if the second packet is an ARP packet or an IPv6 ND packet, the gateway device further performs ARP or IPv6 ND learning, and the learned ARP or IPv6 ND entry includes at least a MAC address and an IP address. MAC address: This is the MAC address of the AP that sends ARP packets or IPv6 ND packets. IP Address: This is the IP address of the AP that sends the ARP packet or IPv6 ND packet.
[0084] Based on the above entries, the following describes the step in step 302 in which the second packet is forwarded based on the destination IP address of the second packet.
[0085] Optionally, in this embodiment, the step in step 302 above, which involves forwarding the second packet based on the destination IP address of the second packet, may include the following steps b1 to b3.
[0086] In step b1, the Layer 2 header of the second packet is deencapsulated to obtain the fifth packet.
[0087] Optionally, in this embodiment, the fifth packet obtained after decapsulating the Layer 2 header of the second packet is substantially a Layer 3 packet having a destination IP address and a source IP address.
[0088] In step b2, an IP routing entry matching the destination IP address of the fifth packet is searched for in the IP routing forwarding instance routing table associated with the Layer 3 gateway interface.
[0089] Optionally, the found IP routing entry includes the destination IP address of the fifth packet. The IP routing forwarding instance routing table may be established based on traditional route learning methods.
[0090] In step b3, if the outbound interface of the IP routing entry is the SRv6 tunnel port from the gateway device to the first AP, the sixth packet is forwarded based on the outbound interface in the first Locator route that matches the Locator of the first AP obtained.
[0091] Here, the first AP refers to any of the APs, and is merely a name given for the sake of clarity, not a limiting one.
[0092] Optionally, in this embodiment, the sixth packet may be obtained by adding at least an IPv6 encapsulation header to the fifth packet. For example, the sixth packet may be obtained by first adding a Layer 2 header to the fifth packet, and then adding an IPv6 encapsulation header.
[0093] For example, if the sixth packet has the newly added Layer 2 header and IPv6 encapsulation header, then in one example, the Layer 2 header includes at least the destination MAC address and the source MAC address, the destination MAC address being the MAC address corresponding to the IP address of the first AP found in the ARP or IPv6 ND entry, and the source MAC address being the MAC address of the gateway device.
[0094] In one example, the destination IPv6 address in the IPv6 encapsulation header includes at least the Locator and Function assigned to the first AP, and the source IPv6 address in the IPv6 encapsulation header includes at least the Locator and Function assigned to the gateway device.
[0095] Based on the Local SID described above, in this embodiment, the Function in the destination IPv6 address and the Function in the source IPv6 address in the IPv6 encapsulation header attached to the sixth packet contain the same Function operation command value, and this Function operation command value is the first service VLAN ID. Here, the first service VLAN ID is the service VLAN ID to which the sixth packet belongs, for example, service VLAN 3502.
[0096] Furthermore, in this embodiment, the first Locator route described above can refer to the Locator route described above. The outbound interface in the first Locator route is, as described above, a Layer 3 interface on the gateway device for forwarding SRv6 services to the first AP.
[0097] Ultimately, steps b1 through b3 implemented how the gateway device forwards packets when it receives them through the SRv6 tunnel.
[0098] The following explains how, in step 303 above, the fourth packet is forwarded based on the destination IP address of the fourth packet.
[0099] Optionally, in this embodiment, the step in step 303 above, which involves forwarding the fourth packet based on the destination IP address of the fourth packet, may include the following steps c1 to c3.
[0100] In step c1, the IP routing forwarding instance routing table is searched for an IP routing entry that matches the destination IP address of the fourth packet.
[0101] In step c2, if the outbound interface of the IP routing entry is the SRv6 tunnel port from the gateway device to the second AP, the system searches for a second Locator route that matches the Locator of the second AP from the acquired Locator route and forwards the seventh packet through the outbound interface of the second Locator route.
[0102] Here, the second AP refers to any of the APs, and is merely a name given for the sake of clarity, not a limiting one.
[0103] Optionally, in this embodiment, the seventh packet may be obtained by adding at least an IPv6 encapsulation header to the fourth packet. For example, the seventh packet may be obtained by first adding a Layer 2 header to the fourth packet, and then adding an IPv6 encapsulation header.
[0104] For example, if the seventh packet has the newly added Layer 2 header and IPv6 encapsulation header, then in one example, the Layer 2 header includes at least the destination MAC address and the source MAC address, the destination MAC address being the MAC address corresponding to the IP address of the second AP found in the ARP or IPv6 ND entry, and the source MAC address being the MAC address of the gateway device.
[0105] In one example, the destination IPv6 address in the IPv6 encapsulation header includes at least a Locator and Function assigned to a second AP, and the source IPv6 address in the IPv6 encapsulation header includes at least a Locator and Function assigned to a gateway device.
[0106] Based on the Local SID entry described above, in this embodiment, the Function in the destination IPv6 address and the Function in the source IPv6 address in the IPv6 encapsulation header attached to the seventh packet contain the same Function operation command value, and this Function operation command value is the second service VLAN ID. Here, the second service VLAN ID is the service VLAN ID to which the seventh packet belongs, for example, service VLAN 3502.
[0107] Furthermore, in this embodiment, the second Locator route can refer to the Locator route described above. The outbound interface in the second Locator route is, as mentioned above, a Layer 3 interface on the gateway device for forwarding SRv6 services to the second AP.
[0108] Ultimately, steps c1 and c2 implemented how the gateway device forwards packets when it receives them from the network side.
[0109] The above describes the method according to the embodiment of the present invention from the perspective of a gateway device in a Layer 3 network. Below, the method according to the embodiment of the present invention will be described from the perspective of an AP.
[0110] Referring to Figure 6, which is a flowchart of another method according to an embodiment of the present invention, this method is applied to an AP connected to a gateway device in a Layer 3 network. In this embodiment, the AP automatically creates a Layer 3 interface, for example, Interface VLAN 4092, locally for exchanging SRv6 services with the gateway device. Here, the IPv6 address of the Layer 3 interface may be set automatically. Also, based on the SRv6 tunnel between the gateway device and the AP, an SRv6 tunnel port on the AP may be bound to the Layer 3 interface on the AP.
[0111] As shown in Figure 6, the flow may include the following steps.
[0112] In step 601, if it is necessary to forward the packet to the gateway device, step 602 is executed, and when a packet is received via the SRv6 tunnel from this AP to the gateway device, step 603 is executed.
[0113] In step 602, an IPv6 encapsulation header is added to the packet, and the packet is forwarded via the SRv6 tunnel from this AP to the gateway device.
[0114] Step 602 is performed on the premise that the packets need to be forwarded to the gateway device.
[0115] Optionally, the destination IP address in the IPv6 encapsulation header includes at least the Locator and Function assigned to the gateway device, and the source IP address in the IPv6 encapsulation header includes at least the Locator and Function assigned to this AP.
[0116] As one embodiment, in step 602, as described above, the source IP address and destination IP address in the IPv6 encapsulation header may be adaptively determined based on the service VLAN ID to which the packet belongs.
[0117] For example, the destination IP address in the IPv6 encapsulation header may include Locator, Function, and Args. Locator: Sets the Locator to the one assigned to the gateway device. Function: Set to the service VLAN ID to which the packet belongs. Args: An application identifier (including the service's role type and application type) is added.
[0118] Similarly, the source IP address in the IPv6 encapsulation header may include the Locator and Function. Locator: This is set to the Locator assigned to the AP. Function: Set to the service VLAN ID to which the packet belongs.
[0119] In other words, in this embodiment, the Function in the destination IPv6 address and the Function in the source IPv6 address in the IPv6 encapsulation header are the same, and both are the third service VLAN ID, and the third service VLAN ID is the service VLAN ID to which the above packet belongs.
[0120] In step 603, the received packet is decapsulated using IPv6, and the packet is forwarded based on the destination MAC address of the decapsulated packet.
[0121] Step 603 is performed assuming that a packet has been received via the SRv6 tunnel from this AP to the gateway device. Since Step 603 is similar to the forwarding process of a conventional AP, its explanation is omitted here.
[0122] At this point, the flow shown in Figure 6 has been completed.
[0123] As shown in the flow in Figure 6, the gateway device and AP deploy an SRv6 tunnel based on the assigned Locator, transmit packets between the gateway device and AP via the SRv6 tunnel, and implement a packet forwarding method applicable to the Layer 3 network where SRv6 is deployed.
[0124] The method according to the embodiment of the present invention has been described above. The apparatus according to the embodiment of the present invention will now be described.
[0125] Referring to Figure 7, which is a structural diagram of an apparatus according to an embodiment of the present invention. The apparatus is applied to a gateway device in a Layer 3 network, where an SRv6 tunnel exists between the gateway device and the access point AP connected to the gateway device, and each of the gateway device and the different APs connected to the gateway device is assigned a different locator, and the apparatus is, A packet receiving unit for receiving a first packet via the SRv6 tunnel or a third packet from the network side, When a first packet is received via the SRv6 tunnel, the IPv6 encapsulation header of the first packet is decapsulated to obtain a second packet, and the second packet is forwarded based on the destination IP address of the second packet. A packet processing unit that, upon receiving a third packet from the network side, performs IPv6 decapsulation on the third packet to obtain a fourth packet, and forwards the fourth packet based on the destination IP address of the fourth packet, is included. The destination IP address in the IPv6 encapsulation header attached to the first packet includes at least a Locator and a Function assigned to the gateway device; the destination MAC address of the second packet is the MAC address of the Layer 3 gateway interface associated with the VSI instance bound to the Function on the gateway device; and the destination IPv6 address in the IPv6 encapsulation header attached to the third packet includes at least a Locator assigned to the gateway device.
[0126] Optionally, if the gateway device functions as a Locator Manager, the device will The system further includes an allocation unit for receiving Locator allocation requests transmitted by APs and for allocating corresponding Locators to APs based on those Locator allocation requests.
[0127] Optionally, a User Datagram Protocol (UDP) connection for Locator assignment is established between the gateway device and the AP, and the Locator assignment request is received via the UDP connection. The assignment unit assigns the corresponding Locator to the AP based on the Locator assignment request. Sending back a Locator assignment response to the AP via the UDP connection, with at least the Locator assigned to the AP attached, The AP receives a designated Locator assignment request, which it has sent back based on the Locator assignment response, via the UDP connection, wherein the designated Locator assignment request includes at least the Locator attached to the Locator assignment response. This includes sending a Locator assignment confirmation message to the AP via the UDP connection in order to confirm that the Locator has been assigned to the AP.
[0128] Optionally, after the allocation unit has allocated a corresponding Locator to an AP, if it receives a Locator Occupancy Request sent by the AP via the UDP connection, and the AP is permitted to continue occupying the allocated Locator, the allocation unit sends a Locator Occupancy Confirmation message to the AP via the UDP connection to confirm that the AP continues to occupy the allocated Locator, or, if it does not receive a Locator Occupancy Request sent by the AP within a predetermined time, the allocation unit releases the Locator allocated to the AP. The Locator Occupancy Request is used to instruct the AP to continue occupying the allocated Locator.
[0129] Optionally, the allocation unit further assigns a Locator to an AP connected to the gateway device and then generates a Locator route to the AP. The next hop of the Locator route is the IPv6 address of the interface on the AP connected to the gateway device, and the outbound interface is a Layer 3 interface on the gateway device for forwarding SRv6 services to the AP.
[0130] Optionally, the packet processing unit may forward the second packet based on the destination IP address of the second packet. The second packet is decapsulated by removing the Layer 2 header to obtain a fifth packet, From the IP routing forwarding instance routing table associated with the Layer 3 gateway interface, search for an IP routing entry that matches the destination IP address of the fifth packet, If the outbound interface of the IP routing entry is an SRv6 tunnel port from the gateway device to the first AP, the system includes forwarding a sixth packet based on the outbound interface in the first Locator route that matches the Locator of the first AP, obtained. The outbound interface in the first Locator route is a Layer 3 interface on the gateway device for forwarding SRv6 services to the first AP. The sixth packet is obtained by adding at least an IPv6 encapsulation header to the fifth packet, wherein the destination IPv6 address in the IPv6 encapsulation header added to the sixth packet includes at least a Locator and Function assigned to the first AP, and the source IPv6 address in the IPv6 encapsulation header added to the sixth packet includes at least a Locator and Function assigned to the gateway device.
[0131] Optionally, the Function includes at least a Function type and a Function operation command value. The Function in the destination IPv6 address and the Function in the source IPv6 address in the IPv6 encapsulation header attached to the sixth packet contain the same Function operation command value, and the Function operation command value is the first service VLAN ID. The aforementioned first service VLAN ID is the service VLAN ID to which the aforementioned sixth packet belongs.
[0132] Optionally, the packet processing unit may forward the fourth packet based on the destination IP address of the fourth packet. Searching the IP routing forwarding instance routing table for an IP routing entry that matches the destination IP address of the fourth packet, If the outbound interface of the IP routing entry is an SRv6 tunnel port from the gateway device to the second AP, the system includes searching for a second Locator route that matches the Locator of the second AP from the acquired Locator route, and forwarding the seventh packet via the outbound interface of the second Locator route. The outbound interface in the second Locator route is a Layer 3 interface on the gateway device for forwarding SRv6 services to the second AP, the seventh packet is obtained by adding at least an IPv6 encapsulation header to the fourth packet, the destination IPv6 address in the IPv6 encapsulation header added to the seventh packet includes at least a Locator and Function assigned to the second AP, and the source IPv6 address in the IPv6 encapsulation header added to the seventh packet includes at least a Locator and Function assigned to the gateway device.
[0133] Optionally, the Function includes at least a Function type and a Function operation command value. The Function in the destination IPv6 address and the Function in the source IPv6 address in the IPv6 encapsulation header attached to the seventh packet contain the same Function operation command value, and this Function operation command value is the second service VLAN ID. The second service VLAN ID is the service VLAN ID to which the seventh packet belongs.
[0134] Optionally, the device further includes an entry learning unit (not shown in Figure 7). The entry learning unit is, When the IP address of a terminal connected to any AP is learned, a Function matching the terminal's IP address is determined, and the Function and the terminal's IP address are reported to the network side, so that the destination IPv6 address in the IPv6 encapsulation header attached to the packet sent from the network side to the terminal includes at least the Function, the Function is used to instruct IPv6 decapsulation and a lookup in the IP routing forwarding instance routing table for forwarding the packet to the terminal that matches the terminal's IP address, if the terminal's IP address is IPv4, the IP routing forwarding instance routing table is an IPv4 VPN routing table, if the terminal's IP address is IPv6, the IP routing forwarding instance routing table is an IPv6 VPN routing table, and / or If no local MAC entry exists that matches the source MAC address of the second packet, MAC learning is performed on the second packet to obtain a MAC entry that matches the source MAC address of the second packet. The MAC entry includes at least the source MAC address of the second packet, a VSI instance, and outbound interface information, and the VSI instance corresponds to the service VLAN ID to which the second packet belongs.
[0135] This concludes the explanation of the structure of the device shown in Figure 7.
[0136] Referring to Figure 8, which is a structural diagram of another device according to an embodiment of the present invention, the device is applied to an access point AP connected to a gateway device in a Layer 3 network, where an SRv6 tunnel exists between the gateway device and the AP, and each AP, the gateway device, and other APs connected to the gateway device are each assigned a different locator, and the device is, A receiving unit for receiving packets via an SRv6 tunnel from this AP to the gateway device, When it is necessary to forward a packet to the gateway device, an IPv6 encapsulation header is added to the packet, and the packet is forwarded via the SRv6 tunnel from this AP to the gateway device. A forwarding unit that, upon receiving a packet via the SRv6 tunnel from this AP to the gateway device, decapsulates the received packet and forwards the packet based on the destination MAC address of the decapsulated packet, is included. The destination IP address in the IPv6 encapsulation header includes at least the Locator and Function assigned to the gateway device, and the source IP address in the IPv6 encapsulation header includes at least the Locator and Function assigned to this AP.
[0137] Optionally, the Function in the destination IPv6 address and the Function in the source IPv6 address in the IPv6 encapsulation header are the same, and both are the third service VLAN ID. The third service VLAN ID is the service VLAN ID to which the packets that need to be forwarded to the gateway device belong.
[0138] This concludes the explanation of the structure of the device shown in Figure 8.
[0139] Embodiments of the present invention further provide a hardware structure of the apparatus shown in Figure 7 or Figure 8. Referring to Figure 9, which is a structural diagram of an electronic device according to an embodiment of the present invention. As shown in Figure 9, the hardware structure may include a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor, and the processor is used to execute machine-executable instructions in order to carry out any of the methods disclosed in the above examples of the present invention.
[0140] Based on the same concept as described above, embodiments of the present invention further provide a machine-readable storage medium in which several computer instructions are stored, and when the computer instructions are executed by a processor, the methods disclosed in the above embodiments of the present invention can be carried out.
[0141] Exemplary, the machine-readable storage medium may be an electronic, magnetic, optical, or other physical storage device capable of storing or remembering information such as executable instructions and data. For example, the machine-readable storage medium may be RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (e.g., hard disk drives), solid-state drives, any type of storage disk (e.g., optical discs, DVDs, etc.), or similar storage media, or a combination thereof.
[0142] The systems, devices, modules, or units described in the above embodiments may be specifically implemented by computer chips, entities, or products having some function. A typical implementing device is a computer, and the specific form of the computer may be a personal computer, laptop computer, mobile phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet, wearable device, or any combination of these devices.
[0143] For the sake of clarity, the above-mentioned device will be described by dividing it into various units according to their function. Of course, when implementing the present invention, it is also possible to realize the functions of each unit using the same or multiple software and / or hardware.
[0144] As those skilled in the art will see, embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention may be provided in the form of embodiments consisting only of hardware, embodiments consisting only of software, or embodiments combining software and hardware. Furthermore, embodiments of the present invention may take the form of computer program products implemented on one or more computer-usable storage media (including, but not limited to, magnetic disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.
[0145] The present invention will be described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a dedicated computer, an embedded processor, or another programmable data processing device to generate a machine, thereby generating a device for implementing one or more flows in a flowchart and / or one or more blocks in a block diagram, through instructions executed by the processor of the computer or other programmable data processing device.
[0146] Furthermore, these computer program instructions may be stored in computer-readable memory that can instruct a computer or other programmable data processing device to work in a specific manner, resulting in the creation of a product that includes an instruction unit that implements a function specified in one or more flows of a flowchart and / or one or more blocks of a block diagram using the instructions stored in the computer-readable memory.
[0147] These computer program instructions may be loaded onto a computer or other programmable data processing device, so that a series of operational steps are executed on the computer or other programmable device, generating processing to be performed by the computer, thereby providing steps for implementing a function specified in one or more flows of a flowchart and / or one or more blocks of a block diagram, by instructions executed on the computer or other programmable device.
[0148] The above are merely examples of the present invention and are not intended to limit the invention. Those skilled in the art can make various modifications and changes to the present invention. Any modifications, equivalent substitutions, or improvements made without departing from the spirit and principles of the present invention should be included within the scope of the claims.
Claims
1. A packet forwarding method applied to a gateway device in a Layer 3 network, wherein an SRv6 tunnel exists between the gateway device and an access point AP connected to the gateway device, and different locators are assigned to the gateway device and different APs connected to the gateway device. Steps include: when a first packet is received via the SRv6 tunnel, decapsulating the IPv6 encapsulation header of the first packet to obtain a second packet, and forwarding the second packet based on the destination IP address of the second packet, wherein the destination IPv6 address in the IPv6 encapsulation header attached to the first packet includes at least a Locator and a Function assigned to the gateway device, and the destination MAC address of the second packet is the MAC address of the Layer 3 gateway interface on the gateway device associated with the VSI instance bound to the Function on the gateway device; The process includes the step of receiving a third packet from a network other than the SRv6 tunnel that requires IPv6 decapsulation, performing IPv6 decapsulation on the third packet to obtain a fourth packet, and forwarding the fourth packet based on the destination IP address of the fourth packet, wherein the destination IPv6 address in the IPv6 encapsulation header attached to the third packet includes at least a Locator assigned to the gateway device. A packet forwarding method characterized by the following features.
2. When the gateway device functions as a Locator Manager, Upon receiving a Locator assignment request sent by the AP, The gateway device assigns a Locator to the AP by the step of assigning a corresponding Locator to the AP based on the Locator assignment request. The method according to feature 1.
3. A User Datagram Protocol (UDP) connection for Locator assignment is established between the gateway device and the AP, and the Locator assignment request is received via the UDP connection. The step of assigning a corresponding Locator to the AP based on the Locator assignment request is: The steps include sending back a Locator assignment response to the AP via the UDP connection, with at least the Locator assigned to the AP attached, The steps include receiving a designated Locator assignment request, which the AP has returned based on the Locator assignment response, via the UDP connection, wherein the designated Locator assignment request includes at least the Locator attached to the Locator assignment response; The process includes the step of sending a Locator assignment confirmation message to the AP via the UDP connection in order to confirm that the Locator is assigned to the AP, The method according to feature 2.
4. After assigning a corresponding Locator to the AP, When a Locator Occupancy Request transmitted by the AP is received via the UDP connection, if the AP is permitted to continue occupying the assigned Locator, the Locator Occupancy Confirmation Message is sent back to the AP via the UDP connection to confirm that the AP will continue to occupy the assigned Locator, wherein the Locator Occupancy Request is used to request whether or not the AP will continue to occupy the assigned Locator. The process further includes the step of releasing the Locator assigned to the AP if a Locator occupancy request sent by the AP is not received within a predetermined time, The method according to feature 3.
5. The step further includes the gateway device assigning a Locator to an AP connected to the gateway device as a Locator Manager, and then generating a Locator route to the AP. The next hop of the Locator route is the IPv6 address of the interface connected to the gateway device on the AP, and the outbound interface is the Layer 3 interface on the gateway device for forwarding SRv6 services to the AP. The method according to feature 1.
6. The step of forwarding the second packet based on the destination IP address of the second packet is: The steps include decapsulating the Layer 2 header of the second packet to obtain a fifth packet, The steps include searching for an IP routing entry that matches the destination IP address of the fifth packet from the IP routing forwarding instance routing table associated with the Layer 3 gateway interface, If the outbound interface of the IP routing entry is an SRv6 tunnel port from the gateway device to the first AP, the steps include: forwarding a sixth packet based on the outbound interface in the first Locator route that matches the Locator of the first AP obtained; The outbound interface in the first Locator route is a Layer 3 interface on the gateway device for forwarding SRv6 services to the first AP. The sixth packet is obtained by adding at least an IPv6 encapsulation header to the fifth packet, wherein the destination IPv6 address in the IPv6 encapsulation header added to the sixth packet includes at least a Locator and Function assigned to the first AP, and the source IPv6 address in the IPv6 encapsulation header added to the sixth packet includes at least a Locator and Function assigned to the gateway device. The method according to 1 or 5, characterized by the above.
7. The Function includes at least a Function type and a Function operation command value, The Function in the destination IPv6 address and the Function in the source IPv6 address in the IPv6 encapsulation header attached to the sixth packet contain the same Function operation command value, and the Function operation command value is the first service VLAN ID. The first service VLAN ID is the service VLAN ID to which the sixth packet belongs. The method according to feature 6.
8. The step of forwarding the fourth packet based on the destination IP address of the fourth packet is: The steps include searching the IP routing instance routing table for an IP routing entry that matches the destination IP address of the fourth packet, If the outbound interface of the IP routing entry is an SRv6 tunnel port from the gateway device to the second AP, the procedure includes the steps of: searching for a second Locator route that matches the Locator of the second AP from the acquired Locator route; and forwarding the seventh packet via the outbound interface of the second Locator route. The outbound interface in the second Locator route is a Layer 3 interface on the gateway device for forwarding SRv6 services to the second AP, the seventh packet is obtained by adding at least an IPv6 encapsulation header to the fourth packet, the destination IPv6 address in the IPv6 encapsulation header added to the seventh packet includes at least a Locator and Function assigned to the second AP, and the source IPv6 address in the IPv6 encapsulation header added to the seventh packet includes at least a Locator and Function assigned to the gateway device. The method according to 1 or 5, characterized by the above.
9. The Function includes at least a Function type and a Function operation command value, The Function in the destination IPv6 address and the Function in the source IPv6 address in the IPv6 encapsulation header attached to the seventh packet contain the same Function operation command value, and the Function operation command value is the second service VLAN ID. The second service VLAN ID is the service VLAN ID to which the seventh packet belongs. The method according to feature 8.
10. The process further includes the step of learning the IP address of a terminal connected to any AP, determining a Function that matches the terminal's IP address, and reporting the Function and the terminal's IP address to the network side, so that the destination IPv6 address in the IPv6 encapsulation header attached to the packet sent from the network side to the terminal includes at least the Function. The Function matching the terminal IP address is used to instruct IPv6 decapsulation and a lookup in the IP routing forwarding instance routing table for forwarding packets to the terminal that matches the terminal IP address. If the terminal IP address is IPv4, the IP routing forwarding instance routing table is an IPv4 VPN routing table, and if the terminal IP address is IPv6, the IP routing forwarding instance routing table is an IPv6 VPN routing table. The method according to feature 8.
11. If no MAC entry locally matches the source MAC address of the second packet, the process further includes the step of performing MAC learning on the second packet to obtain a MAC entry that matches the source MAC address of the second packet. The MAC entry includes at least the source MAC address, VSI instance, and outbound interface information of the second packet, the VSI instance corresponding to the service VLAN ID to which the second packet belongs. The method according to feature 1.
12. A packet forwarding method applicable to an access point AP connected to a gateway device in a Layer 3 network, wherein an SRv6 tunnel exists between the gateway device and the AP, and different locators are assigned to the AP, the gateway device, and other APs connected to the gateway device. When it is necessary to forward a packet to the gateway device, the AP adds an IPv6 encapsulation header to the packet and forwards the packet via an SRv6 tunnel from the AP to the gateway device, wherein the destination IPv6 address in the IPv6 encapsulation header includes at least a Locator and Function assigned to the gateway device, and the source IPv6 address in the IPv6 encapsulation header includes at least a Locator and Function assigned to the AP. The AP includes the step of receiving a packet via the SRv6 tunnel from this AP to the gateway device, decapsulating the received packet, and forwarding the packet based on the destination MAC address of the decapsulated packet. When the gateway device functions as a Locator Manager, A Locator assignment request is sent to the gateway device. The gateway device receives the corresponding Locator that it has assigned to this AP based on the Locator assignment request, thereby assigning a Locator to this AP by the gateway device. A User Datagram Protocol (UDP) connection for Locator assignment is established between the gateway device and this AP, and the Locator assignment request is transmitted via the UDP connection. The step of receiving the corresponding Locator that the gateway device has assigned to this AP based on the Locator assignment request is: The steps include receiving, via the UDP connection, a Locator assignment response from the gateway device, which includes at least a Locator assigned to this AP; A step of sending a designated Locator assignment request to the gateway device via the UDP connection based on the Locator assignment response, wherein the designated Locator assignment request includes at least the Locator attached to the Locator assignment response. The process includes receiving a Locator assignment confirmation message, which is returned by the gateway device via the UDP connection, confirming that the Locator will be assigned to this AP. A packet forwarding method characterized by the following features.
13. The Function in the destination IPv6 address and the Function in the source IPv6 address in the IPv6 encapsulation header are the same, and both are the third service VLAN ID. The third service VLAN ID is the service VLAN ID to which the packets that need to be forwarded to the gateway device belong. The method according to 12, characterized by the features described above.
14. A packet forwarding device applied to a gateway device in a Layer 3 network, wherein an SRv6 tunnel exists between the gateway device and an access point AP connected to the gateway device, and each of the gateway device and the different APs connected to the gateway device is assigned a different locator. A packet receiving unit for receiving a first packet via the SRv6 tunnel, or for receiving a third packet that requires IPv6 decapsulation from a network side other than the SRv6 tunnel, When a first packet is received via the SRv6 tunnel, the IPv6 encapsulation header of the first packet is decapsulated to obtain a second packet, and the second packet is forwarded based on the destination IP address of the second packet. A packet processing unit is included for receiving a third packet from a network other than the SRv6 tunnel that requires IPv6 decapsulation, for performing IPv6 decapsulation on the third packet to obtain a fourth packet, and for forwarding the fourth packet based on the destination IP address of the fourth packet. The destination IPv6 address in the IPv6 encapsulation header attached to the first packet includes at least a Locator and a Function assigned to the gateway device, the destination MAC address of the second packet is the MAC address of the Layer 3 gateway interface on the gateway device associated with the VSI instance bound to the Function on the gateway device, and the destination IPv6 address in the IPv6 encapsulation header attached to the third packet includes at least a Locator assigned to the gateway device. A packet forwarding device characterized by the following features.
15. A packet forwarding device applied to an access point AP connected to a gateway device in a Layer 3 network, wherein an SRv6 tunnel exists between the gateway device and the AP, and different locators are assigned to the AP, the gateway device, and other APs connected to the gateway device. A receiving unit for receiving packets via an SRv6 tunnel from this AP to the gateway device, When it is necessary to forward a packet to the gateway device, an IPv6 encapsulation header is added to the packet, and the packet is forwarded via the SRv6 tunnel from this AP to the gateway device. A forwarding unit that, upon receiving a packet via the SRv6 tunnel from this AP to the gateway device, decapsulates the received packet and forwards the packet based on the destination MAC address of the decapsulated packet, is included. The destination IPv6 address in the IPv6 encapsulation header includes at least the Locator and Function assigned to the gateway device, and the source IPv6 address in the IPv6 encapsulation header includes at least the Locator and Function assigned to this AP. A packet forwarding device characterized by the following features.
Citation Information
Patent Citations
Message forwarding method and device
CN113207192A
Message forwarding method and device
CN113301667A
Improved SID allocation
WO2021158428A1