CN106850388B - Method and device for forwarding message by VPLS network - Google Patents

Method and device for forwarding message by VPLS network Download PDF

Info

Publication number
CN106850388B
CN106850388B CN201710106980.7A CN201710106980A CN106850388B CN 106850388 B CN106850388 B CN 106850388B CN 201710106980 A CN201710106980 A CN 201710106980A CN 106850388 B CN106850388 B CN 106850388B
Authority
CN
China
Prior art keywords
mac address
index information
forwarding table
message
destination
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
CN201710106980.7A
Other languages
Chinese (zh)
Other versions
CN106850388A (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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology 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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201710106980.7A priority Critical patent/CN106850388B/en
Publication of CN106850388A publication Critical patent/CN106850388A/en
Application granted granted Critical
Publication of CN106850388B publication Critical patent/CN106850388B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method and a device for forwarding a message by a VPLS network, and relates to the field of data communication. Wherein the method comprises the following steps: receiving a message; learning the source MAC address according to the source MAC address in the received message; when a received message carries destination index information, searching a corresponding destination MAC address forwarding table according to the destination index information, wherein the destination index information is the index information of the MAC address forwarding table corresponding to the destination MAC address; and sending a message according to the destination MAC address forwarding table. In the scheme, when the message carries the target index information, the MAC address forwarding table is searched according to the target index information for sending the message, so that the MAC address forwarding table is not inquired once according to the MAC address, and the forwarding efficiency is improved.

Description

Method and device for forwarding message by VPLS network
Technical Field
The invention relates to the field of data communication, in particular to a method and a device for forwarding a message by a VPLS network.
Background
Virtual Private LAN Service (VPLS) is one of metro ethernet technologies, which can effectively connect each access point and implement point-to-point, point-to-multipoint, and multipoint-to-multipoint ethernet services on the network topology. From a connectivity perspective, VPLS provides an emulated LAN connection for customers using an IP/MPLS wide area backbone network. From a service provider perspective, the LAN emulated by the VPLS provides convenient, flexible Ethernet services, and the emulated LAN connections are transparent to the various customer's branched local area networks across the wide area network, as if they were all connected to a same switch. The VPLS has the advantages of simple configuration, flexible networking, low construction and maintenance cost and the like, and is widely used.
In the forwarding process of a message in an existing VPLS network, Provider Edge (PE) devices need to perform source MAC address learning on the received message and select a route according to a destination MAC address. Because the MAC address forwarding table in the PE device stores the MAC address forwarding information of the VPLS broadcasting domain where the MAC address forwarding table is located, the lookup cardinality is large, and the MAC address characteristics cause that the MAC address lookup efficiency is low, the forwarding efficiency is low under the condition that the PE device needs to lookup the MAC address forwarding table twice in each message forwarding process.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for forwarding a packet in a VPLS network, where an address forwarding table corresponding to a destination MAC address is searched through destination index information, so that the address forwarding table is not searched according to the MAC address in a forwarding process once, and forwarding efficiency is improved, so as to solve the above problem.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a method for forwarding a message by a VPLS network is applied to forwarding the message by PE equipment, and comprises the following steps: receiving a message; learning the source MAC address according to the source MAC address in the received message; when a received message carries destination index information, searching a corresponding destination MAC address forwarding table according to the destination index information, wherein the destination index information is the index information of the MAC address forwarding table corresponding to the destination MAC address; and sending a message according to the destination MAC address forwarding table.
A device for forwarding a message by a VPLS network is applied to forwarding the message by PE equipment, and comprises: the receiving module is used for receiving the message; the learning module is used for learning the source MAC address according to the source MAC address in the received message; the searching module is used for searching a corresponding destination MAC address forwarding table according to destination index information when the received message carries the destination index information, wherein the destination index information is the index information of the MAC address forwarding table corresponding to the destination MAC address; and the sending module is used for sending a message according to the destination MAC address forwarding table.
According to the method and the device for forwarding the message by the VPLS network, provided by the embodiment of the invention, when the received message carries destination index information, the destination index information is index information of an MAC address forwarding table corresponding to a destination MAC address, and the PE equipment searches the corresponding destination MAC address forwarding table according to the destination index information so as to send the message according to the searched destination MAC address forwarding table corresponding to the destination index information, so that the MAC address forwarding table is searched once according to the MAC address in the forwarding process, and the forwarding efficiency is improved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a block diagram of a PE device according to a preferred embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for forwarding a packet in a VPLS network according to a first embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a forwarding process of forwarding a packet in a VPLS network according to a second embodiment of the present invention;
fig. 4 is a schematic diagram illustrating another forwarding process for forwarding a packet in a VPLS network according to a second embodiment of the present invention;
fig. 5 is a functional block diagram of an apparatus for forwarding packets in a VPLS network according to a second embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Fig. 1 shows a block diagram of a PE device 100 applicable to the embodiments of the present invention. As shown in fig. 1, PE device 100 includes a memory 102, a memory controller 104, one or more processors 106 (only one shown), a network interface 108, and the like. These components communicate with each other via one or more communication buses/signal lines 116.
The memory 102 may be configured to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for forwarding a message in a VPLS network in the embodiment of the present invention, and the processor 106 executes various functional applications and data processing by running the software programs and modules stored in the memory 102, such as the method for forwarding a message in a VPLS network provided in the embodiment of the present invention.
The memory 102 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. Access to the memory 102 by the processor 106, and possibly other components, may be under the control of the memory controller 104.
A network interface 108 connects the processor 106 and the memory 102. In some embodiments, the network interface 108, the processor 106, and the memory controller 104 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips. The network interface 108 may be used for signal connection between the PE device and a CE device or other PE devices to implement data interaction.
It is understood that the configuration shown in fig. 1 is merely illustrative, and PE device 100 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
In the embodiment of the present invention, the PE device 100 may be a router or other network device.
First embodiment
Fig. 2 shows a method for forwarding a packet in a VPLS network according to a first embodiment of the present invention, which is applied to forwarding a packet by a PE device, and as shown in fig. 2, the method includes:
step S110: and receiving the message.
And the PE equipment receives messages sent by other equipment. The messages received by the PE device may come from other PE devices or may come from the CE device. When the PE equipment receives a message from the AC direction, the message is sent by the CE equipment, and when the PE equipment receives a message from the PW direction, the message is sent by other PE equipment.
In this example, the information encapsulated in the message sent by the PE device is different from that sent by the CE device, and in the message sent by the PE device, in addition to the source MAC address, the destination MAC address, and the text content of the message, active index information and destination index information may be encapsulated. The source index information encapsulated in the message corresponds to an MAC address forwarding table corresponding to a source MAC address in the PE device sending the message, and the destination index information corresponds to an MAC address forwarding table corresponding to a destination MAC address in the PE device receiving the message. Therefore, the processing modes of the messages received by the PE device from the CE device or other PE devices may be different, and the PE device may determine the processing mode of the message by determining whether the message is from the AC direction or the PW direction.
After receiving the message, the PE equipment judges whether the message is from the PW direction or the AC direction, if the message is from the PW direction, the following steps are executed:
step S120: and learning the source MAC address according to the source MAC address in the received message.
Specifically, in the learning process, the PE device may search an MAC address forwarding table according to the source MAC address, and when the MAC address forwarding table is not searched according to the source MAC address in the received message, create an MAC address forwarding table corresponding to the source MAC address according to the source MAC address.
In this embodiment, a MAC address forwarding table created by a PE device is expanded on the basis of the prior art, where the MAC address forwarding table includes, in addition to a MAC address and path information corresponding to the MAC address, index information of the MAC address forwarding table and opposite-end index information. The index information of the MAC address forwarding table is the index information corresponding to the MAC address forwarding table in the PE equipment, the index information is distributed to the created MAC address forwarding table when the MAC address forwarding table is created, and the index information and the created MAC address forwarding table have a unique corresponding relation and represent the unique identity information of the MAC address forwarding table corresponding to the source MAC address in the PE equipment. The opposite-end index information of the MAC address forwarding table is the index information of the corresponding MAC address forwarding table in the destination PE equipment to which the message is to be sent when the MAC address used for creating the MAC address forwarding table is used as the destination MAC address. In this embodiment, the index information has a certain data format, but the specific data format is not limited, and may be one or more letters or numbers. In this embodiment, the data format of the index information is simpler than the data format of the MAC address, and may be embodied that the number of data bits of the index information is less than that of the MAC address.
In this embodiment, the peer index information of the MAC address forwarding table is determined and recorded by the source index information in the received message.
Therefore, when receiving from the PW direction that the packet sent by the PE device does not carry active index information, the PE device creates an MAC address forwarding table in which the peer index information is invalid, and the representation form may be that the corresponding field is in a reserved state, and may be null or specific reserved data. When receiving a message sent by the PE device from the PW direction, the PE device carries active index information, and sets opposite-end index information in the created MAC address forwarding table according to the source index information in the message, that is, sets the opposite-end index information in the created MAC address forwarding table to be equal to the source index information in the received message. It can be understood that the source index information in the received message is index information of an MAC address forwarding table corresponding to a source MAC address in the PE device that sends the received message.
In addition, if the PE device receives a message carrying source index information from the PW direction and finds the MAC address forwarding table according to the source MAC address, the PE device may further update opposite-end index information in the MAC address forwarding table corresponding to the source MAC address by using the source index information, that is, if the source index information in the message is inconsistent with the corresponding opposite-end index information, the corresponding opposite-end index information is set to be equal to the index information in the message, and if the index information in the message is consistent with the corresponding opposite-end index information, the opposite-end index information remains unchanged.
Step S130: and when the received message carries destination index information, searching a corresponding destination MAC address forwarding table according to the destination index information, wherein the destination index information is the index information of the MAC address forwarding table corresponding to the destination MAC address.
When receiving a message from the PW direction, the PE device indicates that the received message is sent by other PE devices, and judges whether the message carries destination index information, wherein the destination index information is index information of an MAC address forwarding table corresponding to a destination MAC address in the PE device receiving the message. And when the field for encapsulating the target index information in the message received by the PE equipment is not empty, and the data format of the data encapsulated by the encapsulated target index information is consistent with the data format of the index information corresponding to the MAC address forwarding table in the PE equipment, determining that the message carries the target index information.
When the judgment result is that the received message carries destination index information, the PE device may search the MAC address forwarding table corresponding to the destination index information according to the destination index information, and it can be understood that the MAC address forwarding table corresponding to the destination index information is an MAC address forwarding table in which the index information is consistent with the destination index information. And when the MAC address forwarding table is found, judging that the found MAC address forwarding table is a destination MAC address forwarding table, wherein the MAC address is the destination MAC address.
Further, after the MAC address forwarding table is found according to the destination index information, it is further checked whether a destination MAC address in the found destination MAC address forwarding table is the same as a destination MAC address carried in the received message. If the checking result is different, that is, the destination MAC address in the destination MAC address forwarding table corresponding to the destination index information in the PE device is different from the destination MAC address carried in the received message, the destination index information may be wrong destination index information, and the PE device searches the corresponding destination MAC address forwarding table according to the destination MAC address in the received message, so that the MAC address forwarding table searched according to the destination MAC address is used as a correct destination MAC address forwarding table.
In addition, if the MAC address forwarding table is searched according to the destination index information, the corresponding MAC address forwarding table is searched according to the destination MAC address in the received message to serve as the destination MAC address forwarding table.
Further, in this embodiment, when a message is received from the PW direction, and an MAC address in an MAC address forwarding table found according to destination index information is different from a destination MAC address carried in the received message, or the MAC address forwarding table found according to the destination index information fails to be found, an update message is returned to the PE device that sent the message, where source index information carried in the update message is invalid or index information of the MAC address forwarding table found according to the destination MAC address in the received message, so that the PE device that received the update message updates, according to the source index information carried in the update message, the opposite-end index information in the MAC address forwarding table corresponding to the source MAC address correspondingly. It can be understood that the invalid source index information may be that a field corresponding to the source index information in the message is empty or that the data format of the index information corresponding to the MAC address forwarding table is inconsistent. And if the source index information in the message is invalid, the PE equipment updates the corresponding opposite-end index information to be invalid when updating the opposite-end index information according to the source index information in the message.
When a message is received from the PW direction and the judgment result of the PE device is that the received message does not carry destination index information, a corresponding MAC address forwarding table can be searched according to a destination MAC address in the received message.
Step S140: and sending a message according to the destination MAC address forwarding table.
And when the PE equipment receives a message from the PW direction and finds a corresponding destination MAC address forwarding table according to destination index information carried in the message, sending the message according to the destination MAC address forwarding table.
In this embodiment, a specific process of sending a packet according to a destination MAC address forwarding table includes, first, encapsulating opposite-end index information in the destination MAC address forwarding table in the PE device as destination index information in a packet to be sent, encapsulating index information of an MAC address forwarding table corresponding to a source MAC address as source index information in a packet to be sent, and then sending the encapsulated packet.
In addition, when the PE device receives a message sent by other PE devices from the PW direction and does not carry destination index information, the MAC address in a destination MAC address forwarding table corresponding to the destination index information in the received message is different from the destination MAC address carried in the received message, the searching of the destination MAC address forwarding table according to the destination index information fails, and the like, the MAC address forwarding table is searched according to the destination MAC address carried in the message, and the message is still packaged and then sent according to the destination MAC address forwarding table.
Of course, if the opposite-end index information in the destination MAC address forwarding table of the PE device is invalid or the destination MAC address forwarding table is not found according to both the destination index information and the destination MAC address, the field corresponding to the opposite-end index information in the encapsulated packet is invalid.
And when the PE equipment sends the message, the message is sent according to the path information corresponding to the MAC address in the destination MAC address forwarding table. When the PE device does not find the destination MAC address, the packet may be sent from all possible sending paths.
If the message received by the PE device is from the AC direction, the PE device first learns the source MAC address according to the source MAC address in the received message, and compared with the learning process in which the PE device receives the message from the PW direction in step S120, because the message sent by the CE device does not carry the source index information, when the MAC address forwarding table is not found according to the source MAC address, the peer index information in the created MAC address forwarding table corresponding to the source MAC address is invalid, and its expression form may also be that the field corresponding to the peer index information is in a reserved state, is empty, or is specific reserved data, and the like. In addition, if the PE device finds the MAC address forwarding table according to the source MAC address, the next step may be directly performed.
After learning the MAC address, the PE device searches a destination MAC address forwarding table. Because the received message sent by the CE equipment does not carry index information, the MAC address forwarding table is directly searched according to the destination MAC address in the message, and the searched MAC address forwarding table is used as the destination MAC address forwarding table. Certainly, in this embodiment, the execution sequence of the two steps of the PE device performing the source MAC address learning and searching the destination MAC address forwarding table is not limited sequentially.
And the PE equipment sends the message according to the MAC address forwarding table. Specifically, the message received from the AC direction is a message not carrying destination index information, a destination MAC address forwarding table is searched according to a destination MAC address carried in the message, and the message is encapsulated and then sent according to the destination MAC address forwarding table. The encapsulation mode of the PE device to the message is that on the basis of the content of the received message, the field corresponding to the destination index information and the field corresponding to the source index information are added, the index information in the MAC address forwarding table corresponding to the source MAC address is encapsulated into the source index information in the message, and the opposite end index information in the destination MAC address forwarding table is encapsulated into the destination index information. It can be understood that, if the opposite-end index information in the destination MAC address forwarding table in the PE device is invalid, the destination index information in the encapsulated message is invalid.
Second embodiment
In this embodiment, a detailed description is given of a method for forwarding a packet in a VPLS network by taking a VPLS network including two PE devices and two CE devices as an example. Referring to fig. 3, the VPLS network includes a first CE device, a first PE device, a second CE device, and a second PE device, which are connected in sequence by signals, where a MAC address of the first CE device is MAC-a and a MAC address of the second CE device is MAC-B.
As shown in fig. 3, the first CE device sends a message with a source MAC address of MAC-a and a destination MAC address of MAC-B to the first PE device.
The first PE device receives the message from the AC direction over path 1 and performs source MAC address learning. The first PE device does not have a MAC address forwarding table corresponding to the source MAC address MAC-a, and thus the first PE device creates a MAC address forwarding table whose MAC address is MAC-a. The MAC address forwarding table created by the first PE device is expanded on the basis of the MAC address forwarding table management structure in the prior art, and index information and opposite end index information are added. As shown in fig. 3, the MAC address forwarding table created by the first PE device according to the MAC-a includes an ID and an index of an opposite-end forwarding table, where the outgoing path information corresponds to a path along which the first PE device receives a packet from the first CE device, and in this embodiment, the outgoing path information is path 1, the ID is index information of the address forwarding table corresponding to the MAC-a, the ID allocated by the first PE device to the MAC address forwarding table is "x", and the index of the opposite-end forwarding table is index information of an opposite end corresponding to the MAC-a, please refer to fig. 3.
The first PE device encapsulates the received packet, and as shown in fig. 3, adds tag information to the encapsulated packet for recording source index information and destination index information. Referring to fig. 3, D-ID represents destination index information, at this time, in the first PE device, a MAC address forwarding table corresponding to the destination MAC address MAC-B does not exist or there is no valid opposite-end index information in the MAC address forwarding table. And the S-ID represents source index information, and the index information 'x' in the MAC address forwarding table corresponding to the MAC-A is packaged into the source index information.
As shown in fig. 3, the first PE device forwards the encapsulated packet to the second PE device through the path 2, and the second PE device receives the packet from the PW direction through the path 3.
After receiving the message, the second PE device first learns the source MAC address. And the second PE device does not find the MAC address forwarding table according to the source MAC address MAC-A and creates the MAC address forwarding table according to the MAC-A. As shown in fig. 3, index information "n" is allocated in the created MAC address forwarding table corresponding to the MAC-a, the outgoing path information is path 3, and the index of the opposite-end forwarding table is equal to the source index information S-ID in the received packet and is "x".
The second PE device sends the message to the second CE device through path 4.
When the second CE device returns a packet, the source MAC address in the returned packet is MAC-B and the destination MAC address is MAC-a, as shown in fig. 4. The second PE device receives the packet through path 4, and first learns the source MAC address. And the second PE device does not find the MAC address forwarding table according to the source MAC address MAC-B and creates the MAC address forwarding table according to the MAC-B. As shown in fig. 4, index information "m" is allocated in the created MAC address forwarding table corresponding to the MAC-B, the outgoing path information is path 4, and since the packet sent by the second CE device does not carry index information, the index of the forwarding table at the opposite end in the created forwarding table corresponding to the MAC-B is "none".
The second PE device finds out that the path information corresponding to the destination MAC address forwarding table is path 3 and the opposite-end index information is x according to the MAC-A, encapsulates the index information m of the MAC address forwarding table corresponding to the source MAC address MAC-B into the source index information in the message, encapsulates the opposite-end index information x corresponding to the destination MAC address MAC-A into the destination index information in the message, and sends the encapsulated message to the first PE device through the path 3.
And the first PE equipment receives a message returned by the second PE equipment from the PW direction through the path 2 and executes the source MAC address learning. The first PE device does not find the MAC address forwarding table according to the source MAC address MAC-B, and creates the MAC address forwarding table according to the MAC-B. As shown in fig. 4, index information "y" is allocated in the created MAC address forwarding table corresponding to the MAC-B, the outgoing path information is path 2, and the index of the forwarding table at the opposite end is equal to the source index information S-ID in the received packet and is "m".
The first PE device finds the MAC address forwarding table corresponding to the destination MAC address MAC-A according to the destination index information 'x' in the received message, determines a path for returning the message to the first CE device according to the path information path 1 in the MAC address forwarding table corresponding to the MAC-A, and then the first PE device returns the message to the first CE device through the path 1.
When the first CE device sends a message with the source MAC address as MAC-A and the destination MAC address as MAC-B again, the first PE device receives the message from the AC direction through the path 1 and finds the MAC address forwarding table according to the source MAC address MAC-A. And then finding a destination MAC address forwarding table according to the destination MAC address MAC-B, packaging the ID in the MAC address forwarding table corresponding to the MAC-A into source index information 'x' in the message by the first PE equipment, packaging the index of an opposite-end forwarding table in the MAC address forwarding table corresponding to the MAC-B into destination index information'm' in the message, and sending the message to the second PE equipment through an outgoing path information path 2 in the MAC address forwarding table corresponding to the MAC-B.
And the second PE equipment receives the message from the PW direction through the path 3, performs MAC address learning according to the source MAC address MAC-A in the message and finds the MAC address forwarding table corresponding to the MAC-A. In addition, the second PE device may also update the opposite-end index information in the MAC address forwarding table corresponding to the MAC-a by using the source index information "x" in the message. In this embodiment, the source index information "x" in the packet is consistent with the peer forwarding table index "x" in the MAC address forwarding table corresponding to the MAC-a, and the peer forwarding table index remains unchanged.
And then searching a destination MAC address forwarding table according to destination index information m in the received message. As shown in fig. 4, the destination MAC address forwarding table corresponding to MAC-B can be found according to the destination index information "m". Further, the second PE device may further compare whether the destination MAC address in the message is consistent with the MAC address in the destination MAC address forwarding table found according to the destination index information, and if not, consider that the destination MAC address forwarding table found according to the destination index information is wrong, and need to find a correct destination MAC address forwarding table according to the destination MAC address in the message. In this embodiment, the MAC address in the MAC address forwarding table found according to the destination index information and the destination MAC address carried in the packet are both MAC-B, and it can be determined that the found MAC address forwarding table is correct.
The second PE device determines the path information in the found destination MAC address forwarding table as path 4, and then forwards the packet through path 4, and the second CE device can obtain the packet forwarded by the second PE device.
In summary, in the method for forwarding a message in a VPLS network provided by the embodiment of the present invention, when a received message carries destination index information, a PE device searches a corresponding MAC address forwarding table according to the destination index information, and when the MAC address forwarding table is found, the MAC address forwarding table found according to the destination index information is used as a destination MAC address forwarding table, and a message is sent according to the destination MAC address forwarding table. In this embodiment, the data format of the index information is simpler than the data format of the MAC address, and compared with searching the destination MAC address forwarding table according to the destination MAC address, the speed of searching the destination MAC address forwarding table according to the destination index information is faster, so that the searching efficiency can be effectively improved.
Third embodiment
This embodiment provides a device 300 for forwarding a packet in a VPLS network, which is applied to forwarding a packet by a PE device, please refer to fig. 5, where the device includes:
a receiving module 310, configured to receive a message; a learning module 320, configured to learn a source MAC address according to the source MAC address in the received message; the searching module 330 is configured to search, when a received message carries destination index information, a corresponding destination MAC address forwarding table according to the destination index information, where the destination index information is index information of an MAC address forwarding table corresponding to a destination MAC address; and a sending module 340, configured to send a message according to the destination MAC address forwarding table.
Specifically, in this embodiment, when the MAC address forwarding table is not found according to the source MAC address in the received message, the learning module is configured to create the MAC address forwarding table according to the source MAC address, allocate index information to the created MAC address forwarding table, and record opposite-end index information.
Further, in this embodiment, the present invention further includes an updating module 350, where when a received packet carries source index information, the updating module 350 is configured to update opposite-end index information in an MAC address forwarding table corresponding to a source MAC address by using the source index information, where the source index information is index information of an MAC address forwarding table corresponding to the source MAC address in the PE device that sends the received packet.
In addition, the sending module 340 is configured to encapsulate the opposite-end index information in the destination MAC address forwarding table as destination index information in a message to be sent, encapsulate the index information of the MAC address forwarding table corresponding to the source MAC address as source index information in the message to be sent, and then send the encapsulated message.
In this embodiment, when the received message does not carry destination index information, when the MAC address in the destination MAC address forwarding table corresponding to the destination index information is different from the destination MAC address carried in the received message, or when the searching of the destination MAC address forwarding table according to the destination index information fails, the searching module 330 is configured to search the corresponding MAC address forwarding table according to the destination MAC address in the received message. Further, in this case, when the received message is a message sent by another PE device, the sending module 340 is further configured to return an update message to the PE device that sends the message, where source index information carried in the update message is invalid or index information of an MAC address forwarding table found according to a destination MAC address in the received message, so that the PE device that receives the update message updates opposite-end index information in the MAC address forwarding table corresponding to the source MAC address according to the source index information carried in the update message.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and portions that are the same as and similar to each other in the same embodiment may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A method for forwarding a message by a VPLS network is applied to forwarding the message by a PE device, and the method comprises the following steps:
receiving a message;
when an MAC address forwarding table is not found according to a source MAC address in a received message, creating the MAC address forwarding table according to the source MAC address, distributing index information for the created MAC address forwarding table and recording opposite-end index information, wherein the index information is index information corresponding to the MAC address forwarding table in the MAC address forwarding table, the opposite-end index information is index information of the MAC address forwarding table corresponding to destination PE equipment to which the message is to be sent, and the index information and the opposite-end index information have a unique corresponding relation with the MAC address forwarding table, wherein the opposite-end index information is determined and recorded by the source index information in the received message;
when a received message carries destination index information, searching a corresponding destination MAC address forwarding table according to the destination index information, wherein the destination index information is the index information of the MAC address forwarding table corresponding to the destination MAC address;
and encapsulating the opposite-end index information in the destination MAC address forwarding table into destination index information in a message to be sent, encapsulating the index information of the MAC address forwarding table corresponding to the source MAC address into source index information in the message to be sent, and sending the encapsulated message.
2. The method according to claim 1, wherein when the received packet carries active index information, and before the packet is sent according to the destination MAC address forwarding table, the method further comprises: and updating opposite-end index information in an MAC address forwarding table corresponding to a source MAC address by using the source index information, wherein the source index information is the index information of the MAC address forwarding table corresponding to the source MAC address in the PE equipment for sending the received message.
3. The method of claim 1, wherein before sending the packet according to the destination MAC address forwarding table, the method further comprises:
when the received message does not carry destination index information, when the MAC address in a destination MAC address forwarding table corresponding to the destination index information is different from the destination MAC address carried in the received message, or when the destination MAC address forwarding table is failed to be searched according to the destination index information, searching a corresponding MAC address forwarding table according to the destination MAC address in the received message.
4. The method according to claim 3, wherein when the received message is a message sent by another PE device, an update message is returned to the PE device sending the message, and the source index information carried in the update message is invalid or index information of an MAC address forwarding table searched according to a destination MAC address in the received message, so that the PE device receiving the update message updates the opposite-end index information in the MAC address forwarding table corresponding to the source MAC address according to the source index information carried in the update message.
5. A device for forwarding a message in a VPLS network is applied to forwarding the message by PE equipment, and the device comprises:
the receiving module is used for receiving the message;
the learning module is used for creating an MAC address forwarding table according to a source MAC address in a received message, distributing index information for the created MAC address forwarding table and recording opposite-end index information, wherein the index information is index information in the MAC address forwarding table, the index information is index information of the MAC address forwarding table, the opposite-end index information is index information of the MAC address forwarding table, the MAC address forwarding table corresponds to destination PE equipment to which the message is to be sent, the index information and the opposite-end index information have a unique corresponding relation with the MAC address forwarding table, and the opposite-end index information is determined by the source index information in the received message and is recorded;
the searching module is used for searching a corresponding destination MAC address forwarding table according to destination index information when the received message carries the destination index information, wherein the destination index information is the index information of the MAC address forwarding table corresponding to the destination MAC address;
and the sending module is used for packaging the opposite-end index information in the destination MAC address forwarding table into destination index information in a message to be sent, packaging the index information of the MAC address forwarding table corresponding to the source MAC address into source index information in the message to be sent, and sending the packaged message.
6. The apparatus according to claim 5, further comprising an updating module, where when the received packet carries source index information, the updating module is configured to update opposite-end index information in an MAC address forwarding table corresponding to a source MAC address by using the source index information, where the source index information is index information of an MAC address forwarding table corresponding to a source MAC address in the PE device that sends the received packet.
CN201710106980.7A 2017-02-27 2017-02-27 Method and device for forwarding message by VPLS network Active CN106850388B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710106980.7A CN106850388B (en) 2017-02-27 2017-02-27 Method and device for forwarding message by VPLS network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710106980.7A CN106850388B (en) 2017-02-27 2017-02-27 Method and device for forwarding message by VPLS network

Publications (2)

Publication Number Publication Date
CN106850388A CN106850388A (en) 2017-06-13
CN106850388B true CN106850388B (en) 2020-04-03

Family

ID=59133690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710106980.7A Active CN106850388B (en) 2017-02-27 2017-02-27 Method and device for forwarding message by VPLS network

Country Status (1)

Country Link
CN (1) CN106850388B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726633B (en) * 2021-08-12 2023-04-07 中国联合网络通信集团有限公司 Forwarding method and forwarding device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217463A (en) * 2007-12-27 2008-07-09 华为技术有限公司 Method and device for controlling message forwarding
CN102148745A (en) * 2010-02-08 2011-08-10 中兴通讯股份有限公司 Method and system for increasing forwarding efficiency of virtual private LAN service network
CN102821052A (en) * 2012-08-22 2012-12-12 迈普通信技术股份有限公司 Method and device for searching forwarding information in virtual special local area network service network
CN103428067A (en) * 2013-08-14 2013-12-04 杭州华三通信技术有限公司 Message forwarding method and device based on two-layer virtual private network
CN105634942A (en) * 2014-10-31 2016-06-01 华为技术有限公司 Method and switch for forwarding message

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130077630A1 (en) * 2011-09-28 2013-03-28 Yigal Bejerano Energy efficient connectionless routing with simple lookup

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217463A (en) * 2007-12-27 2008-07-09 华为技术有限公司 Method and device for controlling message forwarding
CN102148745A (en) * 2010-02-08 2011-08-10 中兴通讯股份有限公司 Method and system for increasing forwarding efficiency of virtual private LAN service network
CN102821052A (en) * 2012-08-22 2012-12-12 迈普通信技术股份有限公司 Method and device for searching forwarding information in virtual special local area network service network
CN103428067A (en) * 2013-08-14 2013-12-04 杭州华三通信技术有限公司 Message forwarding method and device based on two-layer virtual private network
CN105634942A (en) * 2014-10-31 2016-06-01 华为技术有限公司 Method and switch for forwarding message

Also Published As

Publication number Publication date
CN106850388A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
CN102368726B (en) Forwarding method and device applied to L2VPN (layer 2 virtual private network)
CN108141416A (en) A kind of message processing method, computing device and message process device
CN104660508A (en) Message forwarding method and device
CN112910772B (en) Message forwarding method and device based on segmented routing
CN103634423B (en) Three-layered interface based MPLS-TP (multi-protocol label switching-transport profile) configuration method and device
WO2016177145A1 (en) Packet transmission method and device
CN107968749B (en) Method for realizing QinQ route termination, switching chip and switch
CN109495320B (en) Data message transmission method and device
CN112422398B (en) Message transmission method and communication device
CN107547346B (en) Message transmission method and device
CN108600109A (en) A kind of message forwarding method and device
CN112217724A (en) Route management method, device, network equipment and readable storage medium
JP2019521619A (en) Packet forwarding
CN108718276B (en) Message forwarding method and device
CN107896188B (en) Data forwarding method and device
CN107547311B (en) Flow statistical method and device
US9641611B2 (en) Logical interface encoding
CN109756411B (en) Message forwarding method and device, first VTEP device and storage medium
US7480306B2 (en) Interworking functionality
CN109039903B (en) Route determining method, device and machine-readable storage medium
CN113726653B (en) Message processing method and device
CN105763411B (en) Method and device for establishing multicast tunnel
CN106850388B (en) Method and device for forwarding message by VPLS network
CN111147376B (en) Route updating method, device, equipment and medium
CN103269300A (en) Method and equipment for achieving heterogeneous network interconnection

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