# US 10,771,385 B2 · Packet forwarding method and port extender

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,771,385 B2
- Document ID: US10771385B2
- Status: Granted
- Kind: B2
- Application number: 16/099,677
- Filed: 2017-06-20
- Published: 2019-05-23
- Granted: 2020-09-08
- Earliest claimed: 2016-06-21
- Assignees: New H3C Technologies Co., Ltd.
- Applicants: New H3C Technologies Co., Ltd.
- Inventors: Xuewei Liang
- Web page: https://patentgrep.com/patent/US10771385B2

## CPC

- H04L 49/70: {Virtual switches}
- H04L 12/4641: {Virtual LANs, VLANs, e.g. virtual private networks [VPN] (LAN interconnection over a bridge based backbone H04L12/462; encapsulation techniques H04L12/4633; routing of packets H04L45/00; packet switches H04L49/00; virtual private networks for security H04L63/0272)}
- H04L 45/02: Topology update or discovery
- H04L 45/66: {Layer 2 routing, e.g. in Ethernet based MAN's}
- H04L 45/745: Address table lookup; Address filtering
- H04L 49/25: Routing or path finding in a switch fabric
- H04L 49/30: {Peripheral units, e.g. input or output ports}
- H04L 2101/622: Layer-2 addresses, e.g. medium access control [MAC] addresses
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A PE and a method of forwarding packet are provided. According to an example of the method, when receiving a packet, the PE may determine a vPort associated to a port through which the packet is received. When a forwarding entry adding condition is satisfied, the PE may add a first forwarding entry in a forwarding table by recording the first vPort as an egress port, a source MAC address of the packet as a MAC address and an VLAN identifier of the VLAN associated with the first vPort as a VLAN identifier. Subsequently, the PE may search the forwarding table for a second forwarding entry matching the destination MAC address of the packet and the VLAN to which the packet belongs. The PE may search a port associating relationship table for a port associated to a second vPort in the second forwarding entry to forward the packet.

## Claims

### Claim 1

A method of forwarding a packet, comprising:
receiving, by a Port Extender (PE), the packet;
determining, by the PE, a first Virtual Port (vPort) associated to a receiving port through which the packet is received;
adding, by the PE, a first forwarding entry in a forwarding table in response to a forwarding entry adding condition being satisfied, by recording the first vPort as an egress port in the first forwarding entry, recording a source Media Access Control (MAC) address of the packet as a MAC address in the first forwarding entry, and recording a Virtual Local Area Network (VLAN) identifier of a VLAN associated with the first vPort as a VLAN identifier in the first forwarding entry;
searching, by the PE, the forwarding table for a second forwarding entry matching a destination MAC address of the packet and the VLAN identifier of the VLAN to which the packet belongs; and
searching, by the PE, a port associating relationship table for a port which is associated to a second vPort in the second forwarding entry; and
forwarding, by the PE, the packet through the port associated to the second vPort.

### Claim 2 (depends on 1)

The method according to claim 1, wherein determining the first vPort comprises:
searching, by the PE, the port associating relationship table to determine the first vPort being associated to a first user port in response to the receiving port being the first user port; or
determining, by the PE, the first vPort which is assigned in advance to a characteristic parameter carried in the packet in response to the receiving port being the first user port; or
determining, by the PE, the first vPort which is associated to a source E-tag Channel Identifier (ECID) carried in a first tag of the packet in response to the receiving port being a first cascade port.

### Claim 3 (depends on 1)

The method according to claim 1, wherein forwarding the packet through the port associated to the second vPort comprises:
sending, by the PE, the packet being added with a first tag and a second tag through an upstream port in response to the upstream port being associated to the second vPort and a first user port being determined as the receiving port; or
sending, by the PE, the packet being added with the first tag and the second tag through a second cascade port in response to the second cascade port being associated to the second vPort and the first user port being determined as the receiving port; or
sending, by the PE, the packet through a second user port in response to the second user port being associated to the second vPort and the first user port being determined as the receiving port; or sending, by the PE, the packet through the upstream port in response to the upstream port being associated to the second vPort a first cascade port being determined as the receiving port; or
sending, by the PE, the packet through the second cascade port in response to the second vPort being associated with the second cascade port and the first cascade port being determined as the receiving port; or
sending, by the PE, the packet being removed from the first tag and the second tag through the second user port in response to the second vPort being associated to the second user port and the first cascade port being determined as the receiving port;
wherein the first tag carries a source ECID associated with the first vPort, and the second tag carries the VLAN identifier associated with the first vPort.

### Claim 4 (depends on 1)

The method according to claim 1, further comprising:
sending, by the PE, the packet being added with a first tag and a second tag through an upstream port in response to that the second forwarding entry is not acquired from the forwarding table and the receiving port is a first user port; or
sending, by the PE, the packet through the upstream port in response to that the second forwarding entry is not acquired from the forwarding table and the receiving port is a first cascade port;
wherein the first tag carries a source ECID associated with the first vPort, and the second tag carries the VLAN identifier associated with the first vPort.

### Claim 5 (depends on 1)

The method according to claim 1, wherein searching the forwarding table for the second forwarding entry matching the destination MAC address of the packet and the VLAN identifier of the VLAN to which the packet belongs comprises:
searching, by the PE, the forwarding table for a second forwarding entry matching the destination MAC address of the packet and the VLAN identifier associated with the first vPort in response to the receiving port being a first user port; or
searching, by the PE, the forwarding table for a second forwarding entry matching the destination MAC address of the packet and the VLAN identifier in a second tag carried by the packet in response to the receiving port being a cascade port,
wherein the second tag carries the VLAN identifier associated with the first vPort.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the forwarding entry adding condition comprises any one or more of the following:
there is no forwarding entry in which the MAC address is the source MAC address of the packet in the forwarding table; or
the receiving port is a user port, and the forwarding entry in which the MAC address is the source MAC address of the packet in the forwarding table is learned from a packet received through an upstream port.

### Claim 7

A Port Extender (PE), comprising a processor and a forwarding chip, wherein
receiving, by the forwarding chip, a packet;
determining, by the forwarding chip, a first Virtual Port (vPort) associated to a receiving port through which the packet is received;
sending, by the forwarding chip, the packet to the processor;
adding, by the processor, a first forwarding entry in a forwarding table in response to a forwarding entry adding condition being satisfied, by recording the first vPort as an egress port in the first forwarding entry, recording a source MAC address of the packet as a Media Access Control (MAC) address in the first forwarding entry, and recording a Virtual Local Area Network (VLAN) identifier of a VLAN associated with the first vPort as a VLAN identifier in the first forwarding entry;
searching, by the forwarding chip, the forwarding table for a second forwarding entry matching a destination MAC address of the packet and the VLAN identifier of a VLAN to which the packet belongs;
searching, by the forwarding chip, a port associating relationship table for a port associated to a second vPort in the second forwarding entry; and
forwarding, by the forwarding chip, the packet through the port associated to the second vPort.

### Claim 8 (depends on 7)

The PE according to claim 7, wherein the forwarding chip determining the first vPort comprises:
searching, by the forwarding chip, the port associating relationship table to determine the first vPort being associated to a first user port in response to the receiving port being the first user port; or
determining, by the forwarding chip, the first vPort which is assigned in advance to a characteristic parameter carried in the packet in response to the receiving port being the first user port; or
determining, by the forwarding chip, the first vPort which is associated to a source E-tag Channel Identifier (ECID) carried in a first tag of the packet in response to the receiving port being a first cascade port.

### Claim 9 (depends on 7)

The PE according to claim 7, wherein forwarding, by the forwarding chip, the packet through the port associated to the second vPort comprises any one of the following:
sending, by the forwarding chip, the packet being added with a first tag and a second tag through an upstream port in response to the upstream port being associated to the second vPort and a first user port being determined as the receiving port; or
sending, by the forwarding chip, the packet being added with the first tag and the second tag through a second cascade port in response to the second cascade port being associated to the second vPort and the first user port being determined as the receiving port; or
sending, by the forwarding chip, the packet through a second user port in response to the second user port being associated to the second vPort and the first user port being determined as the receiving port; or
sending, by the forwarding chip, the packet through the upstream port in response to the upstream port being associated to the second vPort and a first cascade port being determined as the receiving port; or
sending, by the forwarding chip, the packet through the second cascade port in response to the second vPort being associated with the second cascade port and the first cascade port being determined as the receiving port; or
sending, by the forwarding chip, the packet being removed from the first tag and the second tag through the second user port in response to the second vPort associated to the second user port and the first cascade port being determined as the receiving port;
wherein the first tag carries a source ECID associated with the first vPort, and the second tag carries the VLAN identifier associated with the first vPort.

### Claim 10 (depends on 7)

The PE according to claim 7, wherein
sending, by the forwarding chip, the packet being added with a first tag and a second tag through an upstream port in response to that the second forwarding entry is not acquired from the forwarding table and the receiving port is a first user port; or
sending, by the forwarding chip, the packet through the upstream port in response to that the second forwarding entry is not acquired from the forwarding table and the receiving port is a first cascade port;
wherein the first tag carries a source ECID associated with the first vPort, and the second tag carries the VLAN identifier associated with the first vPort.

### Claim 11 (depends on 7)

The PE according to claim 7, wherein searching the forwarding table for the second forwarding entry matching the destination MAC address of the packet and the VLAN identifier of the VLAN to which the packet belongs comprises:
searching, by the forwarding chip, the forwarding table for a second forwarding entry matching the destination MAC address of the packet and the VLAN identifier associated with the first vPort in response to the receiving port being a first user port; or
searching, by the forwarding chip, the forwarding table for a second forwarding entry matching the destination MAC address of the packet and the VLAN identifier in a second tag carried in the packet in response to the receiving port being a cascade port, wherein the second tag carries the VLAN identifier associated with the first vPort.

### Claim 12 (depends on 7)

The PE according to claim 7, wherein the forwarding entry adding condition comprises any one or more of the following:
there is no forwarding entry in which the MAC address is the source MAC address of the packet in the forwarding table; or
the receiving port is a user port, and the forwarding entry in which the MAC address is the source MAC address of the packet in the forwarding table is learned from a packet received through an upstream port.
