WO2021088357A1 - 一种用于生成转发信息的方法、装置和系统 - Google Patents
一种用于生成转发信息的方法、装置和系统 Download PDFInfo
- Publication number
- WO2021088357A1 WO2021088357A1 PCT/CN2020/092716 CN2020092716W WO2021088357A1 WO 2021088357 A1 WO2021088357 A1 WO 2021088357A1 CN 2020092716 W CN2020092716 W CN 2020092716W WO 2021088357 A1 WO2021088357 A1 WO 2021088357A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- mac address
- mac
- converted
- network device
- message
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2596—Translation of addresses of the same type other than IP, e.g. translation from MAC to MAC addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4604—LAN interconnection over a backbone network, e.g. Internet, Frame Relay
- H04L12/462—LAN interconnection over a bridge based backbone
- H04L12/4625—Single bridge functionality, e.g. connection of two networks over a single bridge
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4633—Interconnection of networks using encapsulation techniques, e.g. tunneling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/54—Organization of routing tables
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/66—Layer 2 routing, e.g. in Ethernet based MAN's
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/72—Routing based on the source address
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2592—Translation of Internet protocol [IP] addresses using tunnelling or encapsulation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/695—Types of network addresses using masks or ranges of addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
- H04L45/021—Ensuring consistency of routing table updates, e.g. by using epoch numbers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/10—Mapping addresses of different types
- H04L61/103—Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
Definitions
- This application relates to the field of communication technology, and in particular to a method, device and system for generating forwarding information.
- the system for forwarding messages in the EVPN network may include: user-end provider edge (UPE) network equipment (hereinafter referred to as UPE equipment) on the user side and network provider edge (NPE) on the network side Network equipment (hereinafter referred to as NPE equipment).
- UPE user-end provider edge
- NPE network provider edge
- the UPE device can receive a request message generated by at least one user equipment connected to it, and the request message generated by each user equipment carries the media access control (Media Access Control, MAC) address of the user equipment.
- the UPE device generates a corresponding MAC route based on the MAC address of the at least one user equipment.
- the UPE device sends the generated MAC routes to the NPE device so that the NPE device can learn these MAC routes.
- the NPE device forwards the message based on the learned MAC route.
- the number of user equipments connected to the UPE device is often large, resulting in a large number of MAC routes that the NPE device needs to learn and maintain, which in turn leads to greater pressure on the NPE device to maintain the MAC route locally and causes more resource consumption.
- This application provides a method, device and system for generating forwarding information, which can significantly reduce the number of MAC routes learned and maintained locally by network equipment such as NPE equipment, save storage resources, improve query efficiency, and reduce equipment pressure.
- a method for generating forwarding information includes: a first network device receives n packets, where the n packets include n media access control MAC addresses, and n packets
- the source MAC addresses of are n MAC addresses, and n is an integer greater than or equal to 2; the first network device determines n converted MAC addresses based on n MAC addresses, where n MAC addresses and n converted MAC addresses Address one-to-one correspondence, n converted MAC addresses belong to the first MAC address segment; the first network device saves the correspondence between n MAC addresses and n converted MAC addresses; the first network device sends to the second network device The first MAC address segment.
- the n messages may be multiple messages continuously received by the first network device (such as a UPE device), or may be some of the multiple messages continuously received by the first network device.
- the first MAC address segment includes multiple MAC addresses.
- the first MAC address segment may be represented by a fixed-length bit string, and the fixed-length bit string includes a fixed bit substring part and a variable bit substring part, wherein the fixed bit substring part may be referred to as a mask. Code, for example, each bit in the fixed bit substring takes the value 1.
- the masks of the multiple MAC addresses in the first MAC address segment that is, the fixed bit substrings are partially the same, so as to facilitate the aggregation of the multiple MAC addresses.
- the variable bit substring parts other than the mask in the multiple MAC addresses are different from each other to distinguish the multiple MAC addresses.
- the first network device may filter one MAC address in the above-mentioned first MAC address segment based on each MAC address of the n MAC addresses as the converted MAC address corresponding to each MAC address.
- the first network device determines the n converted MAC addresses corresponding to the n MAC addresses according to the n MAC addresses carried in the received n packets, and the n converted MAC addresses belong to The first MAC address segment.
- the first network device saves the one-to-one correspondence between the n MAC addresses and the n converted MAC addresses, and sends the first MAC address segment to the second network device.
- the first MAC address segment may, for example, be included in the aggregated MAC route, so that the second network device (such as an NPE device) does not need to learn n MAC routes corresponding to n MAC addresses, but only needs to learn one aggregated MAC route. That's it.
- the number of MAC routes learned by the second network device is significantly reduced, which reduces the storage pressure of the second network device and saves network resources.
- the method further includes: the first network device obtains n updated packets based on the n packets and the n converted MAC addresses, wherein the source MAC addresses of the n updated packets are n A converted MAC address; the first network device sends n updated messages.
- the first network device may replace the source MAC addresses in the n packets before updating with the corresponding converted MAC addresses to obtain n updated packets.
- the remote network device can learn the converted MAC address, so as to realize the transmission and reception of messages based on the converted MAC address.
- the method further includes: the first network device receives the first message, the first source MAC address of the first message belongs to n MAC addresses of the n messages; the first network device is based on the first message and The first converted MAC address corresponding to the first source MAC address obtains the first converted message, wherein the source MAC address of the first converted message is the first converted MAC address, and the first converted MAC address is The MAC address belongs to n converted MAC addresses; the first network device sends the first converted message.
- the first message may also be a request message sent by the user equipment to the first network device, and the first network device has established a correspondence between the MAC address corresponding to the user equipment and the converted MAC address.
- the first network device can extract the first source MAC address in the first message, and then search based on the correspondence between the n stored MAC addresses and the n converted MAC addresses The first converted MAC address corresponding to the first source MAC address, and then replace the first source MAC address in the first message with the first converted MAC address to obtain the first converted message, In this way, messages are sent and received based on the converted MAC address.
- the first source MAC address of the first message is the outer source MAC address
- the first message further includes the inner source MAC address
- the inner source MAC address is the same as the outer source MAC address
- the first network device Obtaining the first converted message based on the first message and the first converted MAC address corresponding to the first source MAC address includes: the first network device replaces the outer source MAC address and the inner source MAC address respectively Is the first converted MAC address corresponding to the first source MAC address to obtain the first converted message.
- the first network device When the first network device receives a message of type such as Address Resolution Protocol (ARP), it needs to replace the inner and outer source MAC addresses in the message with the translated MAC address to ensure message forwarding Accuracy, avoid packet loss and other problems.
- ARP Address Resolution Protocol
- the method further includes: the first network device receives a second message, wherein the destination MAC address of the second message includes a second converted MAC address, and the second converted MAC address belongs to n converted MAC addresses.
- the MAC address the first network device obtains the second converted message based on the second message and the second MAC address corresponding to the second converted MAC address, where the destination MAC address of the second converted message is The second MAC address, the second MAC address belongs to n MAC addresses; the first network device sends the second converted message.
- the remote network device uses the converted MAC address as the destination MAC address to send a message to the user equipment.
- the first network device as the forwarding device receives the message, it can be based on the locally saved converted MAC address and the original For the correspondence between MAC addresses, the destination MAC address is replaced with the original MAC address to complete the forwarding of the message to the user equipment.
- the first MAC address segment belongs to a first aggregated MAC route sent by the first network device to the second network device, and the first aggregated MAC route further includes the IP address of the first network device.
- the IP address can enable the network device receiving the first MAC route to determine the port corresponding to the IP address, so that the network device can successfully send the message to the first network device through the port.
- the number of MAC addresses in the first MAC address segment is greater than or equal to the number of user equipment connected to the first network device.
- the first MAC address segment may correspond to multiple MAC addresses.
- the number of user equipment connected to the first network device may be considered.
- the first network device may determine the number of user equipment based on the type of service and residential area. In some other situations, the first network device may also determine the number of user equipment based on other common characteristics or only based on the number scale. After that, the first network device generates a corresponding first MAC address segment according to the determined number of user equipments to ensure that the first MAC address segment can accommodate the MAC addresses corresponding to the corresponding number of user equipments, thereby improving the performance of the addresses planned by the network equipment. Ease of use and rationality.
- the method further includes: the first network device receives m packets, wherein the m packets include m media access control MAC addresses, and the source MAC addresses of the m packets are m MAC addresses, and m It is an integer greater than or equal to 2; the first network device determines m converted MAC addresses based on m MAC addresses, where m MAC addresses correspond to m converted MAC addresses one-to-one, and m converted MAC addresses It belongs to the second MAC address segment; the first network device stores the correspondence between the m MAC addresses and the m converted MAC addresses; the first network device sends the second MAC address segment to the second network device or the third network device.
- a method for generating forwarding information includes: a first network device receives a MAC address segment sent by a second network device; the first network device generates forwarding information, and the forwarding information includes a MAC address segment; The first network device receives a message sent by the third network device. The message includes a destination MAC address, and the destination MAC address belongs to the MAC address segment; the first network device sends a message to the second network device based on the destination MAC address and the forwarding information. The network device forwards the received message.
- the first network device (such as the NPE device) may determine the corresponding forwarding information based on the destination MAC address of the message, and then implement the forwarding of the message to the second network device based on the forwarding information.
- the destination MAC address may be, for example, the converted MAC address belonging to the first MAC address segment or the second MAC address segment in the aforementioned first aspect.
- the first network device forwarding the received message to the second network device based on the destination MAC address and the forwarding information includes: the first network device queries the forwarding information based on the destination MAC address and the longest match principle. The first network device forwards the message to the second network device based on the forwarding information, and the MAC address segment of the forwarding information matches the destination MAC address.
- the forwarding information may be a MAC route including a MAC address segment, and the MAC route may be stored in a MAC routing table.
- the longest matching principle refers to matching the destination MAC address with each MAC route in the MAC routing table maintained by the first network device bit by bit until the route with the longest matching degree is found.
- the first network device can search for an exact matching route, such as the local MAC route maintained by the first network device, or search for an imprecise matching route, such as a MAC route including a MAC address segment, so that it can maintain
- an exact matching route such as the local MAC route maintained by the first network device
- an imprecise matching route such as a MAC route including a MAC address segment
- the forwarding information further includes a port, the port is determined based on the IP address of the second network device, and the first network device forwards the packet to the second network device based on the forwarding information, including: the first network device forwards the packet through the port.
- a system for generating forwarding information includes a first network device and a second network device,
- the first network device is used for:
- n messages where the n messages include n media access control MAC addresses, the source MAC addresses of the n messages are the n MAC addresses, and n is an integer greater than or equal to 2 ;
- n converted MAC addresses based on the n MAC addresses, wherein the n MAC addresses have a one-to-one correspondence with the n converted MAC addresses, and the n converted MAC addresses belong to the first MAC address segment ;
- the second network device is used for:
- first forwarding information where the first forwarding information includes a first MAC address segment
- the first packet is forwarded based on the first forwarding information and the received first destination MAC address of the first packet, where the first destination MAC address belongs to the first MAC address segment.
- the number of MAC routes learned by the second network device is significantly reduced, the storage pressure of the second network device is reduced, and network resources are saved.
- the first network device is further configured to:
- n updated messages based on the n messages and the n converted MAC addresses, wherein the source MAC addresses of the n updated messages are the n converted MAC addresses, respectively address;
- the first network device is further configured to:
- a second converted message is obtained based on the second message and the second converted MAC address corresponding to the second source MAC address, wherein the source MAC address of the second converted message is The second converted MAC address, where the second converted MAC address belongs to the n converted MAC addresses;
- the second source MAC address of the second message is an outer source MAC address
- the second message further includes an inner source MAC address
- the inner source MAC address is the same as the outer source MAC address.
- the MAC addresses are the same, and the obtaining the second converted message based on the second message and the second converted MAC address corresponding to the second source MAC address includes:
- the first network device is further configured to:
- the first message is received from the second network device, wherein the destination MAC address of the first message includes a first converted MAC address, and the first converted MAC address belongs to the n The converted MAC address;
- a first converted message is obtained based on the first message and a first MAC address corresponding to the first converted MAC address, wherein the destination MAC address of the first converted message is the A first MAC address, where the first MAC address belongs to the n MAC addresses; sending the first converted message.
- the first MAC address segment belongs to a first aggregated MAC route sent by the first network device to the second network device, and the first aggregated MAC route may also include the IP address of the first network device.
- the number of MAC addresses in the first MAC address segment is greater than or equal to the number of user equipment connected to the first network device.
- forwarding the first packet based on the first forwarding information and the received first destination MAC address of the first packet includes:
- the first forwarding information including the first MAC address segment based on the first destination MAC address and the longest match principle
- the first forwarding information further includes a port, the port is determined based on the IP address of the first network device, and the second network device sends the forwarding information to the
- the forwarding of the received first message by the first network device includes: forwarding the first message received by the second network device through a port.
- the first network device is further configured to:
- Receive m messages where the m messages include m media access control MAC addresses, the source MAC addresses of the m messages are the m MAC addresses, and m is an integer greater than or equal to 2 ;
- the second network device or the third network device is used for:
- an apparatus for generating forwarding information includes a first receiving module for receiving n messages, wherein the n messages include n media access control MAC addresses, The source MAC addresses of the n packets are the n MAC addresses, and n is an integer greater than or equal to 2; the first determining module is configured to determine n converted MAC addresses based on the n MAC addresses , Wherein the n MAC addresses have a one-to-one correspondence with the n converted MAC addresses, and the n converted MAC addresses belong to the first MAC address segment; the first storage module is configured to store the n MAC addresses Correspondence with the n converted MAC addresses; a first sending module, configured to send the first MAC address segment to a first network device.
- the device for generating forwarding information sends the first aggregated MAC route to the network device, so that the network device such as NPE does not need to learn n MAC routes corresponding to n MAC addresses, but only needs to learn one aggregated MAC route. .
- the number of MAC routes learned by the network device is significantly reduced, which reduces the storage pressure of the network device and saves network resources.
- the apparatus for generating forwarding information further includes: a first obtaining module, configured to obtain n updated messages based on the n messages and the n converted MAC addresses, where The source MAC addresses of the n updated messages are the n converted MAC addresses respectively; the second sending module is configured to send the n updated messages.
- the remote network device can learn the converted MAC address, so as to realize the transmission and reception of messages based on the converted MAC address.
- the apparatus for generating forwarding information further includes: a second receiving module, configured to receive a first message, and the first source MAC address of the first message belongs to all the n messages.
- the first obtaining module is further configured to obtain a first converted message based on the first message and a first converted MAC address corresponding to the first source MAC address,
- the source MAC address of the first converted message is the first converted MAC address, and the first converted MAC address belongs to the n converted MAC addresses;
- a third sending module Used to send the first converted message.
- the device for generating forwarding information may extract the first source MAC address in the first message, and then based on the n stored MAC addresses and n converted MAC addresses Find the first converted MAC address corresponding to the first source MAC address, and then replace the first source MAC address in the first message with the first converted MAC address to obtain the first converted MAC address The converted message, so as to realize the transmission and reception of the message based on the converted MAC address.
- the first source MAC address of the first message is an outer source MAC address
- the first message further includes an inner source MAC address
- the inner source MAC address is the same as the outer source MAC address.
- the MAC address is the same
- the first obtaining module is further configured to replace the outer source MAC address and the inner source MAC address with a first converted MAC address corresponding to the first source MAC address, respectively To get the first converted message.
- the device for generating forwarding information When receiving a type of message such as ARP, the device for generating forwarding information needs to replace both the inner and outer layer source MAC addresses in the message with the translated MAC address to ensure the accuracy of message forwarding. Avoid problems such as packet loss.
- the apparatus for generating forwarding information further includes a third receiving module for receiving a second packet, wherein the destination MAC address of the second packet includes the second converted MAC address, so The second converted MAC address belongs to the n converted MAC addresses; a second acquisition module is configured to be based on the second message and a second MAC address corresponding to the second converted MAC address Obtaining a second converted message, wherein the destination MAC address of the second converted message is the second MAC address, and the second MAC address belongs to the n MAC addresses; a fourth sending module, Used to send the second converted message.
- the remote network device uses the converted MAC address as the destination MAC address to send a message to the user equipment, and the device for generating forwarding information with the forwarding function can be based on the locally stored converted message when receiving the message.
- the corresponding relationship between the MAC address and the original MAC address replace the destination MAC address with the original MAC address to complete the forwarding of the message to the user equipment.
- the first MAC address segment belongs to a first aggregated MAC route sent by the first network device to the second network device, and the first aggregated MAC route further includes the IP of the first network device address.
- the IP address can enable the network device receiving the first MAC route to determine the port corresponding to the IP address, so that the network device can successfully send the message to the apparatus for generating forwarding information through the port .
- the number of MAC addresses in the first MAC address segment is greater than or equal to the number of user equipment connected to the first network device.
- the device for generating forwarding information generates the corresponding first MAC address segment according to the determined number of user equipments, so as to ensure that the first MAC address segment can accommodate the MAC addresses corresponding to the corresponding number of user equipments, thereby improving the planning of the device.
- the ease of use and rationality of the address may be determined based on the type of service and residential area, for example.
- the apparatus for generating forwarding information further includes: a fourth receiving module, configured to receive m messages, wherein the m messages include m media access control MAC addresses, and the m
- the source MAC addresses of the message are the m MAC addresses, and m is an integer greater than or equal to 2;
- the second determining module is configured to determine m converted MAC addresses based on the m MAC addresses, wherein There is a one-to-one correspondence between m MAC addresses and m converted MAC addresses, and the m converted MAC addresses belong to the second MAC address segment;
- the second storage module is used to store the m MAC addresses and the m MAC addresses. Corresponding relationship between the converted MAC addresses;
- a fifth sending module configured to send the second MAC address segment to the first network device or the second network device.
- the device for generating forwarding information may include multiple MAC address segments, and different MAC address segments may include different multiple MAC addresses.
- the first network device may divide the MAC addresses of user equipment applying for different service types into different MAC address segments, or for another example, the apparatus may divide the MAC addresses of user equipment belonging to different residential areas into different MAC address segment, which facilitates the management of user equipment and the forwarding of packets.
- an apparatus for generating forwarding information includes: a first receiving module, configured to receive a MAC address segment sent by a first network device; and a generating module, configured to Generate forwarding information, the forwarding information includes the MAC address segment; the second receiving module is configured to receive a message sent by a second network device, the message includes a destination MAC address, the destination MAC address belongs to the MAC Address segment; a forwarding module for forwarding the received message to the first network device based on the destination MAC address and the forwarding information.
- the apparatus for generating forwarding information may determine corresponding forwarding information based on the destination MAC address of the message, and then send the message to the first network device based on the destination MAC address and forwarding information in the message.
- the destination MAC address may be, for example, the converted MAC address belonging to the first MAC address segment or the second MAC address segment in the aforementioned first aspect.
- the forwarding module is configured to query the forwarding information based on the destination MAC address and the longest match principle, and forward the message to the first network device based on the forwarding information, and the forwarding information is The MAC address segment matches the destination MAC address.
- the device for generating forwarding information can search for an exact matching route based on the longest matching principle, such as a local route maintained by the device for generating forwarding information, or a route that is not exactly matching, such as the first network device
- the sent MAC route includes the MAC address segment, so that packet forwarding based on aggregated MAC route can be realized on the basis of maintaining the traditional mechanism.
- the forwarding information further includes a port, the port is determined based on the IP address of the second network device, and the forwarding module is configured to forward the packet through the port.
- a network device in a sixth aspect, includes: a memory and a processor; wherein, the processor is configured to call a program stored in the memory, so that the network device executes any of the operations as in the first aspect.
- a network device in a seventh aspect, includes: a memory and a processor; wherein the processor is configured to call a program stored in the memory, so that the network device executes any of the operations as in the second aspect.
- a network device including: a processor; the processor is configured to couple with a memory, and after reading an instruction in the memory, execute according to the instruction the one used for generating forwarding information as in any of the above-mentioned first aspect designs Methods.
- a network device including: a processor; the processor is configured to couple with a memory, and after reading an instruction in the memory, execute according to the instruction as in any one of the above-mentioned second aspect designs for generating forwarding information Methods.
- a computer storage medium is provided, and a computer program is stored in the storage medium, and the computer program is used to execute the method for generating forwarding information described in any one of the designs of the first aspect.
- a computer storage medium is provided, and a computer program is stored in the storage medium, and the computer program is used to execute the method for generating forwarding information described in any design of the second aspect.
- a computer program product containing instructions is provided.
- the network device executes the method for generating forwarding information described in any design of the first aspect, or causes The network device executes the method for generating forwarding information described in any design of the second aspect.
- FIG. 1 is a schematic structural diagram of a system for generating forwarding information provided by an embodiment of this application;
- FIG. 2 is a schematic flowchart of a method for generating forwarding information provided by an embodiment of the application
- FIG. 3 is a schematic diagram of a message structure provided by an embodiment of the application.
- FIG. 4 is a block diagram of a device for generating forwarding information provided by an embodiment of the application.
- Fig. 5 is a block diagram of another device for generating forwarding information provided by an embodiment of the application.
- FIG. 6 is a block diagram of still another device for generating forwarding information provided by an embodiment of the application.
- FIG. 7 is a schematic structural diagram of a network device provided by an embodiment of this application.
- the network system may include: at least one UPE device (three are shown in FIG. 1) and at least one NPE device (two are shown in FIG. 1).
- the at least one UPE device includes UPE device 01 to UPE device 03, and the at least one NPE device includes NPE device 11 and NPE device 12.
- Each UPE device has a communication connection with NPE device 11 and NPE device 12, and NPE device 11 and A communication connection may also be established between the NPE devices 12.
- the UPE device can be connected to at least one user equipment ( Figure 1 shows 12).
- UPE device 01 is connected to user equipment 1 (Y1 for short) to Y6, UPE device 02 is connected to Y7 to Y9, and UPE device 03 is connected to Y10 to Y12.
- Each user device can run as an independent device or run on a virtual machine.
- the at least one user equipment may be located on the same virtual machine or on a different virtual machine.
- Figure 1 shows a situation where there are multiple user devices running on the same virtual machine.
- Y1 to Y3 connected to UPE device 01 are located on the same virtual machine 101
- Y4 to Y6 connected to UPE device 01 are located in the same virtual machine.
- Y7 to Y9 connected to UPE device 02 are located on the same virtual machine 103
- Y10 to Y12 connected to UPE device 03 are located on the same virtual machine 104.
- the UPE device can receive a request message generated by at least one user equipment connected to it, and the request message generated by any user equipment carries the MAC address of the user equipment.
- the UPE device may determine the corresponding MAC route based on the MAC address of the at least one user equipment, and send the MAC route to the NPE device, so that the NPE device can learn these MAC routes.
- the NPE device can generate forwarding information based on the learned MAC route, and then forward the message based on the forwarding information. For example, during packet transmission, the UPE device may forward the request packet generated by the user equipment to the NPE device.
- the NPE device obtains a response message of the request message, and the response message carries the MAC address.
- the NPE device may send the response message to the UPE device corresponding to the destination MAC address based on the destination MAC address and forwarding information carried in the response message.
- the NPE device needs to learn more MAC routes, which in turn leads to a large amount of forwarding information that the NPE device needs to query.
- the query efficiency is low, and the storage pressure is high.
- the number of MAC routes that the NPE device can support is limited.
- the NPE device may fail to meet the actual needs of the network.
- the MAC routes learned by the NPE device often need to be updated.
- the embodiment of the present application provides a method for generating forwarding information.
- the method can be applied to a network device with the function of sending and receiving messages.
- it can be applied to any UPE device in the network system shown in FIG. 1 (for example, UPE device 01) and any NPE device (for example, NPE device 11) connected to any UPE device.
- FIG. 2 is a schematic flowchart of a method for generating forwarding information provided by an embodiment of this application.
- the following embodiments take the method applied to the first UPE device and the first NPE device as an example for description. Methods can include:
- the first UPE device receives n messages, where the n messages include n MAC addresses, the source MAC addresses of the n messages are the n MAC addresses, and n is greater than or equal to An integer of 2.
- the n messages may be multiple messages continuously received by the first UPE device, or part of the multiple messages continuously received by the first UPE device.
- the text may be discontinuous, which is not particularly limited in the embodiments of the present application.
- the n messages may be request messages generated by n user equipments connected to the first UPE device, and in this case, the n MAC addresses represent the MAC addresses of the n user equipments.
- the n messages may be Address Resolution Protocol (ARP) messages or other types of messages.
- ARP Address Resolution Protocol
- the MAC address in Table 1 is expressed in hexadecimal. It should be noted that Table 1 only exemplarily shows n MAC addresses, which does not constitute the only limitation to the embodiment of the present application.
- the first UPE device determines n converted MAC addresses based on the n MAC addresses, where the n MAC addresses correspond to the n converted MAC addresses one-to-one, and the n converted MAC addresses The MAC address belongs to the first MAC address segment.
- the first MAC address segment can be used to indicate multiple MAC addresses.
- the multiple MAC addresses belonging to the first MAC address segment have the same fixed bit substring, but the multiple variable bit substrings of the multiple MAC addresses are different from each other, wherein the fixed bit substring is used to identify the corresponding multiple MAC addresses In the first MAC address segment, multiple variable bit substrings are used to distinguish multiple MAC addresses.
- the first MAC address segment may belong to the first aggregated MAC route.
- the first aggregated MAC route is a route sent by the first UPE device, and includes the first MAC address segment and the IP address of the first UPE device.
- the IP address of the first UPE device may specifically be a neighbor IP (peer IP) address, and the neighbor IP address is an IP address used after the EVPN neighbor relationship is established between the first UPE device and the first NPE device.
- peer IP peer IP
- the first MAC address segment includes an aggregated MAC address and a mask.
- the aggregated MAC address is used to represent multiple MAC addresses, which is the same as a general MAC address, that is, 48 bits.
- the mask can be used to indicate that the corresponding MAC address is an aggregated MAC address.
- the aggregated MAC address includes a high-bit substring and a low-bit substring.
- the high-bit substring includes t (t ⁇ 1) bits, corresponding to the first t high-bit bits of the aggregated MAC address
- the low-bit substring includes (48-t) Bits, corresponding to the last (48-t) low bits of the aggregated MAC address.
- the high bit substring of the aggregated MAC address may be the same as the fixed bit substring of multiple MAC addresses.
- the length of the mask is the same as the aggregated MAC address, that is, 48 bits.
- the mask is used to indicate the length of the high-bit substring of the aggregated MAC address.
- the value of the first t high bits of the mask is 1, and the value of the next (48-t) low bits is 0.
- the high bit substring is the same as the fixed bit substring of multiple MAC addresses.
- the aggregated MAC address still includes high-bit substring and low-bit substring.
- the high-bit substring includes r (r ⁇ 1) bits, corresponding to the first r high-bit bits of the aggregated MAC address
- the low-bit substring includes (48-r) bits Bit, corresponding to the last (48-r) low-order bits of the aggregated MAC address.
- the low bit substring of the aggregated MAC address may be the same as the fixed bit substring of multiple MAC addresses.
- the length of the mask is the same as the aggregated MAC address, that is, 48 bits.
- the mask is used to indicate the length of the low-bit substring of the aggregated MAC address.
- the value of the first r high bits of the mask is 0, and the value of the next (48-r) low bits is 1.
- the low bit substring is the same as the fixed bit substring of multiple MAC addresses.
- the first MAC address segment includes aggregated MAC addresses and indication information.
- the aggregated MAC address is used to represent multiple MAC addresses, and has the same number of bits as a general MAC address.
- the indication information may occupy a specified bit length and have a specific value to indicate that the corresponding MAC address is an aggregated MAC address.
- the indication information may also be located in a specific field, for example, and may be assigned a value to indicate the effective digits of the aggregated MAC address, and the effective digits may be used for subsequent route matching calculations.
- the multiple MAC addresses represented by the first MAC address segment may be located in the same MAC address pool (English: address nat).
- the MAC address pool includes available p (p ⁇ 1) MAC addresses, and the p MAC addresses have the same fixed bit substring.
- the number of MAC addresses included in a MAC address pool can be a fixed value or can be set as required.
- the number of MAC addresses included in one MAC address pool may be greater than or equal to the number of user equipment connected to the first UPE device.
- the first UPE device may plan the size of the MAC address pool according to the number of user equipment in a certain metropolitan area carried on the first UPE device; or, according to the number of user equipment carrying a certain type of service carried on the first UPE device Plan the size of the MAC address pool; or, plan the size of the MAC address pool uniformly according to the number of all user equipment carried on the first UPE device, so as to ensure that the first MAC address segment can accommodate the corresponding number of user equipment corresponding MACs Address, thereby improving the usability and rationality of the address planned by the network device, and facilitating the management of the MAC address on the first UPE device.
- the high-bit substring of the aggregated MAC address of the first MAC address segment can occupy the high 36 bits of the entire address bit string.
- the fixed bit substrings of 4096 MAC addresses are the same, and also occupy the high 36 bits of the entire address bit string, and the content is the same as the high bit substring.
- the low bit substring of the aggregated MAC address can occupy the low 12 bits of the entire address bit string.
- the length of the variable bit substring of the 4096 MAC addresses is 12 bits, but the variable bit substring of each of the 4096 MAC addresses is different.
- the first MAC address segment can be expressed in binary form as:
- the first MAC address segment may represent all 4906 MAC addresses in the corresponding MAC address pool.
- the fixed bit substring of each of the 4096 MAC addresses is the same as the high bit string of the first MAC address segment, that is, the fixed bit substring of the 4096 MAC addresses occupies the high 36 bits of the MAC address and each The value of the bit is 0.
- the variable bit substring in the 4096 MAC addresses occupies the lower 12 bits of the MAC address, and the variable bit substring of each MAC address is different.
- the MAC address in the MAC address pool corresponding to the first MAC address segment can be expressed as:
- the MAC address in the MAC address pool corresponding to the first MAC address segment can also be expressed in hexadecimal form, namely:
- the first UPE device may filter n MAC addresses from among the multiple MAC addresses indicated by the first MAC address segment as the n converted MAC addresses.
- the embodiment of the present application does not specifically limit the method used by the first UPE device to filter out the n converted MAC addresses corresponding to the n MAC addresses in the MAC address pool.
- the first UPE device may sequentially determine the n converted MAC addresses in the MAC address pool as n converted MAC addresses corresponding to the n MAC addresses.
- the first UPE device may also determine the n converted MAC addresses corresponding to the n MAC addresses in a random order, as long as it is ensured that the n MAC addresses are in one-to-one correspondence with the n converted MAC addresses.
- Table 2 shows n MAC addresses and n first MAC address segments The one-to-one correspondence between the MAC addresses (that is, n converted MAC addresses) in the MAC address, as shown in Table 2, the MAC address in the first MAC address segment corresponding to the MAC address 0000-8a51-2c16 BD 10000 is 0000-0000-0001.
- the first UPE device saves the correspondence between the n MAC addresses and the n converted MAC addresses.
- the corresponding relationship can be saved for subsequent message forwarding.
- the first UPE device determines a first aggregated MAC route.
- the first aggregated MAC route includes a first MAC address segment.
- the composition structure of the first MAC address segment reference may be made to the aforementioned S202, which will not be repeated here.
- the first aggregated MAC route may also include the IP address of the first UPE device, so that the network device that receives the first aggregated MAC route determines to the first UPE device according to the IP address of the first UPE device The port used when forwarding the message, so that the message is successfully sent to the first UPE device through the port.
- the IP address can be a peer IP address.
- the first UPE device sends the first aggregated MAC route to the first NPE device.
- the first NPE device generates forwarding information, where the forwarding information includes the first MAC address segment and the IP address in the first aggregated MAC route.
- the first NPE device After receiving the first aggregated MAC route sent by the first UPE device, the first NPE device can search the locally maintained first routing information table according to the IP address in the first aggregated MAC route, and determine the connection with the first UPE device.
- the first routing information table may be, for example, a forwarding information table (Forwarding Information Base, FIB) maintained and stored locally by the first NPE device.
- the first NPE device generates and stores forwarding information including, for example, the first MAC address segment, the IP address, and the port according to the port corresponding to the determined IP address.
- the forwarding information is stored in the second routing information table.
- the forwarding information may be MAC routing information
- the second routing information table may be a MAC routing table.
- the second routing information table may also include one or more one or more forwarding information generated based on other aggregated MAC routes, and the one or more other aggregated MAC routes may be, for example, the first UPE device to the first Other aggregated MAC routes sent by the NPE device may also be aggregated MAC routes sent by other UPE devices to the first NPE device.
- the second routing information table may also include one or more common MAC routes.
- the one or more MAC routes may be, for example, MAC routes learned locally by the first NPE device, or sent by other NPE devices.
- the MAC routing can also be sent by other UPE devices that do not have the function of sending aggregated MAC routing.
- the first UPE device obtains n updated packets based on the n packets and the n converted MAC addresses, where the source MAC addresses of the n updated packets are respectively the n converted MAC addresses.
- the source MAC addresses of the n messages before the update are n MAC addresses, and the source MAC addresses of the n messages after the update are n converted MAC addresses.
- the first UPE device may replace all source MAC addresses in the n pre-update messages with the corresponding converted MAC addresses to obtain n updated messages.
- the first UPE device Since any of the n messages may have multiple fields carrying active MAC addresses, the first UPE device needs to replace all source MAC addresses carried in any message with the corresponding The converted MAC address can ensure the accuracy of message forwarding and avoid problems such as message parsing errors and packet loss.
- the outer source MAC address and inner source MAC address of any message are the same, and both are the source MAC address of the message.
- the first UPE device may replace both the outer source MAC address and the inner source MAC address with the converted MAC address corresponding to the source MAC address of the message to obtain the updated message.
- FIG. 3 is a schematic diagram of a message structure provided by an embodiment of the application, and the message is an ARP message.
- the message includes a message header and data part.
- the content of the Ethernet source address field in the packet header can be the outer source MAC address in the ARP packet, and the content of the sender Ethernet address field in the data part can be the inner source MAC address in the ARP packet address.
- the first UPE device needs to replace the contents of both the Ethernet source address field and the sending end Ethernet address field with the converted MAC address.
- the header of the ARP message can also include an Ethernet destination address field (the content is the destination MAC address) and a message type field, and the data part can also include a destination Ethernet address field (the content is the destination MAC address). Address), hardware type field, protocol type field, hardware address length field, protocol address length field, operation (OP) field, sending end Internet Protocol (IP) address field, destination IP address field, etc.
- Ethernet destination address field the content is the destination MAC address
- OP operation
- IP Internet Protocol
- the first UPE device sends n updated packets to the first NPE device.
- the first NPE device can learn the n converted MAC addresses to realize the Messages of n converted MAC addresses are sent and received.
- the first NPE device obtains n response messages corresponding to the n updated messages.
- the first NPE device may send the packets to n according to the destination MAC address carried in each of the n updated packets One or more network devices corresponding to the destination MAC address, so that the one or more network devices feed back n response messages corresponding to the n request messages to the first NPE device.
- the destination MAC address of the second message includes the second converted MAC address, and the second converted MAC address belongs to n Converted MAC address.
- the above example describes the situation in which the first NPE device obtains n response messages corresponding to the updated n request messages. Understandably, in other cases, the n updated messages may not be request messages, or only some of them may be request messages. In these other situations, the first NPE device in S209 does not obtain the response message, but irregularly obtains the message to be forwarded.
- the message to be forwarded may be, for example, a message that needs to be sent to the first UPE device. Data message of any user equipment.
- the destination MAC address in the message to be forwarded is one of the converted MAC addresses stored in the first UPE device.
- the first NPE device forwards the n response messages to the first UPE device based on the destination MAC address of each response message and forwarding information including the first MAC address segment.
- the first NPE device may forward the second message to the first UPE device based on the second translated MAC address (destination MAC address) and forwarding information in the second message. Message.
- the first NPE device can use the second converted MAC address to look up the second routing information table, and based on the match between the second converted MAC address and the first MAC address segment, hits from the second routing information table According to the corresponding forwarding information, the second message is then sent to the corresponding port in the forwarding information, so as to realize the forwarding of the second message to the first UPE device.
- the first NPE device may query the second routing information table maintained by the first NPE device based on the second translated MAC address of the second packet, and the second routing information table includes forwarding information generated based on the first aggregated MAC route.
- the query method may be based on the exact matching principle, for example. Still taking the way that the MAC address segment is composed of aggregated MAC addresses and masks as an example, under this exact matching principle, the first NPE device needs to calculate the second converted MAC address with the mask of the locally maintained MAC address segment , And the aggregated MAC address of the MAC address segment is also calculated with the mask, and then the second converted MAC address and the aggregated MAC address after the operation of the mask are accurately matched until the corresponding forwarding information is hit .
- the query method may also be based on the longest matching principle, for example.
- the longest matching principle refers to matching the second converted MAC address with the forwarding information in the second routing information table maintained by the first NPE device bit by bit, until the forwarding with the longest number of consecutively matched bits is found information.
- the first MAC address segment is determined to include the forwarding information of the first MAC address segment.
- the first NPE device can find an exact matching route, such as a local route maintained by the first NPE device, or a non-exact match route, such as the first UPE device sent by the first NPE device.
- Aggregated MAC routing can realize message forwarding based on the first aggregated MAC routing while maintaining the traditional mechanism.
- the first NPE device determines that the second packet is an unknown unicast packet Text. At this time, the first NPE device will broadcast the second message to send the second message to all UPE devices (or some UPE devices) connected to the first NPE device, so as to ensure the stability of message forwarding.
- the first UPE device obtains n updated response messages based on the n response messages.
- the first UPE device may obtain the second updated response message based on the second message and the second MAC address corresponding to the second translated MAC address, where the second updated response message
- the destination MAC address of the response message is the second MAC address, and the second MAC address belongs to the above n MAC addresses.
- the first UPE device has stored the correspondence between n MAC addresses and n converted MAC addresses. Since the second MAC address belongs to the n MAC addresses, the first UPE device can search for the first corresponding to the second converted MAC address based on the stored correspondence between the n MAC addresses and the n converted MAC addresses. 2. MAC addresses, and replace the second converted MAC address in the second packet with the corresponding second MAC address to obtain the second updated response packet, thereby realizing normal forwarding of the packet to the user equipment.
- the first UPE device in S211 can also receive one or more messages of other types. If the data message needs to be forwarded to the user equipment, it is based on the locally stored n MAC addresses and n messages. The corresponding relationship of the converted MAC address is updated to the one or more messages to obtain the corresponding updated message.
- the first UPE device Since multiple fields of the second message may carry the second converted MAC address, the first UPE device needs to replace all the second converted MAC addresses carried in the second message Is the corresponding second MAC address. For example, please continue to refer to the aforementioned FIG. 3, the first UPE device may replace the contents of the Ethernet destination address field and the destination Ethernet address field in the second packet with the aforementioned second MAC address.
- the first UPE device sends the n updated response messages.
- the first UPE device may send the second updated response message to the user corresponding to the second MAC address equipment.
- the first UPE device determines the second MAC address
- the second converted message is an unknown unicast message.
- the first UPE device will broadcast the message to send the second converted message to all user equipment (or some user equipment) connected to the first UPE device.
- the first UPE device determines and saves the correspondence between n MAC addresses and n converted MAC addresses as an example for description. After the first UPE device saves the correspondence between the n MAC addresses and the n converted MAC addresses, the first UPE device may also receive a first message sent by the user equipment, and the first source MAC of the first message The address belongs to n MAC addresses of n packets. Then, the first UPE device may obtain the first updated message based on the first message and the first translated MAC address corresponding to the first source MAC address. The source MAC address of the first updated message is the first converted MAC address, and the first converted MAC address belongs to n converted MAC addresses. The first UPE device may send the first updated message to the first NPE device.
- the first message may be a request message sent by the user equipment to the first UPE device.
- the first UPE device has stored the correspondence between the MAC address of the user equipment and the converted MAC address.
- the first UPE device can extract the first source MAC address in the first message, and then based on the corresponding relationship between the n MAC addresses stored in S203 and the n converted MAC addresses, Find the first converted MAC address corresponding to the first source MAC address, and then replace the first source MAC address in the first message with the first converted MAC address to obtain the first updated message .
- the process can be referred to the foregoing description, which will not be repeated here.
- the first NPE device may also obtain a response packet of the packet.
- the first NPE device refers to the above S210 to The first UPE device sends the response message.
- the first UPE device then refers to the above S211 to obtain the first updated response message to be sent to the user equipment, and refers to S212 to send the first updated response message to the user equipment, which will not be repeated here.
- the first MAC address segment belongs to the first aggregated MAC route as an example.
- the first MAC address segment may not belong to the first aggregated MAC route.
- S204 and S205 may not be executed.
- S204 and S205 can be replaced by the first UPE device sending the first MAC address segment and the IP address of the first UPE device to the first NPE device.
- the first NPE device generates the first MAC address segment and the first UPE device. The forwarding information of the IP address.
- the first MAC address segment and the IP address of the first UPE device can also be sent separately, as long as the first NPE device can combine the first MAC address segment and the first MAC address segment with the first MAC address segment and the first UPE device after receiving them separately.
- the preset rule may be, for example, a common flag bit.
- the IP address of the first UPE device may also be replaced by another type of device identifier that can be used to identify the first UPE device.
- the first UPE device may include multiple MAC address segments, and the multiple MAC addresses included in different MAC address segments are different.
- the first UPE device may divide the MAC addresses of user equipment applying for different service types into different MAC address segments, or for another example, the first UPE device may divide the MAC addresses of user equipment belonging to different residential areas into different MAC address segment, which facilitates the management of user equipment and the forwarding of packets.
- the first UPE device may divide the MAC addresses of user equipment belonging to different regions or different cities into different MAC address segments.
- the first MAC address segment is taken as an example for description.
- the first UPE device may also include other address segments than the first MAC address segment, such as the second MAC address segment.
- the UPE device and the NPE device may also refer to the foregoing method of generating forwarding information based on the first MAC address segment to implement the sending and receiving of packets based on the second MAC address segment.
- the first UPE device may also receive m messages including m MAC addresses.
- the source MAC addresses of the m packets are m MAC addresses, and m is an integer greater than or equal to 2.
- the first UPE device may determine m converted MAC addresses one-to-one corresponding to the m MAC addresses according to the m MAC addresses, where the m converted MAC addresses belong to the second MAC address segment.
- the first UPE device can save the corresponding relationship between the m MAC addresses and the m converted MAC addresses, and send the second MAC to the first NPE device or the second NPE device Address segment.
- the first UPE device can obtain m updated messages based on the m messages and the m converted MAC addresses, where the source MAC addresses of the m updated messages are the m converted MAC addresses, respectively.
- the first UPE device may send m updated packets to the first NPE device or the second NPE device.
- the first NPE device or the second NPE device obtains m responses corresponding to the m updated packets after receiving the m updated packets Message.
- the first NPE device or the second NPE device generates forwarding information including the second MAC address segment, and forwards the m response packets to the first UPE device based on the forwarding information including the second MAC address segment.
- the first UPE device obtains m updated response messages based on the received m response messages, and sends the m updates to the user equipment with the m MAC addresses carried in the m updated response messages The response message afterwards.
- the second MAC address segment may belong to the second aggregated MAC route.
- the second aggregated MAC route is a route sent by the first UPE device, and includes the second MAC address segment and the IP address of the first UPE device.
- the first UPE device may first determine the second aggregated MAC route, and then send the second aggregated MAC route to the first NPE device or the second NPE device to send the second MAC route to the first NPE device or the second NPE device Address segment.
- the second aggregated MAC route can refer to the aforementioned first aggregated MAC route, and the process can refer to the aforementioned S204 and S205, which will not be repeated here.
- UPE devices other than the first UPE device may also generate aggregated MAC routes and send them to the first NPE device, the second NPE device, or any other NPE device.
- the network devices used to cooperate to complete the aggregated MAC routing receiving and sending and forwarding information generation are the UPE device and the NPE device, respectively. Understandably, in other possible application scenarios, other types of network devices may also be used to implement corresponding functions.
- the first UPE device or the first NPE device in the foregoing embodiment may be referred to as the first network device.
- the first network device When the first UPE device is called the first network device, the first network device may be used to perform the operations performed by the first UPE device.
- the first NPE device may be referred to as the second network device, and the second NPE device may be referred to as the third network device.
- the first network device When the first NPE device is called the first network device, the first network device may be used to perform the operations performed by the first NPE device.
- the first UPE device may be referred to as the second network device
- the second NPE device may be referred to as the third network device
- the response packet obtained by the first NPE device in S209 may be sent by the fourth network device.
- the MAC address of the user equipment is pre-configured. Generally, the MAC addresses of each user equipment are relatively discrete, which makes it impossible to directly aggregate the MAC addresses of at least one user equipment to obtain an aggregated MAC route.
- the first UPE device may first determine a MAC address pool including multiple converted MAC addresses, and the multiple converted MAC addresses may be continuous and may be represented by an aggregated MAC route. By replacing the multiple MAC addresses in the packets sent by multiple user equipment with multiple converted MAC addresses, and publishing the aggregated MAC route that can represent the multiple converted MAC addresses, it is possible to realize the communication to at least one user.
- the MAC address of the device is aggregated, and the normal forwarding of packets based on the aggregated MAC route is realized.
- the first UPE device determines the n converted MAC addresses corresponding to the n MAC addresses according to the n MAC addresses carried in the n messages received , The n converted MAC addresses belong to the first MAC address segment.
- the first UPE device saves the one-to-one correspondence between the n MAC addresses and the n converted MAC addresses, and sends the first MAC address segment to the first NPE device.
- the first MAC address segment may, for example, be included in the aggregated MAC route, so that the first NPE device does not need to learn n MAC routes corresponding to the n MAC addresses, but only needs to learn one aggregated MAC route.
- the number of MAC routes learned by the first NPE device is significantly reduced, which reduces the storage pressure of the first NPE device and saves network resources.
- the probability of occurrence of the situation that the first NPE device cannot meet the number specification of MAC routes is reduced, and the time period for the first NPE device to update its stored MAC routes is also reduced.
- the embodiments of the present application also provide a network system for generating forwarding information.
- the network system for generating forwarding information can apply the method for generating forwarding information provided in the above embodiments.
- the network system for generating forwarding information may be, for example, the network system shown in FIG. 1.
- the system for generating forwarding information may include a first network device and a second network device.
- the first network device may be, for example, the first UPE device shown in FIG. 2, and the second network device may be, for example, the first NPE device shown in FIG. 2.
- the first network device is configured to: receive n messages, where n messages include n MAC addresses, the source MAC addresses of the n messages are n MAC addresses, and n is an integer greater than or equal to 2.
- the second network device is used to: receive the first MAC address segment. Generate forwarding information, where the forwarding information includes the first MAC address segment; forwarding the received message based on the forwarding information.
- the second network device is configured to: receive the first MAC address segment and generate first forwarding information, where the first forwarding information includes the first MAC address segment, based on the first forwarding information and the received first report The first destination MAC address of the message forwards the first message, and the first destination MAC address belongs to the first MAC address segment.
- the first MAC address segment may, for example, be included in the aggregated MAC route.
- the first network device may also be used to: obtain n updated messages based on n messages and n converted MAC addresses, where the source MAC addresses of the n updated messages are n converted MAC addresses. MAC address. Send n updated messages.
- the first network device may be further configured to receive the first message from the second network device, wherein the destination MAC address of the first message includes a first converted MAC address, and the first The converted MAC address belongs to the n converted MAC addresses.
- the first network device obtains a first converted message based on the first message and a first MAC address corresponding to the first converted MAC address, wherein the value of the first converted message is
- the destination MAC address is the first MAC address
- the first MAC address belongs to the n MAC addresses, and the first converted message is sent.
- the first MAC address segment may belong to a first aggregated MAC route sent by the first network device to the second network device, and the first aggregated MAC route may also include the IP address of the first network device.
- the first network device may be further configured to receive a second packet, and the second source MAC address of the second packet belongs to the n MAC addresses of the n packets.
- the first network device obtains a second converted message based on the second message and a second converted MAC address corresponding to the second source MAC address, wherein the second converted message
- the source MAC address of is the second converted MAC address
- the second converted MAC address belongs to the n converted MAC addresses
- the second converted message is sent.
- the second message for example, an ARP message
- the second source MAC address of the second message is the outer source MAC address
- the second message also includes the inner source MAC address.
- Source MAC address, the inner layer source MAC address is the same as the outer layer source MAC address
- the second packet is obtained based on the second packet and the second translated MAC address corresponding to the second source MAC address 2.
- the converted message The first network device respectively replaces the outer source MAC address and the inner source MAC address with a second converted MAC address corresponding to the second source MAC address to obtain a second converted MAC address Message.
- the first network device is further configured to receive m messages, where the m messages include m media access control MAC addresses, and the source MAC addresses of the m messages are the m MAC addresses, respectively , M is an integer greater than or equal to 2.
- the first network device determines m converted MAC addresses based on the m MAC addresses, where the m MAC addresses correspond to m converted MAC addresses one-to-one, and the m converted MAC addresses It belongs to the second MAC address segment, and saves the correspondence between the m MAC addresses and the m converted MAC addresses.
- the first network device may send the second MAC address segment to the second network device or the third network device.
- the second network device or the third network device may be configured to receive the second MAC address segment, generate second forwarding information including the second MAC address segment, based on the information including the second MAC address segment The second forwarding information forwards the received third message, and the destination MAC address of the third message belongs to the second MAC address segment.
- the third network device may be, for example, the NPE device in the system shown in FIG. 1.
- the first network device determines the n MAC addresses corresponding to the n MAC addresses according to the n MAC addresses carried in the n messages received.
- the converted MAC address, the n converted MAC addresses belong to the first MAC address segment.
- the first network device saves the one-to-one correspondence between the n MAC addresses and the n converted MAC addresses, and sends the first MAC address segment to the second network device.
- the first MAC address segment may be included in the aggregated MAC address, for example.
- the second network device does not need to learn n MAC routes corresponding to n MAC addresses, but only needs to learn one aggregated MAC route. As a result, the number of MAC routes learned by the second network device is significantly reduced, which reduces the storage pressure of the second network device and saves network resources.
- the embodiment of the present application provides a device for generating forwarding information.
- the device for generating forwarding information may be, for example, the first UPE device in the method shown in FIG. 2 described above. Please refer to FIG. 4, which is a block diagram of a device for generating forwarding information provided by an embodiment of the application.
- the device 300 for generating forwarding information includes:
- the first receiving module 301 is configured to receive n messages, where the n messages include n MAC addresses, the source MAC addresses of the n messages are respectively n MAC addresses, and n is an integer greater than or equal to 2;
- the first determining module 302 is configured to determine n converted MAC addresses based on n MAC addresses, where the n MAC addresses correspond to the n converted MAC addresses one-to-one, and the n converted MAC addresses belong to the first MAC Address segment
- the first saving module 303 is configured to save the correspondence between n MAC addresses and n converted MAC addresses;
- the first sending module 304 is configured to send the first MAC address segment to the first network device.
- the first determining module determines the relationship between the n MAC addresses and the n MAC addresses carried in the n packets received by the first receiving module. Corresponding n converted MAC addresses, the n converted MAC addresses belong to the first MAC address segment.
- the first saving module saves the one-to-one correspondence between the n MAC addresses and the n converted MAC addresses.
- the first sending module sends the first MAC address segment to the first network device.
- the first MAC address segment may include, for example, In the aggregated MAC route, the first network device does not need to learn n MAC routes corresponding to the n MAC addresses, but only needs to learn one aggregated MAC route. As a result, the number of MAC routes learned by the first network device is significantly reduced, which reduces the storage pressure of the first network device and saves network resources.
- FIG. 5 is a block diagram of another device for generating forwarding information provided by an embodiment of the application. As shown in FIG. 5, based on FIG. 4, the device is used for generating forwarding information.
- the device 300 also includes:
- the first obtaining module 305 is configured to obtain n updated messages based on n messages and n converted MAC addresses, where the source MAC addresses of the n updated messages are n converted MAC addresses. address;
- the second sending module 306 is configured to send n updated messages.
- the remote network device can learn the converted MAC address, so as to realize the transmission and reception of messages based on the converted MAC address.
- the apparatus 300 for generating forwarding information further includes:
- the second receiving module 307 is configured to receive a first message, where the first source MAC address of the first message belongs to n MAC addresses of n messages;
- the first obtaining module 305 is further configured to obtain the first converted message based on the first message and the first converted MAC address corresponding to the first source MAC address, wherein the first converted message
- the source MAC address of the text is the first converted MAC address, and the first converted MAC address belongs to n converted MAC addresses;
- the third sending module 308 is configured to send the first converted message.
- the apparatus for generating forwarding information may extract the first source MAC address in the first message, and then based on the n number of MAC addresses that have been saved and the number of converted MAC addresses Correspondence, search for the first converted MAC address corresponding to the first source MAC address, and then replace the first source MAC address in the first message with the first converted MAC address to obtain the first converted MAC address The message, so as to realize the message is sent and received based on the converted MAC address.
- the first source MAC address of the first packet is the outer source MAC address
- the first packet further includes the inner source MAC address
- the inner source MAC address is the same as the outer source MAC address
- the first acquisition Module 305 is also used for:
- the outer source MAC address and the inner source MAC address are respectively replaced with the first converted MAC address corresponding to the first source MAC address to obtain the first converted message.
- the device for generating forwarding information needs to replace the internal and external source MAC addresses in the message with the translated MAC address to ensure the accuracy of message forwarding and avoid Problems such as packet loss occurred.
- the apparatus 300 for generating forwarding information further includes:
- the third receiving module 309 is configured to receive a second message, where the destination MAC address of the second message includes the second converted MAC address, and the second converted MAC address belongs to n converted MAC addresses;
- the second obtaining module 310 is configured to obtain a second converted message based on the second message and a second MAC address corresponding to the second converted MAC address, where the destination MAC address of the second converted message is The second MAC address, the second MAC address belongs to n MAC addresses;
- the fourth sending module 311 is configured to send the second converted message.
- the remote network device uses the converted MAC address as the destination MAC address to send a message to the user equipment.
- the device for generating forwarding information with the forwarding function can be based on the locally stored converted MAC address and For the correspondence between the original MAC addresses, the destination MAC address is replaced with the original MAC address to complete the forwarding of the message to the user equipment.
- the first MAC address segment belongs to a first aggregated MAC route sent by the first network device to the second network device, and the first aggregated MAC route further includes the IP address of the first network device.
- the IP address may enable the network device receiving the first MAC route to determine the port corresponding to the IP address, so that the network device can successfully send the message to the apparatus 300 for generating forwarding information through the port.
- the number of MAC addresses in the first MAC address segment is greater than or equal to the number of user equipment connected to the first network device.
- the device for generating forwarding information generates the corresponding first MAC address segment according to the determined number of user equipments, so as to ensure that the first MAC address segment can accommodate the MAC addresses corresponding to the corresponding number of user equipments, thereby improving the The ease of use and rationality of the address planned by the device for forwarding information.
- the number of user equipments may be determined based on the type of service and residential area, for example.
- the apparatus 300 for generating forwarding information further includes:
- the fourth receiving module 312 is configured to receive m messages, where the m messages include m media access control MAC addresses, the source MAC addresses of the m messages are m MAC addresses, and m is greater than or equal to 2. Integer
- the second determining module 313 is configured to determine m converted MAC addresses based on m MAC addresses, where the m MAC addresses correspond to the m converted MAC addresses one-to-one, and the m converted MAC addresses belong to the second MAC Address segment
- the second saving module 314 is configured to save the correspondence relationship between m MAC addresses and m converted MAC addresses;
- the fifth sending module 315 is configured to send the second MAC address segment to the first network device or the second network device.
- the device for generating forwarding information may include multiple MAC address segments, and different MAC address segments may include different multiple MAC addresses.
- the first network device may divide the MAC addresses of user equipment applying for different service types into different MAC address segments, or for another example, the device for generating forwarding information may divide the MAC addresses of user equipment belonging to different residential areas.
- the MAC address is divided into different MAC address segments to facilitate the management of user equipment and the forwarding of packets.
- the embodiment of the present application provides an apparatus for generating forwarding information.
- the apparatus for generating forwarding information may be, for example, the first NPE device shown in FIG. 2. Please refer to FIG. 6, which is a block diagram of a device for generating forwarding information provided by an embodiment of the application.
- the device 400 for generating forwarding information includes:
- the first receiving module 401 is configured to receive the MAC address segment sent by the first network device
- the generating module 402 is configured to generate forwarding information, where the forwarding information includes a MAC address segment;
- the second receiving module 403 is configured to receive a message sent by a second network device, the message includes a destination MAC address, and the destination MAC address belongs to a MAC address segment;
- the forwarding module 404 is configured to forward the received message to the first network device based on the destination MAC address and forwarding information.
- the generation module generates forwarding information including the MAC address segment sent by the first network device received by the first receiving module, and the forwarding module is based on the second receiving module.
- the destination MAC address in the message received by the module and the forwarding information generated by the generating module are forwarded to the first network device.
- the MAC address segment may be included in the aggregated MAC route, for example, so that it can be used to generate
- the device for forwarding information does not need to learn n MAC routes corresponding to the n MAC addresses, but only needs to learn one aggregated MAC route. As a result, the number of MAC routes learned by the device for generating forwarding information is significantly reduced, reducing the storage pressure of the device for generating forwarding information, and saving network resources.
- the forwarding module 404 is configured to query forwarding information based on the destination MAC address and the longest match principle, and forward the packet to the first network device based on the forwarding information, and the MAC address segment of the forwarding information matches the destination MAC address.
- the device for generating forwarding information can search for an exact matching route, such as a local route maintained by the device for generating forwarding information, or search for a route that is not exactly matching, such as sent by the first network device.
- the aggregated MAC routing can realize packet forwarding based on aggregated MAC routing while maintaining the traditional mechanism.
- the forwarding information further includes a port, the port is determined based on the IP address of the second network device, and the forwarding module 404 is configured to forward the packet through the port.
- the embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and the computer program is used to execute any method for generating forwarding information provided by the embodiment of the present application.
- the embodiments of the present application provide a computer program product containing instructions.
- the computer program product runs on a network device, the network device executes the method for generating forwarding information described in any design of the embodiment of the present application.
- the embodiment of the present application provides a network device.
- the network device may be, for example, the first UPE device shown in FIG. 2, or the other UPE device shown in FIG. 1, or any other network device, and any other network device may be used to execute the first UPE device shown in FIG. The same function as the device.
- the network device includes: a processor; the processor is configured to couple with a memory, and after reading an instruction in the memory, execute the method executed by the first UPE device as described in the foregoing embodiment of the present application according to the instruction.
- the embodiments of the present application also provide a network device.
- the network device may be, for example, the first NPE device shown in FIG. 2, or the other NPE device shown in FIG. 1, or any other network device, and any other network device may be It is used to perform the same functions as the first NPE device shown in FIG. 2.
- the network device includes: a processor; the processor is configured to couple with a memory, and after reading an instruction in the memory, execute the method executed by the first NPE device as described in the foregoing embodiment of the present application according to the instruction.
- the number of processors in the foregoing embodiment may be multiple.
- the memory coupled with the processor may be independent of the processor or independent of the network device, and may also be inside the processor or the network device.
- the storage can be a physically independent unit, or it can be a storage space on a cloud server or a network hard drive.
- FIG. 7, is a schematic structural diagram of a possible network device 500.
- the network device 500 includes a processor 502 and a memory 501, where the memory 501 is used to store a program, and the processor 502 is used to call the program stored in the memory 501, so that the network device executes a corresponding method or function.
- the network device 500 may further include at least one communication interface 503 and at least one communication bus 504.
- the memory 501, the processor 502, and the communication interface 503 are communicatively connected through a communication bus 504.
- the communication interface 503 is used to communicate with other devices under the control of the processor 502, and the processor 502 can call a program stored in the memory 501 through the communication bus 504.
- the computer may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
- software it may be implemented in whole or in part in the form of a computer program product, which includes one or more computer instructions.
- the computer may be a general-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.
- the center transmits to another website site, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.).
- 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, a floppy disk, a hard disk, and a magnetic tape), an optical medium, or a semiconductor medium (for example, a solid state hard disk).
- first and second are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance.
- at least one refers to one or more, and “multiple” refers to two or more, unless expressly defined otherwise.
- the term “and/or” is merely an association relationship that describes associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone. three situations.
- the character "/" in this text generally indicates that the associated objects before and after are in an "or” relationship.
- the disclosed system, equipment, device, etc. may be implemented in other configuration modes.
- the device embodiments described above are merely illustrative, for example, the division of units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
- the units described as separate components may or may not be physically separate.
- the components described as units may or may not be physical units, which can be located in one place or distributed to multiple network devices (such as terminal )on. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Power Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
Description
Claims (28)
- 一种用于生成转发信息的方法,其特征在于,所述方法包括:第一网络设备接收n个报文,其中,所述n个报文包括n个介质访问控制MAC地址,所述n个报文的源MAC地址分别为所述n个MAC地址,n为大于或等于2的整数;所述第一网络设备基于所述n个MAC地址确定n个经转换的MAC地址,其中所述n个MAC地址与n个经转换的MAC地址一一对应,所述n个经转换的MAC地址属于第一MAC地址段;所述第一网络设备保存所述n个MAC地址与所述n个经转换的MAC地址的对应关系;所述第一网络设备向第二网络设备发送所述第一MAC地址段。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:所述第一网络设备基于所述n个报文和所述n个经转换的MAC地址获得n个更新后的报文,其中所述n个更新后的报文的源MAC地址分别为所述n个经转换的MAC地址;所述第一网络设备发送所述n个更新后的报文。
- 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:所述第一网络设备接收第一报文,所述第一报文的第一源MAC地址属于所述n个报文的所述n个MAC地址;所述第一网络设备基于所述第一报文和与所述第一源MAC地址对应的第一经转换的MAC地址获得第一经转换的报文,其中所述第一经转换的报文的源MAC地址为所述第一经转换的MAC地址,所述第一经转换的MAC地址属于所述n个经转换的MAC地址;所述第一网络设备发送所述第一经转换的报文。
- 根据权利要求3所述的方法,其特征在于,所述第一报文的第一源MAC地址为外层源MAC地址,所述第一报文还包括内层源MAC地址,所述内层源MAC地址与所述外层源MAC地址相同,所述第一网络设备基于所述第一报文和与所述第一源MAC地址对应的第一经转换的MAC地址获得第一经转换的报文,包括:所述第一网络设备分别将所述外层源MAC地址和所述内层源MAC地址替换为与所述第一源MAC地址对应的第一经转换的MAC地址,以获得第一经转换的报文。
- 根据权利要求1至4任一项所述的方法,其特征在于,所述方法还包括:所述第一网络设备接收第二报文,其中,所述第二报文的目的MAC地址包括第二经转换的MAC地址,所述第二经转换的MAC地址属于所述n个经转换的MAC地址;所述第一网络设备基于所述第二报文和与所述第二经转换的MAC地址对应的第二MAC地址获得第二经转换的报文,其中所述第二经转换的报文的目的MAC地址为所述第二MAC地址,所述第二MAC地址属于所述n个MAC地址;所述第一网络设备发送所述第二经转换的报文。
- 根据权利要求1至5任一项所述的方法,其特征在于,所述第一MAC地址段属于所述第一网络设备向所述第二网络设备发送的第一聚合MAC路由,所述第一聚合MAC路由还包括所述第一网络设备的IP地址。
- 根据权利要求1至6任一项所述的方法,其特征在于,所述第一MAC地址段中的MAC地址的数量大于或等于所述第一网络设备连接的用户设备的数量。
- 根据权利要求1至7任一项所述的方法,其特征在于,所述方法还包括:所述第一网络设备接收m个报文,其中,所述m个报文包括m个介质访问控制MAC地址,所述m个报文的源MAC地址分别为所述m个MAC地址,m为大于或等于2的整数;所述第一网络设备基于所述m个MAC地址确定m个经转换的MAC地址,其中所述m个MAC地址与m个经转换的MAC地址一一对应,所述m个经转换的MAC地址属于第二MAC地址段;所述第一网络设备保存所述m个MAC地址与所述m个经转换的MAC地址的对应关系;所述第一网络设备向所述第二网络设备或第三网络设备发送所述第二MAC地址段。
- 一种用于生成转发信息的方法,其特征在于,所述方法包括:第一网络设备接收第二网络设备发送的MAC地址段;所述第一网络设备生成转发信息,所述转发信息包括所述MAC地址段;所述第一网络设备接收第三网络设备发送的报文,所述报文包括目的MAC地址,所述目的MAC地址属于所述MAC地址段;所述第一网络设备基于所述目的MAC地址和所述转发信息,向所述第二网络设备转发接收到的所述报文。
- 根据权利要求9所述的方法,其特征在于,所述第一网络设备基于所述目的MAC地址和所述转发信息,向所述第二网络设备转发接收到的所述报文包括:所述第一网络设备基于所述目的MAC地址和最长匹配原则查询所述转发信息;所述第一网络设备基于所述转发信息向所述第二网络设备转发所述报文,所述转发信息的所述MAC地址段与所述目的MAC地址相匹配。
- 根据权利要求10所述的方法,其特征在于,所述转发信息还包括端口,所述端口基于所述第二网络设备的IP地址确定,所述第一网络设备基于所述转发信息向所述第二网络设备转发所述报文,包括:所述第一网络设备通过所述端口转发所述报文。
- 一种用于生成转发信息的系统,所述系统包括第一网络设备和第二网络设备,其特征在于,所述第一网络设备用于:接收n个报文,其中,所述n个报文包括n个介质访问控制MAC地址,所述n个报文的源MAC地址分别为所述n个MAC地址,n为大于或等于2的整数;基于所述n个MAC地址确定n个经转换的MAC地址,其中所述n个MAC地址与n个经转换的MAC地址一一对应,所述n个经转换的MAC地址属于第一MAC地址段;保存所述n个MAC地址与所述n个经转换的MAC地址的对应关系;向第二网络设备发送所述第一MAC地址段;所述第二网络设备用于:接收所述第一MAC地址段;生成转发信息,所述转发信息包括所述第一MAC地址段;基于所述转发信息和接收到的第一报文的目的MAC地址转发所述第一报文,所述目的MAC地址属于所述第一MAC地址段。
- 根据权利要求12所述的系统,其特征在于,所述第一网络设备还用于:从所述第二网络设备接收所述第一报文,所述第一报文的所述目的MAC地址包括第一经转换的MAC地址,所述第一经转换的MAC地址属于所述n个经转换的MAC地址;基于所述第一报文和与所述第一经转换的MAC地址对应的第一MAC地址获得第一经转 换的报文,其中所述第一经转换的报文的目的MAC地址为所述第一MAC地址,所述第一MAC地址属于所述n个MAC地址;发送所述第一经转换的报文。
- 一种用于生成转发信息的装置,其特征在于,所述用于生成转发信息的装置包括:第一接收模块,用于接收n个报文,其中,所述n个报文包括n个介质访问控制MAC地址,所述n个报文的源MAC地址分别为所述n个MAC地址,n为大于或等于2的整数;第一确定模块,用于基于所述n个MAC地址确定n个经转换的MAC地址,其中所述n个MAC地址与n个经转换的MAC地址一一对应,所述n个经转换的MAC地址属于第一MAC地址段;第一保存模块,用于保存所述n个MAC地址与所述n个经转换的MAC地址的对应关系;第一发送模块,用于向第一网络设备发送所述第一MAC地址段。
- 根据权利要求14所述的装置,其特征在于,所述用于生成转发信息的装置还包括:第一获取模块,用于基于所述n个报文和所述n个经转换的MAC地址获得n个更新后的报文,其中所述n个更新后的报文的源MAC地址分别为所述n个经转换的MAC地址;第二发送模块,用于发送所述n个更新后的报文。
- 根据权利要求14或15所述的装置,其特征在于,所述用于生成转发信息的装置还包括:第二接收模块,用于接收第一报文,所述第一报文的第一源MAC地址属于所述n个报文的所述n个MAC地址;所述第一获取模块,还用于基于所述第一报文和与所述第一源MAC地址对应的第一经转换的MAC地址获得第一经转换的报文,其中所述第一经转换的报文的源MAC地址为所述第一经转换的MAC地址,所述第一经转换的MAC地址属于所述n个经转换的MAC地址;第三发送模块,用于发送所述第一经转换的报文。
- 根据权利要求16所述的装置,其特征在于,所述第一报文的第一源MAC地址为外层源MAC地址,所述第一报文还包括内层源MAC地址,所述内层源MAC地址与所述外层源MAC地址相同,所述第一获取模块,还用于:分别将所述外层源MAC地址和所述内层源MAC地址替换为与所述第一源MAC地址对应的第一经转换的MAC地址,以获得第一经转换的报文。
- 根据权利要求14至17任一项所述的装置,其特征在于,所述用于生成转发信息的装置还包括:第三接收模块,用于接收第二报文,其中,所述第二报文的目的MAC地址包括第二经转换的MAC地址,所述第二经转换的MAC地址属于所述n个经转换的MAC地址;第二获取模块,用于基于所述第二报文和与所述第二经转换的MAC地址对应的第二MAC地址获得第二经转换的报文,其中所述第二经转换的报文的目的MAC地址为所述第二MAC地址,所述第二MAC地址属于所述n个MAC地址;第四发送模块,用于发送所述第二经转换的报文。
- 根据权利要求14至18任一项所述的装置,其特征在于,所述第一MAC地址段属于所述第一网络设备向所述第二网络设备发送的第一聚合MAC路由,所述第一聚合MAC路由还包括所述第一网络设备的IP地址。
- 根据权利要求14至19任一项所述的装置,其特征在于,所述第一MAC地址段中的MAC地址的数量大于或等于所述第一网络设备连接的用户设备的数量。
- 根据权利要求14至20任一项所述的装置,其特征在于,所述用于生成转发信息的装置还包括:第四接收模块,用于接收m个报文,其中,所述m个报文包括m个介质访问控制MAC地址,所述m个报文的源MAC地址分别为所述m个MAC地址,m为大于或等于2的整数;第二确定模块,用于基于所述m个MAC地址确定m个经转换的MAC地址,其中所述m个MAC地址与m个经转换的MAC地址一一对应,所述m个经转换的MAC地址属于第二MAC地址段;第二保存模块,用于保存所述m个MAC地址与所述m个经转换的MAC地址的对应关系;第五发送模块,用于向所述第一网络设备或第二网络设备发送所述第二MAC地址段。
- 一种用于生成转发信息的装置,其特征在于,所述用于生成转发信息的装置包括:第一接收模块,用于接收第一网络设备发送的MAC地址段;生成模块,用于生成转发信息,所述转发信息包括所述MAC地址段;第二接收模块,用于接收第二网络设备发送的报文,所述报文包括目的MAC地址,所述目的MAC地址属于所述MAC地址段;转发模块,用于基于所述目的MAC地址和所述转发信息,向所述第一网络设备转发接收到的所述报文。
- 根据权利要求22所述的装置,其特征在于,所述转发模块用于:基于所述目的MAC地址和最长匹配原则查询所述转发信息;基于所述转发信息向所述第一网络设备转发所述报文,所述转发信息的所述MAC地址段与所述目的MAC地址相匹配。
- 根据权利要求23所述的装置,其特征在于,所述转发信息还包括端口,所述端口基于所述第二网络设备的IP地址确定,所述转发模块用于:通过所述端口转发所述报文。
- 一种网络设备,其特征在于,所述网络设备包括:处理器和存储器,所述存储器中存储有程序,所述处理器用于调用所述存储器中存储的程序,以使得所述网络设备执行如权利要求1至8任一项所述的用于生成转发信息的方法。
- 一种网络设备,其特征在于,所述网络设备包括:处理器和存储器,所述存储器中存储有程序,所述处理器用于调用所述存储器中存储的程序,以使得所述网络设备执行如权利要求9至11任一项所述的用于生成转发信息的方法。
- 一种计算机存储介质,其特征在于,所述存储介质内存储有计算机程序,所述计算机程序用于执行权利要求1至8任一项所述的用于生成转发信息的方法。
- 一种计算机存储介质,其特征在于,所述存储介质内存储有计算机程序,所述计算机程序用于执行权利要求9至11任一项所述的用于生成转发信息的方法。
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
BR112022008591A BR112022008591A2 (pt) | 2019-11-05 | 2020-05-27 | Método, aparelho e sistema para geração de informação de encaminhamento |
EP20884836.6A EP4044532A4 (en) | 2019-11-05 | 2020-05-27 | PROCEDURE FOR GENERATION OF FORWARDING INFORMATION, DEVICE AND SYSTEM |
JP2022526278A JP2022554380A (ja) | 2019-11-05 | 2020-05-27 | 転送情報を生成する方法、装置、およびシステム |
US17/736,628 US20220263794A1 (en) | 2019-11-05 | 2022-05-04 | Method, apparatus, and system for generating forwarding information |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911071875 | 2019-11-05 | ||
CN201911071875.X | 2019-11-05 | ||
CN202010027651.5 | 2020-01-10 | ||
CN202010027651.5A CN112787932B (zh) | 2019-11-05 | 2020-01-10 | 一种用于生成转发信息的方法、装置和系统 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US17/736,628 Continuation US20220263794A1 (en) | 2019-11-05 | 2022-05-04 | Method, apparatus, and system for generating forwarding information |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021088357A1 true WO2021088357A1 (zh) | 2021-05-14 |
Family
ID=75749976
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/092716 WO2021088357A1 (zh) | 2019-11-05 | 2020-05-27 | 一种用于生成转发信息的方法、装置和系统 |
Country Status (6)
Country | Link |
---|---|
US (1) | US20220263794A1 (zh) |
EP (1) | EP4044532A4 (zh) |
JP (1) | JP2022554380A (zh) |
CN (2) | CN115567441A (zh) |
BR (1) | BR112022008591A2 (zh) |
WO (1) | WO2021088357A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113726658B (zh) * | 2021-08-09 | 2022-10-18 | 中国联合网络通信集团有限公司 | 一种路由转发方法及装置 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101102264A (zh) * | 2006-07-04 | 2008-01-09 | 华为技术有限公司 | 一种以太网转发数据的方法和一种以太网系统 |
WO2017118880A1 (en) * | 2016-01-08 | 2017-07-13 | Telefonaktiebolaget Lm Ericsson (Publ) | Faster convergence on primary provider edge (pe) failure in a single-active redundancy topology |
CN108063716A (zh) * | 2013-05-24 | 2018-05-22 | 华为技术有限公司 | 用于以太虚拟专用网的方法和设备 |
US10033636B1 (en) * | 2016-04-14 | 2018-07-24 | Cisco Technology, Inc. | Ethernet segment aware MAC address learning |
Family Cites Families (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6928478B1 (en) * | 2001-06-25 | 2005-08-09 | Network Appliance, Inc. | Method and apparatus for implementing a MAC address pool for assignment to a virtual interface aggregate |
CN100450080C (zh) * | 2005-05-17 | 2009-01-07 | 华为技术有限公司 | 收敛二层mac地址的方法及设备 |
US20070201490A1 (en) * | 2005-07-13 | 2007-08-30 | Mahamuni Atul B | System and method for implementing ethernet MAC address translation |
US8077720B2 (en) * | 2007-02-27 | 2011-12-13 | Alcatel-Lucent Usa Inc. | Methods and devices for generating and forwarding translated MAC addresses |
US8259726B2 (en) * | 2009-05-28 | 2012-09-04 | Force10 Networks, Inc. | Method and apparatus for forwarding table reduction |
CN102404193B (zh) * | 2010-09-17 | 2014-08-13 | 华为技术有限公司 | 生成转发表项、报文转发、地址获取的方法及边缘设备 |
US8953590B1 (en) * | 2011-03-23 | 2015-02-10 | Juniper Networks, Inc. | Layer two virtual private network having control plane address learning supporting multi-homed customer networks |
US8787149B1 (en) * | 2012-02-01 | 2014-07-22 | Juniper Networks, Inc. | MAC address synchronization for multi-homing with multichassis link aggregation |
CN103795631B (zh) * | 2012-10-30 | 2017-03-15 | 杭州华三通信技术有限公司 | 部署了以太网虚拟连接的网络中的流量转发方法及设备 |
US9331958B2 (en) * | 2012-12-31 | 2016-05-03 | Advanced Micro Devices, Inc. | Distributed packet switching in a source routed cluster server |
CN103944826B (zh) * | 2013-01-22 | 2017-03-15 | 杭州华三通信技术有限公司 | Spbm网络中的表项聚合方法及设备 |
CN105282032A (zh) * | 2014-07-25 | 2016-01-27 | 中兴通讯股份有限公司 | 报文转发处理方法、装置及宽带接入设备 |
US10187218B2 (en) * | 2015-09-15 | 2019-01-22 | Google Llc | Systems and methods for processing packets in a computer network |
CN108075956B (zh) * | 2016-11-16 | 2020-05-22 | 新华三技术有限公司 | 一种数据处理方法和装置 |
US11522828B2 (en) * | 2017-07-31 | 2022-12-06 | Cisco Technology, Inc. | Virtualized network functions through address space aggregation |
CN108809767B (zh) * | 2018-06-28 | 2020-09-15 | 新华三技术有限公司 | Mac地址处理方法、设备和级联组网系统 |
-
2020
- 2020-01-10 CN CN202211011830.5A patent/CN115567441A/zh active Pending
- 2020-01-10 CN CN202010027651.5A patent/CN112787932B/zh active Active
- 2020-05-27 WO PCT/CN2020/092716 patent/WO2021088357A1/zh unknown
- 2020-05-27 EP EP20884836.6A patent/EP4044532A4/en active Pending
- 2020-05-27 BR BR112022008591A patent/BR112022008591A2/pt unknown
- 2020-05-27 JP JP2022526278A patent/JP2022554380A/ja active Pending
-
2022
- 2022-05-04 US US17/736,628 patent/US20220263794A1/en not_active Abandoned
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101102264A (zh) * | 2006-07-04 | 2008-01-09 | 华为技术有限公司 | 一种以太网转发数据的方法和一种以太网系统 |
CN108063716A (zh) * | 2013-05-24 | 2018-05-22 | 华为技术有限公司 | 用于以太虚拟专用网的方法和设备 |
WO2017118880A1 (en) * | 2016-01-08 | 2017-07-13 | Telefonaktiebolaget Lm Ericsson (Publ) | Faster convergence on primary provider edge (pe) failure in a single-active redundancy topology |
US10033636B1 (en) * | 2016-04-14 | 2018-07-24 | Cisco Technology, Inc. | Ethernet segment aware MAC address learning |
Non-Patent Citations (1)
Title |
---|
See also references of EP4044532A4 |
Also Published As
Publication number | Publication date |
---|---|
CN112787932A (zh) | 2021-05-11 |
EP4044532A4 (en) | 2022-12-14 |
BR112022008591A2 (pt) | 2022-08-09 |
CN115567441A (zh) | 2023-01-03 |
JP2022554380A (ja) | 2022-12-28 |
EP4044532A1 (en) | 2022-08-17 |
US20220263794A1 (en) | 2022-08-18 |
CN112787932B (zh) | 2022-09-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021078281A1 (zh) | 报文转发及域名地址查询 | |
US10574574B2 (en) | System and method for BGP sFlow export | |
US10749763B2 (en) | Reliable address discovery cache | |
US10091105B2 (en) | Efficient forwarding information base caching system and method | |
US11012358B2 (en) | Forwarding table management | |
WO2023115978A1 (zh) | 一种报文处理方法、装置及电子设备 | |
JP2020520612A (ja) | パケット伝送方法、エッジデバイス及び機械可読記憶媒体 | |
US8923298B2 (en) | Optimized trie-based address lookup | |
CN102035738B (zh) | 一种获取路由信息的方法及装置 | |
WO2015180130A1 (zh) | 报文编辑处理方法和相关设备 | |
WO2024093064A1 (zh) | 一种大规模多模态网络中标识管理及优化转发方法和装置 | |
WO2020134831A1 (zh) | 一种用于片上网络的数据传输方法、装置及电子设备 | |
CN111654443B (zh) | 一种云环境下虚机IPv6地址直接访问公网的方法 | |
TWI241089B (en) | Method and apparatus to perform network routing using multiple length trie blocks | |
US10536368B2 (en) | Network-aware routing in information centric networking | |
WO2021088357A1 (zh) | 一种用于生成转发信息的方法、装置和系统 | |
JP2016503267A (ja) | ネットワークのプロトコルアドレスを扱う方法及び処理デバイス | |
WO2016070332A1 (zh) | 流表项处理方法和装置 | |
US11902158B2 (en) | System and method for forwarding packets in a hierarchical network architecture using variable length addresses | |
EP2375692A2 (en) | Apparatus and method for registering node and searching for floating internet protocol address using distributed network | |
CN105072043A (zh) | Mesh网络路由协议中的客户端声明过程优化方法 | |
CN115242733B (zh) | 报文组播方法、组播网关、电子设备及存储介质 | |
WO2021143660A1 (zh) | 一种数据传输的方法和装置 | |
US20230195538A1 (en) | Offloaded data processing for named based data transmissions | |
CN107547406B (zh) | 分布式evpn网关组网中建立fib表的方法和装置 |
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: 20884836 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2022526278 Country of ref document: JP Kind code of ref document: A |
|
REG | Reference to national code |
Ref country code: BR Ref legal event code: B01A Ref document number: 112022008591 Country of ref document: BR |
|
ENP | Entry into the national phase |
Ref document number: 2020884836 Country of ref document: EP Effective date: 20220510 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 112022008591 Country of ref document: BR Kind code of ref document: A2 Effective date: 20220504 |