CN103685007B - A kind of mac learning method when edge device message forwards and edge device - Google Patents
A kind of mac learning method when edge device message forwards and edge device Download PDFInfo
- Publication number
- CN103685007B CN103685007B CN201210316996.8A CN201210316996A CN103685007B CN 103685007 B CN103685007 B CN 103685007B CN 201210316996 A CN201210316996 A CN 201210316996A CN 103685007 B CN103685007 B CN 103685007B
- Authority
- CN
- China
- Prior art keywords
- client
- message
- mac address
- unicast message
- tunnel
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000012545 processing Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000007547 defect Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 208000036398 Kyphoscoliotic Ehlers-Danlos syndrome due to lysyl hydroxylase 1 deficiency Diseases 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 230000002401 inhibitory effect Effects 0.000 description 1
- 208000032197 kyphoscoliotic type 1 Ehlers-Danlos syndrome Diseases 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000005641 tunneling Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4604—LAN interconnection over a backbone network, e.g. Internet, Frame Relay
- H04L12/462—LAN interconnection over a bridge based backbone
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4604—LAN interconnection over a backbone network, e.g. Internet, Frame Relay
- H04L12/462—LAN interconnection over a bridge based backbone
- H04L12/4625—Single bridge functionality, e.g. connection of two networks over a single bridge
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
Medium education (MAC) the address learning method when present invention provides a kind of edge device message to forward and edge device, the method virtualizes the server end edge device (ED) in (EVI) network and client ED for Ethernet.That is: between server end edge device (ED) and client ED, over run tunnel is set up.Server end ED and client ED utilize over run tunnel to receive unknown unicast message, carry out corresponding message forwarding after this message carries out mac learning again.Application the present invention program, owing to edge device is to forward unknown unicast flow by over run tunnel, and learns MAC Address during forwarding, both can reach the purpose of mac learning, can effectively suppress again flooding of message.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an MAC learning method and an edge device for forwarding a packet by the edge device.
Background
An Ethernet Virtual Interconnection (EVI) network is a network that can connect a plurality of site networks deployed in different places, and is a system that implements two-layer Interconnection between the site networks based on Virtual links. The EVI network utilizes advanced 'MAC in IP' technology to realize two-layer virtual private network (L2 VPN) technology based on an IP core network.
The EVI network is generally composed of a core network, an overlay network, several site networks, and the like.
The core network is a public network which is mainly a network carried by IP routing equipment and provides interconnection among site networks, and mainly performs IP forwarding of tunnel messages.
The overlapped Network is a Virtual Network established among site edge devices, realizes the expansion of a Virtual Local Area Network (VLAN) among different sites, and provides two-layer interconnection among the site networks.
The site network is connected to a two-layer network with independent service functions of a core network by one or more Edge Devices (EDs), which can provide a two-layer switching function between sites.
In existing EVI networks, a fully connected architecture is typically employed between EDs, namely: tunnels are established between the EDs respectively. Media Access Control (MAC) addresses between sites are issued via an Intermediate System-to-Intermediate System (ISIS) protocol. Such as: an ED of a site newly learns a MAC within the site, which can be flooded to all other EDs via tunneling using ISIS protocol. However, if the number of the MAC addresses to be issued is very large, the packet may be lost, so that the opposite end cannot learn the MAC addresses. In addition, when users of each station visit each other, if an ED cannot inquire the destination MAC address of the message in its own MAC table, the message is an unknown unicast message. For this, the ED may be handled in two modes, EVI Flooding or EVI No Flooding. For the evenmapping mode, the ED may flood an unknown unicast packet to all other EDs, which may also cause defects such as packet loss or resource occupation due to the flooding. For the EVI No Flooding mode, the ED directly discards the unknown unicast message, which results in the failure of access.
Disclosure of Invention
In view of this, the present invention provides an MAC learning method and an edge device for forwarding an edge device packet, which can also learn an MAC without depending on an ISIS protocol to issue the MAC, thereby avoiding the packet loss and resource occupation defects caused by flooding as much as possible.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention can be implemented as follows:
a MAC learning method when the message of edge device is forwarded, this method is used for server end edge device ED in the virtualized EVI network of Ethernet, said server end ED and customer end ED in EVI network have set up the main tunnel, set up the spare tunnel between said server end ED and customer end ED, used for bearing the unknown unicast message; the method further comprises the following steps:
the server end ED receives an unknown unicast message from a source client end ED from a standby tunnel, wherein the unknown unicast message carries an ED identifier of the source client end ED; the server end ED learns the source MAC address of the message, and configures the learned MAC address and an output interface corresponding to a main tunnel between the server end ED and the source client end ED to an MAC table of the server end ED;
the server ED queries an MAC table according to the destination MAC address of the unknown unicast message, and performs local forwarding when hitting a local site; when hitting the remote site, the remote site is forwarded out through a standby tunnel between the remote site and the target client ED; and if the hit is not hit, broadcasting is carried out in the EVI instance.
In view of the above object, an embodiment is further provided, which can be implemented as follows:
a MAC learning method when the message of edge device is forwarded, this method is used for customer end edge device ED in Ethernet virtualization EVI network, said customer end ED and server end ED have set up the main tunnel, set up the spare tunnel between said customer end ED and said server end, used for bearing the unknown unicast message; the method further comprises the following steps:
when the client end ED is used as a source client end ED to send an unknown unicast message, adding an ED identifier of the client end ED into the unknown unicast message, and sending the unknown unicast message to a server end ED through a standby tunnel established between the client end ED and the server end ED;
when the client ED is used as a target client ED to receive an unknown unicast message from a standby tunnel, acquiring a source client ED according to an ED identifier carried by the unknown unicast message, learning a source MAC address of the message, and configuring the learned MAC address, an output interface corresponding to a main tunnel between the target client ED and the source client ED to an MAC table; then, inquiring an MAC table of the unknown unicast message according to the destination MAC address of the unknown unicast message, and if the unknown unicast message hits a local site, carrying out local forwarding; if not, broadcasting in the virtual local area network VLAN.
In view of the above object, the embodiment of the present invention provides a solution:
an edge device is a server end edge device ED in an Ethernet virtualization EVI network, and comprises a main control unit, a forwarding unit and an interface unit, wherein a primary tunnel is established between the server end ED and a client end ED in the EVI network;
the forwarding unit is configured to, when the interface unit receives an unknown unicast message from the source client ED from the backup tunnel, learn a source MAC address of the unknown unicast message, where the unknown unicast message carries an ED identifier of the source client ED, and configure the learned MAC address and an egress interface corresponding to the primary tunnel between the server end ED and the source client ED to the MAC table; the system is also used for inquiring an MAC table according to the destination MAC address of the unknown unicast message, and if the MAC table hits a local site, the MAC table is locally forwarded through an interface unit; when hitting the remote site, the remote site is forwarded out through the interface unit by using a standby tunnel between the remote site and the destination client ED; miss, broadcast within EVI instance through interface unit.
In view of the above object, the embodiment of the present invention further provides a scheme:
an edge device is a client edge device ED in an Ethernet virtualization EVI network, and comprises a main control unit, a forwarding unit and an interface unit, wherein an active tunnel is established between the client edge device ED and a server edge device ED in the EVI network;
the main control unit is used for adding the ED identification of the main control unit to the unknown unicast message when the main control unit is used as a source client ED to send the unknown unicast message;
the forwarding unit is used for sending the backup tunnel established between the forwarding unit and the server end ED to the server end ED through the interface unit when the forwarding unit is used as the source client end ED; when the user terminal is used as a destination client ED, an unknown unicast message forwarded by a server end ED is received from a standby tunnel through an interface unit, a source client ED is obtained according to an ED identifier carried by the unknown unicast message, a source MAC address of the message is learned, and the learned MAC address and an outgoing interface corresponding to a main tunnel between the destination client ED and the source client ED are configured to an MAC table; the device is also used for inquiring an MAC table according to the destination MAC address of the unknown unicast message, and if the destination MAC address hits the local, the device carries out local forwarding through an interface unit; if not, broadcast in the VLAN through the interface unit.
In summary, the present invention provides an MAC learning method and an edge device during forwarding an edge device packet, where a backup tunnel is established between a server ED and a client ED for carrying an unknown unicast packet. The server ED and the client ED can forward unknown unicast messages by using the backup tunnel, achieve the purpose of MAC learning in the process of forwarding the messages, and simultaneously effectively inhibit the flooding of the messages.
Drawings
Fig. 1 is a system configuration diagram according to a first embodiment of the present invention.
Fig. 2 is a schematic diagram of an internal structure of a server ED according to an embodiment of the present invention.
Fig. 3 is a schematic internal structure diagram of a client ED according to an embodiment of the present invention.
Fig. 4 is a system configuration diagram in the second embodiment of the present invention.
Fig. 5 is a message format with an ED identifier added in the second embodiment of the present invention.
Detailed Description
The first embodiment of the present invention provides a solution, that is: in an Ethernet Virtualization (EVI) network, when an Edge Device (ED) forwards a message, if a unicast message of a remote station is received, the message can be directly used for MAC learning and message forwarding.
However, in the MAC learning process, especially in the initial stage, because each ED does not learn the MAC address of the host under the remote site, most of the messages to be forwarded are unknown unicast messages, which may cause a phenomenon of flooding a large number of unknown unicast messages. Such as: host1, which is hung down by CE1 of ED1 user equipment in a site, sends a message to host2, which is hung down by CE2 in an ED2 site, but ED1 does not learn the MAC address of host2 in advance, and naturally cannot hit the destination MAC address according to the MAC table, so the message is an unknown unicast message. To send the message to the destination, ED1 may flood the unknown unicast message to all other ED devices in the EVI network. In order to suppress such flooding, in the embodiment of the present invention, in addition to establishing the active tunnel between the EDs, a backup tunnel is also established between the server ED and the client ED, and is used for carrying an unknown unicast packet. The primary tunnel and the backup tunnel are EVI tunnels. The tunnel type of the EVI tunnel is an IP GRE tunnel and is used for bearing the EVI Link, and a plurality of EVI links can be borne on one tunnel. The EVI tunnel is a point-to-multipoint automatic tunnel, and the local site can establish connection with a plurality of neighbor sites through one EVI tunnel, wherein each connection corresponds to one EVI Link.
In addition, in order to indicate the source of an unknown unicast message, the ED identifier of the source ED is added, so that the ED receiving the message can correctly learn the MAC address. Therefore, in the embodiment of the present invention, when the source client ED needs to flood an unknown unicast packet, the packet may be flooded only to the server ED through the backup tunnel, and then the server ED forwards the packet to the destination client ED. Meanwhile, in the process of message forwarding, both the server ED and the client ED can complete MAC learning.
Fig. 1 is a schematic system architecture diagram according to a first embodiment of the present invention. As shown in fig. 1, the EVI network includes a server ED and a plurality of clients ED, each ED has a plurality of CEs in its site, and each CE has a plurality of hosts suspended under it. And a primary tunnel is established between the EDs, and a standby tunnel is also established between the server-side ED and each client-side ED and is used for specially bearing unknown unicast messages. Here, a network formed by each ED and its subordinate CE is a site network, and a public network in which each ED interacts with each other is a core network.
To better illustrate the solution of the embodiment, the server ED and the client ED are described in detail below.
Fig. 2 is a schematic diagram of the internal structure of the server ED. As shown in fig. 2, the server ED includes: a master unit 1011, a forwarding unit 1012 and an interface unit 1013. In practical application, the main control unit 1011 is implemented by hardware such as a CPU; the forwarding unit 1012, like the forwarding unit in the prior art, stores an MAC hardware table, and is mainly responsible for address query and other work during message forwarding; the interface unit 1013 mainly refers to an external interface of the edge device, and includes a physical port or a logical interface. Wherein,
the forwarding unit 1012 is configured to, when the interface unit 1013 receives an unknown unicast packet from the source client ED from the backup tunnel, learn a source MAC address of the packet, where the unknown unicast packet carries an ED identifier of the source client ED, and configure the learned MAC address and an egress interface corresponding to the primary tunnel between the server end ED and the source client ED to the MAC table; the interface unit 1013 is further configured to query the MAC table according to the destination MAC address of the unknown unicast packet, and perform local forwarding when a local station is hit; when hitting the remote site, it is forwarded out through the interface unit 1013 and the backup tunnel between the destination client ED and the remote site; misses, are broadcast within the EVI instance via interface unit 1013.
That is to say, the server ED may learn the source MAC address of the packet from the unknown unicast packet received by the backup tunnel, and perform corresponding packet forwarding after querying the MAC table. It should be noted that, although the server ED receives the unknown unicast packet from the backup tunnel, the server ED configures the corresponding relationship between the source MAC address and the egress interface corresponding to the primary tunnel to its own MAC table. The reason is that: once the server ED learns the source MAC address, if a subsequent message is to be sent to the device corresponding to the source MAC address, the message should be a known unicast message, and the message is directly sent from the primary tunnel without being sent from the backup tunnel, that is, the message is sent out according to the egress interface corresponding to the primary tunnel in the MAC table. It should be noted that when the server ED forwards the unknown unicast packet to the remote station, the unknown unicast packet still needs to be sent from the backup tunnel, so that the remote station can correctly learn the MAC address.
Fig. 3 is a schematic diagram of the internal structure of the client ED. As shown in fig. 2, the client ED also comprises: a main control unit 1021, a forwarding unit 1022, and an interface unit 1023. In practical application, the main control unit 1021 is realized by hardware such as a CPU; the forwarding unit 1022 stores an MAC hardware table, and is mainly responsible for address query and other operations during message forwarding; the interface unit 1023 mainly refers to an external interface of the edge device, including a physical port or a logical interface. Wherein,
the main control unit 1021 is configured to, when serving as a source client ED to send an unknown unicast message, add an ED identifier of the main control unit to the unknown unicast message;
the forwarding unit 1022 is configured to, when serving as the source client ED, send the backup tunnel established with the server end ED to the server end ED through the interface unit 1023; when the node is used as a destination client ED, an unknown unicast message forwarded by a server ED is received from a backup tunnel through an interface unit 1023, a source client ED is known according to an ED identifier carried by the unknown unicast message, a source MAC address of the message is learned, and the learned MAC address and an outgoing interface corresponding to a primary tunnel between the destination client ED and the source client ED are configured to an MAC table; the interface unit 1023 is further configured to query the MAC table according to the destination MAC address of the unknown unicast packet, and if the destination MAC address hits the local address, perform local forwarding through the interface unit 1023; if there is a miss, broadcast is done within the VLAN via interface unit 1023.
That is, the destination client ED may learn the source MAC address of the packet from the unknown unicast packet received by the backup tunnel, and perform corresponding packet forwarding after querying the MAC table. It should be noted that, although the destination client ED receives the unknown unicast packet from the backup tunnel, the destination client ED issues the source MAC address and the outgoing interface corresponding to the active tunnel between itself and the source client ED to its MAC table. The reason is that: the destination client ED learns that the source client ED site has the host MAC address pending, but is received from a backup tunnel between the destination client ED and the server ED. If the destination client directly utilizes the backup tunnel response message subsequently, the destination client cannot correctly reach the source client ED, and therefore, the egress interface corresponding to the primary tunnel between the destination client ED and the source client ED should be saved during MAC learning.
In order to better describe the solution of the invention, a detailed description of one embodiment is given below.
Taking fig. 4 as an example, it is assumed that a CE221 is located in the site of the server ED211, a Host231 is hung down, a CE222 is located in the site of the client ED212, a Host232 is hung down, a CE223 is located in the site of the client ED231, a Host233 is hung down, a CE224 is located in the site of the client ED214, and a Host234 is hung down. The ED 211-ED 214 establish a primary tunnel, the server ED211 establishes a backup tunnel with the client ED 212-ED 214, and establishes an EVI LINK connection based on the EVI tunnel. The connection between ED1 and ED2 is LINK1 and LINK1-2, the connection between ED1 and ED3 is LINK2 and LINK2-2, and the connection between ED1 and ED4 is LINK3 and LINK 3-2. The existing method can be adopted to establish the tunnel, such as establishing an IP GRE tunnel, regardless of the primary tunnel or the standby tunnel.
The present embodiment assumes that Host232 within the client ED212 site is to access Host233 within the client ED213 site, while client ED212 has not previously learned the MAC addresses of Host232 and Host233, and client ED213 has not previously learned the MAC address of Host 232.
In this embodiment, the unknown unicast message needs to add an ED identifier of the source client ED, and the format of the added message is shown in fig. 5. Wherein, the "EVI-ED indicator" field is the ED identification. In practical applications, each ED may be configured with an ED identifier in advance. Such as: the identity of ED1 may be configured as id1, with a corresponding address of 1.1.1.1; the ID of ED2 is configured as id2, and the corresponding address is 2.2.2.2; the ID of ED3 is configured as id3, and the corresponding address is 3.3.3.3; the ID of ED4 is configured as id4, and the corresponding address is 4.4.4.4. Here, the address may uniquely identify the device of the EVI tunnel, so that the source client ED may be specified by the corresponding address according to the ED identifier in the unsolicited broadcast packet.
The access implementation scheme of the embodiment of the present invention is described in two stages as follows:
the first stage is as follows: the Host232 connected to CE222 sends an ethernet packet to the Host233 connected to CE 223.
Step S1: CE222 sends an Ethernet message from Host232 to ED212, where the Ethernet message carries the active MAC address and the destination MAC address. Wherein, the source MAC address is the MAC address of Host232, and the destination MAC address is the MAC address of Host 233.
Step S2: the ED212 performs MAC learning, and the ED212 stores the source MAC address of the ethernet packet, the VLAN it belongs to, and the port that receives the ethernet packet in the MAC table of the corresponding EVI instance.
Here, the ED212 may determine a corresponding EVI instance according to the EVI instance bound to the VLAN to which the received ethernet packet belongs.
Step S3: the ED212 does not find a matching entry in the MAC table according to the destination MAC address of the Ethernet packet, encapsulates the Ethernet packet header into an Ethernet over IP GRE tunnel packet according to the backup tunnel with the server ED211, and adds its own ED identifier to the tunnel packet.
Fig. 5 shows a packet format of an Ethernet over IP GRE tunnel packet carrying an ED identifier sent by the ED 212. In fig. 5, the IP GRE tunnel header includes an IP packet header and a GRE packet header. With respect to the IP headers of the IP packets carried by the ethernet packet shown in fig. 5, the IP header in the IP GRE tunnel header can be regarded as the outer IP header of the tunnel packet, the source IP of the IP header in the IP GRE tunnel header is the IP address of the ED212, and the destination IP address of the IP header in the IP GRE tunnel header is the IP address of the ED 211. The GRE header indicates that the protocol packet carried is an ethernet packet.
The header of the public network two-layer packet shown in fig. 5 may be regarded as an outer ethernet header, the destination MAC of the public network two-layer packet is the MAC of the next-hop device connected to the ED212, such as the device P2 shown in fig. 4 (if the next-hop device is the ED211, the destination MAC of the public network two-layer packet is the MAC address of the ED 211), the source MAC of the public network two-layer packet is the virtual interface MAC of the ED211, and the VLAN id of the public network two-layer packet is the public network VLAN number.
Step S1 to step S3 are that the Host232 sends the ethernet packet to the edge device ED212, and the ED212 determines that the packet is an unknown unicast packet.
Step S4: the ED212 sends the tunnel message to the server end ED211 through the backup tunnel LINK1-2, where an identifier of the source ED carried in the tunnel message is an identifier of the ED 212.
Step S5: and the server end ED211 receives the tunnel message carrying the source ED identifier from the standby tunnel LINK 1-2.
Step S6: the server ED211 configures an inner-layer source MAC address of the tunnel packet, the VLAN to which the tunnel packet belongs, and a tunnel interface of the primary tunnel connected to the source ED to a corresponding entry of the MAC table of the EVI instance.
And after receiving the tunnel message, the ED211 removes a public network second-layer message header and an IP GRE tunnel header, and determines an EVI (Ethernet virtualization interconnection) instance according to the VLAN to which the Ethernet message belongs. The principle of the ED211 removing the public network layer two and the IP GRE tunnel header is substantially the same as the existing IP GRE tunnel header terminating principle, and the details are not repeated in this embodiment.
In this embodiment, the server ED211 determines that the tunnel packet is from the ED212 according to the source client ED identifier, and records the tunnel interface of the primary tunnel of the ED212 in the entry corresponding to the inner-layer source MAC address; the tunnel interface is an egress interface corresponding to the active tunnel between the ED211 and the ED 212. May be a tunnel index indicating a tunnel interface.
In addition, in practical application, the server ED211 may also learn the MAC address from the message from the local CE or the primary tunnel. For the message from the local site, the method for learning the MAC address is the same as the prior art, and is not described here again. For the packet from the primary tunnel, that is, the main control unit 1011 in fig. 2 is further configured to, when the interface unit 1013 receives a known unicast packet sent from the source ED from the primary tunnel, learn the source MAC address of the packet, and configure the learned MAC address and the outgoing interface corresponding to the primary tunnel between the server ED itself and the source ED to its MAC table. Correspondingly, the forwarding unit 1012 is further configured to query the MAC table according to the destination MAC address of the known unicast packet, and if the destination MAC address hits a local station (i.e., the MAC address of the host suspended from the local station), perform local forwarding; if not, broadcast in the VLAN.
Step S7: the server end ED211 finds a table entry in the MAC table of the EVI instance according to the destination MAC address of the ethernet packet, where the table entry includes a tunnel interface, determines that the destination client end ED is the ED213 according to the tunnel interface, encapsulates the ethernet packet into a tunnel packet and adds the identifier of the source ED, that is, the ED identifier of the ED212, according to the backup tunnel encapsulation connected to the ED213, and sends the tunnel packet carrying the source ED identifier to the ED213 through the backup tunnel LINK 2-2.
In this embodiment, if the entry found by the server ED211 includes a port, local forwarding may be performed.
In this embodiment, if the server ED211 does not find the entry matching the destination MAC address of the ethernet packet in the MAC table of the corresponding EVI instance, it needs to broadcast in the EVI instance, and the method includes: a forwarding unit 1012 of the server ED211 broadcasts an ethernet packet in the local VLAN of the EVI instance through an interface unit 1013, and encapsulates the ethernet packet into a tunnel packet according to the backup tunnels established between itself and all other clients ED except the source ED, adds the source ED identifier, and sends the tunnel packet to the client ED213 and the ED214, respectively.
Step S8: the ED213 receives the tunnel message carrying the source ED identity from the backup tunnel LINK 2-2.
Step S9: the ED213 knows that the source ED is the ED212 according to the source ED identifier carried in the tunnel packet, and configures the source MAC address of the inner-layer ethernet packet, the VLAN to which the ethernet packet belongs, and the tunnel interface of the active tunnel connected to the source client ED in the MAC table corresponding to the EVI instance.
Here, steps S8 and S9 describe how the client ED213 learns the MAC from the packet received by the backup tunnel, and in practical applications, the client ED213 may also learn the MAC address from the packet from the local site or the primary tunnel.
That is to say, if the MAC address is learned from the packet of the local station, the forwarding unit 1022 in fig. 3 is further configured to, when the client ED receives the unicast packet of the local station, perform source MAC address learning on the packet, and store the learned MAC address and the port receiving the packet in the MAC table. The forwarding unit 1022 is further configured to query the MAC table of the forwarding unit according to the destination MAC address of the packet, and if the host under the local site is hit, perform local forwarding through the interface unit 1023; if the host computer under the site of the server end ED or the destination client end ED at the far end is hit, the host computer is forwarded through the interface unit 1023 by using a main tunnel between the host computer and the server end ED or the destination client end ED; and if not, processing the unicast message as an unknown unicast message.
If the MAC address is learned from the packet of the active tunnel, forwarding unit 1022 in fig. 3 is further configured to receive, at client ED as destination client ED, a known unicast packet sent from source ED from the active tunnel, learn the source MAC address of the packet, and configure the learned MAC address and the outgoing interface corresponding to the active tunnel between the destination client ED and the source ED to its MAC table. The forwarding unit 1022 is further configured to query the MAC table according to the destination MAC address of the known unicast packet, and if a host hung under a local site is hit, perform local forwarding; if not, broadcast in the VLAN.
Step S10: the ED213 finds a port corresponding to the destination MAC address of the ethernet packet in the MAC table corresponding to the EVI instance, and forwards the ethernet packet to the CE223 through the port. The CE223 forwards the ethernet packet to the Host 233.
In this embodiment, this step may naturally hit assuming that the ED213 has previously learned the MAC address of Host 233. In practical applications, if there is no hit, the ethernet packet is broadcast in the local VLAN of the EVI instance. Thus, the CE223 receives the ethernet packet and forwards the ethernet packet to the Host 233.
And a second stage: the Host233 feeds back a message to the Host 232.
Step H1: the CE223 sends the ethernet packet sent by the Host233 to the ED213, where the source MAC address of the ethernet packet is the MAC address of the Host233, and the destination MAC address is the MAC address of the Host 232.
Step H2: the ED213 finds the entry matching the destination MAC address of the ethernet packet according to the MAC table of the EVI instance, and the entry includes a tunnel interface, that is, a tunnel interface of the active tunnel between the ED213 and the ED 212.
Step H3: the ED213 encapsulates the ethernet packet into a tunnel packet, and sends a response packet to the ED212 through the active tunnel with the ED 212.
Here, the ED3 may query the tunnel entry according to the tunnel interface, obtain the source IP and the destination IP of the IP GRE tunnel header, and the information of the public network VLAN, the destination MAC, the egress port, etc. of the public network layer two header, encapsulate the ethernet packet, and forward it.
Step H4: the ED212 receives the tunnel packet, encapsulates the tunnel packet into an ethernet packet, queries a table entry matching the destination MAC of the ethernet packet in the MAC table of the EVI instance, and forwards the ethernet packet to the CE222 with the table entry outgoing interface as a port.
The CE222 continues to forward the ethernet packet to Host232 according to the ethernet destination MAC address.
Since the ED212 has learned the MAC address of the CE222 in step S2, the step can hit and learn the corresponding port, and the response message can be accurately sent to the CE222 through the corresponding port, and then forwarded to the Host232 by the CE 222. Heretofore, Host232 has successfully accessed Host 233. In the process of forwarding the message, the server ED211, the client ED212, and the ED213 perform MAC learning directly by using the traffic message.
In the embodiment of the present invention, if a unicast message needs to be sent between the Host231 and the Host232, the CE221 transfers the ethernet unicast message sent by the Host231 to the ED211, and after the ED211 records the source MAC, VLAN information, and port information of the ethernet message in the MAC table of the EVI instance, if the ED1 does not find the entry matching the destination MAC of the ethernet message in the MAC table of the EVI instance, the ethernet message is broadcast in the local VLAN of the EVI instance and the tunnel message is encapsulated by the primary tunnels connecting the EDs of the clients, and the tunnel message is sent to the EDs of the clients through the primary tunnels. Or, the ED211 broadcasts an ethernet packet in the local VLAN of the EVI instance and encapsulates the tunnel packet by connecting the backup tunnels of the respective clients ED, inserts the ED identifier of the server ED as the source ED identifier into the tunnel packet, and sends the tunnel packet carrying the source ED identifier to the respective clients ED through the backup tunnels.
If the Host231 needs to send a broadcast message, the CE221 transfers the ethernet broadcast message sent by the Host231 to the ED211, and after the ED211 records the source MAC, VLAN information, and port information of the ethernet message in the MAC table of the EVI instance, the ethernet message is broadcast in the local VLAN of the EVI instance and the tunnel message is encapsulated by the primary tunnels connecting the EDs of the clients, and the tunnel message is sent to the EDs of the clients through the primary tunnels. Or, the ED211 broadcasts an ethernet packet in the local VLAN of the EVI instance and encapsulates the tunnel packet by connecting the backup tunnels of the respective clients ED, inserts the ED identifier of the server ED as the source ED identifier into the tunnel packet, and sends the tunnel packet carrying the source ED identifier to the respective clients ED through the backup tunnels.
In this embodiment, the backup tunnel established between the server ED and the client ED may effectively suppress the flooding of the unknown unicast ethernet packet. And the method can also avoid discarding unknown unicast Ethernet messages, and ensure the reliable transmission of the messages while inhibiting flooding.
The objects, technical solutions and advantages of the present invention have been described in further detail with reference to the preferred embodiments, it should be understood that the above description is only illustrative of the preferred embodiments of the present invention, and should not be construed as limiting the present invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (17)
1. A MAC learning method when the message of edge device is forwarded, this method is used for server end edge device ED in the virtualized EVI network of Ethernet, said server end ED and customer end ED in EVI network have set up the main tunnel, characterized by that, set up the spare tunnel between said server end ED and customer end ED, used for bearing the unknown unicast message; the method further comprises the following steps:
the server end ED receives an unknown unicast message from a source client end ED from a standby tunnel, wherein the unknown unicast message carries an ED identifier of the source client end ED; the server end ED learns the source MAC address of the message, and configures the learned MAC address and an output interface corresponding to a main tunnel between the server end ED and the source client end ED to an MAC table of the server end ED;
the server ED queries an MAC table according to the destination MAC address of the unknown unicast message, and performs local forwarding when hitting a local site; when hitting the remote site, the remote site is forwarded out through a standby tunnel between the remote site and the target client ED; and if the hit is not hit, broadcasting is carried out in the EVI instance.
2. The method of claim 1, wherein the method of broadcasting within an EVI instance comprises:
and the server ED broadcasts the unknown unicast message in a local virtual local area network VLAN, and forwards the unknown unicast message from backup tunnels established between the server ED and all other clients ED except the source client ED.
3. The method of claim 1, further comprising:
the server end ED receives a known unicast message sent by a source client end ED from a main tunnel, learns a source MAC address of the message, and configures the learned MAC address and an output interface corresponding to the main tunnel between the server end ED and the source client end ED to an MAC table of the server end ED;
the server ED queries an MAC table according to the destination MAC address of the known unicast message, and performs local forwarding when hitting a local site; and if the result is not hit, broadcasting in the local virtual local area network VLAN.
4. The method of claim 1, further comprising:
the server ED receives a unicast message of a local site, learns a source MAC address of the message, and configures the learned MAC address and a port to an MAC table of the server ED; and inquiring an MAC table according to the destination MAC address of the unicast message of the local site, broadcasting in a local VLAN if the destination MAC address of the unicast message of the local site is not hit, and respectively forwarding the broadcast message from main tunnels established by the local site and all other client sides ED, or respectively forwarding the backup tunnels established by the local site and all other client sides ED after the ED identifier of the server side ED is carried in the unicast message.
5. The method of claim 1, further comprising:
the server ED receives a broadcast message of a local site, learns a source MAC address of the message, and configures the learned MAC address and a port to an MAC table of the server ED; and broadcasting in the local VLAN, and respectively forwarding the broadcast from the backup tunnels or the main tunnels established by the local VLAN and all other clients ED.
6. A MAC learning method when the message of edge device is forwarded, this method is used in customer end edge device ED in the virtualized EVI network of Ethernet, said customer end ED and server end ED have set up the primary tunnel, characterized by that, also set up the spare tunnel between said customer end ED and said server end, used for bearing the unknown unicast message; the method further comprises the following steps:
when the client end ED is used as a source client end ED to send an unknown unicast message, adding an ED identifier of the client end ED into the unknown unicast message, and sending the unknown unicast message to a server end ED through a standby tunnel established between the client end ED and the server end ED;
when the client ED is used as a target client ED to receive an unknown unicast message from a standby tunnel, acquiring a source client ED according to an ED identifier carried by the unknown unicast message, learning a source MAC address of the message, and configuring the learned MAC address, an output interface corresponding to a main tunnel between the target client ED and the source client ED to an MAC table; then, inquiring an MAC table of the unknown unicast message according to the destination MAC address of the unknown unicast message, and if the unknown unicast message hits a local site, carrying out local forwarding; if not, broadcasting in the virtual local area network VLAN.
7. The method of claim 6, further comprising:
when the client ED is used as a source client ED to receive a unicast message of a local site, performing source MAC address learning on the message, and storing the learned MAC address and a port for receiving the message in an MAC table of the client ED;
inquiring an MAC table of the message according to the destination MAC address of the message, and if the message hits a local site, carrying out local forwarding; if the station hits the server end ED or the target client end ED station, the station is forwarded out through a main tunnel between the station and the server end ED or the target client end ED; and if not, processing the unicast message as an unknown unicast message.
8. The method of claim 6, further comprising:
the client ED as a target client ED receives a known unicast message sent by a source client ED from a main tunnel, learns a source MAC address of the message, and configures the learned MAC address and an output interface corresponding to the main tunnel between the target client ED and the source client ED to an MAC table;
the destination client ED inquires an MAC table according to the destination MAC address of the known unicast message, and if the destination client ED hits a local site, local forwarding is carried out; if not, broadcast in the VLAN.
9. An edge device, which is a server end edge device ED in an Ethernet virtualization EVI network, comprises a main control unit, a forwarding unit and an interface unit, wherein an active tunnel is established between the server end ED and a client end ED in the EVI network,
the forwarding unit is configured to, when the interface unit receives an unknown unicast message from the source client ED from the backup tunnel, learn a source MAC address of the unknown unicast message, where the unknown unicast message carries an ED identifier of the source client ED, and configure the learned MAC address and an egress interface corresponding to the primary tunnel between the server end ED and the source client ED to the MAC table; the system is also used for inquiring an MAC table according to the destination MAC address of the unknown unicast message, and if the MAC table hits a local site, the MAC table is locally forwarded through an interface unit; when hitting the remote site, the remote site is forwarded out through the interface unit by using a standby tunnel between the remote site and the destination client ED; miss, broadcast within EVI instance through interface unit.
10. The apparatus of claim 9, wherein the broadcasting within the EVI instance by the interface unit is: and the forwarding unit broadcasts the unknown unicast message in the VLAN through the interface unit and forwards the unknown unicast message out through the interface unit by using the standby tunnels established with all the other clients ED except the source client ED.
11. The apparatus of claim 9,
the forwarding unit is further configured to, when the interface unit receives a known unicast message sent from the source client ED from the primary tunnel, learn a source MAC address of the message, and configure the learned MAC address and an egress interface corresponding to the primary tunnel between the server end ED and the source client ED to an MAC table of the server end ED; the unicast message forwarding module is also used for inquiring an MAC table according to the destination MAC address of the known unicast message, and performing local forwarding when a local site is hit; and if the result is not hit, broadcasting in the VLAN.
12. The apparatus of claim 9,
the forwarding unit is further configured to, when receiving a unicast message of a local site of the forwarding unit through the interface unit, learn a source MAC address of the unicast message, and configure the learned MAC address and port to an MAC table of the forwarding unit; and inquiring an MAC table according to the destination MAC address of the unicast message of the local site, broadcasting in a local VLAN if the destination MAC address of the unicast message of the local site is not hit, and respectively forwarding the broadcast message from main tunnels established by the local site and all other client sides ED, or respectively forwarding the backup tunnels established by the local site and all other client sides ED after the ED identifier of the server side ED is carried in the unicast message.
13. The edge device of claim 9,
the forwarding unit is further configured to, when the interface unit receives a broadcast packet of its own local site, learn a source MAC address of the packet, and configure the learned MAC address and port to its own MAC table; and broadcasting in the local VLAN, and respectively forwarding the broadcast from the backup tunnels or the main tunnels established by the local VLAN and all other clients ED.
14. An edge device, which is a client edge device ED in an Ethernet virtualization EVI network, comprises a main control unit, a forwarding unit and an interface unit, wherein an active tunnel is established between the client end ED and a server end ED in the EVI network,
the main control unit is used for adding the ED identification of the main control unit to the unknown unicast message when the main control unit is used as a source client ED to send the unknown unicast message;
the forwarding unit is used for sending the backup tunnel established between the forwarding unit and the server end ED to the server end ED through the interface unit when the forwarding unit is used as the source client end ED; when the user terminal is used as a destination client ED, an unknown unicast message forwarded by a server end ED is received from a standby tunnel through an interface unit, a source client ED is obtained according to an ED identifier carried by the unknown unicast message, a source MAC address of the message is learned, and the learned MAC address and an outgoing interface corresponding to a main tunnel between the destination client ED and the source client ED are configured to an MAC table; the device is also used for inquiring an MAC table according to the destination MAC address of the unknown unicast message, and if the destination MAC address hits the local, the device carries out local forwarding through an interface unit; if not, broadcast in the VLAN through the interface unit.
15. The apparatus of claim 14,
the forwarding unit is further configured to, when the interface unit receives a unicast packet of the local station, perform source MAC address learning on the packet, and store the learned MAC address and the port receiving the packet in an MAC table.
16. The apparatus of claim 14,
the forwarding unit is further used for inquiring an MAC table of the forwarding unit according to a destination MAC address of a message when the interface unit receives a unicast message of the local site, and performing local forwarding through the interface unit when the message hits the local site; when hitting a remote server end ED or a target client end ED, forwarding by using a main tunnel between the server end ED or the target client end ED and the interface unit; and if not, processing the unicast message as an unknown unicast message.
17. The apparatus of claim 14,
the forwarding unit is further configured to receive, at the client ED as the destination client ED, a known unicast message sent from the source client ED from the primary tunnel, learn a source MAC address of the message, and configure the learned MAC address and an egress interface corresponding to the primary tunnel between the destination client ED and the source client ED to its own MAC table; the system is also used for inquiring an MAC table according to the destination MAC address of the known unicast message, and if the destination MAC address of the known unicast message hits a local site, carrying out local forwarding; and if the result is not hit, broadcasting in the VLAN.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210316996.8A CN103685007B (en) | 2012-08-31 | 2012-08-31 | A kind of mac learning method when edge device message forwards and edge device |
PCT/CN2013/082638 WO2014032609A1 (en) | 2012-08-31 | 2013-08-30 | Mac address learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210316996.8A CN103685007B (en) | 2012-08-31 | 2012-08-31 | A kind of mac learning method when edge device message forwards and edge device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103685007A CN103685007A (en) | 2014-03-26 |
CN103685007B true CN103685007B (en) | 2016-11-16 |
Family
ID=50182534
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210316996.8A Active CN103685007B (en) | 2012-08-31 | 2012-08-31 | A kind of mac learning method when edge device message forwards and edge device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103685007B (en) |
WO (1) | WO2014032609A1 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9559865B2 (en) * | 2013-11-08 | 2017-01-31 | Verizon Patent And Licensing Inc. | Virtual network device in a cloud computing environment |
CN104618210B (en) * | 2014-12-25 | 2018-07-31 | 新华三技术有限公司 | A kind of state notice method and equipment |
CN104836744B (en) * | 2015-05-29 | 2018-06-12 | 新华三技术有限公司 | A kind of message processing method and device |
US10313153B2 (en) | 2017-02-27 | 2019-06-04 | Cisco Technology, Inc. | Adaptive MAC grouping and timeout in EVPN environments using machine learning |
CN117221045A (en) * | 2020-08-28 | 2023-12-12 | 柏思科技有限公司 | Method and system for transmitting session-based packets |
CN112804158B (en) * | 2021-03-31 | 2021-09-21 | 四川新网银行股份有限公司 | Unknown unicast forwarding and control method for switch |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2107724B1 (en) * | 2008-03-31 | 2010-06-23 | Alcatel, Lucent | Improved MAC address learning |
CN101980496A (en) * | 2010-10-13 | 2011-02-23 | 华为数字技术有限公司 | Message processing method and system, exchange board and access server equipment |
CN102098202A (en) * | 2009-12-11 | 2011-06-15 | 华为技术有限公司 | Virtual private topology control method, device and system |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040202199A1 (en) * | 2003-04-11 | 2004-10-14 | Alcatel | Address resolution in IP interworking layer 2 point-to-point connections |
US7907595B2 (en) * | 2006-09-29 | 2011-03-15 | Avaya, Inc. | Method and apparatus for learning endpoint addresses of IPSec VPN tunnels |
CN101001196A (en) * | 2007-01-25 | 2007-07-18 | 华为技术有限公司 | Method and device for setting pseudo-line tunnel and transmitting message using it |
US8565230B2 (en) * | 2010-09-10 | 2013-10-22 | Avaya Inc. | Shared virtual tunnels supporting Mac learning in communication networks |
CN102594711B (en) * | 2012-03-28 | 2014-11-26 | 杭州华三通信技术有限公司 | Message forwarding method and edge device therefor |
-
2012
- 2012-08-31 CN CN201210316996.8A patent/CN103685007B/en active Active
-
2013
- 2013-08-30 WO PCT/CN2013/082638 patent/WO2014032609A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2107724B1 (en) * | 2008-03-31 | 2010-06-23 | Alcatel, Lucent | Improved MAC address learning |
CN102098202A (en) * | 2009-12-11 | 2011-06-15 | 华为技术有限公司 | Virtual private topology control method, device and system |
CN101980496A (en) * | 2010-10-13 | 2011-02-23 | 华为数字技术有限公司 | Message processing method and system, exchange board and access server equipment |
Also Published As
Publication number | Publication date |
---|---|
CN103685007A (en) | 2014-03-26 |
WO2014032609A1 (en) | 2014-03-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11374857B2 (en) | Network device management method and apparatus, and system for indicating a network device to perform management operation | |
US9525563B2 (en) | Forwarding packets in an edge device | |
WO2016101646A1 (en) | Access method and apparatus for ethernet virtual network | |
US9730269B2 (en) | Method and system for partitioning wireless local area network | |
CN102413061B (en) | Message transmission method and equipment | |
US10193707B2 (en) | Packet transmission method and apparatus | |
CN103841023B (en) | The method and apparatus of data forwarding | |
US10033539B1 (en) | Replicating multicast state information between multi-homed EVPN routing devices | |
US9929936B2 (en) | Method for sending multicast packet and switch | |
CN111726286A (en) | EVPN message processing method, device and system | |
CN103685007B (en) | A kind of mac learning method when edge device message forwards and edge device | |
CN108964940B (en) | Message sending method and device and storage medium | |
EP3069471B1 (en) | Optimized multicast routing in a clos-like network | |
WO2017054576A1 (en) | Unicast tunnel building method, apparatus and system | |
CN108200225A (en) | Dissymmetric network address encapsulates | |
CN108696414A (en) | Return cut-in method, device and more home nodes more | |
US10757066B2 (en) | Active-active access to transparent interconnection of lots of links (TRILL) edges | |
WO2020220459A1 (en) | Vxlan and openflow-based method and system for sharing virtual home network | |
CN115695279A (en) | Segment route SRv6 communication method based on version 6 internet protocol | |
CN113794615A (en) | Message forwarding method and device | |
CN107547691B (en) | Address resolution protocol message proxy method and device | |
US11962673B2 (en) | Packet tunneling and decapsulation with split-horizon attributes | |
CN218920438U (en) | Internet access control system based on VXLAN | |
WO2023143186A1 (en) | Data transmission method, system and apparatus | |
CN106452992A (en) | Remote multi-homing networking method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No. Patentee after: Xinhua three Technology Co., Ltd. Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base Patentee before: Huasan Communication Technology Co., Ltd. |