# US 9,356,802 B2 · Method, apparatus, and system for selecting network device

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

- Number: US 9,356,802 B2
- Document ID: US9356802B2
- Status: Granted
- Kind: B2
- Application number: 13/937,938
- Filed: 2013-07-09
- Published: 2013-11-07
- Granted: 2016-05-31
- Earliest claimed: 2011-01-11
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Yuanlong Jiang; Liangyuan Li
- Web page: https://patentgrep.com/patent/US9356802B2

## CPC

- H04L 12/4675: {Dynamic sharing of VLAN information amongst network nodes (configuration of the network or of network elements H04L41/08)}
- H04L 45/68: {Pseudowire emulation, e.g. IETF WG PWE3}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Embodiments of the present invention disclose a method, an apparatus, and a system for selecting a network device. The method includes: receiving, by a second network device, a network device selection message sent by a first network device, where the network device selection message contains a VLAN mapping capability identifier of the first network device; and selecting, by the second network device, according to the VLAN mapping capability identifier and local VLAN mapping capability, a network device for executing VLAN mapping. By using the technical solutions provided in the embodiments of the present invention, execution of VLAN mapping for a bidirectional pseudo wire (PW) between two network devices on a same network device may be implemented, and there are only two VLAN identifiers on the bidirectional PW, thereby ensuring consistency of VLAN mapping and making it simpler and easier to maintain and detect the PW.

## Claims

### Claim 1

A method for selecting a network device, comprising:
receiving, by a second network device, a network device selection message sent by a first network device, wherein the network device selection message contains a virtual local area network (VLAN) mapping capability identifier of the first network device; and
selecting, by the second network device, according to the VLAN mapping capability identifier and local VLAN mapping capability, the network device for executing VLAN mapping;
wherein the network device selection message further contains a device identifier of the first network device; and accordingly, the second network device selects, according to the VLAN mapping capability identifier, the device identifier, the local VLAN mapping capability, and a local device identifier, the network device for executing the VLAN mapping;
wherein the selecting, by the second network device, according to the VLAN mapping capability identifier, the device identifier, the local VLAN mapping capability, and the local device identifier, the network device for executing the VLAN mapping comprises:
when the second network device determines, according to the VLAN mapping capability identifier and the local VLAN mapping capability, that both the second network device and the first network device have the VLAN mapping capability, selecting, according to sizes or a sequence of the device identifier and the local device identifier, the network device for executing the VLAN mapping.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the selecting, by the second network device, according to the VLAN mapping capability identifier and the local VLAN mapping capability, the network device for executing the VLAN mapping comprises any one of:
when the second network device determines, according to the VLAN mapping capability identifier and the local VLAN mapping capability, that only the second network device has VLAN mapping capability, selecting the second network device as the network device for executing the VLAN mapping; and
when the second network device determines, according to the VLAN mapping capability identifier and the local VLAN mapping capability, that only the first network device has the VLAN mapping capability, selecting the first network device as the network device for executing the VLAN mapping.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the network device selection message further contains a device identifier of the first network device; and
accordingly, the second network device selects, according to the VLAN mapping capability identifier, the device identifier, the local VLAN mapping capability, and a local device identifier, the network device for executing the VLAN mapping.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the selecting, by the second network device, according to the VLAN mapping capability identifier, the device identifier, the local VLAN mapping capability, and the local device identifier, the network device for executing the VLAN mapping comprises:
when the second network device determines, according to the VLAN mapping capability identifier and the local VLAN mapping capability, that both the second network device and the first network device have the VLAN mapping capability, selecting, according to sizes or a sequence of the device identifier and the local device identifier, the network device for executing the VLAN mapping.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the network device selection message comprises a label distribution protocol (LDP) message or a border gateway protocol (BGP) message.

### Claim 6

An apparatus for selecting a network device, comprising:
a receiving module, configured to receive a network device selection message sent by a first network device, wherein the network device selection message contains a virtual local area network (VLAN) mapping capability identifier of the first network device; and
a selecting module, configured to select, according to the VLAN mapping capability identifier and local VLAN mapping capability, the network device for executing VLAN mapping;
wherein the network device selection message further contains a device identifier of the first network device; and accordingly, the selecting module is configured to select, according to the VLAN mapping capability identifier, the device identifier, the local VLAN mapping capability, and a local device identifier, the network device for executing the VLAN mapping; and
wherein the network device for executing the VLAN mapping is selected according to sizes or a sequence of the device identifier and the local device identifier.

### Claim 7

A system for selecting a network device, comprising:
a first network device, configured to send a network device selection message to a second network device, wherein the network device selection message contains a virtual local area network (VLAN) mapping capability identifier of the first network device; and
a second network device, configured to receive the network device selection message, and select, according to the VLAN mapping capability identifier and local VLAN mapping capability, the network device for executing VLAN mapping;
wherein the network device selection message further contains a device identifier of the first network device; and accordingly the second network device is configured to receive the network device selection message, and select, according to the VLAN mapping capability identifier, the device identifier, the local VLAN mapping capability, and a local device identifier, the network device for executing the VLAN mapping; and
wherein the network device for executing the VLAN mapping is selected according to sizes or a sequence of the device identifier and the local device identifier.
