CN108965093B - VLAN (virtual local area network) distribution method and device - Google Patents

VLAN (virtual local area network) distribution method and device Download PDF

Info

Publication number
CN108965093B
CN108965093B CN201810973296.3A CN201810973296A CN108965093B CN 108965093 B CN108965093 B CN 108965093B CN 201810973296 A CN201810973296 A CN 201810973296A CN 108965093 B CN108965093 B CN 108965093B
Authority
CN
China
Prior art keywords
message
vlan tag
tag
vlan
label
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810973296.3A
Other languages
Chinese (zh)
Other versions
CN108965093A (en
Inventor
阳进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Information Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201810973296.3A priority Critical patent/CN108965093B/en
Publication of CN108965093A publication Critical patent/CN108965093A/en
Application granted granted Critical
Publication of CN108965093B publication Critical patent/CN108965093B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • H04L12/4645Details on frame tagging
    • H04L12/465Details on frame tagging wherein a single frame includes a plurality of VLAN tags
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application provides a VLAN allocation method and a device, comprising the following steps: when a message is forwarded through a local uplink port, whether a virtual local area network TAG VLAN TAG carried in a designated TAG of the message is a designated VLAN TAG is checked; if the VLAN TAG carried in the appointed label of the message is the appointed VLAN TAG, the appointed label of the message is removed, and the message is forwarded to the CB through the local uplink port, so that the CB determines the VLAN TAG associated with the message when determining that the message does not carry the appointed label, and forwards the message according to the determined VLAN TAG. By using the method provided by the application, the CB can allocate the VLAN TAG to the message which does not carry the VLAN TAG.

Description

VLAN (virtual local area network) distribution method and device
Technical Field
The present application relates to the field of computer communications, and in particular, to a VLAN assignment method and apparatus.
Background
802.1BR defines an Extended Bridge (CB) consisting of CB (control Bridge) and PE (Port Extender).
Fig. 1 is a schematic diagram of an extended bridge. As shown in fig. 1, in this extended bridge, PEs are connected to CBs via Upstream ports (Upstream ports), and CBs are connected to PEs via cascade ports. The PE is connected with a user host through a user side port. In this way, the PE provides the CB with an extension of the number of ports and the port access capabilities.
In a conventional message forwarding mechanism, after a PE device receives a message that does not carry a VLAN (Virtual Local Area Network) TAG from a Local user side port, the PE may assign the message with a VLAN TAG, and add a C-TAG and an E-TAG to the message. Wherein, the C-TAG carries the assigned VLAN TAG, and the E-TAG carries the ECID (E-TAG Channel Identifier ) associated with the virtual port bound to the user side port. Then the PE forwards the message carrying the C-TAG label and the E-TAG label to the CB, and the CB forwards the message.
The traditional message forwarding mechanism is that a PE allocates a VLAN TAG for a message which does not carry the VLAN TAG, and carries the allocated VLAN TAG in a C-TAG of the message to be sent to a CB. However, in the conventional message forwarding mechanism, there is no mechanism in which the CB allocates the VLAN TAG uniformly to the message which does not carry the VLAN TAG.
Disclosure of Invention
In view of this, the present application provides a VLAN assignment method and apparatus, so as to implement that a CB assigns a VLAN TAG to a message that does not carry the VLAN TAG.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the present application, there is provided a VLAN assignment method, which is applied to a port expansion bridge PE device in an expansion bridge, and includes:
when a message is forwarded through a local uplink port, whether a virtual local area network TAG VLAN TAG carried in a designated TAG of the message is a designated VLAN TAG is checked;
if the VLAN TAG carried in the appointed label of the message is the appointed VLAN TAG, the appointed label of the message is removed, and the message is forwarded to the CB through the local uplink port, so that the CB allocates the VLAN TAG associated with the message when determining that the message does not carry the appointed label, and forwards the message according to the allocated VLAN TAG.
Optionally, the designated label of the packet is added in the following manner:
when the message received through the local user side port does not carry the VLAN TAG, adding a designated label recorded with the designated VLAN TAG for the message;
and when the message received through the local user side port carries the VLAN TAG, adding a designated label for recording the VLAN TAG carried by the message to the message.
Optionally, the method further includes:
if the VLAN TAG carried in the appointed label of the message is not the appointed VLAN TAG, the message carrying the appointed label is forwarded to the CB through the local uplink port, so that the CB forwards the message according to the VLAN TAG carried in the appointed label of the message.
According to a second aspect of the present application, there is provided a VLAN assignment method applied to a control bridge CB device in an extended bridge, including:
receiving a message sent by PE equipment;
if the message does not carry the appointed label, determining a VLAN TAG associated with the message, and forwarding the message according to the determined VLAN TAG; the designated TAG is used for recording the VLAN TAG associated with the message.
Optionally, the determining the VLAN TAG associated with the packet includes:
in the preset corresponding relation between the MAC address and the VLAN TAG, the source MAC address of the message is taken as a keyword, and the VLAN TAG corresponding to the keyword is searched;
and determining the searched VLAN TAG as the VLAN TAG associated with the message.
According to a third aspect of the present application, there is provided a VLAN assignment apparatus applied to a port expansion bridge PE device in an expansion bridge, including:
a checking unit, configured to check whether a VLAN TAG carried in a TAG of a message is a designated VLAN TAG when the message is forwarded through a local uplink port;
a deleting unit, configured to remove the designated TAG of the message if the VLAN TAG carried in the designated TAG of the message is the designated VLAN TAG;
and the forwarding unit is used for forwarding the message to the CB through the local uplink port so that the CB allocates a VLAN TAG associated with the message when determining that the message does not carry a specified label, and forwards the message according to the allocated VLAN TAG.
Optionally, the designated label of the packet is added in the following manner:
when the message received through the local user side port does not carry the VLAN TAG, adding a designated label recorded with the designated VLAN TAG for the message;
and when the message received through the local user side port carries the VLAN TAG, adding a designated label for recording the VLAN TAG carried by the message to the message.
Optionally, the forwarding unit is further configured to forward, if the VLAN TAG carried in the specified label of the packet is not the specified VLAN TAG, the packet carrying the specified label to the CB through the local uplink port, so that the CB forwards the packet according to the VLAN TAG carried in the specified label of the packet.
According to a fourth aspect of the present application, there is provided a VLAN assignment apparatus applied to a control bridge CB device in an extended bridge, including:
a receiving unit, configured to receive a message sent from a PE device;
a determining unit, configured to determine a VLAN TAG associated with the message if the message does not carry an assigned TAG, and forward the message according to the determined VLAN TAG; the designated TAG is used for recording the VLAN TAG associated with the message.
Optionally, the determining unit is specifically configured to, in a preset correspondence between the MAC address and the VLAN TAG, use the source MAC address of the packet as a keyword, and search for the VLAN TAG corresponding to the keyword; and determining the searched VLAN TAG as the VLAN TAG associated with the message.
The application aims to provide a VLAN allocation method, so that a CB can allocate a VLAN TAG for a message which is received from a PE and does not carry the VLAN TAG.
Specifically, the method and the device indicate that the message received by the PE device through the user side port does not carry the VLAN TAG by designating the VLAN TAG.
When the PE forwards the message through the local uplink interface. The PE can check whether the VLAN TAG carried in the appointed label of the message is the appointed VLAN TAG or not, if so, the appointed label of the message is removed, so that when the PE receives the message which does not carry the VLAN TAG, the PE can still enable the message not to carry the VLAN TAG and send the message to the CB device. When the CB device receives a message not carrying a VLAN TAG, it may assign the VLAN TAG to the message.
Drawings
Fig. 1 is a schematic diagram of an extended bridge shown in an exemplary embodiment of the present application;
fig. 2 is a flow chart illustrating a VLAN assignment method according to an exemplary embodiment of the present application;
fig. 3 is a flow chart illustrating a VLAN assignment method according to an exemplary embodiment of the present application;
fig. 4 is a diagram illustrating a VLAN assignment method according to an exemplary embodiment of the present application;
fig. 5 is a block diagram of a VLAN assignment device according to an exemplary embodiment of the present application.
Fig. 6 is a block diagram of another VLAN assignment device according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The application aims to provide a VLAN allocation method, so that a CB can allocate a VLAN TAG for a message which is received from a PE and does not carry the VLAN TAG.
Specifically, the method and the device indicate that the message received by the PE device through the user side port does not carry the VLAN TAG by designating the VLAN TAG.
When the PE forwards the message through the local uplink interface. The PE can check whether the VLAN TAG carried in the appointed label of the message is the appointed VLAN TAG or not, if so, the appointed label of the message is removed, so that when the PE receives the message which does not carry the VLAN TAG, the PE can still enable the message not to carry the VLAN TAG and send the message to the CB device. When the CB device receives a message not carrying a VLAN TAG, it may assign the VLAN TAG to the message.
Referring to fig. 2, fig. 2 is a VLAN assignment method provided in the present application, which can implement that a CB assigns a VLAN TAG to a message that does not carry the VLAN TAG. The method can be applied to PE devices in an 802.1BR defined extended bridge, and specifically can include the following steps.
Step 201: when the PE device forwards the packet through the local uplink port, the PE device may check whether the VLAN TAG carried in the designated TAG of the packet is the designated VLAN TAG.
The designated TAG is configured to record a VLAN TAG associated with the received packet, and in a specific implementation, the designated TAG may be a C-TAG or other TAGs, which is only exemplarily described herein, and is not specifically limited.
The designated VLAN TAG refers to a preset VLAN TAG, such as 4095. Here, the designated VLAN TAG is only exemplified, and is not particularly limited. The designated VLAN TAG is mainly used for indicating that the message received by the user port does not carry the VLAN TAG.
The addition of the designated tag may be added as follows:
the PE device may receive the message through a local user-side port. If the received message carries the VLAN TAG, the PE device may add a designated TAG to the message, and the VLAN TAG carried by the message is recorded in the added designated TAG. If the received message does not carry the VLAN TAG, the PE device may add a designated TAG to the message, where the designated TAG records the designated VLAN TAG.
When the PE equipment forwards the message through the local uplink port, the PE equipment can detect whether the VLAN TAG carried in the appointed label of the message is the appointed VLAN TAG or not. If so, step 202 is performed, if not, step 203 is designated.
Step 202: if the VLAN TAG carried in the appointed label of the message is the appointed VLAN TAG, the PE device removes the appointed label of the message and forwards the message to the CB through the local uplink port.
When the implementation is performed, if the VLAN TAG carried in the designated TAG of the packet is the designated VLAN TAG, the PE device may remove the designated TAG.
In addition, the PE device may further add an E-TAG to the message, where the E-TAG records an ECID associated with a virtual port bound to a user-side port that receives the message.
Then, the PE device may forward the packet carrying the E-TAG label to the CB device through the local uplink port without the designated label.
Step 203: if the VLAN TAG carried in the designated TAG of the packet is not the designated VLAN TAG, the PE device may forward the packet carrying the designated TAG to the CB through the local uplink port.
If the VLAN TAG carried in the designated TAG of the packet is not the designated VLAN TAG, the PE device may retain the designated TAG.
In addition, the PE device may further add an E-TAG to the message, where the E-TAG records an ECID associated with a virtual port bound to a user-side port that receives the message.
And then, the PE equipment forwards the message added with the designated label and the E-TAG label to the CB equipment through a local uplink port.
The timing sequence of adding the E-TAG to the packet by the PE device is not specifically limited here. Only the E-TAG label is added before forwarding the message.
Then, the PE can send the message carrying the designated TAG and the E-TAG TAG to the CB device.
Thus, the description of the flow of fig. 2 is completed.
Referring to fig. 3, fig. 3 is a flowchart illustrating a VLAN assignment method according to an exemplary embodiment of the present application. The method can realize that the CB allocates the VLAN TAG for the message which does not carry the VLAN TAG. The method can be applied to the CB device in the 802.1BR defined extended bridge, and specifically can include the following steps.
Step 301: the CB equipment can receive the message sent by the PE equipment.
In implementation, the CB device may receive a packet from the PE device from the local cascade interface. The CB device may then check whether the received packet carries a specified label.
Step 302: if the message does not carry the designated TAG, the CB equipment determines a VLAN TAG associated with the message and forwards the message according to the determined VLAN TAG; the designated TAG is used for recording the VLAN TAG associated with the message.
In this embodiment of the application, if the received message does not carry a specific TAG, the CB device may determine a VLAN TAG associated with the message, and forward the message according to the determined VLAN TAG.
When the determination is made, the CB device may use the source MAC address of the message as a keyword in the preset correspondence between the MAC address and the VLAN TAG, search for the VLAN TAG corresponding to the keyword, and use the found VLAN TAG as the VLAN TAG associated with the message.
If the CB device is in the preset corresponding relation between the MAC address and the VLAN TAG, the VLAN TAG corresponding to the source MAC address of the message is not found. The CB device may also determine the VLAN TAG associated with the packet by other methods. For example, the VLAN TAG corresponding to the cascade port that receives the message is used as the VLAN TAG of the message.
Here, the determination of the VLAN TAG associated with the packet by the CB device is only an exemplary illustration, and the determination method is not specifically limited.
In this embodiment of the present application, if the received message carries an assigned TAG, the CB device forwards the message according to the VLAN TAG recorded in the assigned TAG of the message.
For example, the CB device may check whether a preset VLAN TAG list records a VLAN TAG recorded in a designated TAG carried by the packet, and if so, forward the packet according to the VLAN TAG of the packet, and if not, discard the packet. The VLAN TAG list records the VLAN TAG which is allowed to be forwarded by the CB.
As can be seen from the above description, in one aspect, the present application indicates, by designating the VLAN TAG, that the packet received by the PE device through the user side port does not carry the VLAN TAG. When the PE forwards the message through the local uplink port, the PE can check whether the VLAN TAG carried in the appointed label of the message is the appointed VLAN TAG or not, and if so, the appointed label of the message is removed. Therefore, when the PE receives the message not carrying the VLAN TAG, the PE can still enable the message not carrying the VLAN TAG to be sent to the CB device. When the CB device receives a message not carrying a VLAN TAG, it may assign the VLAN TAG to the message.
On the other hand, the network chip in the PE device usually performs forwarding and other operations based on the VLAN TAG of the packet. The method and the device have the advantages that the appointed label recorded with the appointed VLAN TAG is added to the message which does not carry the VLAN TAG, and the appointed label is deleted when the message is forwarded, and the method and the device have the advantages that: the method can be compatible with hardware (such as a network chip on the PE device) and software on the existing PE device.
Thus, the description of the flow of fig. 3 is completed.
The VLAN assignment method proposed in the present application will be described in detail below by way of specific examples.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating a VLAN assignment method according to an exemplary embodiment of the present application.
As shown in fig. 4, PE401 is connected to a cascade port404 of CB401 through a local upstream port 403. PE401 is connected to subscriber host 1 through local subscriber side port401, and PE401 is connected to subscriber host 2 through local subscriber side port 402.
It is assumed that the packet 1 sent by the user host 1 to the PE401 does not carry the VLAN TAG. The user host 2 sends a message 2 to the PE401, where the VLAN TAG carried in the message 2 is assumed to be 13.
For message 1:
the PE401 receives the message 1 sent by the user host 1 through the local user side Port401, and checks that the message 1 does not carry the VLAN TAG. The PE401 adds a C-TAG to the message 1, where the C-TAG records a designated VLAN TAG (4095). The designated VLAN TAG is 4095, and the designated TAG is a C-TAG TAG. The VLAN TAG 4095 indicates that the packet 1 received by the PE401 does not carry a VLAN TAG, and the VLAN TAG 4095 is further used to indicate that the C-TAG including the VLAN TAG 4095 added to the packet 1 is to be removed when the PE401 sends the packet 1 to the CB 401.
When the PE401 forwards the message 1 through the local uplink PE403, the PE401 can check whether the VLAN TAG carried in the C-TAG of the message 1 is 4095.
In this example, the VLAN TAG carried in the C-TAG of message 1 is 4095, and PE401 may remove the C-TAG of message 1. In addition, the PE401 may also add an E-TAG to the message 1, where the E-TAG records an ECID associated with the virtual Port bound by the Port 401.
Then, the PE401 may send the message 1, which has removed the C-TAG and only carries the E-TAG, to the CB401 through the local upstream port 403.
It should be noted that, in the existing manner, when receiving a packet carrying a VLAN TAG, a PE device sends the packet carrying the VLAN TAG to a CB. When receiving a message not carrying a VLAN TAG, the PE device allocates the VLAN TAG for the message, carries the VLAN TAG in the message and then sends the VLAN TAG to the CB. Therefore, the messages sent to the CB by the PE all carry the VLAN TAG, and the CB cannot allocate the VLAN TAG to the messages which do not carry the VLAN TAG before entering the PE.
In the application, the PE401 adds a C-TAG containing a designated VLAN TAG to the message 1 not carrying the VLAN TAG, on one hand, the designated VLAN TAG may indicate that the message 1 is a message not carrying the VLAN TAG, so as to indicate that the C-TAG is deleted when the message 1 is forwarded to the CB 401; on the other hand, in order to be compatible with the existing mode of forwarding the message by the PE, the C-TAG containing the designated VLAN TAG is added to the message 1, so that the PE401 can no longer allocate the VLAN TAG to the message 1 not carrying the VLAN TAG.
When the message 1 is sent to the CB401, the PE401 finds that the message 1 carries a specified VLAN TAG, and can delete the C-TAG of the message 1, so as to ensure that the message 1 not carrying the VLAN TAG still does not carry the VLAN TAG when being sent from the PE401, so that the CB401 can allocate the VLAN TAG to the message 1 not carrying the VLAN TAG.
After the CB401 receives the message 1 through the local cascade interface port404, the CB401 may check whether the message 1 carries a C-TAG.
In this example, since the message 1 does not carry the C-TAG, the CB401 may parse the message 1 and read the source MAC address in the message 1. Then, the CB401 uses the source MAC address of the message 1 as a keyword in the preset correspondence between the MAC address and the VLAN TAG, and searches for the VLAN TAG corresponding to the keyword. The CB401 may forward the message 1 according to the found VLAN TAG and the ECID recorded in the E-TAG of the message 1.
For message 2:
when the PE401 receives the packet 2 sent by the user host 2 through the local user side Port402, the PE401 may check whether the packet 2 carries the VLAN TAG.
In this example, since the packet 2 carries the VLAN TAG (i.e. 13), the PE401 may add a C-TAG to the packet 2, where the C-TAG records the VLAN TAG (i.e. 13) carried by the packet 2.
When the PE401 forwards the message 2 through the local upstream port403, the PE401 may check whether the VLAN TAG carried in the C-TAG of the message 2 is 4095.
In this example, the VLAN TAG carried in the C-TAG of message 2 is 13, instead of 4095, and PE401 may retain the C-TAG of message 2. In addition, the PE401 may also add an E-TAG to the packet 2, where the E-TAG records an ECID associated with the virtual Port bound by the Port 402.
Then, the PE401 may send the packet 2 carrying the C-TAG label and the E-TAG label to the CB401 through the local upstream port 403.
After CB401 receives packet 2 through local cascade interface port404, CB401 may check whether packet 2 carries a C-TAG.
In this example, since the C-TAG is carried in the message 2, the CB401 may parse the message 2 and read the VLAN TAG (i.e. 13) carried in the C-TAG of the message 2.
Then, the CB401 may forward the message according to the VLAN TAG (i.e. 13) carried in the C-TAG of the message 2 and the ECID carried in the E-TAG of the message 2.
As can be seen from the above description, the present application indicates that the packet received by the PE device through the user-side port does not carry the VLAN TAG by specifying the VLAN TAG (i.e. 4095).
When the PE forwards the message through the local uplink interface. The PE may check whether the VLAN TAG carried in the C-TAG of the message is the designated VLAN TAG (i.e. 4095), and if so, remove the C-TAG of the message. Therefore, when the PE receives the message 1 which does not carry the VLAN TAG, the PE can also enable the message 1 to still not carry the VLAN TAG and to be sent to the CB 401. When receiving a message 1 not carrying a VLAN TAG, the CB401 may assign the VLAN TAG to the message 1.
Referring to fig. 5, fig. 5 is a block diagram of a VLAN assignment device according to an exemplary embodiment of the present application. The device can be applied to PE equipment in an extended bridge and can comprise the following units.
A checking unit 501, configured to check whether a VLAN TAG carried in a TAG of a virtual local area network is a designated VLAN TAG when a packet is forwarded through a local uplink port;
a deleting unit 502, configured to remove the designated TAG of the message if the VLAN TAG carried in the designated TAG of the message is the designated VLAN TAG;
a forwarding unit 503, configured to forward the packet to the CB through the local uplink port, so that the CB allocates a VLAN TAG associated with the packet when determining that the packet does not carry an assigned TAG, and forwards the packet according to the allocated VLAN TAG.
Optionally, the designated label of the packet is added in the following manner:
when the message received through the local user side port does not carry the VLAN TAG, adding a designated label recorded with the designated VLAN TAG for the message;
and when the message received through the local user side port carries the VLAN TAG, adding a designated label for recording the VLAN TAG carried by the message to the message.
Optionally, the forwarding unit 503 is further configured to forward, if the VLAN TAG carried in the specified label of the packet is not the specified VLAN TAG, the packet carrying the specified label to the CB through the local uplink port, so that the CB forwards the packet according to the VLAN TAG carried in the specified label of the packet.
Referring to fig. 6, fig. 6 is a block diagram of another VLAN assignment device according to an exemplary embodiment of the present application. The device can be applied to CB equipment in an extended bridge and comprises the following units.
A receiving unit 601, configured to receive a message sent from a PE device;
a determining unit 602, configured to determine a VLAN TAG associated with the message if the message does not carry an assigned TAG, and forward the message according to the determined VLAN TAG; the designated TAG is used for recording the VLAN TAG associated with the message.
Optionally, the determining unit 602 is specifically configured to, in a preset correspondence between a MAC address and a VLAN TAG, use a source MAC address of the packet as a keyword, and search for the VLAN TAG corresponding to the keyword; and determining the searched VLAN TAG as the VLAN TAG associated with the message.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A VLAN allocation method is applied to a port expansion bridge PE device in an expansion bridge, and comprises the following steps:
when a message is forwarded through a local uplink port, whether a virtual local area network TAG VLAN TAG carried in a designated TAG of the message is a designated VLAN TAG is checked;
if the VLAN TAG carried in the appointed label of the message is the appointed VLAN TAG, the appointed label of the message is removed, and the message is forwarded to the CB through the local uplink port, so that the CB allocates the VLAN TAG associated with the message when determining that the message does not carry the appointed label, and forwards the message according to the allocated VLAN TAG.
2. The method of claim 1, wherein the specified label of the packet is added by:
when the message received through the local user side port does not carry the VLAN TAG, adding a designated label recorded with the designated VLAN TAG for the message;
and when the message received through the local user side port carries the VLAN TAG, adding a designated label for recording the VLAN TAG carried by the message to the message.
3. The method of claim 1, further comprising:
if the VLAN TAG carried in the appointed label of the message is not the appointed VLAN TAG, the message carrying the appointed label is forwarded to the CB through the local uplink port, so that the CB forwards the message according to the VLAN TAG carried in the appointed label of the message.
4. A VLAN allocation method is applied to a Control Bridge (CB) device in an extended bridge and comprises the following steps:
receiving a message sent by PE equipment;
if the message does not carry the appointed label, distributing the VLAN TAG associated with the message, and forwarding the message according to the distributed VLAN TAG; the appointed label is used for recording the VLAN TAG associated with the message;
when the PE forwards the message through the local uplink port, and when the VLAN TAG carried in the appointed label of the message is determined to be the appointed VLAN TAG, the appointed label in the message is deleted to form the message without the appointed label.
5. The method of claim 4, wherein said assigning the VLAN TAG associated with the packet comprises:
in the preset corresponding relation between the MAC address and the VLAN TAG, the source MAC address of the message is taken as a keyword, and the VLAN TAG corresponding to the keyword is searched;
and allocating the searched VLAN TAG to the message.
6. A VLAN assignment apparatus, applied to a port expansion bridge PE device in an expansion bridge, comprising:
a checking unit, configured to check whether a VLAN TAG carried in a TAG of a message is a designated VLAN TAG when the message is forwarded through a local uplink port;
a deleting unit, configured to remove the designated TAG of the message if the VLAN TAG carried in the designated TAG of the message is the designated VLAN TAG;
and the forwarding unit is used for forwarding the message to the CB through the local uplink port so that the CB allocates a VLAN TAG associated with the message when determining that the message does not carry a specified label, and forwards the message according to the allocated VLAN TAG.
7. The apparatus of claim 6, wherein the specified label of the packet is added by:
when the message received through the local user side port does not carry the VLAN TAG, adding a designated label recorded with the designated VLAN TAG for the message;
and when the message received through the local user side port carries the VLAN TAG, adding a designated label for recording the VLAN TAG carried by the message to the message.
8. The apparatus according to claim 6, wherein the forwarding unit is further configured to forward, if the VLAN TAG carried in the specified label of the packet is not the specified VLAN TAG, the packet carrying the specified label to the CB through the local upstream port, so that the CB forwards the packet according to the VLAN TAG carried in the specified label of the packet.
9. A VLAN assignment apparatus applied to a control bridge, CB, device in an extended bridge, comprising:
a receiving unit, configured to receive a message sent from a PE device;
a determining unit, configured to assign a VLAN TAG associated with the message if the message does not carry an assigned TAG, and forward the message according to the assigned VLAN TAG; the appointed label is used for recording the VLAN TAG associated with the message;
when the PE forwards the message through the local uplink port, and when the VLAN TAG carried in the appointed label of the message is determined to be the appointed VLAN TAG, the appointed label in the message is deleted to form the message without the appointed label.
10. The apparatus according to claim 9, wherein the determining unit is specifically configured to look up, in a preset correspondence between the MAC address and the VLAN TAG, the VLAN TAG corresponding to a key using a source MAC address of the packet as the key; and determining the searched VLAN TAG as the VLAN TAG associated with the message.
CN201810973296.3A 2018-08-24 2018-08-24 VLAN (virtual local area network) distribution method and device Active CN108965093B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810973296.3A CN108965093B (en) 2018-08-24 2018-08-24 VLAN (virtual local area network) distribution method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810973296.3A CN108965093B (en) 2018-08-24 2018-08-24 VLAN (virtual local area network) distribution method and device

Publications (2)

Publication Number Publication Date
CN108965093A CN108965093A (en) 2018-12-07
CN108965093B true CN108965093B (en) 2021-03-23

Family

ID=64473151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810973296.3A Active CN108965093B (en) 2018-08-24 2018-08-24 VLAN (virtual local area network) distribution method and device

Country Status (1)

Country Link
CN (1) CN108965093B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500172B (en) * 2022-01-30 2023-08-08 普联技术有限公司 IPTV networking method, IPTV networking device, network equipment and storage medium
CN114666269B (en) * 2022-04-11 2024-05-14 浪潮思科网络科技有限公司 VLAN message forwarding method, device, equipment and medium based on IP subnet

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873374A (en) * 2014-03-27 2014-06-18 杭州华三通信技术有限公司 Message processing method and device in virtualized system
CN104092595A (en) * 2014-07-21 2014-10-08 杭州华三通信技术有限公司 Message processing method and device based on 802.1 BR virtualization system
CN107528784A (en) * 2016-06-21 2017-12-29 新华三技术有限公司 Message forwarding method and device
CN107547449A (en) * 2017-06-30 2018-01-05 新华三技术有限公司 Mirror image message retransmission method, device and system
CN108055215A (en) * 2017-12-26 2018-05-18 新华三技术有限公司 Message forwarding method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873374A (en) * 2014-03-27 2014-06-18 杭州华三通信技术有限公司 Message processing method and device in virtualized system
CN104092595A (en) * 2014-07-21 2014-10-08 杭州华三通信技术有限公司 Message processing method and device based on 802.1 BR virtualization system
CN107528784A (en) * 2016-06-21 2017-12-29 新华三技术有限公司 Message forwarding method and device
CN107547449A (en) * 2017-06-30 2018-01-05 新华三技术有限公司 Mirror image message retransmission method, device and system
CN108055215A (en) * 2017-12-26 2018-05-18 新华三技术有限公司 Message forwarding method and device

Also Published As

Publication number Publication date
CN108965093A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
EP2192725B1 (en) Packet switch being partitioned into virtual LANs (VLANs)
WO2013136522A1 (en) Computer system and method for communicating data between computers
CN109981493B (en) Method and device for configuring virtual machine network
CN109714239B (en) Management message issuing method, VNFM (virtual network management frequency) equipment and server
CN108259346B (en) Equivalent routing table item establishing method and device
CN108259218B (en) IP address allocation method and device
CN109032533B (en) Data storage method, device and equipment
CN108965093B (en) VLAN (virtual local area network) distribution method and device
CN107547675B (en) User equipment migration method and device
CN107040393A (en) A kind of route management method and equipment
CN108683617A (en) Message diversion method, device and shunting interchanger
CN107547400B (en) Virtual machine migration method and device
CN106302861B (en) Address allocation method and device
US8935696B2 (en) Communication method of virtual machines and server-end system
CN107086960B (en) Message transmission method and device
CN110519147A (en) Data frame transmission method, device, equipment and computer readable storage medium
CN109039947A (en) Network packet De-weight method, device, network shunt equipment and storage medium
CN108390811B (en) GRE tunnel establishment method and equipment thereof
CN101938411A (en) Method and equipment for processing ND snooping item
CN107070797A (en) A kind of method and system of message forwarding
CN108259338B (en) Private network application identification method and device
CN112637033B (en) VLAN (virtual local area network) distribution method, device and equipment based on hardware service board card
CN111865794B (en) Logical port association method, system, equipment and data transmission system
CN111654452B (en) Message processing method and device
CN114257545A (en) Message forwarding method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230531

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.