IP Library › Granted Patent US 11,706,140
Granted Patent B2
US 11,706,140 · App. 17/232,431 · Granted Jul 18, 2023

Packet forwarding method and network device

Inventor: Jie Yang (Nanjing, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD
H04L45/745H04L12/4633H04L12/4641H04L45/586H04L45/64
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,706,140
App. No.
17/232,431
Granted
Jul 18, 2023
Kind
B2
Abstract

A packet forwarding method and a network device are provided, and the method is applied to the network device. The network device includes a first virtual routing and forwarding (VRF) table and a second VRF table. The method includes: the network device receives a first packet. If the first packet carries tunnel attribute information, the network device forwards the first packet based on the first VRF table. The first VRF table includes one or more local routes, and next-hop outbound interfaces of the one or more local routes are all local outbound interfaces. The network device forwards the first packet based on the first VRF table, so that a packet from a tunnel may be forwarded to a local virtual machine for processing and may not be forwarded to another tunnel endpoint device, to avoid a routing loop during packet forwarding.

Claims (36)

1. A packet forwarding method applied to a network device, the method comprising:

receiving a first packet with tunnel attribute information; and

forwarding the first packet based on a first virtual routing forwarding (VRF) table, wherein the first VRF table consists of one or more local routes, and each next-hop outbound interface of the one or more local routes is a local outbound interface,

wherein the first VRF table includes only the local routes to prevent the first packet from being forwarded to another tunnel endpoint device,

receiving a second packet without tunnel attribute information; and

forwarding the second packet based on a second VRF table to balance resource usage of packet forwarding, wherein the second VRF table comprises a plurality of routes, and the plurality of routes comprises the one or more local routes and at least one route whose next-hop outbound interface is a remote outbound interface.

2. The method according to claim 1 , wherein before receiving the first packet, the method comprises:

generating the first VRF table based on a fact that an obtained route is a local route.

3. The method according to claim 1 , wherein the tunnel attribute information is virtual extensible local area network (VXLAN) tunnel attribute information, multi-protocol label switching, (MPLS) tunnel attribute information, or segment routing (SR) tunnel attribute information.

4. The method according to claim 1 , wherein the network device is a device connected to a plurality of virtual machines in a data center network.

5. A network device, comprising:

a memory, comprising instructions;

a processor coupled to the memory, the instructions, when executed by the processor, cause the network device to:

to receive a first packet with tunnel attribute information; and

forward the first packet based on a first virtual routing forwarding (VRF) table, wherein the first VRF table consists of one or more local routes, and each next-hop outbound interface of the one or more local routes is a local outbound interface,

wherein the first VRF table includes only the local routes to prevent the first packet from being forwarded to another tunnel endpoint device,

receiving a second packet without tunnel attribute information; and

forwarding the second packet based on a second VRF table to balance resource usage of packet forwarding, wherein the second VRF table comprises a plurality of routes, and the plurality of routes comprises the one or more local routes and at least one route whose next-hop outbound interface is a remote outbound interface.

6. The network device according to claim 5 , wherein the instructions further cause the network device to:

generate the first VRF table based on an obtained route being a local route.

7. The network device according to claim 5 , wherein the instructions further cause the network device to:

determine, based on a destination address of the first packet, a first route used to forward the first packet in the first VRF table, wherein the first route belongs to the one or more local routes; and

forward the first packet based on the first route.

8. The network device according to claim 5 , wherein the tunnel attribute information is virtual extensible local area network (VXLAN) tunnel attribute information, multi-protocol label switching (MPLS) tunnel attribute information, or segment routing (SR) tunnel attribute information.

9. The network device according to claim 5 , wherein the network device is a device connected to one or more virtual machines in a data center network.

10. A non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores a computer-readable instruction which, when executed by a processor, implement a method comprising:

receiving a first packet with tunnel attribute information; and

forwarding the first packet based on a first virtual routing and forwarding (VRF) table, wherein the first VRF table consists of one or more local routes, and each next-hop outbound interface of the one or more local routes is a local outbound interface,

wherein the first VRF table includes only the local routes to prevent the first packet from being forwarded to another tunnel endpoint device,

receiving a second packet without tunnel attribute information; and

forwarding the second packet based on a second VRF table to balance resource usage of packet forwarding, wherein the second VRF table comprises a plurality of routes, and the plurality of routes comprises the one or more local routes and at least one route whose next-hop outbound interface is a remote outbound interface.

11. The non-transitory computer-readable storage medium according to claim 10 , wherein the method further comprises:

generating the first VRF table when an obtained route is a local route.

12. The non-transitory computer-readable storage medium according to claim 10 , wherein the tunnel attribute information is virtual extensible local area network (VXLAN) tunnel attribute information.

13. The non-transitory computer-readable storage medium according to claim 10 , wherein the tunnel attribute information is multi-protocol label switching (MPLS) tunnel attribute information or segment routing (SR) tunnel attribute information.

14. The non-transitory computer-readable storage medium according to claim 10 , wherein the network device is a device connected to a plurality of virtual machines in a data center network.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 26, 2023
From: YANG, JIE
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 063771/0808 →
Priority Claims (1)
CN 202010314463.0 · Apr 20, 2020 · national
Continuity (1)
Related Publication 20210328922A1 · Oct 21, 2021