WO2021190251A1 - Mac地址发送方法、装置、***及相关设备 - Google Patents

Mac地址发送方法、装置、***及相关设备 Download PDF

Info

Publication number
WO2021190251A1
WO2021190251A1 PCT/CN2021/078547 CN2021078547W WO2021190251A1 WO 2021190251 A1 WO2021190251 A1 WO 2021190251A1 CN 2021078547 W CN2021078547 W CN 2021078547W WO 2021190251 A1 WO2021190251 A1 WO 2021190251A1
Authority
WO
WIPO (PCT)
Prior art keywords
route
virtual
local area
network device
information
Prior art date
Application number
PCT/CN2021/078547
Other languages
English (en)
French (fr)
Inventor
朱文惠
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP21777165.8A priority Critical patent/EP4113937A4/en
Priority to JP2022557970A priority patent/JP2023518594A/ja
Publication of WO2021190251A1 publication Critical patent/WO2021190251A1/zh
Priority to US17/950,820 priority patent/US20230015922A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2596Translation of addresses of the same type other than IP, e.g. translation from MAC to MAC addresses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/586Association of routers of virtual routers
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/76Routing in software-defined topologies, e.g. routing between virtual machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/66Layer 2 routing, e.g. in Ethernet based MAN's
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5038Address allocation for local use, e.g. in LAN or USB networks, or in a controller area network [CAN]

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and in particular, to a method, device, system, and related equipment for sending a Media Access Control (MAC) address.
  • MAC Media Access Control
  • Ethernet Virtual Private Network is a virtual private network (Virtual Private Network, VPN) technology used to realize Layer 2 network interconnection.
  • VPN Virtual Private Network
  • An EVPN-based scalable virtual local area network includes multiple provider edge (Provider Edge, PE) devices, and the multiple PE devices can communicate with each other.
  • the host can connect to the PE device in the VXLAN to access the VXLAN.
  • the PE device can be connected to multiple hosts (which can be referred to as the local host of the PE device), and multiple virtual machines can be created on each of the multiple hosts (which can be referred to as the local virtual machine of the PE device). Multiple virtual machines on each host may belong to the same virtual local area network (VLAN), or may belong to different VLANs.
  • VLAN virtual local area network
  • the PE device can obtain the MAC address of its local virtual machine. Each time the PE device obtains the MAC address of a virtual machine, it can generate a Media Access Control/Internet Protocol Advertisement (MAC/IP Advertisement) route for advertising the MAC address of the virtual machine. Sent to other PE devices, the MAC/IP Advertisement route includes the MAC address of the virtual machine and the VXLAN network identifier (VXLAN network identifier, VNI) of the virtual machine.
  • VXLAN network identifier VXLAN network identifier
  • the embodiments of the present application provide a method, device, system, and related equipment for sending a MAC address, which can reduce the number of routes used to advertise the MAC address of a virtual machine in a network to a certain extent.
  • a MAC address sending method is provided, which is applied to a network system.
  • the network system includes a first network device and a second network device.
  • the first network device is connected to multiple virtual machines, and the multiple virtual machines include a first network device. Virtual machine and second virtual machine.
  • the method can be executed by the first network device. Specifically, the first network device obtains the MAC address of the first virtual machine; the MAC address of the first virtual machine is the same as the MAC address of the second virtual machine, and the virtual local area network where the second virtual machine and the first virtual machine are located is different In a case, the first network device obtains the first route, and the first route includes routing information, and the routing information includes the MAC address, the first virtual local area network information of the first virtual machine, and the second virtual local area network information of the second virtual machine; The network device sends the first route to the second network device.
  • the number of virtual machines that are the same as the MAC address of the first virtual machine and different from the virtual local area network where the first virtual machine is located can also be multiple, and are different from the virtual local area network where the first virtual machine is located.
  • the virtual local area networks where the multiple virtual machines are located are also different, and the second virtual machine belongs to the multiple virtual machines.
  • the routing information in the first route includes the MAC address, the first virtual local area network information of the first virtual machine, and the multiple virtual local area network information of the multiple virtual machines.
  • the multiple virtual local area network information has a one-to-one correspondence.
  • a route can be used to advertise the MAC address and the virtual local area network information of each virtual machine in the multiple virtual machines, that is, different virtual local area networks. Multiple pieces of information from multiple virtual machines with the same MAC address can be aggregated into one route. In this way, the number of routes in the network can be reduced, and route transmission performance and route convergence performance can be improved.
  • the first network device may store a second route (such as a Border Gateway Protocol (BGP) route), and the second route includes the routing information.
  • BGP Border Gateway Protocol
  • the route can include separate routes.
  • Multiple routing table entries corresponding to the multiple virtual machines In other words, for multiple virtual machines that are in different virtual local area networks but have the same MAC address, multiple pieces of information corresponding to the multiple virtual machines are recorded in one route to reduce the number of routes that need to be stored locally and save Storage resources.
  • the first network device may send a third route to the second network device.
  • the third route includes the MAC address and the second virtual local area network information, but does not include The first virtual local area network information.
  • the first network device can obtain relevant attribute information of the one or more virtual machines, and the one or more virtual machines include the second virtual machine but not the first virtual machine .
  • the first network device may send the third route to the second network device to advertise related information of the second virtual machine.
  • the virtual machine When the first network device also finds that it is online at the same time (the simultaneous online is not necessarily the same time point in the strict sense, and the order within a certain threshold range can be allowed), the virtual machine also includes the virtual machine with the same MAC address as the second virtual machine In the case of a virtual machine, the related information of the multiple virtual machines with the same MAC address may be sent together in the third route. After the first network device sends the third route, the first virtual machine goes online at a certain moment, and the first virtual machine and the second virtual machine have the same MAC address. At this time, the first network device can send the first route to Announce the relevant information of the first virtual machine.
  • the first route may include related information of the first virtual machine and related information of one or more virtual machines included in the previous third route.
  • the first route can be used as an update route of the third route.
  • the third route as an example that is sent when the virtual machine goes online, it is understandable that the third route itself may also be a route in an update scenario.
  • the second network device can continuously receive the latest route advertised by the first network device.
  • the route includes the aggregation attribute information of the virtual machines with the same MAC address under the first network device, thereby reducing the routes stored locally by the second network device. quantity.
  • the first virtual local area network information may include a virtual private network tag.
  • the virtual private network label includes VNI; or, if the first network device is located in a segment routing (SR) network or Internet Protocol version 6 segment routing (Internet Protocol) Version 6 segment routing, SRv6) network, the virtual private network label includes the segment identifier (SID); or, if the first network device is located in a multi-protocol label switching (Multi-protocol Label Switching, MPLS) network, the virtual private network label Private network labels include MPLS labels.
  • SR segment routing
  • MPLS Multi-protocol Label Switching
  • the first virtual local area network information may further include any one or more of routing destination attributes, virtual local area network tags, and MAC migration extended community attributes.
  • the first route may be a route used to advertise a MAC address.
  • the first route may be a MAC/IP Advertisement route, and the MAC/IP Advertisement route may be carried in a BGP update (Update) message.
  • the routing information including the MAC address, the first virtual local area network information, and the second virtual local area network information may exist in part of the fields in the MAC/IP Advertisement route, or part of the information in the routing information is directly It may exist in some fields in the BGP Update message, and other parts of information exist in the MAC/IP Advertisement route.
  • the routing information may also exist in other types of routes, and the route may be carried in a message together with one or more other advertisement routes, or sent separately.
  • the attribute value of the MAC Mobility Extended Community (MMEC) attribute included in the first virtual local area network information is the first attribute value.
  • the first network device receives the fourth route, the fourth route includes the MAC address and the third virtual local area network information of the first virtual machine, and the third virtual local area network information includes the MAC migration extended community attribute of the first virtual machine
  • the attribute value of is the second attribute value; in the case that the first attribute value is less than the second attribute value, the first network device deletes the first virtual local area network information in the second route and stores the fifth route.
  • the route includes the MAC address and the third virtual local area network information.
  • the third virtual local area network information is the updated virtual local area network information of the first virtual machine and is sent by other network devices.
  • a virtual machine migrates from the first network device to other network devices. Therefore, the first network device can update the routing table entry corresponding to the first virtual machine stored locally, and specifically can delete the first virtual local area network information in the stored second route.
  • the first network device further generates and stores a fifth route (such as a BGP route) according to the received fourth route, and the fifth route includes the third virtual local area network information sent by the second network device.
  • a fifth route such as a BGP route
  • a device for sending a MAC address in a second aspect, is provided, and the device for sending a MAC address has a function of realizing the behavior of the method for sending a MAC address in the first aspect.
  • the MAC address sending device includes at least one module, and the at least one module is used to implement the MAC address sending method provided in the above-mentioned first aspect.
  • a device for sending a MAC address includes a processor and a transceiver.
  • the processor is configured to execute a program stored in the memory to implement the MAC address sending method described in the first aspect.
  • the transceiver is used to send and receive various data involved in the first aspect.
  • the device may further include the memory, configured to store a program that supports the MAC address sending device to execute the MAC address sending method provided in the first aspect.
  • the MAC address sending device may further include a communication bus, the communication bus being used to establish a connection between the processor and the transceiver.
  • a computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute the MAC address sending method described in the first aspect.
  • a computer program product containing instructions which when running on a computer, causes the computer to execute the MAC address sending method described in the first aspect.
  • a method for receiving a MAC address is provided, which is applied to a network system.
  • the network system includes a first network device and a second network device.
  • the first network device is connected to multiple virtual machines, and the multiple virtual machines include a first network device. Virtual machine and second virtual machine.
  • the method is executed by the second network device.
  • the second network device receives the first route sent by the first network device, the first route includes first routing information, and the first routing information includes MAC address, first virtual local area network information, and second virtual local area network information, and the MAC address Is the MAC address of the first virtual machine and the second virtual machine connected to the first network device, the first virtual local area network information is the information of the first virtual machine, and the second virtual local area network information is the information of the second virtual machine; the second network The device stores the first routing information.
  • the number of virtual machines that are the same as the MAC address of the first virtual machine and different from the virtual local area network where the first virtual machine is located can also be multiple, and are different from the virtual local area network where the first virtual machine is located.
  • the virtual local area networks where the multiple virtual machines are located are also different, and the second virtual machine is the multiple virtual machines to which it belongs.
  • the routing information in the first route includes the MAC address, the first virtual local area network information of the first virtual machine, and the multiple virtual local area network information of the multiple virtual machines.
  • the multiple virtual local area network information has a one-to-one correspondence.
  • a route can be used to advertise the MAC address and the virtual local area network information of each virtual machine in the multiple virtual machines, that is, different virtual local area networks.
  • the same MAC address can be aggregated into one route. In this way, the number of routes in the network can be reduced, and route transmission performance and route convergence performance can be improved.
  • the first routing information is stored in the second route.
  • the second network device stores the first routing information
  • the first routing information is stored in the second route.
  • only one route needs to be stored to record the MAC address and virtual local area network information of the multiple virtual machines.
  • multiple routing table entries corresponding to these multiple virtual machines can be recorded in one route, thereby reducing the number of routes that need to be stored locally .
  • the second network device before receiving the first route, receives the third route sent by the first network device, the third route includes second routing information, and the second routing information includes the MAC address and the second route.
  • the virtual local area network information does not include the first virtual local area network information, and the second network device stores the second route information in the second route. That is, the second route stored locally by the second network device includes the virtual local area network information of the second virtual machine.
  • the third route sent by the device does not include the information of the first virtual machine that has the same MAC address as the second virtual machine. Therefore, the second route stored locally by the second network device does not include the information of the first virtual machine.
  • the second network device may update the second routing information in the second route to the first routing information.
  • the updating may be, for example, updating the complete second routing information to the first routing information, or it may be partially updating the data content of the second routing information that is different from the first routing information.
  • the third route includes the information of the second virtual machine
  • the first route includes the information of the first virtual machine and the second virtual machine.
  • the third route may also include information about one or more other virtual machines that have the same MAC address as the second virtual machine, and the third route may include information about the same MAC address as the first virtual machine.
  • the virtual machine such as the second virtual machine and/or one or more other virtual machines, may not include the information of other virtual machines, that is, when the first network device sends the first route, the first route included in the first route
  • a piece of routing information is information about a virtual machine that is actually mounted under the first network device and has the same MAC address as the first virtual machine when it is discovered that the first virtual machine is online.
  • the first virtual local area network information may include a virtual private network tag.
  • the virtual private network label includes VNI; or, if the first network device is located in an SR network or an SRv6 network, the virtual private network label includes SID; or, if the first network device Located in the MPLS network, the virtual private network label includes the MPLS label.
  • the first virtual local area network information may further include any one or more of routing destination attributes, virtual local area network tags, and MAC migration extended community attributes.
  • the first route may be a route used to advertise MAC addresses.
  • the first route may be a MAC/IP Advertisement route.
  • the MAC/IP Advertisement route can be carried in the BGP Update message.
  • the routing information including the MAC address, the first virtual local area network information, and the second virtual local area network information may exist in part of the fields in the MAC/IP Advertisement route, or part of the information in the routing information is directly It may exist in some fields in the BGP Update message, and other parts of information exist in the MAC/IP Advertisement route.
  • the routing information may also exist in other types of routes, and the route may be carried in a message together with one or more other routes, or sent separately.
  • the attribute value of the MAC migration extended community attribute of the first virtual machine included in the first routing information is the first attribute value.
  • the second network device generates a fourth route (such as a MAC/IP Advertisement route) according to the connection between the first virtual machine and the second network device and sends it to the first network device.
  • the fourth route includes the MAC address and the second network device.
  • the third virtual local area network information of a virtual machine, and the attribute value of the MAC migration extended community attribute of the first virtual machine included in the third virtual local area network information is a second attribute value, and the second attribute value is greater than the first attribute value.
  • the second network device may also store a sixth route locally, where the sixth route includes the MAC address and the third virtual local area network information of the first virtual machine.
  • the sixth route and the foregoing second route are two independently stored routes, where the second route is a route stored according to the MAC/IP Advertisement route received from the first network device, and the sixth route is the second network
  • the device generates or obtains a route according to the virtual machine detected under the second network device.
  • the second network device can update the locally stored MMEC attribute value of the first virtual machine, and specifically can increase the MMEC attribute value of the first virtual machine, that is, the second attribute value is greater than the first attribute value.
  • the MAC address and virtual local area network information of the first virtual machine can be re-advertised, that is, the fourth route can be sent to the first network device.
  • the fourth route may also include other virtual machines that have the same MAC address as the first virtual machine stored by the second network device. Information.
  • the fourth route may also only carry the updated virtual local area network information of the first virtual machine, or it may also carry other updated virtual local area network information that has the same MAC address as the first virtual machine, such as There are also other virtual machines migrating from the first network device to the second network device at the same time, or other newly online virtual machines under the second network device.
  • the first network device that receives the fourth route can update the routing table entries in the locally stored route with the same MAC address according to the update information carried in the received route, thereby improving routing transmission. It is efficient and reduces the number of routes stored locally by the route receiver.
  • the second network device may also send the first route to the third network device.
  • the second network device may be a route reflector, for example. Since the first network device reduces the number of routes that need to be sent, the corresponding second network device also reduces the number of routes that need to be reflected, which improves the overall transmission efficiency of the network.
  • a device for sending a MAC address is provided, and the device for sending a MAC address has the function of realizing the behavior of the method for sending a MAC address in the sixth aspect.
  • the MAC address sending device includes at least one module, and the at least one module is configured to implement the MAC address sending method provided in the sixth aspect.
  • a MAC address sending device in an eighth aspect, includes a processor and a transceiver, and the processor is configured to execute a program stored in a memory to implement the sixth The MAC address sending method described in the aspect.
  • the transceiver is used to send and receive various data involved in the sixth aspect.
  • the device may further include the memory for storing a program that supports the MAC address sending device to execute the MAC address sending method provided in the sixth aspect.
  • the MAC address sending device may further include a communication bus, the communication bus being used to establish a connection between the processor and the transceiver.
  • a computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute the MAC address sending method described in the sixth aspect.
  • a computer program product containing instructions which when running on a computer, causes the computer to execute the MAC address sending method described in the sixth aspect.
  • a MAC address transceiver system in an eleventh aspect, includes a first network device and a second network device.
  • the first network device is connected to a plurality of virtual machines, and the plurality of virtual machines includes a first virtual machine. Machine and the second virtual machine.
  • the first network device is configured to obtain the MAC address of the first virtual machine, where the MAC address of the first virtual machine is the same as the MAC address of the second virtual machine, and the second virtual machine is If the virtual local area network where the first virtual machine is located is different, a first route is acquired, where the first route includes first routing information, and the first routing information includes the MAC address and the first virtual machine's Sending the first virtual local area network information and the second virtual local area network information of the second virtual machine to the second network device;
  • the second network device is configured to receive the first route sent by the first network device, and store the first route information in the first route.
  • the first network device is further configured to store a second route, and the second route includes the first route information.
  • the second network device is used to store the first route information in the sixth route.
  • the first network device is further configured to send a third route to the second network device, where the third route includes second routing information, and the second routing information includes the MAC address and The second virtual local area network information does not include the first virtual local area network information; in this manner, the first network device is used to update the third route to obtain the first route;
  • the second network device is further configured to receive the third route sent by the first network device, and add the second routing information to the sixth route; in this manner, the second network device is used to transfer the The second routing information in the sixth route is updated to the first routing information.
  • the first virtual local area network information includes a virtual private network tag.
  • the virtual private network label includes VNI; or, if the first network device is located in an SR network or an SRv6 network, the virtual private network label includes SID; or, if the first network device is located in an MPLS network, the virtual private network label includes an MPLS label.
  • the first virtual local area network information further includes any one or more of routing destination attributes, virtual local area network tags, and MAC migration extended community attributes.
  • the first route is a MAC/IP Advertisement route.
  • the attribute value of the MAC migration extended community attribute included in the first virtual local area network information is the first attribute value
  • the second network device is further configured to generate a fourth route according to the connection between the first virtual machine and the second network device, where the fourth route includes the MAC address and the first virtual machine's 3.
  • Virtual local area network information where the attribute value of the MAC migration extended community attribute of the first virtual machine included in the third virtual local area network information is a second attribute value, and the second attribute value is greater than the first attribute value; Sending the fourth route by the first network device;
  • the first network device is further configured to receive a fourth route, and when the first attribute value is less than the second attribute value, delete the first virtual local area network information in the second route, and store the first virtual local area network information.
  • Fifth route, the fifth route includes the MAC address and the third virtual local area network information.
  • the second network device is further configured to send the first route to the third network device.
  • Fig. 1 is a schematic diagram of a network system provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a method for sending a MAC address according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of another network system provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a MAC address sending device provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of another MAC address sending device provided by an embodiment of the present application.
  • Fig. 7 is a schematic diagram of a MAC address transceiving system provided by an embodiment of the present application.
  • Fig. 1 is a schematic diagram of a network system provided by an embodiment of the present application.
  • a network system such as an EVPN-based VXLAN, SR network, SRv6 network, or MPLS network
  • it usually includes multiple network devices (network device 1 and network device 2 as shown in Figure 1)
  • the multiple network devices communicate with each other to realize the data forwarding function.
  • Hosts can connect to network devices in the network system to access the network system.
  • Each network device can be connected to multiple hosts (which can be called the local host of this network device), and each of the multiple hosts can have multiple virtual machines (which can be called the local virtual machine of this network device). ). That is, each network device can be connected to multiple virtual machines. Multiple virtual machines connected to each network device can belong to the same VLAN or belong to different VLANs. Each network device can obtain the MAC address of its connected virtual machine and send the MAC address to other network devices.
  • This MAC/IP Advertisement route includes this virtual machine. The MAC address of the machine and the VNI of this virtual machine. Then the network device sends this MAC/IP Advertisement route to other network devices so that other network devices can learn the MAC address of this virtual machine.
  • MAC/IP Advertisement route needs to be generated for each virtual machine, which leads to a continuous increase in the number of routes in the network and affects network performance.
  • the embodiment of the present application provides a method for sending MAC addresses, which can converge the same MAC addresses under different virtual local area networks into one route, thereby reducing the number of routes transmitted in the network to a certain extent, and significantly reducing the local network equipment.
  • the number of routes maintained improves the overall performance of network operations.
  • FIG. 2 is a flowchart of a method for sending a MAC address provided by an embodiment of the present application.
  • the method is applied to the network system shown in FIG. 1.
  • the network system includes a first network device and a second network device.
  • the first network device Connected to multiple virtual machines, the multiple virtual machines including a first virtual machine and a second virtual machine.
  • the method includes:
  • the first network device obtains the MAC address of the first virtual machine.
  • the first network device may be a device with a data forwarding function, such as a switch, a router, and other devices.
  • a data forwarding function such as a switch, a router, and other devices.
  • the types of the first network devices may be the same or different.
  • the first network device may be a VXLAN tunnel end point (vxlan tunnel end point, VTEP) device or the like.
  • VTEP VXLAN tunnel end point
  • EVPN is a VPN technology used to realize Layer 2 network interconnection.
  • the first network device may be a PE device.
  • the SRv6 network uses the Internet Protocol Version 6 (IPv6) data plane, which can be incrementally deployed on the IPv6 network.
  • IPv6 Internet Protocol Version 6
  • the first network device can be connected to multiple hosts (which can be referred to as the local host of the first network device), and multiple virtual machines can be created on each of the multiple hosts (which can be referred to as the local host of the first network device). virtual machine). That is, the first network device can be connected to multiple virtual machines.
  • the multiple virtual machines connected to the first network device may belong to the same VLAN or belong to different VLANs.
  • the first virtual machine is one of multiple virtual machines connected to the first network device, that is, the first virtual machine is a local virtual machine of the first network device.
  • the first network device can obtain the MAC address of the local virtual machine.
  • the first network device may obtain the MAC address of the first virtual machine in multiple ways.
  • IPv4 Internet Protocol Version 4
  • the MAC address of the first virtual machine may be resolved by the first network device according to the received address from the first virtual machine If a protocol (Address Resolution Protocol, ARP) message is determined, the ARP message may include a gratuitous ARP message, an ARP request message, or an ARP response message.
  • ARP Address Resolution Protocol
  • the MAC address of the first virtual machine may be the first network device according to the neighbor discovery protocol (Neighbor Discovery Protocol, ND) message received from the first virtual machine It is determined that the ND message may include a neighbor solicitation (Neighbor solicitation, NS) message or a neighbor advertisement (Neighbor Advertisement, NA) message, etc.
  • ND neighbor Discovery Protocol
  • the first virtual machine can send a gratuitous ARP message to the first network device connected to it.
  • the gratuitous ARP message includes the MAC address of the first virtual machine, so as to realize the
  • the network device advertises its own address; or, before the first virtual machine needs to communicate with other virtual machines, it can send an ARP request message carrying the IP address of the other virtual machine to the first network device it is connected to to pass the other virtual machine
  • the IP address of the virtual machine queries the MAC address of the other virtual machine.
  • the source address of the ARP request message is the MAC address of the first virtual machine; or, the first virtual machine receives the first virtual machine sent by other virtual machines.
  • an ARP response message carrying the MAC address of the first virtual machine may be sent to the other virtual machine.
  • the source address of the ARP response message is the MAC address of the first virtual machine.
  • the first virtual machine can send an NS message carrying the IP address of the other virtual machine to the first network device it is connected to before it needs to communicate with other virtual machines.
  • the source address of the NS message is the MAC address of the first virtual machine;
  • an NA message carrying the MAC address of the first virtual machine may be sent to the other virtual machines, and the source address of the NA message is the MAC address of the first virtual machine at this time.
  • the first network device may obtain the MAC address of the first virtual machine from the NS message or the NA message.
  • the first network device After the first network device obtains the MAC address of its local first virtual machine, it may obtain a route for advertising the MAC address through the following operation 202.
  • the first network device obtains the first route and sends it to The second network device sends the first route.
  • the first route includes routing information including the MAC address, first virtual local area network information of the first virtual machine, and second virtual local area network information of the second virtual machine.
  • the second network device may be a device with a data forwarding function, such as a switch, a router, and other devices.
  • the types of the second network devices may be the same or different.
  • the second network device may be a VTEP device or the like.
  • the second network device may be a PE device.
  • the second virtual machine is a virtual machine other than the first virtual machine among the multiple virtual machines connected to the first network device, and the second virtual machine is also a local virtual machine of the first network device.
  • the number of virtual machines that are the same as the MAC address of the first virtual machine and different from the virtual local area network where the first virtual machine is located may be one or more, and the second virtual machine belongs to the one or more virtual machines. machine. That is, the routing information in the first route includes the MAC address, the first virtual local area network information of the first virtual machine, and may also include one of one or more virtual machines that have the same MAC address as the first virtual machine. Or multiple virtual local area network information.
  • a route can be used to advertise the MAC address and the virtual local area network information of each virtual machine in the multiple virtual machines, that is, different virtual local area networks.
  • the same MAC address can be aggregated into one route. In this way, the number of routes in the network can be reduced, and route transmission performance and route convergence performance can be improved.
  • the first network device may obtain the first route, and multiple possible situations are described below.
  • the first network device obtains the MAC address of the first virtual machine and the MAC address of the second virtual machine within a preset period of time, and finds the MAC address of the first virtual machine and the MAC address of the second virtual machine.
  • the MAC addresses are the same.
  • the first network device directly generates and sends a first route including the MAC address, the first virtual local area network information of the first virtual machine, and the second virtual local area network information of the second virtual machine to the second network device. In this way, the number of routes to be sent can be reduced.
  • the preset duration can be set reasonably according to actual needs, and the preset duration can be set to a smaller value.
  • the preset duration can be greater than or equal to 0 seconds and less than or equal to 600 seconds. That is, the first network device obtains both the MAC address of the first virtual machine and the MAC address of the second virtual machine in a relatively short period of time.
  • the first virtual machine and the second virtual machine go online at the same time or go online at a short interval, and the first network device simultaneously obtains the MAC address of the first virtual machine and the second virtual machine's MAC address.
  • MAC address or the first network device first obtains the MAC address of the first virtual machine, and then obtains the MAC address of the second virtual machine after a short interval, or the first network device first obtains the second virtual machine The MAC address of the first virtual machine is obtained after a short interval.
  • the first network device may have learned the information of multiple local virtual machines with the same MAC address before enabling the function.
  • the machine information is separately stored in multiple routes.
  • the first route can be generated and sent using the enabled aggregation notification method.
  • the first network device first obtains the MAC address of the second virtual machine, and obtains the MAC address of the first virtual machine after obtaining the MAC address of the second virtual machine for a preset period of time.
  • the preset time period is different from the first case above, that is, after obtaining the MAC address of the second virtual machine, the second virtual machine does not obtain another machine with the same MAC address within the preset time period set in the first case.
  • the MAC address of the virtual machine (such as the first virtual machine), in this case, after obtaining the MAC address of the second virtual machine, the first network device may first send the third route to the second network device.
  • the third route includes the MAC address and the second virtual local area network information, but since the first virtual machine has not been found yet, it does not include the first virtual local area network information.
  • the first network device later obtains the MAC address of the first virtual machine, the first network device finds that the MAC address of the first virtual machine is the same as the MAC address of the second virtual machine, and can send the updated first route.
  • the updated first route may carry the MAC address, the virtual local area network information of the first virtual machine, and the virtual local area network information of the second virtual machine.
  • the updated first route may also include the MAC address and the virtual local area network information of the first virtual machine, but does not include the virtual local area network information of the second virtual machine, for example, when the first virtual machine goes online At that time, the second virtual machine has been uninstalled from the first network device or migrated to other network devices.
  • the virtual machine information carried in the first route sent by the first network device may be virtual local area network information of one or more virtual machines with the same MAC address actually mounted by the first network device when the device sends the route, but The sending of the first route by the first network device is triggered because the first virtual machine goes online.
  • the third route may also include virtual local area network information of other virtual machines with the same MAC address found within a preset time period.
  • the first network device can obtain the MAC addresses of the multiple virtual machines in a short time. Assuming that the MAC addresses of the multiple virtual machines are the same, the first network device may generate a third route including the MAC address and the virtual local area network information of the multiple virtual machines and send it to the second network device. After a long period of time exceeding the preset time, the first virtual machine goes online, and the first network device obtains the MAC address of the first virtual machine. Assuming that the MAC address of the first virtual machine is the same as the MAC addresses of the multiple virtual machines, Then the first network device may add the first virtual local area network information of the first virtual machine to obtain the updated first route.
  • the first network device may locally store the corresponding relationship between the MAC address and virtual local area network information of one or more virtual machines having the MAC address, and the corresponding relationship may be stored as routing information in a local route. For example, corresponding to the first route sent to the second network device, the first network device may store the second route locally.
  • the second route includes the same routing information as the first route, and the routing information includes the MAC address and the first route.
  • the first network device has not stored the second route before acquiring the first route. At this time, after the first network device generates the first route, the second route may be generated and stored.
  • the first network device has stored the route including the MAC address and the second virtual local area network information of the second virtual machine before acquiring the first route.
  • the first network device can update the stored route to obtain the second route. Specifically, the first network device may add the first virtual local area network information to the stored route to obtain the updated second route.
  • the following describes the virtual local area network information.
  • the virtual local area network information is used to reflect the relevant information of the virtual local area network where a virtual machine is located, and specifically may be one or more virtual local area network attribute information corresponding to the virtual machine.
  • the attributes included in the virtual local area network information can be the same or different. It can be designed according to specific needs, as long as it can reflect the relevant information of the virtual local area network where the virtual machine is located, and it can be used for different virtual machines.
  • the relevant information of the virtual local area network can be distinguished.
  • the virtual local area network information may include a virtual private network tag (VPN tag), and the VPN tag is used to identify the VPN where the virtual machine is located.
  • VPN tag virtual private network tag
  • the virtual private network label may include VNI.
  • the virtual private network label may include the SID.
  • the virtual private network label may include an MPLS label.
  • the virtual local area network information may further include any one or more of a route target (Route Target) attribute, a virtual local area network tag (VLAN tag), and an MMEC attribute.
  • a route target Route Target
  • VLAN tag virtual local area network tag
  • MMEC virtual local area network tag
  • both the first virtual local area network information and the second virtual local area network information may include virtual private Network label, Route Target, VLAN tag, and MMEC; or, both the first virtual local area network information and the second virtual local area network information may include the virtual private network label, Route Target, and MMEC; or, the first virtual local area network information and the second virtual local area network
  • the information can include the virtual private network label and Route Target.
  • the advertisement and reception of routes can be controlled. Specifically, after the Route Target attribute is carried in the virtual local area network information included in the route, other network devices that receive this route will compare the Route Target attribute configured by themselves with the Route Target attribute in this route, and only if both exist The routing information in this route will be stored only when the attribute value is the same, otherwise the routing information in this route will not be stored.
  • the VLAN tag can be used to identify the VLAN to which the data frame belongs. Specifically, after the VLAN tag is carried in the virtual local area network information included in the route, other network devices that receive this route store the route information in this route, and subsequently forward data frames with the destination address of the MAC address. The VLAN tag can be added to the data frame, so that the data frame can be forwarded in the VLAN identified by the VLAN tag.
  • the MMEC attribute includes a serial number, and the serial number increases as the number of virtual machine migrations increases.
  • virtual machine migration refers to the migration of a virtual machine from the network device it is connected to to another network device in the network. After the newly migrated network device senses that the virtual machine is online, it will resend the route used to advertise the virtual machine's MAC address. The difference between this route and the previously announced route used to advertise the virtual machine's MAC address is: The sequence number (or value) in the MMEC attribute included in this route is increased by 1. After other network devices receive a route with a greater sequence number than the route currently stored by itself, they update the stored route according to the route.
  • the virtual local area network information includes the MMEC attribute
  • take the migration of the first virtual machine from the first network device to the second network device as an example.
  • the attribute value of the MMEC included in the first virtual local area network information (corresponding to the first virtual machine) stored in the first network device is the first attribute value
  • the first network device receives the fourth route sent by the second network device .
  • the fourth route is generated when the second network device discovers that the first virtual machine is online, and includes the MAC address and the third virtual local area network information of the first virtual machine.
  • the attribute value of the MMEC of the first virtual machine included in the third virtual local area network information is the second attribute value. In the case that the first attribute value is less than the second attribute value, the first network device updates the second route.
  • the first network device may update the first virtual machine of the first virtual machine in the locally stored second route.
  • LAN information is deleted.
  • the first network device generates and stores a fifth route according to the fourth route, and the fifth route includes the MAC address and the third virtual local area network information.
  • the updated second route and the saved fifth route belong to two different routes, where the second route includes the virtual local area network information of the virtual machine with the MAC address under the first network device, and the fifth route includes the first 2.
  • the second route and the fifth route may be two different BGP routes.
  • the first network device may update the stored route corresponding to the first virtual machine, and specifically may delete the first virtual local area network information in the second route and store the fifth route.
  • the first network device may first detect whether the first virtual machine still exists locally, and if it is determined that the first virtual machine does not exist locally, then Perform the delete operation. Otherwise, you can perform operations such as reporting errors.
  • the method of updating the second route can also temporarily shield the first virtual local area network information by means such as setting.
  • the third virtual local area network information needs to include at least a virtual private network tag and an MMEC attribute, and may also include one or all of Route Target and VLAN tag.
  • the first route may be a route used to advertise MAC addresses.
  • the first route may be a MAC/IP Advertisement route.
  • the MAC/IP Advertisement route can be carried in the BGP Update message.
  • the routing information including the MAC address, the first virtual local area network information, and the second virtual local area network information may exist in part of the fields in the MAC/IP Advertisement route, or part of the information in the routing information It can directly exist in some fields in the BGP Update message, and other parts of information exist in the MAC/IP Advertisement route.
  • the routing information may also exist in other types of routes, and the route may be carried in a message together with one or more other routes, or sent separately.
  • the MAC/IP Advertisement route may include the EVPN network layer reachability information (NLRI) attribute, and the routing information may exist in the EVPN NLRI attribute.
  • NLRI network layer reachability information
  • the fields included in the EVPN NLRI attribute may be as shown in Table 1 below:
  • Route Distinguisher Ethernet Segment Identifier
  • EMI Ethernet Tag Identity Document
  • MAC Address Length MAC Address Length
  • MAC address MAC address
  • IP Address Length IP Address Virtual private network label 1 Route Target 1 VLAN tag 1 MMEC 1
  • Virtual private network label 2 Route Target 2 VLAN tag 2 MMEC 2 ... ... Virtual private network label n Route Target n VLAN tag n MMEC n
  • the route identifier field is used to distinguish MAC/IP Advertisement routes of different VXLANs to avoid MAC/IP Advertisement route conflicts.
  • the Ethernet segment identifier field is used to uniquely identify the link connecting the virtual machine to the network device.
  • the Ethernet tag identity identifier field is used to identify the VLAN ID actually configured by the network device.
  • the MAC address length field is used to indicate the length of the MAC address field, and the MAC address can be determined by combining the MAC address length field and the MAC address field.
  • the IP address length field is used to indicate the length of the IP address field. In the embodiment of the present application, the values of the IP address length field and the IP address field can both be 0.
  • the EVPN NLRI attribute in the MAC/IP Advertisement route can include a MAC address and multiple virtual local area network information (ie virtual private network tag, Route Target, VLAN tag, MMEC), and these multiple virtual local area network information It is the virtual local area network information of multiple virtual machines to which this MAC address belongs.
  • a MAC/IP Advertisement route carries the virtual local area network information of multiple virtual machines with the same MAC address under different virtual local area networks and the MAC address.
  • the Route Target in the routing information can exist in the extended communities attribute in the BGP Update message, and other information except Route Target in the routing information can exist in the EVPN NLRI Properties.
  • the fields included in the BGP Update message may be as shown in Table 2 below:
  • the BGP Update message can include a MAC address and multiple virtual local area network information (that is, virtual private network tag, Route Target, VLAN tag, MMEC), and the multiple virtual local area network information is the MAC address Virtual local area network information of multiple virtual machines to which it belongs.
  • the BGP Update message carries the virtual local area network information of multiple virtual machines with the same MAC address under different virtual local area networks and the MAC address.
  • the second network device receives the first route sent by the first network device.
  • the first route includes the above-mentioned route information, which is referred to herein as the first route information. That is, the first routing information includes the MAC address, the first virtual local area network information, and the second virtual local area network information.
  • the MAC address is the MAC address of the first virtual machine and the second virtual machine connected to the first network device
  • the first virtual local area network information is information of the first virtual machine
  • the second virtual local area network information is information of the second virtual machine.
  • the second network device after the second network device receives the first route sent by the first network device, it can also perform route reflection, that is, it can send the first route to the third network device, so that the third network device can perform virtual operations accordingly.
  • route reflection that is, it can send the first route to the third network device, so that the third network device can perform virtual operations accordingly.
  • Machine routing learning since the number of routes that the first network device needs to send is reduced, the number of routes that the second network device needs to reflect is correspondingly reduced, thereby further reducing the number of routes in the network.
  • the second network device stores the first routing information.
  • the second network device that receives the first route can perform virtual machine routing learning based on this, that is, can store the first route information in the first route.
  • the second network device may store the first routing information in a local routing.
  • the local route includes the MAC address advertised by the first network device through the first route, the first virtual local area network information of the first virtual machine having the MAC address, and the second virtual local area network information of the second virtual machine.
  • the second network device may generate the route information including the first route when receiving the first route. Local routing and storage.
  • the second network device before receiving the first route, the second network device has received the third route sent by the first network device, the third route includes the second routing information, and the second routing information includes the MAC address and The second virtual local area network information does not include the first virtual local area network information.
  • the second network device adds the second route information to the second route.
  • the second network device finds that the local route advertised by the first network device including the MAC address is stored locally, and the local route can be updated according to the received first route.
  • the second network device updates the second routing information in the local route to the first routing information.
  • the second routing information can be completely replaced with the first routing information, or it can be by comparing the first routing information. Partially update different parts of the second routing information, such as adding the first virtual local area network information to the local routing to implement the update.
  • the second network device may generate a fourth route according to the connection between the first virtual machine and the second network device and send it to the first A network device, the fourth route includes the MAC address and the third virtual local area network information of the first virtual machine.
  • the attribute value of the MMEC attribute of the first virtual machine included in the third virtual local area network information is a second attribute value, the second attribute value is determined according to the first attribute value, and the second attribute value may be greater than the first attribute value, to Indicates that the first virtual machine is migrated.
  • the second network device can update the attribute value of the MMEC attribute corresponding to the first virtual machine, and specifically can increase the attribute value of the MMEC attribute of the first virtual machine, that is, the second attribute value is greater than the first attribute value .
  • the second network device may advertise the MAC address of the first virtual machine and the third virtual local area network information including the second attribute value, and the third virtual local area network information may carry In the fourth route sent by the second network device to the first network device.
  • the second network device may also locally store the sixth route including the third virtual local area network information.
  • the second network device before the first virtual machine goes online on the second network device, the second network device has discovered that one or more other virtual machines with the same MAC address as the first virtual machine have been online, and the other virtual machines have gone online.
  • the virtual local area network information of one or more virtual machines is stored in the sixth route.
  • the second network device can update the sixth route by adding the third virtual local area network information.
  • other virtual machines with the MAC address of the first virtual machine are not loaded on the second network device, and when the first virtual machine goes online, The second network device locally generates and stores the sixth route.
  • the sixth route may delete the virtual local area network information of one or more other virtual machines while adding the third virtual local area network information.
  • the one or more other virtual machines may be after the first virtual machine goes online. The virtual machine is uninstalled within the preset time period.
  • the first network device obtains the MAC address of the first virtual machine. After that, when the MAC address of the first virtual machine is the same as the MAC address of the second virtual machine, and the virtual local area network where the second virtual machine is located is different from that of the first virtual machine, the first network device obtains the first route, and the first The routing includes routing information, and the routing information includes the MAC address, the first virtual local area network information of the first virtual machine, and the second virtual local area network information of the second virtual machine. Finally, the first network device sends the first route to the second network device so that the second network device can store the routing information.
  • a route can be used to advertise the MAC address and the virtual local area network information of each virtual machine in the multiple virtual machines, that is, the same MAC under different virtual local area networks Addresses can be aggregated into one route, which can reduce the number of routes in the network and improve route transmission performance and route convergence performance.
  • Virtual machine 1 and virtual machine 2 are online on network device 1 at the same time.
  • network device 1 obtains the MAC address of virtual machine 1 and the MAC address of virtual machine 2, it is found that the MAC address of virtual machine 1 is the same as the MAC address of virtual machine 2, and the virtual local area network where virtual machine 1 and virtual machine 2 are located are different.
  • the network device 1 generates a route for advertising the MAC address, the route includes routing information, and the route information includes the MAC address, virtual local area network information of virtual machine 1 and virtual local area network information of virtual machine 2.
  • the network device 1 generates the routing to the network device 2, and stores the local route including the routing information.
  • the network device 2 After the network device 2 receives the route sent by the network device 1, it can perform operations such as route reflection to send the route to other network devices. At the same time, the network device 2 may store a local route including the routing information in the route, and the local route corresponds to the network device 1.
  • the virtual machine 5 goes online on the network device 1.
  • network device 1 obtains the MAC address of virtual machine 5 and finds that the MAC address of virtual machine 5 is the same as the MAC address of virtual machine 1 and the MAC address of virtual machine 2
  • network device 1 updates the route.
  • the routing information includes the MAC address, virtual local area network information of virtual machine 1, virtual local area network information of virtual machine 2, and virtual local area network information of virtual machine 5.
  • the network device 1 generates the updated route to the network device 2, and adds the virtual local area network information of the virtual machine 5 to the previously stored local route.
  • the network device 2 After the network device 2 receives the updated route sent by the network device 1, it can perform route reflection, that is, send the updated route to other network devices. At the same time, the network device 2 can add the virtual local area network information of the virtual machine 5 to the previously stored local route.
  • Virtual machine 1 migrated from network device 1 to network device 2.
  • the virtual machine 1 goes offline on the network device 1, and after the network device 2 goes online again, the network device 2 obtains the MAC address of the virtual machine 1 and the virtual local area network information of the virtual machine 1.
  • the network device 2 finds that the previously stored local route includes the MAC address advertised by the first network device and the virtual local area network information of the virtual machine 1.
  • the network device 2 deletes the virtual local area network information of the virtual machine 1 stored in the local route, and increases the attribute value of the MMEC attribute in the acquired virtual local area network information of the virtual machine 1.
  • the network device 2 newly generates a local route including the MAC address and the virtual local area network information of the virtual machine 1, and the newly generated local route corresponds to the network device 2.
  • the network device 2 generates a route for advertising the MAC address and sends it to the network device 1.
  • the route includes the MAC address and virtual local area network information of the virtual machine 1.
  • network device 1 After network device 1 receives the route sent by network device 2, it finds that the MAC address advertised by the route is the same as the MAC address included in the local route, and finds that the attribute value of the MMEC attribute of virtual machine 1 included in the route is greater than this
  • the attribute value of the MMEC attribute of the virtual machine 1 stored in the local route (the route corresponding to the network device 1), the network device 1 deletes the virtual local area network information of the virtual machine 1 in the local route, and generates a message that includes the MAC address
  • the local route (route corresponding to the network device 2) of the virtual local area network information of the virtual machine 1 in the route.
  • Fig. 4 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • the network device may be the network device shown in FIG. 1, or the first network device described in the embodiment of FIG. 2, or the second network device described in the embodiment of FIG. 2, or The network device 1 or the network device 2 shown in FIG. 3.
  • the network device may include at least one processor 401 and at least one communication interface 404.
  • the network device may also include a communication bus 402 and a memory 403.
  • the processor 401 may be a microprocessor (including a central processing unit (CPU), etc.), an application-specific integrated circuit (ASIC), or may be one or more for controlling the solution of the application Integrated circuit for program execution.
  • a microprocessor including a central processing unit (CPU), etc.
  • ASIC application-specific integrated circuit
  • the communication interface 404 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), and so on.
  • RAN radio access network
  • WLAN wireless local area network
  • the memory 403 may be read-only memory (ROM), random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), optical disk ( Including read-only discs (compact disc read-only memory, CD-ROM), compact discs, laser discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store The desired program code in the form of instructions or data structures and any other medium that can be accessed by the computer, but not limited to this.
  • the memory 403 may exist independently and is connected to the processor 401 through the communication bus 402.
  • the memory 403 may also be integrated with the processor 401.
  • the communication bus 402 may include a path for transferring information between the above-mentioned components.
  • the processor 401 may include one or more CPUs, such as CPU0 and CPU1 as shown in FIG. 4.
  • the network device may include multiple processors, such as the processor 401 and the processor 405 as shown in FIG. 4. Each of these processors can be a single-core processor or a multi-core processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (such as computer program instructions).
  • the network device may further include an output device 406 and an input device 407.
  • the output device 406 communicates with the processor 401 and can display information in a variety of ways.
  • the output device 406 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc.
  • the input device 407 communicates with the processor 401, and can receive user input in a variety of ways.
  • the input device 407 may be a mouse, a keyboard, a touch screen device, a sensor device, or the like.
  • the foregoing network device may be, for example, a router, a switch, a PE device, a network server, a switch, or a desktop computer, or may be other types of communication devices or embedded devices, etc.
  • the embodiment of the present application does not specifically limit the type of the network device.
  • the memory 403 is used to store the program code 410 for executing the solution of the present application, and the processor 401 is used to execute the program code 410 stored in the memory 403.
  • the network device can use the processor 401 and the program code 410 in the memory 403 to implement the operation performed by the first network device or the second network device in the MAC address sending method provided in the embodiment of FIG. 2.
  • the memory can also exist independently of the network device, and the program code stored in the memory can be called when the network device is running to implement the MAC address sending method shown in FIG. 2 by the first network device or the second network The operation performed by the device.
  • Figure 5 is a schematic structural diagram of a MAC address sending device provided by an embodiment of the present application.
  • the device can be implemented as part or all of a network device by software, hardware, or a combination of the two.
  • the network device can be the one shown in Figure 4 Network equipment.
  • the apparatus may be located in the first network device shown in FIG. 2 or the network device 1 shown in FIG. 3.
  • the first network device is connected to multiple virtual machines, the multiple virtual machines including a first virtual machine and a second Two virtual machines, the device includes:
  • the first obtaining module 501 is configured to obtain the MAC address of the first virtual machine
  • the second obtaining module 502 is configured to obtain the first route when the MAC address of the first virtual machine is the same as the MAC address of the second virtual machine, and the virtual local area network where the second virtual machine is located is different from that of the first virtual machine,
  • the first route includes routing information, and the routing information includes MAC address, first virtual local area network information of the first virtual machine, and second virtual local area network information of the second virtual machine;
  • the sending module 503 is configured to send the first route to the second network device.
  • the device further includes:
  • the first storage module is used to store the second route, and the second route includes routing information.
  • the sending module 503 is also used to:
  • the second acquisition module 502 is used to:
  • the first virtual local area network information includes a virtual private network tag.
  • the virtual private network label includes VNI; or,
  • the virtual private network label includes the SID; or,
  • the virtual private network label includes the MPLS label.
  • the first virtual local area network information further includes any one or more of routing destination attributes, virtual local area network tags, and MAC migration extended community attributes.
  • the attribute value of the MAC migration extended community attribute included in the first virtual local area network information is the first attribute value
  • the device further includes:
  • the receiving module is configured to receive a fourth route, where the fourth route includes the MAC address and the third virtual local area network information of the first virtual machine, and the attribute value of the MAC migration extended community attribute of the first virtual machine included in the third virtual local area network information is Second attribute value;
  • the update module is used to delete the first virtual local area network information in the second route when the first attribute value is less than the second attribute value;
  • the second storage module is further configured to store a fifth route, and the fifth route includes the MAC address and the third virtual local area network information.
  • the first route is a MAC/IP Advertisement route.
  • the first network device obtains the MAC address of the first virtual machine. After that, when the MAC address of the first virtual machine is the same as the MAC address of the second virtual machine, and the virtual local area network where the second virtual machine is located is different from that of the first virtual machine, the first network device obtains the first route, and the first The routing includes routing information, and the routing information includes the MAC address, the first virtual local area network information of the first virtual machine, and the second virtual local area network information of the second virtual machine. Finally, the first network device sends the first route to the second network device so that the second network device can store the routing information.
  • a route can be used to advertise the MAC address and the virtual local area network information of each virtual machine in the multiple virtual machines, that is, the same MAC under different virtual local area networks Addresses can be aggregated into one route, which can reduce the number of routes in the network and improve route transmission performance and route convergence performance.
  • Figure 6 is a schematic structural diagram of a MAC address sending device provided by an embodiment of the present application.
  • the device can be implemented as part or all of a network device by software, hardware, or a combination of the two.
  • the network device can be the one shown in Figure 4 Network equipment.
  • the apparatus may be located in the second network device shown in FIG. 2 or the network device 2 shown in FIG. 3.
  • the second network device and the first network device are both located in the network system, and the first network device is connected to multiple virtual machines, the multiple virtual machines including a first virtual machine and a second virtual machine, and the apparatus includes:
  • the receiving module 601 is configured to receive a first route sent by a first network device, the first route includes first routing information, the first routing information includes MAC address, first virtual local area network information, and second virtual local area network information, and the MAC address is the first MAC addresses of a first virtual machine and a second virtual machine connected to a network device, the first virtual local area network information is information of the first virtual machine, and the second virtual local area network information is information of the second virtual machine;
  • the storage module 602 is used to store the first routing information.
  • the storage module 602 is used to:
  • the device further includes an adding module
  • the receiving module 601 is further configured to receive a third route sent by the first network device before receiving the first route.
  • the third route includes second routing information, and the second routing information includes MAC address and second virtual local area network information, but does not include First virtual local area network information; an adding module for adding second routing information to the second route;
  • the storage module 602 is used for:
  • the second network device updates the second routing information in the second route to the first routing information.
  • the first virtual local area network information includes a virtual private network tag.
  • the virtual private network label includes VNI; or,
  • the virtual private network label includes the SID; or,
  • the virtual private network label includes the MPLS label.
  • the first virtual local area network information further includes any one or more of the routing destination attribute, the virtual local area network label, and the MAC migration extension community.
  • the attribute value of the MAC migration extended community attribute of the first virtual machine included in the first routing information is the first attribute value
  • the apparatus further includes:
  • the sending module is configured to send a fourth route to the first network device according to the connection between the first virtual machine and the second network device.
  • the fourth route includes the MAC address and the third virtual local area network information of the first virtual machine.
  • the attribute value of the MMEC of the first virtual machine included in the local area network information is a second attribute value, and the second attribute value is greater than the first attribute value.
  • the device further includes:
  • the sending module is used to send the first route to the third network device.
  • the first route is a MAC/IP Advertisement route.
  • the second network device receives the first route sent by the first network device, the first route includes first routing information, and the first routing information includes MAC address, first virtual local area network information, and second virtual local area network information ,
  • the MAC address is the MAC address of the first virtual machine and the second virtual machine connected to the first network device
  • the first virtual local area network information is the information of the first virtual machine
  • the second virtual local area network information is the information of the second virtual machine .
  • the second network device stores the first routing information.
  • a route can be used to advertise the MAC address and the virtual local area network information of each virtual machine in the multiple virtual machines, that is, the same MAC under different virtual local area networks Addresses can be aggregated into one route, which can reduce the number of routes in the network and improve route transmission performance and route convergence performance.
  • the MAC address sending device provided in the above embodiment sends a MAC address
  • only the division of the above functional modules is used as an example.
  • the above functions can be allocated by different functional modules according to needs.
  • the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the MAC address sending device provided in the foregoing embodiment and the MAC address sending method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
  • Fig. 7 is a schematic diagram of a MAC address transceiving system provided by an embodiment of the present application.
  • the system includes a first network device 701 and a second network device 702.
  • the first network device 701 is connected to multiple virtual machines, and the multiple virtual machines include a first virtual machine and a second virtual machine.
  • the first network device 701 is configured to obtain the MAC address of the first virtual machine, where the MAC address of the first virtual machine is the same as the MAC address of the second virtual machine, and the virtual local area network where the second virtual machine and the first virtual machine are located is different
  • the first route includes first routing information
  • the first routing information includes the MAC address, the first virtual local area network information of the first virtual machine, and the second virtual local area network information of the second virtual machine, to
  • the second network device 702 sends the first route;
  • the second network device 702 is configured to receive the first route sent by the first network device 701, and store the first route information in the first route.
  • the first network device 701 is further configured to store a second route, and the second route includes the first route information.
  • the second network device 702 is configured to store the first route information in the sixth route.
  • the first network device 701 is further configured to send a third route to the second network device 702, the third route includes second routing information, and the second routing information includes the MAC address and the second virtual local area network information, but does not include the first virtual local area network Information; in this way, the first network device 701 is used to update the third route to obtain the first route;
  • the second network device 702 is also used to receive the third route sent by the first network device 701, and add the second route information to the sixth route; in this way, the second network device 702 is used to add the The second routing information is updated to the first routing information.
  • the first virtual local area network information includes a virtual private network label.
  • the virtual private network label includes VNI; or, if the first network device 701 is located in an SR network or an SRv6 network, the virtual private network label includes SID; or, if the first A network device 701 is located in an MPLS network, and the virtual private network label includes an MPLS label.
  • the first virtual local area network information further includes any one or more of routing destination attributes, virtual local area network tags, and MAC migration extended community attributes.
  • the first route is a MAC/IP Advertisement route.
  • the attribute value of the MAC migration extended community attribute included in the first virtual local area network information is the first attribute value
  • the second network device 702 is further configured to generate a fourth route according to the connection between the first virtual machine and the second network device 702, the fourth route including the MAC address and the third virtual local area network information of the first virtual machine, and the third virtual local area network
  • the attribute value of the MAC migration extended community attribute of the first virtual machine included in the information is the second attribute value, and the second attribute value is greater than the first attribute value; sending the fourth route to the first network device 701;
  • the first network device 701 is further configured to receive the fourth route, and when the first attribute value is less than the second attribute value, delete the first virtual local area network information in the second route and store the fifth route.
  • the fifth route includes The MAC address and the third virtual local area network information.
  • the second network device 702 is further configured to send the first route to the third network device.
  • the first network device first obtains the MAC address of the first virtual machine. After that, when the MAC address of the first virtual machine is the same as the MAC address of the second virtual machine, and the virtual local area network where the second virtual machine is located is different from that of the first virtual machine, the first network device obtains the first route, and the first The routing includes first routing information, and the first routing information includes the MAC address, the first virtual local area network information of the first virtual machine, and the second virtual local area network information of the second virtual machine. Then, the first network device sends the first route to the second network device so that the second network device can store the first route information.
  • the first network device can use a route to advertise the MAC address and the virtual local area network information of each virtual machine in the multiple virtual machines, that is, they belong to the same first network device.
  • the information of multiple virtual machines with the same MAC address but belonging to different virtual local area networks of a network device can be aggregated into one route, thereby reducing the number of routes used to advertise the MAC addresses of virtual machines in the network, improving routing performance and Routing convergence performance.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example: floppy disk, hard disk, tape), optical medium (for example: Digital Versatile Disc (DVD)) or semiconductor medium (for example: Solid State Disk (SSD)) Wait.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

一种MAC地址发送方法、装置、***及相关设备,属于通信技术领域。该方法应用于网络***,该网络***包括第一网络设备和第二网络设备,第一网络设备与多个虚拟机连接,多个虚拟机包括第一虚拟机和第二虚拟机。第一网络设备获取第一虚拟机的MAC地址,在第一虚拟机的MAC地址与第二虚拟机的MAC地址相同且第二虚拟机与第一虚拟机所在的虚拟局域网不同的情况下,获取第一路由并发送给第二网络设备,第一路由包括路由信息,该路由信息包括该MAC地址、第一虚拟机的第一虚拟局域网信息和第二虚拟机的第二虚拟局域网信息。本方法将不同虚拟局域网下具有相同MAC地址的虚拟机信息汇聚到一条路由,从而减少网络中的路由数量。

Description

MAC地址发送方法、装置、***及相关设备
本申请实施例要求于2020年3月23日提交的申请号为202010209165.5、发明名称为“MAC地址发送方法、装置和***”的中国专利申请的优先权,其全部内容通过引用结合在本申请实施例中。
技术领域
本申请实施例涉及通信技术领域,特别涉及一种媒体接入控制(Media Access Control,MAC)地址发送方法、装置、***及相关设备。
背景技术
以太网虚拟私有网络(Ethernet Virtual Private Network,EVPN)是一种用于实现二层网络互联的虚拟私有网络(Virtual Private Network,VPN)技术。EVPN作为承载二层业务的主流方案在各大运营商的网络设计中被广泛使用。基于EVPN的可扩展虚拟局域网(virtual extensible local area network,VXLAN)中包括多个运营商边缘(Provider Edge,PE)设备,该多个PE设备之间可以相互通信。主机可以连接VXLAN内的PE设备,以接入VXLAN。
PE设备可以连接多台主机(可以称为是该PE设备的本地主机),多台主机中的每台主机上可以创建有多个虚拟机(可以称为是该PE设备的本地虚拟机)。每台主机上的多个虚拟机可以属于同一个虚拟局域网(virtual local area network,VLAN),也可以分属于不同的VLAN。
PE设备可以获取其本地虚拟机的MAC地址。该PE设备每获取到一个虚拟机的MAC地址,就可以生成用于通告这个虚拟机的MAC地址的媒体接入控制/互联网协议通告(Media Access Control/Internet Protocol Advertisement,MAC/IP Advertisement)路由并发送给其它PE设备,该MAC/IP Advertisement路由中包括这个虚拟机的MAC地址和这个虚拟机的VXLAN网络标识(VXLAN network identifier,VNI)。
发明内容
本申请实施例提供了一种MAC地址发送方法、装置、***及相关设备,可以在一定程度上减少网络中用于通告虚拟机MAC地址的路由数量。
第一方面,提供了一种MAC地址发送方法,应用于网络***,该网络***包括第一网络设备和第二网络设备,第一网络设备与多个虚拟机连接,多个虚拟机包括第一虚拟机和第二虚拟机。
该方法可以由第一网络设备执行。具体地,第一网络设备获取第一虚拟机的MAC地址;在第一虚拟机的MAC地址与第二虚拟机的MAC地址相同,且第二虚拟机与第一虚拟机所在的虚拟局域网不同的情况下,第一网络设备获取第一路由,第一路由包括路由信息,该路由信息包括MAC地址、第一虚拟机的第一虚拟局域网信息和第二虚拟机的第二虚拟局域网信息;第一网络设备向第二网络设备发送第一路由。
在一种可能的情形中,与第一虚拟机的MAC地址相同且与第一虚拟机所在的虚拟局域 网不同的虚拟机的数量还可以是多个,且与第一虚拟机所在虚拟局域网不同的该多个虚拟机所在的虚拟局域网也各不相同,该第二虚拟机属于所述多个虚拟机。在上述情形下,第一路由中的路由信息包括该MAC地址、第一虚拟机的第一虚拟局域网信息和该多个虚拟机的多个虚拟局域网信息,其中所述多个虚拟机分别与所述多个虚拟局域网信息一一对应。
本申请实施例中,对于处于不同虚拟局域网但MAC地址相同的多个虚拟机,可以使用一条路由来通告该MAC地址和该多个虚拟机中每个虚拟机的虚拟局域网信息,即不同虚拟局域网下具有相同MAC地址的多个虚拟机的多条信息可以汇聚到一条路由。如此,可以减少网络中的路由数量,提升路由传输性能和路由收敛性能。
在一种可能的实现方式中,第一网络设备可以存储第二路由(如边界网关协议(Border Gateway Protocol,BGP)路由),第二路由包括所述路由信息。如此,对于处于不同虚拟局域网但具有相同MAC地址的多个虚拟机,仅需要本地存储一条路由就可以记录该相同的MAC地址和这多个虚拟机的虚拟局域网信息,该条路由中可以包括分别对应于该多个虚拟机的多个路由表项。也就是说,对于处于不同虚拟局域网但具有相同MAC地址的多个虚拟机,通过将与该多个虚拟机对应的多条信息记录在一条路由里,以减少本地所需存储的路由数量,节约存储资源。
在一种可能的实现方式中,在第一网络设备获取第一路由之前,第一网络设备可以向第二网络设备发送第三路由,第三路由包括MAC地址和第二虚拟局域网信息,不包括第一虚拟局域网信息。例如,在一个或多个虚拟机上线时,第一网络设备能够获取该一个或多个虚拟机的相关属性信息,该一个或多个虚拟机包括第二虚拟机,但不包括第一虚拟机。上述情况下,第一网络设备可以向第二网络设备发送第三路由,以通告第二虚拟机的相关信息。当第一网络设备还发现同时上线(该同时上线未必是严格意义上的相同时间点,可以允许一定阈值范围内的顺序先后)的虚拟机中还包括与该第二虚拟机具有相同MAC地址的虚拟机时,可以在该第三路由中一并发送该具有相同MAC地址的多个虚拟机的相关信息。当第一网络设备发送该第三路由之后,第一虚拟机在某一时刻上线,该第一虚拟机和第二虚拟机具有相同的MAC地址,此时第一网络设备可以发送第一路由以通告该第一虚拟机的相关信息。该第一路由可以包括第一虚拟机的相关信息和此前第三路由中已包括的一个或多个虚拟机的相关信息。即第一路由可以作为第三路由的更新路由。上述以第三路由为虚拟机上线时发送的路由为例,可以理解地,该第三路由本身也可以是更新场景下的路由。由此,第二网络设备可以不断接收第一网络设备通告的最新路由,该路由包括第一网络设备下具有相同MAC地址的虚拟机的汇聚属性信息,由此减少第二网络设备本地保存的路由数量。
示例地,第一虚拟局域网信息可以包括虚拟私有网络标签。例如,若第一网络设备位于基于EVPN的VXLAN中,虚拟私有网络标签包括VNI;或者,若第一网络设备位于分段路由(Segment Routing,SR)网络或互联网协议版本6分段路由(Internet Protocol Version 6 segment routing,SRv6)网络中,虚拟私有网络标签包括分段标识(segment identifier,SID);或者,若第一网络设备位于多协议标签交换(Multi-protocol Label Switching,MPLS)网络中,虚拟私有网络标签包括MPLS标签。
示例地,第一虚拟局域网信息还可以包括路由目的属性、虚拟局域网标签和MAC迁移扩展社区属性中的任意一个或多个。
第一路由可以是用于通告MAC地址的路由,如第一路由可以是MAC/IP Advertisement 路由,该MAC/IP Advertisement路由可以携带于BGP更新(Update)报文中。上述情况下,包括有该MAC地址、第一虚拟局域网信息和第二虚拟局域网信息的路由信息,可以存在于该MAC/IP Advertisement路由中的部分字段中,或者,该路由信息中的部分信息直接可以存在于BGP Update报文中的部分字段中,其他部分信息存在于MAC/IP Advertisement路由中。在其他情形下,该路由信息也可以存在于其他类型的路由中,该路由可以与其他一条或多条通告路由一同携带在报文中发送,或者单独发送。
在一种可能的实现方式中,第一虚拟局域网信息中包括的MAC迁移扩展社区(MAC Mobility Extended Community,MMEC)属性的属性值为第一属性值。这种情况下,第一网络设备接收第四路由,第四路由包括MAC地址和第一虚拟机的第三虚拟局域网信息,第三虚拟局域网信息中包括的第一虚拟机的MAC迁移扩展社区属性的属性值为第二属性值;在第一属性值小于第二属性值的情况下,第一网络设备将第二路由中的第一虚拟局域网信息删除,并存储第五路由,所述第五路由中包括该MAC地址和第三虚拟局域网信息。
当第一属性值小于第二属性值时,说明相比于第一虚拟局域网信息,第三虚拟局域网信息是第一虚拟机的更新的虚拟局域网信息,并且由其他网络设备发送,此时说明第一虚拟机从第一网络设备迁移到其它网络设备。因而第一网络设备可以对本地存储的第一虚拟机对应的路由表项进行更新,具体可以将存储的第二路由中的第一虚拟局域网信息删除。第一网络设备还根据接收的第四路由,生成并存储第五路由(如BGP路由),该第五路由包括第二网络设备发送来的第三虚拟局域网信息。由此,通过使用MMEC属性,第一网络设备能够及时探测到本地虚拟机的迁移,提高本地维护路由信息的准确性,提高网络运行的健壮性。
第二方面,提供了一种MAC地址发送装置,所述MAC地址发送装置具有实现上述第一方面中MAC地址发送方法行为的功能。所述MAC地址发送装置包括至少一个模块,所述至少一个模块用于实现上述第一方面所提供的MAC地址发送方法。
第三方面,提供了一种MAC地址发送装置,所述MAC地址发送装置的结构中包括处理器和收发器。所述处理器被配置为用于执行存储器中存储的程序,以实现上述第一方面所述的MAC地址发送方法。所述收发器用于发送和接收第一方面所涉及的各种数据。可选地,所述装置还可以包括所述存储器,用于存储支持MAC地址发送装置执行上述第一方面所提供的MAC地址发送方法的程序。所述MAC地址发送装置还可以包括通信总线,所述通信总线用于在所述处理器与所述收发器之间建立连接。
第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面所述的MAC地址发送方法。
第五方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面所述的MAC地址发送方法。
第六方面,提供了一种MAC地址接收方法,应用于网络***,该网络***包括第一网络设备和第二网络设备,第一网络设备与多个虚拟机连接,多个虚拟机包括第一虚拟机和第二 虚拟机。
该方法由第二网络设备执行。具体地,第二网络设备接收第一网络设备发送的第一路由,第一路由包括第一路由信息,第一路由信息包括MAC地址、第一虚拟局域网信息和第二虚拟局域网信息,该MAC地址为第一网络设备所连接的第一虚拟机和第二虚拟机的MAC地址,第一虚拟局域网信息为第一虚拟机的信息,第二虚拟局域网信息为第二虚拟机的信息;第二网络设备存储第一路由信息。
在一种可能的情形中,与第一虚拟机的MAC地址相同且与第一虚拟机所在的虚拟局域网不同的虚拟机的数量还可以是多个,且与第一虚拟机所在虚拟局域网不同的该多个虚拟机所在的虚拟局域网也各不相同,该第二虚拟机即属于的所述多个虚拟机。在上述情形下,第一路由中的路由信息包括该MAC地址、第一虚拟机的第一虚拟局域网信息和该多个虚拟机的多个虚拟局域网信息,其中所述多个虚拟机分别与所述多个虚拟局域网信息一一对应。
本申请实施例中,对于处于不同虚拟局域网但MAC地址相同的多个虚拟机,可以使用一条路由来通告该MAC地址和该多个虚拟机中每个虚拟机的虚拟局域网信息,即不同虚拟局域网下的相同的MAC地址可以汇聚到一条路由。如此,可以减少网络中的路由数量,提升路由传输性能和路由收敛性能。
在一种可能的实现方式中,第二网络设备存储第一路由信息时,将第一路由信息存储在第二路由中。如此,对于处于不同虚拟局域网但具有相同MAC地址的多个虚拟机,仅需要存储一条路由就可以记录其MAC地址和这多个虚拟机的虚拟局域网信息。也就是说,对于处于不同虚拟局域网但具有相同MAC地址的多个虚拟机,与这多个虚拟机对应的多个路由表项可以记录在一条路由里,从而可以减少本地所需存储的路由数量。
在一种可能的实现方式中,第二网络设备在接收第一路由之前,接收第一网络设备发送的第三路由,第三路由包括第二路由信息,第二路由信息包括MAC地址和第二虚拟局域网信息,不包括第一虚拟局域网信息,第二网络设备将第二路由信息存储至第二路由。即第二网络设备本地保存的第二路由包括第二虚拟机的虚拟局域网信息,此时,由于第一虚拟机可能还未在第一网络设备上线等原因,第二网络设备接收的第一网络设备发送的第三路由中并未包括和第二虚拟机具有相同MAC地址的第一虚拟机的信息,因而第二网络设备本地存储的第二路由中也不包括第一虚拟机的信息。在第二网络设备接收该第三路由之后,当第二网络设备又接收到包括第一虚拟机属性信息的第一路由后,在将第一路由中包括的第一路由信息存储在第二路由中时,第二网络设备可以将第二路由中的第二路由信息更新为第一路由信息。所述更新例如可以是将完整的第二路由信息更新为第一路由信息,也可以是将第二路由信息中与第一路由信息不同的数据内容进行部分更新。
在上述情形中,以第三路由包括第二虚拟机的信息,而第一路由包括第一虚拟机和第二虚拟机的信息为例。在实际应用场景中,第三路由中还可以包括与第二虚拟机具有相同MAC地址的其他一个或多个虚拟机的信息,而第三路由中可以包括与第一虚拟机具有相同MAC地址的虚拟机,如第二虚拟机和/或其他一个或多个虚拟机,也可以不包括其他虚拟机的信息,即以第一网络设备在发送第一路由时,该第一路由中包括的第一路由信息即为发现第一虚拟机上线时,该第一网络设备下实际挂载的、具有与该第一虚拟机相同的MAC地址的虚拟机的信息。
示例地,第一虚拟局域网信息可以包括虚拟私有网络标签。例如,若第一网络设备位于 基于EVPN的VXLAN中,虚拟私有网络标签包括VNI;或者,若第一网络设备位于SR网络或SRv6网络中,虚拟私有网络标签包括SID;或者,若第一网络设备位于MPLS网络中,虚拟私有网络标签包括MPLS标签。
示例地,第一虚拟局域网信息还可以包括路由目的属性、虚拟局域网标签和MAC迁移扩展社区属性中的任意一个或多个。
第一路由可以是用于通告MAC地址的路由,如第一路由可以是MAC/IP Advertisement路由。该MAC/IP Advertisement路由可以携带于BGP Update报文中。上述情况下,包括有该MAC地址、第一虚拟局域网信息和第二虚拟局域网信息的路由信息,可以存在于该MAC/IP Advertisement路由中的部分字段中,或者,该路由信息中的部分信息直接可以存在于BGP Update报文中的部分字段中,其他部分信息存在于MAC/IP Advertisement路由中。在其他情形下,该路由信息也可以存在于其他类型的路由中,该路由可以与其他一条或多条路由一同携带在报文中发送,或者单独发送。
在一种可能的实现方式中,第一路由信息中包括的第一虚拟机的MAC迁移扩展社区属性的属性值为第一属性值。这种情况下,第二网络设备根据第一虚拟机与第二网络设备连接,生成第四路由(如MAC/IP Advertisement路由)并发送至第一网络设备,该第四路由包括MAC地址和第一虚拟机的第三虚拟局域网信息,第三虚拟局域网信息包括的第一虚拟机的MAC迁移扩展社区属性的属性值为第二属性值,该第二属性值大于第一属性值。第二网络设备还可以在本地保存第六路由,该第六路由包括该MAC地址和第一虚拟机的第三虚拟局域网信息。该第六路由和上述第二路由是两条独立存储的路由,其中该第二路由是根据从第一网络设备接收的MAC/IP Advertisement路由而存储的路由,而该第六路由是第二网络设备根据在该第二网络设备下探测到的虚拟机而生成或获取的路由。
当第一虚拟机与第二网络设备连接时,说明第一虚拟机从第一网络设备迁移到了第二网络设备。因而第二网络设备可以更新本地存储的第一虚拟机的MMEC的属性值,具体可以将第一虚拟机的MMEC属性值增大,也就是说,第二属性值是大于第一属性值的。在增大第一虚拟机的MMEC的属性值后,可以重新通告第一虚拟机的MAC地址和虚拟局域网信息,即可以向第一网络设备发送第四路由。此时,在一种情形下,第四路由中除了包括更新后的第一虚拟机的虚拟局域网信息,还可以包括第二网络设备存储的与该第一虚拟机具有相同MAC地址的其他虚拟机的信息。在另一种情形下,第四路由中也可以仅携带更新的第一虚拟机的虚拟局域网信息,或者也可以一并携带与第一虚拟机具有相同MAC地址的其他更新的虚拟局域网信息,例如还有同时从第一网络设备迁移到第二网络设备的其他虚拟机,或者第二网络设备下其他新上线的虚拟机等情形。在上述另一种情形下,接收该第四路由的第一网络设备可以根据接收的路由中携带的更新信息,更新本地存储的具有相同MAC地址的路由中的路由表项,从而在提高路由传输效率的同时减少路由接收方本地存储的路由数量。
在一种可能的实现方式中,第二网络设备在接收第一路由之后,第二网络设备还可以将第一路由发送至第三网络设备。该第二网络设备例如可以是路由反射器。由于第一网络设备减少了所需发送的路由的数量,所以相应的第二网络设备也减少了所需反射的路由的数量,提高了网络的整体传输效率。
第七方面,提供了一种MAC地址发送装置,所述MAC地址发送装置具有实现上述第六 方面中MAC地址发送方法行为的功能。所述MAC地址发送装置包括至少一个模块,所述至少一个模块用于实现上述第六方面所提供的MAC地址发送方法。
第八方面,提供了一种MAC地址发送装置,所述MAC地址发送装置的结构中包括处理器和收发器,所述处理器被配置为用于执行存储器中存储的程序,以实现上述第六方面所述的MAC地址发送方法。所述收发器用于发送和接收第六方面所涉及的各种数据。可选地,所述装置还可以包括所述存储器,用于存储支持MAC地址发送装置执行上述第六方面所提供的MAC地址发送方法的程序。所述MAC地址发送装置还可以包括通信总线,所述通信总线用于在所述处理器与所述收发器之间建立连接。
第九方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第六方面所述的MAC地址发送方法。
第十方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第六方面所述的MAC地址发送方法。
第十一方面,提供了一种MAC地址收发***,该***包括第一网络设备和第二网络设备,所述第一网络设备与多个虚拟机连接,所述多个虚拟机包括第一虚拟机和第二虚拟机。
所述第一网络设备用于,获取所述第一虚拟机的MAC地址,在所述第一虚拟机的MAC地址与所述第二虚拟机的MAC地址相同,且所述第二虚拟机与所述第一虚拟机所在的虚拟局域网不同的情况下,获取第一路由,所述第一路由包括第一路由信息,所述第一路由信息包括所述MAC地址、所述第一虚拟机的第一虚拟局域网信息和所述第二虚拟机的第二虚拟局域网信息,向所述第二网络设备发送所述第一路由;
所述第二网络设备用于,接收所述第一网络设备发送的所述第一路由,并存储所述第一路由中的第一路由信息。
在一种可能的实现方式中,第一网络设备还用于存储第二路由,第二路由包括所述第一路由信息。
在一种可能的实现方式中,第二网络设备用于将第一路由信息存储在第六路由中。
在一种可能的实现方式中,第一网络设备,还用于向第二网络设备发送第三路由,所述第三路由包括第二路由信息,所述第二路由信息包括所述MAC地址和所述第二虚拟局域网信息,不包括所述第一虚拟局域网信息;这种方式下,第一网络设备用于更新第三路由,以获取第一路由;
第二网络设备,还用于接收所述第一网络设备发送的第三路由,将所述第二路由信息添加至所述第六路由;这种方式下,第二网络设备用于将所述第六路由中的第二路由信息更新为所述第一路由信息。
在一种可能的情况中,第一虚拟局域网信息包括虚拟私有网络标签。示例地,若所述第一网络设备位于基于EVPN的VXLAN中,所述虚拟私有网络标签包括VNI;或者,若所述第一网络设备位于SR网络或SRv6网络中,所述虚拟私有网络标签包括SID;或者,若所述第一网络设备位于MPLS网络中,所述虚拟私有网络标签包括MPLS标签。
在一种可能的情况中,第一虚拟局域网信息还包括路由目的属性、虚拟局域网标签和MAC迁移扩展社区属性中的任意一个或多个。
在一种可能的情况中,第一路由为MAC/IP Advertisement路由。
在一种可能的实现方式中,第一虚拟局域网信息中包括的MAC迁移扩展社区属性的属性值为第一属性值;
所述第二网络设备,还用于根据所述第一虚拟机与所述第二网络设备连接,生成第四路由,所述第四路由包括所述MAC地址和所述第一虚拟机的第三虚拟局域网信息,所述第三虚拟局域网信息包括的所述第一虚拟机的MAC迁移扩展社区属性的属性值为第二属性值,所述第二属性值大于所述第一属性值;向所述第一网络设备发送第四路由;
所述第一网络设备,还用于接收第四路由,在所述第一属性值小于所述第二属性值的情况下,删除第二路由中的所述第一虚拟局域网信息,并存储第五路由,所述第五路由包括所述MAC地址和所述第三虚拟局域网信息。
在一种可能的实现方式中,第二网络设备还用于将所述第一路由发送至第三网络设备。
上述第二方面、第三方面、第四方面和第五方面所获得的技术效果与上述第一方面中对应的技术手段获得的技术效果近似,在这里不再赘述。
上述第七方面、第八方面、第九方面和第十方面所获得的技术效果与上述第六方面中对应的技术手段获得的技术效果近似,在这里不再赘述。
上述第十一方面所获得的技术效果与上述第一方面和第六方面中对应的技术手段获得的技术效果近似,在这里不再赘述。
附图说明
图1是本申请实施例提供的一种网络***的示意图;
图2是本申请实施例提供的一种MAC地址发送方法的流程图;
图3是本申请实施例提供的另一种网络***的示意图;
图4是本申请实施例提供的一种网络设备的结构示意图;
图5是本申请实施例提供的一种MAC地址发送装置的结构示意图;
图6是本申请实施例提供的另一种MAC地址发送装置的结构示意图;
图7是本申请实施例提供的一种MAC地址收发***的示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的实施方式作进一步地详细描述。
在对本申请实施例进行详细地解释说明之前,先对本申请实施例涉及的应用场景予以说明。
图1是本申请实施例提供的一种网络***的示意图。参见图1,在网络***中,如在基于EVPN的VXLAN、SR网络、SRv6网络、或MPLS网络等中,通常包括多个网络设备(如图1中所示的网络设备1和网络设备2),该多个网络设备互相通信,实现数据转发功能。主机(如图1中所示的主机1、主机2、主机3和主机4)可以连接该网络***内的网络设备, 以接入该网络***。
每个网络设备可以连接多台主机(可以称为是这个网络设备的本地主机),多台主机中的每台主机上可以创建有多个虚拟机(可以称为是这个网络设备的本地虚拟机)。也即是,每个网络设备可以与多个虚拟机连接。每个网络设备连接的多个虚拟机可以属于同一个VLAN,也可以分属于不同的VLAN。每个网络设备可以获取其连接的虚拟机的MAC地址,并将该MAC地址发送给其它网络设备。
通常在VXLAN中,网络设备每获取到其所连接的一个虚拟机的MAC地址,就可以生成用于通告这个虚拟机的MAC地址的MAC/IP Advertisement路由,此MAC/IP Advertisement路由中包括这个虚拟机的MAC地址和这个虚拟机的VNI。然后该网络设备将此MAC/IP Advertisement路由发送给其它网络设备,以供其它网络设备学习这个虚拟机的MAC地址。
然而,随着虚拟机技术的发展,一个主机上可以创建较多数量的虚拟机,且不同的虚拟机可以分属于不同的虚拟局域网并拥有相同的MAC地址。在上述MAC地址通告方式中,对于每个虚拟机都需要生成一条MAC/IP Advertisement路由,从而导致网络中的路由数量不断增加,影响网络性能。
为此,本申请实施例提供了一种MAC地址发送方法,可以将不同虚拟局域网下相同的MAC地址汇聚到一条路由,从而在一定程度上可以减少网络中传输的路由数量,明显减少网络设备本地维护的路由数量,提升网络运行的整体性能。
图2是本申请实施例提供的一种MAC地址发送方法的流程图,该方法应用于图1所示的网络***,该网络***中包括第一网络设备和第二网络设备,第一网络设备与多个虚拟机连接,该多个虚拟机包括第一虚拟机和第二虚拟机。参见图2,该方法包括:
201:第一网络设备获取第一虚拟机的MAC地址。
第一网络设备可以是具备数据转发功能的设备,如交换机、路由器等设备。在不同的网络中,第一网络设备的类型可以相同也可以有所不同。
例如,在基于EVPN的VXLAN中,第一网络设备可以是VXLAN隧道终点(vxlan tunnel end point,VTEP)设备等。其中,EVPN是一种用于实现二层网络互联的VPN技术。
又例如,在基于EVPN的VXLAN、SR网络、SRv6网络、或MPLS网络中,第一网络设备可以是PE设备。其中,SRv6网络使用互联网协议版本6(Internet Protocol Version 6,IPv6)数据平面,可以在IPv6网络上增量部署。
第一网络设备可以连接多台主机(可以称为是第一网络设备的本地主机),多台主机中的每台主机上可以创建有多个虚拟机(可以称为是第一网络设备的本地虚拟机)。也即是,第一网络设备可以与多个虚拟机连接。第一网络设备所连接的多个虚拟机可以属于同一个VLAN,也可以分属于不同的VLAN。
另外,第一虚拟机是第一网络设备所连接的多个虚拟机中的一个,即第一虚拟机是第一网络设备的本地虚拟机。第一网络设备可以获取到本地虚拟机的MAC地址。
具体地,第一网络设备可以通过多种方式获取第一虚拟机的MAC地址。一种可能的方式中,在使用互联网协议版本4(Internet Protocol Version 4,IPv4)的网络中,第一虚拟机的MAC地址可以是第一网络设备根据所接收的来自第一虚拟机的地址解析协议(Address Resolution Protocol,ARP)报文确定的,该ARP报文可以包括免费ARP消息、ARP请求消 息或ARP应答消息等。另一种可能的方式中,在使用IPv6的网络中,第一虚拟机的MAC地址可以是第一网络设备根据所接收的来自第一虚拟机的邻居发现协议(Neighbor Discovery Protocol,ND)报文确定的,该ND报文可以包括邻居请求(Neighbor solicitation,NS)消息或邻居公告(Neighbor Advertisement,NA)消息等。
例如,在使用IPv4的网络中,第一虚拟机上线后,可以向其所连接的第一网络设备发送免费ARP消息,该免费ARP消息中包括第一虚拟机的MAC地址,以实现向第一网络设备通告自身地址;或者,第一虚拟机在需要与其它虚拟机通信之前,可以向其所连接的第一网络设备发送携带有该其它虚拟机的IP地址的ARP请求消息,以通过该其它虚拟机的IP地址查询该其它虚拟机的MAC地址,此时该ARP请求消息的源地址为第一虚拟机的MAC地址;或者,第一虚拟机在接收到其它虚拟机发送的携带有第一虚拟机的IP地址的ARP请求消息时,可以向该其它虚拟机发送携带有第一虚拟机的MAC地址的ARP应答消息,此时该ARP应答消息的源地址为第一虚拟机的MAC地址。之后,第一网络设备在接收到第一虚拟机发送的免费ARP消息、ARP请求消息或ARP应答消息后,可以从该免费ARP消息、该ARP请求消息或该ARP应答消息中获取第一虚拟机的MAC地址。
又例如,在使用IPv6的网络中,第一虚拟机上线后,可以在需要与其它虚拟机通信之前,向其所连接的第一网络设备发送携带有该其它虚拟机的IP地址的NS消息,以通过该其它虚拟机的IP地址查询该其它虚拟机的MAC地址,此时该NS消息的源地址为第一虚拟机的MAC地址;或者,第一虚拟机在接收到其它虚拟机发送的携带有第一虚拟机的IP地址的NS消息时,可以向该其它虚拟机发送携带有第一虚拟机的MAC地址的NA消息,此时该NA消息的源地址为第一虚拟机的MAC地址。之后,第一网络设备在接收到第一虚拟机发送的NS消息或NA消息后,可以从该NS消息或该NA消息中获取第一虚拟机的MAC地址。
第一网络设备获取到其本地的第一虚拟机的MAC地址后,可以通过如下操作202来获取用于通告该MAC地址的路由。
202:在第一虚拟机的MAC地址与第二虚拟机的MAC地址相同,且第二虚拟机与第一虚拟机所在的虚拟局域网不同的情况下,第一网络设备获取第一路由,并向第二网络设备发送第一路由。第一路由包括路由信息,该路由信息包括该MAC地址、第一虚拟机的第一虚拟局域网信息和第二虚拟机的第二虚拟局域网信息。
第二网络设备可以是具备数据转发功能的设备,如交换机、路由器等设备。在不同的网络中,第二网络设备的类型可以相同也可以有所不同。例如,在基于EVPN的VXLAN中,第二网络设备可以是VTEP设备等。又例如,在基于EVPN的VXLAN、SR网络、SRv6网络、或MPLS网络中,第二网络设备可以是PE设备。
另外,第二虚拟机是第一网络设备所连接的多个虚拟机中除第一虚拟机之外的虚拟机,第二虚拟机也是第一网络设备的本地虚拟机。
本申请实施例中,与第一虚拟机的MAC地址相同且与第一虚拟机所在的虚拟局域网不同的虚拟机的数量可以是一个或多个,该第二虚拟机属于该一个或多个虚拟机。也即是,第一路由中的路由信息中包括该MAC地址、第一虚拟机的第一虚拟局域网信息,还可包括与该第一虚拟机具有相同MAC地址的一个或多个虚拟机的一个或多个虚拟局域网信息。
本申请实施例中,对于处于不同虚拟局域网但MAC地址相同的多个虚拟机,可以使用一条路由来通告该MAC地址和该多个虚拟机中每个虚拟机的虚拟局域网信息,即不同虚拟 局域网下的相同的MAC地址可以汇聚到一条路由。如此,可以减少网络中的路由数量,提升路由传输性能和路由收敛性能。
第一网络设备获取第一路由的方式可以有多种,下面对多种可能的情况进行说明。
第一种可能的情况下,第一网络设备在预设时长内获取到第一虚拟机的MAC地址和第二虚拟机的MAC地址,并发现第一虚拟机的MAC地址和第二虚拟机的MAC地址相同。这种情况下,第一网络设备直接生成包括有该MAC地址、第一虚拟机的第一虚拟局域网信息和第二虚拟机的第二虚拟局域网信息的第一路由并发送给第二网络设备。如此,可以减少所要发送的路由的数量。
需要说明的是,预设时长可以根据实际需求进行合理设置,且预设时长可以设置的较小。如预设时长可以大于或等于0秒且小于或等于600秒。也就是说,第一网络设备在较短时间内既获取到第一虚拟机的MAC地址又获取到第二虚拟机的MAC地址。
例如,在虚拟机批量上线场景下,第一虚拟机和第二虚拟机同时上线或先后间隔较短时间上线,则第一网络设备同时获取到第一虚拟机的MAC地址和第二虚拟机的MAC地址,或者,第一网络设备先获取到第一虚拟机的MAC地址,在间隔较短时间后又获取到第二虚拟机的MAC地址,或者,第一网络设备先获取到第二虚拟机的MAC地址,在间隔较短时间后又获取到第一虚拟机的MAC地址。
又例如,在首次启用聚合通告具有相同MAC地址的虚拟机的属性信息的功能时,第一网络设备可能在启用该功能前已经学习到多个本地具有相同MAC地址的虚拟机信息,只是这些虚拟机信息分别存储在多条路由中,此时可以采用启用的聚合通告方式生成并发送第一路由。
第二种可能的情况下,第一网络设备先获取到第二虚拟机的MAC地址,并在获取到第二虚拟机的MAC地址的预设时长后再获取到第一虚拟机的MAC地址。所述预设时长后是指区别于上述第一种情况,即当在获取第二虚拟机的MAC地址后,并未在第一种情况设置的预设时长内再获取其他具有相同MAC地址的虚拟机(如第一虚拟机)的MAC地址,则在这种情况下,第一网络设备在获取到第二虚拟机的MAC地址后,可以先向第二网络设备发送第三路由。第三路由包括该MAC地址和第二虚拟局域网信息,但由于还未发现第一虚拟机,因而不包括第一虚拟局域网信息。当第一网络设备此后再获取到第一虚拟机的MAC地址时,第一网络设备发现第一虚拟机的MAC地址和第二虚拟机的MAC地址相同,则可以发送更新后的第一路由。相较于第三路由,该更新后的第一路由中可以携带该MAC地址、第一虚拟机的虚拟局域网信息和第二虚拟机的虚拟局域网信息。在另一种情形下,该更新后的第一路由中还可以包括该MAC地址和第一虚拟机的虚拟局域网信息,但不包括第二虚拟机的虚拟局域网信息,例如在第一虚拟机上线时,第二虚拟机已经从第一网络设备卸载,或迁移到其他网络设备上。第一网络设备发送的第一路由中携带的虚拟机信息,可以是该设备发送路由时第一网络设备实际挂载的具有相同的该MAC地址的一个或多个虚拟机的虚拟局域网信息,只是第一网络设备发送第一路由是由于第一虚拟机上线而触发的。
第三路由中除了包括第二虚拟机的第二虚拟局域网信息,还可以包括在预设时长内发现的其他具有相同MAC地址的虚拟机的虚拟局域网信息。
例如,在虚拟机上线场景下,多个虚拟机同时上线或先后间隔较短时间上线,则第一网络设备在较短时间内可以获取到多个虚拟机的MAC地址。假设这多个虚拟机的MAC地址相 同,则第一网络设备可以生成包括有该MAC地址和这多个虚拟机的虚拟局域网信息的第三路由并发送给第二网络设备。在超过预设时长的较长时间后,第一虚拟机上线,第一网络设备获取到第一虚拟机的MAC地址,假设第一虚拟机的MAC地址和这多个虚拟机的MAC地址相同,则第一网络设备可以添加第一虚拟机的第一虚拟局域网信息,以获得更新后的第一路由。
第一网络设备可以在本地存储该MAC地址以及具有该MAC地址的一个或多个虚拟机的虚拟局域网信息的对应关系,该对应关系可以作为路由信息存储在本地的一条路由中。例如,对应于发送给第二网络设备的第一路由,第一网络设备可以在本地存储第二路由,该第二路由包括与第一路由相同的路由信息,该路由信息包括该MAC地址、第一虚拟机的第一虚拟局域网信息和第二虚拟机的第二虚拟局域网信息。
本申请实施例中,对于处于不同虚拟局域网但具有相同MAC地址的多个虚拟机,仅需要存储一条路由就可以记录其MAC地址和这多个虚拟机的虚拟局域网信息。也就是说,对于处于不同虚拟局域网但具有相同MAC地址的多个虚拟机,与这多个虚拟机对应的多个路由表项可以记录在一条路由里,从而可以减少所需存储的路由数量。
需要说明的是,若第一路由是第一网络设备直接生成的,则第一网络设备在获取第一路由之前,尚未存储第二路由。此时第一网络设备在生成第一路由后,可以生成第二路由并存储。
若第一路由是第一网络设备对第三路由更新得到的,则第一网络设备在获取第一路由之前,已经存储包括有该MAC地址和第二虚拟机的第二虚拟局域网信息的路由。此时第一网络设备可以更新已存储的路由以得到第二路由。具体地,第一网络设备可以在已存储的路由中添加第一虚拟局域网信息,得到更新后的第二路由。
下面对虚拟局域网信息进行说明。
虚拟局域网信息是用于反映一个虚拟机所在的虚拟局域网的相关信息,具体可以是与该虚拟机对应的一个或多个虚拟局域网属性信息。在不同的网络中,虚拟局域网信息中包括的属性可以相同也可以有所不同,可以根据具体需要设计,只要保证其能反映虚拟机所在的虚拟局域网的相关信息,且对于不同的虚拟机可以通过该虚拟局域网的相关信息予以区分即可。
可选地,虚拟局域网信息可以包括虚拟私有网络标签(VPN tag),VPN tag用于标识虚拟机所在的VPN。
示例地,若第一网络设备位于基于EVPN的VXLAN中时,该虚拟私有网络标签可以包括VNI。或者,若第一网络设备位于SR网络或SRv6网络中,该虚拟私有网络标签可以包括SID。或者,若第一网络设备位于MPLS网络中时,该虚拟私有网络标签可以包括MPLS标签。
可选地,虚拟局域网信息还可以包括路由目的(Route Target)属性、虚拟局域网标签(VLAN tag)和MMEC属性中的任意一个或多个。对于第一路由中包括的第一虚拟机的第一虚拟局域网信息和第二虚拟机的第二虚拟局域网信息而言,例如,第一虚拟局域网信息和第二虚拟局域网信息中均可以包括虚拟私有网络标签、Route Target、VLAN tag和MMEC;或者,第一虚拟局域网信息和第二虚拟局域网信息中均可以包括虚拟私有网络标签、Route Target和MMEC;或者,第一虚拟局域网信息和第二虚拟局域网信息中均可以包括虚拟私有网络标签和Route Target。
需要说明的是,通过Route Target属性可以控制路由的发布与接收。具体来说,在路由包括的虚拟局域网信息中携带Route Target属性后,接收到此路由的其它网络设备会将自身配置的Route Target属性与此路由中的Route Target属性进行比较,只有当两者存在相同的属性值时,才会存储此路由中的路由信息,否则不存储此路由中的路由信息。
另外,可以利用VLAN tag来识别数据帧所属的VLAN。具体来说,在路由包括的虚拟局域网信息中携带VLAN tag后,接收到此路由的其它网络设备将此路由中的路由信息存储后,后续在转发目的地址为该MAC地址的数据帧时,就可以在该数据帧中添加该VLAN tag,以便可以实现该数据帧在该VLAN tag所标识的VLAN内的转发。
再者,该MMEC属性中包括一个序列号,这个序列号随着虚拟机迁移次数的增加而递增。具体来说,虚拟机迁移是指虚拟机从其接入的网络设备迁移到网络中的另一台网络设备下。新迁移到的网络设备感知到该虚拟机上线后,会重新发送用于通告该虚拟机的MAC地址的路由,此路由与之前发布的用于通告该虚拟机的MAC地址的路由的区别在于,此路由包括的MMEC属性中的序列号(或值)加1。其它网络设备接收到比自身当前存储的路由中的序列号更大的路由后,根据此路由更新所存储的路由。
当虚拟局域网信息中包括MMEC属性时,以第一虚拟机从第一网络设备迁移到第二网络设备为例。若第一网络设备中存储的第一虚拟局域网信息(对应于第一虚拟机)中包括的MMEC的属性值为第一属性值,且第一网络设备接收到第二网络设备发送的第四路由。该第四路由是第二网络设备发现第一虚拟机上线时生成的,包括该MAC地址和第一虚拟机的第三虚拟局域网信息。该第三虚拟局域网信息中包括的第一虚拟机的MMEC的属性值为第二属性值。在第一属性值小于第二属性值的情况下,第一网络设备对第二路由进行更新,具体地,第一网络设备可以将本地存储的第二路由中的第一虚拟机的第一虚拟局域网信息删除。并且,第一网络设备根据该第四路由生成第五路由并存储,第五路由包括该MAC地址和该第三虚拟局域网信息。该更新后的第二路由和保存的第五路由属于两条不同的路由,其中,第二路由中包括第一网络设备下具有该MAC地址的虚拟机的虚拟局域网信息,第五路由中包括第二网络设备下具有该MAC地址的虚拟机的虚拟局域网信息。该第二路由和第五路由可以是两条不同的BGP路由。
在第一属性值小于第二属性值时,说明第三虚拟局域网信息相比于第一虚拟局域网信息是第一虚拟机的新的虚拟局域网信息,此时第一虚拟机从第一网络设备已经迁移到第二网络设备。因而第一网络设备可以对存储的第一虚拟机对应的路由进行更新,具体可以将第二路由中的第一虚拟局域网信息删除并存储第五路由。
在上述情形下,第一网络设备在删除第一虚拟机的第一虚拟局域网信息之前,可以先探测本地是否还存在该第一虚拟机,如果确定本地已经不存在该第一虚拟机,则可以执行删除操作。否则,可以执行报错等操作。此外,更新第二路由的方式除了删除第一虚拟局域网信息外,还可以通过置位等方式暂时屏蔽第一虚拟局域网信息。
在上述情形下,该第三虚拟局域网信息至少需要包括虚拟私有网络标签和MMEC属性,此外还可以包括Route Target、VLAN tag中的一个或全部。
第一路由可以是用于通告MAC地址的路由,如第一路由可以是MAC/IP Advertisement路由。该MAC/IP Advertisement路由可以携带于BGP Update报文中。这种情况下,包括有该MAC地址、第一虚拟局域网信息和第二虚拟局域网信息的路由信息,可以存在于该MAC/IP  Advertisement路由中的部分字段中,或者,该路由信息中的部分信息直接可以存在于BGP Update报文中的部分字段中,其他部分信息存在于MAC/IP Advertisement路由中。在其他情形下,该路由信息也可以存在于其他类型的路由中,该路由可以与其他一条或多条路由一同携带在报文中发送,或者单独发送。
第一种可能的方式中,MAC/IP Advertisement路由中可以包括EVPN网络层可达信息(network layer reachability information,NLRI)属性,该路由信息可以存在于该EVPN NLRI属性中。示例地,该EVPN NLRI属性中包含的字段可以如下表1所示:
表1
路由标识符(Route Distinguisher,RD)
以太网段标识符(Ethernet Segment Identifier,ESI)
以太网标签身份标识符(Ethernet Tag Identity document,ETID)
MAC地址长度(MAC Address Length)
MAC地址(MAC Address)
IP地址长度(IP Address Length)
IP地址(IP Address)
虚拟私有网络标签1
Route Target 1
VLAN tag 1
MMEC 1
虚拟私有网络标签2
Route Target 2
VLAN tag 2
MMEC 2
……
……
虚拟私有网络标签n
Route Target n
VLAN tag n
MMEC n
其中,路由标识符字段用来区分不同VXLAN的MAC/IP Advertisement路由,以免MAC/IP Advertisement路由冲突。以太网段标识符字段用于唯一标识虚拟机连接到网络设备的链路。以太网标签身份标识符字段用于标识网络设备实际配置的VLAN ID。MAC地址长度字段用于指示MAC地址字段的长度,结合MAC地址长度字段和MAC地址字段可以确定出MAC地址。IP地址长度字段用于指示IP地址字段的长度,在本申请实施例中IP地址长度字段和IP地址字段的值均可以为0。
由表1可以看出,MAC/IP Advertisement路由中的EVPN NLRI属性可以包括一个MAC地址和多个虚拟局域网信息(即虚拟私有网络标签、Route Target、VLAN tag、MMEC),这 多个虚拟局域网信息是这个MAC地址所属的多个虚拟机的虚拟局域网信息。如此,通过一条MAC/IP Advertisement路由就携带了处于不同虚拟局域网下具有相同MAC地址的多个虚拟机的虚拟局域网信息和该MAC地址。
需要说明的是,本申请实施例仅以上表1为例对EVPN NLRI属性进行说明,上表1并不对本申请实施例构成唯一限定。例如,MAC/IP Advertisement路由中实际携带的虚拟局域网信息可以为任意个,每条虚拟局域网信息中包括的属性字段也可以根据需要确定。
第二种可能的方式中,该路由信息中的Route Target可以存在于BGP Update报文中的扩展团体(extended communities)属性中,该路由信息中除Route Target之外的其它信息可以存在于EVPN NLRI属性中。示例地,该BGP Update报文中包含的字段可以如下表2所示:
表2
Figure PCTCN2021078547-appb-000001
由表2可以看出,该BGP Update报文中可以包括一个MAC地址和多个虚拟局域网信息(即虚拟私有网络标签、Route Target、VLAN tag、MMEC),这多个虚拟局域网信息是这个MAC地址所属的多个虚拟机的虚拟局域网信息。如此,通过一个BGP Update报文就携带了处于不同虚拟局域网下具有相同MAC地址的多个虚拟机的虚拟局域网信息和该MAC地址。
需要说明的是,本申请实施例仅以上表2为例对该BGP Update报文进行说明,上表2并不对本申请实施例构成唯一限定。
203:第二网络设备接收第一网络设备发送的第一路由。
第一路由包括上述的路由信息,在此称为第一路由信息。即第一路由信息包括MAC地 址、第一虚拟局域网信息和第二虚拟局域网信息。该MAC地址为第一网络设备所连接的第一虚拟机和第二虚拟机的MAC地址,第一虚拟局域网信息为第一虚拟机的信息,第二虚拟局域网信息为第二虚拟机的信息。
进一步地,第二网络设备在接收到第一网络设备发送的第一路由之后,还可以进行路由反射,即可以将第一路由发送至第三网络设备,以便第三网络设备可以据此进行虚拟机路由学习。本申请实施例中,由于减少了第一网络设备所需发送的路由的数量,所以相应的也减少了第二网络设备所需反射的路由的数量,从而进一步减少了网络中的路由数量。
204:第二网络设备存储第一路由信息。
需要说明的是,第一网络设备发送第一路由后,接收到第一路由的第二网络设备可以据此进行虚拟机路由学习,即可以存储第一路由中的第一路由信息。
具体地,第二网络设备可以将第一路由信息存储在本地的路由中。该本地的路由包括第一网络设备通过第一路由而通告的MAC地址、具有该MAC地址的第一虚拟机的第一虚拟局域网信息和第二虚拟机的第二虚拟局域网信息。
一种可能的情况下,若第二网络设备在接收到第一路由时尚未存储包括有该MAC地址的路由,则第二网络设备在接收到第一路由时,可以生成包括有第一路由信息的本地路由并存储。
另一种可能的情况下,第二网络设备在接收第一路由之前,已经接收到第一网络设备发送的第三路由,第三路由包括第二路由信息,第二路由信息包括该MAC地址和第二虚拟局域网信息,不包括第一虚拟局域网信息,此时第二网络设备将第二路由信息添加至第二路由中。之后,第二网络设备在接收到第一路由时,发现本地已经存储有第一网络设备通告的、包括该MAC地址的本地路由,则可以根据该接收的第一路由对该本地路由进行更新,此时第二网络设备将本地路由中的第二路由信息更新为第一路由信息,具体例如可以是将第二路由信息完整地替换为第一路由信息,或者也可以是通过比较第一路由信息和第二路由信息而部分更新其中不同的部分,如在本地路由中添加第一虚拟局域网信息来实现更新等。
如此,对于同一网络设备中处于不同虚拟局域网但具有相同MAC地址的多个虚拟机,仅需要存储一条路由就可以记录其MAC地址和这多个虚拟机的虚拟局域网信息,从而可以减少所需存储的路由数量。
若第一路由信息中包括的第一虚拟机的MMEC属性的属性值为第一属性值,则第二网络设备可以根据第一虚拟机与第二网络设备连接,生成第四路由并发送至第一网络设备,该第四路由中包括该MAC地址和第一虚拟机的第三虚拟局域网信息。该第三虚拟局域网信息包括的第一虚拟机的MMEC属性的属性值为第二属性值,该第二属性值根据该第一属性值确定,且第二属性值可以大于第一属性值,以指示第一虚拟机发生迁移。
需要说明的是,当第一虚拟机与第二网络设备连接时,说明第一虚拟机从第一网络设备迁移到了第二网络设备。因而第二网络设备可以更新第一虚拟机对应的MMEC属性的属性值,具体可以将第一虚拟机的MMEC属性的属性值增大,也就是说,第二属性值是大于第一属性值的。在增大第一虚拟机的MMEC属性的属性值后,第二网络设备可以通告第一虚拟机的MAC地址和包括该第二属性值的第三虚拟局域网信息,该第三虚拟局域网信息可以携带在第二网络设备向第一网络设备发送的第四路由中。
第二网络设备还可以在本地存储包括该第三虚拟局域网信息的第六路由。在一种情形下, 在第一虚拟机在第二网络设备上线之前,第二网络设备已经发现与第一虚拟机的MAC地址相同的其他的一个或多个虚拟机上线,并将该其他的一个或多个虚拟机的虚拟局域网信息存储在该第六路由中,则在发现第一虚拟机上线时,第二网络设备可以通过添加第三虚拟局域网信息更新该第六路由。在另一种情形下,在第一虚拟机在第二网络设备上线之前,第二网络设备上并未加载具有第一虚拟机的MAC地址的其他虚拟机,则当第一虚拟机上线时,第二网络设备在本地生成第六路由并存储。在其他情形下,第六路由可以在添加第三虚拟局域网信息的同时,删除一个或多个其他虚拟机的虚拟局域网信息,该一个或多个其他虚拟机例如可以是在第一虚拟机上线后的预设时长内卸载的虚拟机。
在本申请实施例中,第一网络设备获取第一虚拟机的MAC地址。之后,在第一虚拟机的MAC地址与第二虚拟机的MAC地址相同,且第二虚拟机与第一虚拟机所在的虚拟局域网不同的情况下,第一网络设备获取第一路由,第一路由包括路由信息,该路由信息包括该MAC地址、第一虚拟机的第一虚拟局域网信息和第二虚拟机的第二虚拟局域网信息。最后,第一网络设备向第二网络设备发送第一路由,以便第二网络设备可以对该路由信息进行存储。如此,对于处于不同虚拟局域网但MAC地址相同的多个虚拟机,可以使用一条路由来通告该MAC地址和该多个虚拟机中每个虚拟机的虚拟局域网信息,即不同虚拟局域网下相同的MAC地址可以汇聚到一条路由,从而可以减少网络中的路由数量,提升路由传输性能和路由收敛性能。
为了便于理解,下面结合图3所示的网络***和不同阶段的应用场景,对上述MAC地址发送方法进行举例说明。
场景1 虚拟机上线:
虚拟机1和虚拟机2同时在网络设备1上线。网络设备1获取到虚拟机1的MAC地址和虚拟机2的MAC地址时,发现虚拟机1的MAC地址和虚拟机2的MAC地址相同,且虚拟机1和虚拟机2所在的虚拟局域网不同,则网络设备1生成用于通告该MAC地址的路由,该路由中包括路由信息,该路由信息包括该MAC地址、虚拟机1的虚拟局域网信息和虚拟机2的虚拟局域网信息。网络设备1将该路由发生给网络设备2,且存储包括有该路由信息的本地路由。
网络设备2接收到网络设备1发送的该路由后,可以进行路由反射等操作,将该路由发送给其它网络设备。同时,网络设备2可以存储包括有该路由中的路由信息的本地路由,该本地路由与网络设备1对应。
场景2 新增虚拟机:
在网络设备1向网络设备2发送该路由后,虚拟机5在网络设备1上线。网络设备1获取到虚拟机5的MAC地址时,发现虚拟机5的MAC地址与虚拟机1的MAC地址和虚拟机2的MAC地址均相同,则网络设备1更新该路由,更新后的路由中的路由信息包括该MAC地址、虚拟机1的虚拟局域网信息、虚拟机2的虚拟局域网信息和虚拟机5的虚拟局域网信息。网络设备1将更新后的路由发生给网络设备2,且在之前存储的本地路由中添加虚拟机5的虚拟局域网信息。
网络设备2接收到网络设备1发送的更新后的路由后,可以进行路由反射,即将该更新后的路由发送给其它网络设备。同时,网络设备2可以在之前存储的本地路由中添加虚拟机 5的虚拟局域网信息。
场景3 虚拟机迁移:
虚拟机1从网络设备1迁移到了网络设备2。虚拟机1在网络设备1下线,并在网络设备2重新上线后,网络设备2获取到虚拟机1的MAC地址和虚拟机1的虚拟局域网信息。网络设备2发现之前存储的本地路由中包括第一网络设备通告的该MAC地址和虚拟机1的虚拟局域网信息。这种情况下,网络设备2删除该本地路由中存储的虚拟机1的虚拟局域网信息,并将获取到的虚拟机1的虚拟局域网信息中的MMEC属性的属性值增大。之后,网络设备2新生成一条包括该MAC地址和虚拟机1的虚拟局域网信息的本地路由,该新生成的本地路由与网络设备2对应。同时,网络设备2生成用于通告该MAC地址的路由并发送给网络设备1,该路由中包括该MAC地址和虚拟机1的虚拟局域网信息。
网络设备1接收到网络设备2发送的该路由后,发现该路由所通告的MAC地址与其本地路由中包括的MAC地址相同,且发现该路由中包括的虚拟机1的MMEC属性的属性值大于该本地路由(与网络设备1对应的路由)中存储的虚拟机1的MMEC属性的属性值,则网络设备1删除该本地路由中的虚拟机1的虚拟局域网信息,并生成一条包括有该MAC地址和该路由中的虚拟机1的虚拟局域网信息的本地路由(与网络设备2对应的路由)。
图4是本申请实施例提供的一种网络设备的结构示意图。该网络设备可以是图1所示的网络设备,也可以是上述图2实施例中所述的第一网络设备,或者也可以是图2实施例中所述的第二网络设备,也可以是图3所示的网络设备1或网络设备2。参见图4,该网络设备可以包括至少一个处理器401以及至少一个通信接口404。该网络设备还可以包括通信总线402、存储器403。
处理器401可以是微处理器(包括中央处理器(central processing unit,CPU)等)、特定应用集成电路(application-specific integrated circuit,ASIC),或者可以是一个或多个用于控制本申请方案程序执行的集成电路。
通信接口404使用任何收发器一类的装置,用于与其它设备或通信网络通信,如以太网、无线接入网(radio access network,RAN)、无线局域网(wireless local area network,WLAN)等。
存储器403可以是只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、电可擦可编程只读存储器(electrically erasable programmable read-Only memory,EEPROM)、光盘(包括只读光盘(compact disc read-only memory,CD-ROM)、压缩光盘、激光盘、数字通用光盘、蓝光光盘等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器403可以是独立存在,并通过通信总线402与处理器401相连接。存储器403也可以和处理器401集成在一起。
通信总线402可包括一通路,用于在上述组件之间传送信息。
在具体实现中,作为一种实施例,处理器401可以包括一个或多个CPU,如图4中所示的CPU0和CPU1。
在具体实现中,作为一种实施例,网络设备可以包括多个处理器,如图4中所示的处理器401和处理器405。这些处理器中的每一个可以是一个单核处理器,也可以是一个多核处 理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,网络设备还可以包括输出设备406和输入设备407。输出设备406和处理器401通信,可以以多种方式来显示信息。例如,输出设备406可以是液晶显示器(liquid crystal display,LCD)、发光二级管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备407和处理器401通信,可以以多种方式接收用户的输入。例如,输入设备407可以是鼠标、键盘、触摸屏设备或传感设备等。
上述网络设备例如可以是路由器、交换机、PE设备、网络服务器、交换机或台式机,也可以是其他类型的通信设备或嵌入式设备等,本申请实施例不特别限定网络设备的类型。
当网络设备包括存储器403时,该存储器403用于存储执行本申请方案的程序代码410,处理器401用于执行存储器403中存储的程序代码410。该网络设备可以通过处理器401以及存储器403中的程序代码410,以实现图2实施例提供的MAC地址发送方法由第一网络设备或第二网络设备执行的操作。在其他实现形式中,存储器也可以独立于网络设备存在,网络设备运行时可以调用该存储器中存储的程序代码,以实现图2示出的MAC地址发送方法中由第一网络设备或第二网络设备执行的操作。
图5是本申请实施例提供的一种MAC地址发送装置的结构示意图,该装置可以由软件、硬件或者两者的结合实现成为网络设备的部分或者全部,该网络设备可以为图4所示的网络设备。参见图5,该装置可以位于图2示出的第一网络设备或图3示出的网络设备1,第一网络设备与多个虚拟机连接,该多个虚拟机包括第一虚拟机和第二虚拟机,该装置包括:
第一获取模块501,用于获取第一虚拟机的MAC地址;
第二获取模块502,用于在第一虚拟机的MAC地址与第二虚拟机的MAC地址相同,且第二虚拟机与第一虚拟机所在的虚拟局域网不同的情况下,获取第一路由,第一路由包括路由信息,路由信息包括MAC地址、第一虚拟机的第一虚拟局域网信息和第二虚拟机的第二虚拟局域网信息;
发送模块503,用于向第二网络设备发送第一路由。
可选地,该装置还包括:
第一存储模块,用于存储第二路由,第二路由包括路由信息。
可选地,发送模块503还用于:
向第二网络设备发送第三路由,第三路由包括MAC地址和第二虚拟局域网信息,不包括第一虚拟局域网信息;
第二获取模块502用于:
更新第三路由,以获取第一路由。
可选地,第一虚拟局域网信息包括虚拟私有网络标签。
可选地,
若第一网络设备位于基于EVPN的VXLAN中,虚拟私有网络标签包括VNI;或者,
若第一网络设备位于SR网络或SRv6网络中,虚拟私有网络标签包括SID;或者,
若第一网络设备位于MPLS网络中,虚拟私有网络标签包括MPLS标签。
可选地,第一虚拟局域网信息还包括路由目的属性、虚拟局域网标签和MAC迁移扩展社区属性中的任意一个或多个。
可选地,第一虚拟局域网信息中包括的MAC迁移扩展社区属性的属性值为第一属性值,该装置还包括:
接收模块,用于接收第四路由,第四路由包括MAC地址和第一虚拟机的第三虚拟局域网信息,第三虚拟局域网信息中包括的第一虚拟机的MAC迁移扩展社区属性的属性值为第二属性值;
更新模块,用于在第一属性值小于第二属性值的情况下,删除第二路由中的第一虚拟局域网信息;
第二存储模块,还用于存储第五路由,所述第五路由中包括所述MAC地址和所述第三虚拟局域网信息。
可选地,第一路由为MAC/IP Advertisement路由。
在本申请实施例中,第一网络设备获取第一虚拟机的MAC地址。之后,在第一虚拟机的MAC地址与第二虚拟机的MAC地址相同,且第二虚拟机与第一虚拟机所在的虚拟局域网不同的情况下,第一网络设备获取第一路由,第一路由包括路由信息,该路由信息包括该MAC地址、第一虚拟机的第一虚拟局域网信息和第二虚拟机的第二虚拟局域网信息。最后,第一网络设备向第二网络设备发送第一路由,以便第二网络设备可以对该路由信息进行存储。如此,对于处于不同虚拟局域网但MAC地址相同的多个虚拟机,可以使用一条路由来通告该MAC地址和该多个虚拟机中每个虚拟机的虚拟局域网信息,即不同虚拟局域网下相同的MAC地址可以汇聚到一条路由,从而可以减少网络中的路由数量,提升路由传输性能和路由收敛性能。
图6是本申请实施例提供的一种MAC地址发送装置的结构示意图,该装置可以由软件、硬件或者两者的结合实现成为网络设备的部分或者全部,该网络设备可以为图4所示的网络设备。参见图6,该装置可以位于图2示出的第二网络设备或图3示出的网络设备2。第二网络设备和第一网络设备均位于网络***,第一网络设备与多个虚拟机连接,该多个虚拟机包括第一虚拟机和第二虚拟机,该装置包括:
接收模块601,用于接收第一网络设备发送的第一路由,第一路由包括第一路由信息,第一路由信息包括MAC地址、第一虚拟局域网信息和第二虚拟局域网信息,MAC地址为第一网络设备所连接的第一虚拟机和第二虚拟机的MAC地址,第一虚拟局域网信息为第一虚拟机的信息,第二虚拟局域网信息为第二虚拟机的信息;
存储模块602,用于存储第一路由信息。
可选地,存储模块602用于:
将第一路由信息存储在第二路由中。
可选地,该装置还包括添加模块;
接收模块601,还用于在接收第一路由之前,接收第一网络设备发送的第三路由,第三路由包括第二路由信息,第二路由信息包括MAC地址和第二虚拟局域网信息,不包括第一虚拟局域网信息;添加模块,用于将第二路由信息添加至第二路由;
存储模块602用于:
第二网络设备将第二路由中的第二路由信息更新为第一路由信息。
可选地,第一虚拟局域网信息包括虚拟私有网络标签。
可选地,
若第一网络设备位于基于EVPN的VXLAN中,虚拟私有网络标签包括VNI;或者,
若第一网络设备位于SR网络或SRv6网络中,虚拟私有网络标签包括SID;或者,
若第一网络设备位于MPLS网络中,虚拟私有网络标签包括MPLS标签。
可选地,第一虚拟局域网信息还包括路由目的属性、虚拟局域网标签和MAC迁移扩展社区中的任意一个或多个。
可选地,第一路由信息中包括的第一虚拟机的MAC迁移扩展社区属性的属性值为第一属性值,该装置还包括:
发送模块,用于根据第一虚拟机与第二网络设备连接,向第一网络设备发送第四路由,所述第四路由包括MAC地址和第一虚拟机的第三虚拟局域网信息,第三虚拟局域网信息包括的第一虚拟机的MMEC的属性值为第二属性值,所述第二属性值大于所述第一属性值。
可选地,该装置还包括:
发送模块,用于将第一路由发送至第三网络设备。
可选地,第一路由为MAC/IP Advertisement路由。
在本申请实施例中,第二网络设备接收第一网络设备发送的第一路由,第一路由包括第一路由信息,第一路由信息包括MAC地址、第一虚拟局域网信息和第二虚拟局域网信息,该MAC地址为第一网络设备所连接的第一虚拟机和第二虚拟机的MAC地址,第一虚拟局域网信息为第一虚拟机的信息,第二虚拟局域网信息为第二虚拟机的信息。之后,第二网络设备存储第一路由信息。如此,对于处于不同虚拟局域网但MAC地址相同的多个虚拟机,可以使用一条路由来通告该MAC地址和该多个虚拟机中每个虚拟机的虚拟局域网信息,即不同虚拟局域网下相同的MAC地址可以汇聚到一条路由,从而可以减少网络中的路由数量,提升路由传输性能和路由收敛性能。
需要说明的是:上述实施例提供的MAC地址发送装置在发送MAC地址时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的MAC地址发送装置与MAC地址发送方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图7是本申请实施例提供的一种MAC地址收发***的示意图。参见图7,该***包括第一网络设备701和第二网络设备702,第一网络设备701与多个虚拟机连接,多个虚拟机包括第一虚拟机和第二虚拟机。
第一网络设备701用于,获取第一虚拟机的MAC地址,在第一虚拟机的MAC地址与第二虚拟机的MAC地址相同,且第二虚拟机与第一虚拟机所在的虚拟局域网不同的情况下,获取第一路由,第一路由包括第一路由信息,第一路由信息包括该MAC地址、第一虚拟机的第一虚拟局域网信息和第二虚拟机的第二虚拟局域网信息,向第二网络设备702发送第一路由;
第二网络设备702用于,接收第一网络设备701发送的第一路由,并存储第一路由中的第一路由信息。
可选地,第一网络设备701还用于存储第二路由,第二路由包括第一路由信息。
可选地,第二网络设备702用于将第一路由信息存储在第六路由中。
可选地,
第一网络设备701,还用于向第二网络设备702发送第三路由,第三路由包括第二路由信息,第二路由信息包括该MAC地址和第二虚拟局域网信息,不包括第一虚拟局域网信息;这种方式下,第一网络设备701用于更新第三路由,以获取第一路由;
第二网络设备702,还用于接收第一网络设备701发送的第三路由,将第二路由信息添加至第六路由;这种方式下,第二网络设备702用于将第六路由中的第二路由信息更新为第一路由信息。
可选地,第一虚拟局域网信息包括虚拟私有网络标签。示例地,若第一网络设备701位于基于EVPN的VXLAN中,虚拟私有网络标签包括VNI;或者,若第一网络设备701位于SR网络或SRv6网络中,虚拟私有网络标签包括SID;或者,若第一网络设备701位于MPLS网络中,虚拟私有网络标签包括MPLS标签。
可选地,第一虚拟局域网信息还包括路由目的属性、虚拟局域网标签和MAC迁移扩展社区属性中的任意一个或多个。
可选地,第一路由为MAC/IP Advertisement路由。
可选地,第一虚拟局域网信息中包括的MAC迁移扩展社区属性的属性值为第一属性值;
第二网络设备702,还用于根据第一虚拟机与第二网络设备702连接,生成第四路由,第四路由包括该MAC地址和第一虚拟机的第三虚拟局域网信息,第三虚拟局域网信息包括的第一虚拟机的MAC迁移扩展社区属性的属性值为第二属性值,第二属性值大于第一属性值;向第一网络设备701发送第四路由;
第一网络设备701,还用于接收第四路由,在第一属性值小于第二属性值的情况下,删除第二路由中的第一虚拟局域网信息,并存储第五路由,第五路由包括该MAC地址和第三虚拟局域网信息。
可选地,第二网络设备702还用于将第一路由发送至第三网络设备。
在本申请实施例中,第一网络设备先获取第一虚拟机的MAC地址。之后,在第一虚拟机的MAC地址与第二虚拟机的MAC地址相同,且第二虚拟机与第一虚拟机所在的虚拟局域网不同的情况下,第一网络设备获取第一路由,第一路由包括第一路由信息,该第一路由信息包括该MAC地址、第一虚拟机的第一虚拟局域网信息和第二虚拟机的第二虚拟局域网信息。然后,第一网络设备向第二网络设备发送第一路由,以便第二网络设备可以对该第一路由信息进行存储。如此,对于处于不同虚拟局域网但MAC地址相同的多个虚拟机,第一网络设备可以使用一条路由来通告该MAC地址和该多个虚拟机中每个虚拟机的虚拟局域网信息,即同属于第一网络设备的、具有相同的MAC地址但属于不同的虚拟局域网的多个虚拟机的信息可以汇聚到一条路由,从而可以减少网络中用于通告虚拟机MAC地址的路由数量,提升路由传输性能和路由收敛性能。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意结合来实现。当 使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络或其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如:同轴电缆、光纤、数据用户线(Digital Subscriber Line,DSL))或无线(例如:红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质,或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如:软盘、硬盘、磁带)、光介质(例如:数字通用光盘(Digital Versatile Disc,DVD))或半导体介质(例如:固态硬盘(Solid State Disk,SSD))等。
以上所述为本申请提供的实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (37)

  1. 一种媒体接入控制MAC地址发送方法,应用于网络***,所述网络***包括第一网络设备和第二网络设备,所述第一网络设备与多个虚拟机连接,所述多个虚拟机包括第一虚拟机和第二虚拟机;所述方法由所述第一网络设备执行,其特征在于,所述方法包括:
    所述第一网络设备获取所述第一虚拟机的MAC地址;
    在所述第一虚拟机的MAC地址与所述第二虚拟机的MAC地址相同,且所述第二虚拟机与所述第一虚拟机所在的虚拟局域网不同的情况下,所述第一网络设备获取第一路由,所述第一路由包括路由信息,所述路由信息包括所述MAC地址、所述第一虚拟机的第一虚拟局域网信息和所述第二虚拟机的第二虚拟局域网信息;
    所述第一网络设备向所述第二网络设备发送所述第一路由。
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备存储第二路由,所述第二路由包括所述路由信息。
  3. 如权利要求1所述的方法,其特征在于,在所述第一网络设备获取所述第一路由之前,所述方法还包括:
    所述第一网络设备向所述第二网络设备发送第三路由,所述第三路由包括所述MAC地址和所述第二虚拟局域网信息,不包括所述第一虚拟局域网信息;
    所述第一网络设备获取第一路由包括:
    所述第一网络设备更新所述第三路由,以获取所述第一路由。
  4. 如权利要求1-3任一所述的方法,其特征在于,所述第一虚拟局域网信息包括虚拟私有网络标签。
  5. 如权利要求4所述的方法,其特征在于,
    若所述第一网络设备位于基于以太网虚拟私有网络EVPN的可扩展虚拟局域网VXLAN中,所述虚拟私有网络标签包括可扩展虚拟局域网网络标识VNI;或者,
    若所述第一网络设备位于分段路由SR网络或互联网协议版本6分段路由SRv6网络中,所述虚拟私有网络标签包括分段标识SID;或者,
    若所述第一网络设备位于多协议标签交换MPLS网络中,所述虚拟私有网络标签包括MPLS标签。
  6. 如权利要求4或5所述的方法,其特征在于,所述第一虚拟局域网信息还包括路由目的属性、虚拟局域网标签和MAC迁移扩展社区属性中的任意一个或多个。
  7. 如权利要求6所述的方法,其特征在于,所述第一虚拟局域网信息中包括的MAC迁移扩展社区属性的属性值为第一属性值,所述方法还包括:
    所述第一网络设备接收第四路由,所述第四路由包括所述MAC地址和所述第一虚拟机的第三虚拟局域网信息,所述第三虚拟局域网信息中包括的所述第一虚拟机的MAC迁移扩展社区属性的属性值为第二属性值;
    在所述第一属性值小于所述第二属性值的情况下,所述第一网络设备删除第二路由中的所述第一虚拟局域网信息,并存储第五路由,所述第五路由包括所述MAC地址和所述第三虚拟局域网信息。
  8. 如权利要求1-7任一所述的方法,其特征在于,所述第一路由为媒体接入控制/互联网协议通告MAC/IP Advertisement路由。
  9. 一种媒体接入控制MAC地址接收方法,应用于网络***,所述网络***包括第一网络设备和第二网络设备,所述第一网络设备与多个虚拟机连接,所述多个虚拟机包括第一虚拟机和第二虚拟机;所述方法由所述第二网络设备执行,其特征在于,所述方法包括:
    所述第二网络设备接收所述第一网络设备发送的第一路由,所述第一路由包括第一路由信息,所述第一路由信息包括MAC地址、第一虚拟局域网信息和第二虚拟局域网信息,所述MAC地址为所述第一网络设备所连接的所述第一虚拟机和所述第二虚拟机的MAC地址,所述第一虚拟局域网信息为所述第一虚拟机的信息,所述第二虚拟局域网信息为所述第二虚拟机的信息;
    所述第二网络设备存储所述第一路由信息。
  10. 如权利要求9所述的方法,其特征在于,所述第二网络设备存储所述第一路由信息包括:
    所述第二网络设备将所述第一路由信息存储在第二路由中。
  11. 如权利要求10所述的方法,其特征在于,所述方法还包括:
    所述第二网络设备在接收所述第一路由之前,接收所述第一网络设备发送的第三路由,所述第三路由包括第二路由信息,所述第二路由信息包括所述MAC地址和所述第二虚拟局域网信息,不包括所述第一虚拟局域网信息,所述第二网络设备将所述第二路由信息添加至所述第二路由;
    所述第二网络设备将所述第一路由信息存储在第二路由中包括:
    所述第二网络设备将所述第二路由中的第二路由信息更新为所述第一路由信息。
  12. 如权利要求9-11任一所述的方法,其特征在于,所述第一虚拟局域网信息包括虚拟私有网络标签。
  13. 如权利要求12所述的方法,其特征在于,
    若所述第一网络设备位于基于以太网虚拟私有网络EVPN的可扩展虚拟局域网VXLAN中,所述虚拟私有网络标签包括可扩展虚拟局域网网络标识VNI;或者,
    若所述第一网络设备位于分段路由SR网络或互联网协议版本6分段路由SRv6网络中, 所述虚拟私有网络标签包括分段标识SID;或者,
    若所述第一网络设备位于多协议标签交换MPLS网络中,所述虚拟私有网络标签包括MPLS标签。
  14. 如权利要求12或13所述的方法,其特征在于,所述第一虚拟局域网信息还包括路由目的属性、虚拟局域网标签和MAC迁移扩展社区中的任意一个或多个。
  15. 如权利要求14所述的方法,其特征在于,所述第一路由信息中包括的第一虚拟机的MAC迁移扩展社区属性的属性值为第一属性值,所述方法还包括:
    所述第二网络设备根据所述第一虚拟机与所述第二网络设备连接,生成第四路由,所述第四路由包括所述MAC地址和所述第一虚拟机的第三虚拟局域网信息,所述第三虚拟局域网信息包括的所述第一虚拟机的MAC迁移扩展社区属性的属性值为第二属性值,所述第二属性值大于所述第一属性值;
    所述第二网络设备向所述第一网络设备发送第四路由。
  16. 如权利要求9-15任一所述的方法,其特征在于,所述第二网络设备在接收所述第一路由之后,所述方法还包括:
    所述第二网络设备将所述第一路由发送至第三网络设备。
  17. 如权利要求9-16任一所述的方法,其特征在于,所述第一路由为媒体接入控制/互联网协议通告MAC/IP Advertisement路由。
  18. 一种媒体接入控制MAC地址发送装置,所述装置应用于第一网络设备,所述第一网络设备与多个虚拟机连接,所述多个虚拟机包括第一虚拟机和第二虚拟机,其特征在于,所述装置包括:
    第一获取模块,用于获取所述第一虚拟机的MAC地址;
    第二获取模块,用于在所述第一虚拟机的MAC地址与所述第二虚拟机的MAC地址相同,且所述第二虚拟机与所述第一虚拟机所在的虚拟局域网不同的情况下,获取第一路由,所述第一路由包括路由信息,所述路由信息包括所述MAC地址、所述第一虚拟机的第一虚拟局域网信息和所述第二虚拟机的第二虚拟局域网信息;
    发送模块,用于向第二网络设备发送所述第一路由。
  19. 如权利要求18所述的装置,其特征在于,所述装置还包括:
    第一存储模块,用于存储第二路由,所述第二路由包括所述路由信息。
  20. 如权利要求18所述的装置,其特征在于,所述发送模块还用于:
    向所述第二网络设备发送第三路由,所述第三路由包括所述MAC地址和所述第二虚拟局域网信息,不包括所述第一虚拟局域网信息;
    所述第二获取模块用于:
    更新所述第三路由,以获取所述第一路由。
  21. 如权利要求18-20任一所述的装置,其特征在于,所述第一虚拟局域网信息包括虚拟私有网络标签。
  22. 如权利要求21所述的装置,其特征在于,
    若所述第一网络设备位于基于以太网虚拟私有网络EVPN的可扩展虚拟局域网VXLAN中,所述虚拟私有网络标签包括可扩展虚拟局域网网络标识VNI;或者,
    若所述第一网络设备位于分段路由SR网络或互联网协议版本6分段路由SRv6网络中,所述虚拟私有网络标签包括分段标识SID;或者,
    若所述第一网络设备位于多协议标签交换MPLS网络中,所述虚拟私有网络标签包括MPLS标签。
  23. 如权利要求21或22所述的装置,其特征在于,所述第一虚拟局域网信息还包括路由目的属性、虚拟局域网标签和MAC迁移扩展社区属性中的任意一个或多个。
  24. 如权利要求23所述的装置,其特征在于,所述第一虚拟局域网信息中包括的MAC迁移扩展社区属性的属性值为第一属性值,所述装置还包括:
    接收模块,用于接收第四路由,所述第四路由包括所述MAC地址和所述第一虚拟机的第三虚拟局域网信息,所述第三虚拟局域网信息中包括的所述第一虚拟机的MAC迁移扩展社区属性的属性值为第二属性值;
    更新模块,用于在所述第一属性值小于所述第二属性值的情况下,所述第一网络设备删除第二路由中的所述第一虚拟局域网信息;
    第二存储模块,用于存储第五路由,所述第五路由包括所述MAC地址和所述第三虚拟局域网信息。
  25. 如权利要求18-24任一所述的装置,其特征在于,所述第一路由为媒体接入控制/互联网协议通告MAC/IP Advertisement路由。
  26. 一种媒体接入控制MAC地址接收装置,所述装置应用于第二网络设备,所述第二网络设备和第一网络设备均位于网络***,所述第一网络设备与多个虚拟机连接,所述多个虚拟机包括第一虚拟机和第二虚拟机,其特征在于,所述装置包括:
    接收模块,用于接收所述第一网络设备发送的第一路由,所述第一路由包括第一路由信息,所述第一路由信息包括MAC地址、第一虚拟局域网信息和第二虚拟局域网信息,所述MAC地址为所述第一网络设备所连接的所述第一虚拟机和所述第二虚拟机的MAC地址,所述第一虚拟局域网信息为所述第一虚拟机的信息,所述第二虚拟局域网信息为所述第二虚拟机的信息;
    存储模块,用于存储所述第一路由信息。
  27. 如权利要求26所述的装置,其特征在于,所述存储模块用于:
    将所述第一路由信息存储在第二路由中。
  28. 如权利要求27所述的装置,其特征在于,所述装置还包括添加模块;
    所述接收模块,还用于在接收所述第一路由之前,接收所述第一网络设备发送的第三路由,所述第三路由包括第二路由信息,所述第二路由信息包括所述MAC地址和所述第二虚拟局域网信息,不包括所述第一虚拟局域网信息;
    所述添加模块,用于将所述第二路由信息添加至所述第二路由;
    所述存储模块用于:
    所述第二网络设备将所述第二路由中的第二路由信息更新为所述第一路由信息。
  29. 如权利要求25-28任一所述的装置,其特征在于,所述第一虚拟局域网信息包括虚拟私有网络标签。
  30. 如权利要求29所述的装置,其特征在于,
    若所述第一网络设备位于基于以太网虚拟私有网络EVPN的可扩展虚拟局域网VXLAN中,所述虚拟私有网络标签包括可扩展虚拟局域网网络标识VNI;或者,
    若所述第一网络设备位于分段路由SR网络或互联网协议版本6分段路由SRv6网络中,所述虚拟私有网络标签包括分段标识SID;或者,
    若所述第一网络设备位于多协议标签交换MPLS网络中,所述虚拟私有网络标签包括MPLS标签。
  31. 如权利要求29或30所述的装置,其特征在于,所述第一虚拟局域网信息还包括路由目的属性、虚拟局域网标签和MAC迁移扩展社区中的任意一个或多个。
  32. 如权利要求31所述的装置,其特征在于,所述第一路由信息中包括的第一虚拟机的MAC迁移扩展社区属性的属性值为第一属性值,所述装置还包括:
    生成模块,用于根据所述第一虚拟机与所述第二网络设备连接,生成第四路由,所述第四路由包括所述MAC地址和所述第一虚拟机的第三虚拟局域网信息,所述第三虚拟局域网信息包括的所述第一虚拟机的MAC迁移扩展社区属性的属性值为第二属性值,所述第二属性值大于所述第一属性值;
    发送模块,用于向所述第一网络设备发送第四路由。
  33. 如权利要求26-32任一所述的装置,其特征在于,所述装置还包括:
    发送模块,用于将所述第一路由发送至第三网络设备。
  34. 如权利要求26-33任一所述的装置,其特征在于,所述第一路由为媒体接入控制/互联网协议通告MAC/IP Advertisement路由。
  35. 一种媒体接入控制MAC地址收发***,其特征在于,所述***包括第一网络设备和第二网络设备,所述第一网络设备与多个虚拟机连接,所述多个虚拟机包括第一虚拟机和第二虚拟机;
    所述第一网络设备用于,获取所述第一虚拟机的MAC地址,在所述第一虚拟机的MAC地址与所述第二虚拟机的MAC地址相同,且所述第二虚拟机与所述第一虚拟机所在的虚拟局域网不同的情况下,获取第一路由,所述第一路由包括第一路由信息,所述第一路由信息包括所述MAC地址、所述第一虚拟机的第一虚拟局域网信息和所述第二虚拟机的第二虚拟局域网信息,向所述第二网络设备发送所述第一路由;
    所述第二网络设备用于,接收所述第一网络设备发送的所述第一路由,并存储所述第一路由中的第一路由信息。
  36. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行如权利要求1-17任意一项所述的方法。
  37. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得计算机执行如权利要求1-17任意一项所述的方法。
PCT/CN2021/078547 2020-03-23 2021-03-01 Mac地址发送方法、装置、***及相关设备 WO2021190251A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP21777165.8A EP4113937A4 (en) 2020-03-23 2021-03-01 MAC ADDRESS SENDING METHOD AND APPARATUS, SYSTEM AND ASSOCIATED DEVICES
JP2022557970A JP2023518594A (ja) 2020-03-23 2021-03-01 Macアドレス送信方法、装置、およびシステム、ならびに関連デバイス
US17/950,820 US20230015922A1 (en) 2020-03-23 2022-09-22 Mac address sending method, apparatus, and system, and related device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010209165.5 2020-03-23
CN202010209165.5A CN113438329B (zh) 2020-03-23 2020-03-23 Mac地址发送方法、装置和***

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/950,820 Continuation US20230015922A1 (en) 2020-03-23 2022-09-22 Mac address sending method, apparatus, and system, and related device

Publications (1)

Publication Number Publication Date
WO2021190251A1 true WO2021190251A1 (zh) 2021-09-30

Family

ID=77752662

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/078547 WO2021190251A1 (zh) 2020-03-23 2021-03-01 Mac地址发送方法、装置、***及相关设备

Country Status (5)

Country Link
US (1) US20230015922A1 (zh)
EP (1) EP4113937A4 (zh)
JP (1) JP2023518594A (zh)
CN (1) CN113438329B (zh)
WO (1) WO2021190251A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338397B (zh) * 2021-12-27 2023-11-03 中国联合网络通信集团有限公司 云平台网络配置方法、装置、服务器、存储介质及***
CN114301994B (zh) * 2021-12-29 2023-09-19 迈普通信技术股份有限公司 一种双栈转换方法、装置、网络设备及存储介质
CN115277550B (zh) * 2022-06-21 2023-11-28 阿里巴巴(中国)有限公司 虚拟网络的路由***、路由方法及路由装置
CN115412528A (zh) * 2022-08-08 2022-11-29 北京达佳互联信息技术有限公司 一种主机路由地址存储方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065554A (zh) * 2014-06-30 2014-09-24 华为技术有限公司 一种组网方法以及组网装置
CN108075956A (zh) * 2016-11-16 2018-05-25 新华三技术有限公司 一种数据处理方法和装置
CN108270878A (zh) * 2016-12-31 2018-07-10 ***通信集团江西有限公司 在vxlan中发送arp报文的方法、vtep设备
US10567347B2 (en) * 2015-07-31 2020-02-18 Nicira, Inc. Distributed tunneling for VPN

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286990B (zh) * 2008-05-27 2012-09-05 中兴通讯股份有限公司 二层组播的转发方法和装置
MX2012007559A (es) * 2010-05-28 2012-07-30 Huawei Tech Co Ltd Capa 2 virtual y mecanismo para hacerla escalable.
US9391885B1 (en) * 2013-09-05 2016-07-12 Juniper Networks, Inc. MPLS label usage in Ethernet virtual private networks
CN103905285A (zh) * 2014-04-06 2014-07-02 陈桂芳 一种实现同一mac地址用户划分到多个不同vlan的方法
CN105591897B (zh) * 2015-11-16 2018-12-11 新华三技术有限公司 Trill网络的mac地址同步方法及装置
US10454877B2 (en) * 2016-04-29 2019-10-22 Cisco Technology, Inc. Interoperability between data plane learning endpoints and control plane learning endpoints in overlay networks
US10506083B2 (en) * 2017-06-27 2019-12-10 Cisco Technology, Inc. Segment routing gateway storing segment routing encapsulating header used in encapsulating and forwarding of returned native packet
US10536370B2 (en) * 2017-08-08 2020-01-14 Dell Products Lp Method and system to avoid temporary traffic loss with BGP ethernet VPN multi-homing with data-plane MAC address learning
US11012349B2 (en) * 2019-06-28 2021-05-18 Arista Networks, Inc. Route reflector optimizations for interconnecting MPLS-based L3-VPN and L3-EVPN networks
US11088871B1 (en) * 2019-12-31 2021-08-10 Juniper Networks, Inc. Fast convergence for MAC mobility
US11451634B2 (en) * 2020-11-06 2022-09-20 Arista Networks, Inc. Systems and method for using DCI-ESI to build highly scalable EVPN DCI networks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065554A (zh) * 2014-06-30 2014-09-24 华为技术有限公司 一种组网方法以及组网装置
US10567347B2 (en) * 2015-07-31 2020-02-18 Nicira, Inc. Distributed tunneling for VPN
CN108075956A (zh) * 2016-11-16 2018-05-25 新华三技术有限公司 一种数据处理方法和装置
CN108270878A (zh) * 2016-12-31 2018-07-10 ***通信集团江西有限公司 在vxlan中发送arp报文的方法、vtep设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4113937A4

Also Published As

Publication number Publication date
JP2023518594A (ja) 2023-05-02
US20230015922A1 (en) 2023-01-19
CN113438329B (zh) 2023-02-10
CN113438329A (zh) 2021-09-24
EP4113937A1 (en) 2023-01-04
EP4113937A4 (en) 2023-08-23

Similar Documents

Publication Publication Date Title
WO2021190251A1 (zh) Mac地址发送方法、装置、***及相关设备
US11283650B2 (en) Method for sending virtual extensible local area network packet, computer device, and computer readable medium
US9940153B2 (en) Method for generating configuration information, and network control unit
CN112910750B (zh) 使用逻辑路由器进行地址解析的方法、设备、***及介质
CN107113241B (zh) 路由确定方法、网络配置方法以及相关装置
CN113162857B (zh) 按需获取路由的方法及网关
US20230155937A1 (en) Route Advertisement Method and Related Device
JP7053901B2 (ja) ループ回避通信方法、ループ回避通信デバイスおよびループ回避通信システム
WO2021139289A1 (zh) 报文发送方法、路由表项的生成方法、装置及存储介质
US11522792B2 (en) Method for discovering forwarding path and related device thereof
US20230024814A1 (en) Route sending method and apparatus, route processing method and apparatus, device, and storage medium
WO2021088561A1 (zh) 位索引显式复制网络中负载分担的方法、装置及设备
US20200328975A1 (en) Method and system segregating application traffic in a wide area network
CN113489646A (zh) 基于vxlan的分段路由传输方法、服务器、源节点及存储介质
WO2023273957A1 (zh) 算力发布方法、算力更新方法及装置
US11924166B2 (en) Resource-path-based, dynamic group membership support for membership groups
US20230155938A1 (en) Route Advertisement Method and Related Device
WO2022022251A1 (zh) 流量限速方法、相关网络设备和存储介质
US20220345370A1 (en) Ordering possible device locations on the network by port-of-entry likelihood
WO2016176842A1 (zh) 一种mpls-tp隧道中的以太接口寻址方法、装置、控制器和网元

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21777165

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022557970

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2021777165

Country of ref document: EP

Effective date: 20220929

NENP Non-entry into the national phase

Ref country code: DE