Forwarding packet
AssigneeNew H3C Technologies Co., Ltd.
InventorsMinghui WANG, Xiyuan MA
Life of this patent
Estimating the term…
Abstract
A method for forwarding a packet and a switch are provided. The switch receives a packet via a port; when the packet is a layer-2 packet, determines a VSI based on an ID of a MDC to which the port belongs and an ID of a VLAN of the packet, searches for a layer-2 entry stored in a chip where the port is located and matching with the VSI and a destination MAC address of the packet, and forwards the packet based on the layer-2 entry; when the packet is a layer-3 packet, determines a second VRF based on the ID of the MDC and an ID of a first VRF to which the packet belongs, searches for a layer-3 entry stored in the chip and matching with the second VRF and a destination IP address of the packet, and forwards the packet based on the layer-3 entry.
Claims12
A method of forwarding a packet, comprising:
- receiving, by a switch, a packet via a port;
- when the packet is a layer-2 packet, determining, by the switch, a Virtual Switch Instance (VSI) based on an identification (ID) of a Multitenant Devices Context (MDC) to which the port belongs and an ID of a Virtual Local Area Network (VLAN) to which the packet belongs, searching, by the switch, for a layer-2 entry stored in a chip where the port is located and matching with the VSI and a destination Media Access Control (MAC) address of the packet, and forwarding, by the switch, the packet based on the matching layer-2 entry;
- and when the packet is a layer-3 packet, determining, by the switch, a second VPN Routing and Forwarding instance (VRF) based on the ID of the MDC to which the port belongs and an ID of a first VRF to which the packet belongs, searching, by the switch, for a layer-3 entry stored in the chip where the port is located and matching with the second VRF and a destination Internet Protocol (IP) address of the packet, and forwarding, by the switch, the packet based on the matching layer-3 entry.
A switch, comprising:
- a processor and a non-transitory machine readable storage medium stored with machine executable instructions which are executable by the processor to:
- receive a packet via a port;
- when the packet is a layer-2 packet, determine a Virtual Switch Instance (VSI) based on an identification (ID) of a Multitenant Devices Context (MDC) to which the port belongs and an ID of a Virtual Local Area Network (VLAN) to which the packet belongs;
- search for a layer-2 entry stored in a chip where the port is located and matching with the VSI and a destination Media Access Control (MAC) address of the packet, and forward the packet based on the matching layer-2 entry;
- when the packet is a layer-3 packet, determine a second VPN Routing and Forwarding instance (VRF) based on the ID of the MDC to which the port belongs and an ID of a first VRF to which the packet belongs;
- search for a layer-3 entry stored in the chip where the port is located and matching with the second VRF and a destination Internet Protocol (IP) address of the packet, and forward the packet based on the matching layer-3 entry.
Dependencies are inferred from the claim text.