WO2016086713A1 - 一种等价多路径的出接口更新方法及装置 - Google Patents

一种等价多路径的出接口更新方法及装置 Download PDF

Info

Publication number
WO2016086713A1
WO2016086713A1 PCT/CN2015/091128 CN2015091128W WO2016086713A1 WO 2016086713 A1 WO2016086713 A1 WO 2016086713A1 CN 2015091128 W CN2015091128 W CN 2015091128W WO 2016086713 A1 WO2016086713 A1 WO 2016086713A1
Authority
WO
WIPO (PCT)
Prior art keywords
next hop
ecmp
arp
information
layer
Prior art date
Application number
PCT/CN2015/091128
Other languages
English (en)
French (fr)
Inventor
杜旭
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016086713A1 publication Critical patent/WO2016086713A1/zh

Links

Images

Definitions

  • the present invention relates to the field of data communication technologies, and in particular, to an outbound interface update method and apparatus for ECMP (Equal-Cost Multi-Path).
  • ECMP Equal-Cost Multi-Path
  • IP Internet Protocol
  • the size of the three-layer network is increasing, making the bandwidth and reliability of the network alive.
  • the focus of business is getting more and more attention.
  • the aggregation layer network accesses the environment of the core network, learns a large number of routing entries, and has large uplink traffic.
  • ECMP routes are often established as links for accessing uplinks. routing.
  • the data packets destined for the destination route can only use one of the links, the other links are in the backup state or the invalid state, and the mutual switching in the dynamic routing environment takes a certain time.
  • the equal-cost multi-path routing protocol can use multiple routes at the same time in the network environment.
  • R1 can route different data packets destined for the same destination address to R2 and R3 through its two outbound interfaces. Therefore, not only the transmission bandwidth is increased, but also the data transmission of the failed link can be backed up without delay and without packet loss.
  • dynamic routing protocols such as Open Shortest Path First (OSPF), Intermediate System to Intermediate System (IS-IS), and Border Gateway Protocol (BGP) ECMP has been supported.
  • OSPF Open Shortest Path First
  • IS-IS Intermediate System to Intermediate System
  • BGP Border Gateway Protocol
  • the same destination address may correspond to multiple outbound interfaces.
  • the device may not have generated an Layer 2 forwarding information of the outbound interface, which may result in the failure to update the Forward Information Base (FIB). If the outbound interface is used, load balancing of traffic cannot be achieved. In a specific environment, service traffic may be interrupted and the high reliability requirements of the network cannot be met.
  • FIB Forward Information Base
  • the technical problem to be solved by the embodiment of the present invention is to provide an outbound interface update method and device for an equal-cost multi-path, which can effectively implement load balancing and link bandwidth of the traffic by timely updating the outbound interface information corresponding to the ECMP routing entry. Utilization provides assurance and improves the reliability of the network.
  • an uplink interface update method for an equal-cost multi-path includes:
  • a corresponding flag bit is set for each next hop of the ECMP route in a database, where the flag bit is valid, indicating that the second layer forwarding information of the next hop exists locally, and is invalid. Time indicates that there is no Layer 2 forwarding information of the next hop locally;
  • next hop Periodically traversing each next hop in the database until all next hops are traversed, wherein if the flag of the next hop of the current traversal is valid, then continuing to traverse the next next hop; if current traversal If the flag of the next hop is invalid, the ARP learning process of the next hop is triggered, and after the second layer forwarding information corresponding to the next hop is learned by the ARP learning process, the next hop is updated. The flag is valid, and the routing information of the next hop is sent to the FIB.
  • the determining whether the Layer 2 forwarding information corresponding to each next hop of the ECMP route exists locally includes:
  • next hop If the next hop is not queried, it is determined that the second layer forwarding information of the next hop does not exist locally;
  • the local MAC address table is queried according to the MAC address corresponding to the next hop: if the MAC address corresponding to the next hop is queried, it is determined that the second layer forwarding information of the next hop exists locally. If the MAC address corresponding to the next hop is not queried, it is determined that the second layer forwarding information of the next hop does not exist locally.
  • the timer is set by setting a timer, and after the timer expires to a predetermined threshold, the operation of traversing the next hop of the database is triggered, and the timer is restarted. Timing.
  • the learning by the ARP learning process, the next hop corresponding After the Layer 2 forwarding information, the flag of the next hop is updated, and the routing information of the next hop is sent to the FIB, including:
  • next hop If there is the same next hop as the first IP, and the flag of the next hop is invalid, the flag of the next hop is updated to be valid, and the outbound interface of the next hop is parsed, and the next hop is obtained. A hop and its outgoing interface information are sent to the FIB.
  • the method when deleting a second ARP entry from the ARP table, the method further includes:
  • the foregoing method further includes:
  • the routing information of the next hop of the ECMP route in the FIB is deleted.
  • An embodiment of the present invention further provides an outbound interface updating apparatus for an equivalent multipath ECMP, including:
  • Obtaining a unit configured to obtain a newly generated ECMP route, and determine all next hops of the ECMP route;
  • a determining unit configured to determine whether the layer 2 forwarding information corresponding to each next hop of the ECMP route exists locally;
  • the processing unit is configured to send the routing information of the next hop of the local layer 2 forwarding information to the forwarding information table FIB according to the judgment result of the determining unit, and route the ECMP in a database.
  • Each of the next hops is configured with a corresponding flag bit, where the flag bit is valid, indicating that the second layer forwarding information of the next hop exists locally, and when invalid, the layer 2 forwarding information of the next hop does not exist locally. ;
  • the traversal unit is configured to periodically traverse each next hop in the database until all next hops are traversed, wherein if the flag of the next hop of the current traversal is valid, then traversing the next next traversal Jump; if the flag of the next hop of the current traversal is invalid, the next hop is triggered.
  • the ARP learning process and after learning the Layer 2 forwarding information corresponding to the next hop through the ARP learning process, updating the flag of the next hop is valid, and sending the routing information of the next hop to the In the FIB.
  • the determining processing unit is configured to:
  • next hop If the next hop is not queried, it is determined that the second layer forwarding information of the next hop does not exist locally;
  • the local MAC address table is queried according to the MAC address corresponding to the next hop: if the MAC address corresponding to the next hop is queried, it is determined that the second layer forwarding information of the next hop exists locally. If the MAC address corresponding to the next hop is not queried, it is determined that the second layer forwarding information of the next hop does not exist locally.
  • the foregoing apparatus further includes:
  • the timing unit is configured to set a timer for timing. After the timer expires to a predetermined threshold, the traversal unit is triggered to traverse the next hop of the database, and the timer is reset to restart timing.
  • the foregoing apparatus further includes:
  • the ARP entry processing unit is configured to newly generate a first ARP entry.
  • the traversing unit is configured to determine, according to the first IP address of the first ARP entry, whether the database exists the same as the first IP address, when the ARP entry is generated by the ARP entry.
  • the next hop of the next hop if there is the same next hop as the first IP, and the flag of the next hop is invalid, the flag of the next hop is updated to be valid, and the next hop is parsed
  • the interface sends the next hop and its outbound interface information to the FIB.
  • the ARP entry processing unit is further configured to delete a second ARP entry from the ARP table.
  • the traversing unit is further configured to determine, according to the second IP address of the second ARP entry, whether the database exists and the second IP when the ARP entry processing unit deletes the second ARP entry The next hop with the same address, and when there is the same next hop as the second IP, the next hop and its outbound interface information are deleted from the FIB.
  • the traversing unit is further configured to delete information of all next hops of the ECMP route from the database when the ECMP route is deleted; and The routing information of the next hop of the ECMP route in the FIB is deleted.
  • the method and device for updating the outbound interface of the equivalent multipath provided by the embodiment of the present invention have at least the following beneficial effects:
  • the embodiment of the present invention triggers the ARP (Address Resolution Protocol) learning process by periodically updating the next hop address of the invalid ECMP link, and sends the ARP request packet to collect the link neighbor information and obtain the link out.
  • Interfaces which quickly update routing FIB entries, have high flexibility, facilitate network discovery, operation and maintenance, and ensure the effectiveness of routing FIB tables. They effectively utilize the bandwidth of ECMP multipaths for load balancing and bandwidth control. The guarantee is provided, and the implementation process of the embodiment of the present invention does not excessively burden the system, and can ensure fast convergence of the link and meet the reliability requirement of the network.
  • FIG. 1 is a schematic diagram of an ECMP aggregation link of the related art
  • FIG. 2 is a schematic flowchart diagram of an ECMP outgoing interface update method according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of an ECMP outgoing interface update apparatus according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of maintaining an ECMP next hop information database when an ECMP route is updated with an FIB according to an embodiment of the present invention
  • FIG. 5 is a schematic flowchart of looping timer triggering update ARP learning according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of a process flow of updating an ECMP next hop information database in an ARP learning update process according to an embodiment of the present invention.
  • IS-IS Intermediate System to Intermediate System
  • a switch is an intermediate system, and the protocol used by the switch to announce each other is called the IS-IS protocol.
  • the IS-IS routing protocol is used to discover neighbors and form adjacencies by exchanging Hello PDUs.
  • the advertisement of the route uses link state PDUs.
  • the routing protocol packet exchange does not trigger the learning of the address resolution protocol (ARP) of the neighbor device. Therefore, the route next hop address processed by the routing topology calculation may be in the ARP.
  • ARP address resolution protocol
  • the FIB entry generated by the route on the forwarding plane may not have an actual outbound interface.
  • the data traffic is sent to the TCP/IP protocol stack, triggering the generation of the ARP entry, and then learning the outgoing interface, and then re-updating the routing FIB table, and finally realizing the wire-speed forwarding traffic.
  • the same next hop entry cannot be updated.
  • the keepalive keepalive message uses the global unicast address as the address of the keepalive message, but the next hop address used in the advertised route is the link-local address, and both addresses belong to the same interface. However, they are inconsistent, so the message cannot update the link-local address.
  • a route may correspond to multiple equivalents. jump. If the IP address of the next outbound interface does not exist in the ARP entry, the outbound interface of the FIB entry will not be added. interface. At the same time, the traffic can be forwarded from other interfaces that exist in the FIB entry.
  • the BGP4+ routing protocol does not trigger the learning of the next hop ARP entry. As a result, the outbound interface of the next hop cannot be updated. The link interface cannot be updated in the route forwarding FIB. The traffic cannot be load balanced between the outbound interface and other interfaces. In a specific environment (such as traffic exceeding the bandwidth of the existing link), service traffic may be interrupted. It may be difficult to meet the high reliability requirements of the network.
  • the embodiment of the present invention provides an ECMP outgoing interface update method, which is used to automatically trigger ARP learning in an ECMP topology network based on the IS-IS and BGP4+ routing protocols, so as to implement an equal-cost routing multiple outgoing interface.
  • the update ensures the validity of the routing FIB table, so as to facilitate load balancing and bandwidth control.
  • the method itself does not burden the system too much, ensures fast convergence of the link, and satisfies the reliability requirements of the network.
  • the ECMP outgoing interface update method provided by the embodiment of the present invention is applied to a Layer 3 forwarding device, which may be an intermediate system (IS), a router, or a Layer 3 switch.
  • the device has enabled dynamic routing protocols such as IS-IS or BGP and enabled ECMP.
  • the protocol control layer of the device can generate an ECMP routing entry, which can be the same as or similar to the related technology, and is not described here.
  • Alive When a new ECMP route is formed, the ECMP outgoing interface update method provided by the embodiment of the present invention implements the fast update of the equal-cost route multiple-outbound interface by using the following steps, as shown in FIG. 2, including:
  • Step 21 Obtain a newly generated ECMP route, and determine all next hops of the ECMP route.
  • a new ECMP route is generated by the protocol control layer of the device, and is sent to the data forwarding plane of the device.
  • the forwarding plane determines information about all next hops of the route. There may be more than two next hops in the ECMP route.
  • the information of the next hop is usually the IP address of the next hop.
  • Step 22 Determine whether the Layer 2 forwarding information corresponding to each next hop of the ECMP route exists locally, and according to the determination result, only the routing information of the next hop of the local Layer 2 forwarding information is sent to the routing information.
  • the forwarding information table FIB a corresponding flag bit is set for each next hop of the ECMP route in a database, where the flag bit is valid, indicating that the second layer forwarding of the next hop exists locally. If the information is invalid, it means that there is no Layer 2 forwarding information of the next hop.
  • the device may not generate the outbound interface information corresponding to the next hop of the ECMP route. Therefore, in this embodiment, it is determined in step 22 whether the Layer 2 forwarding information corresponding to each next hop is Already exists locally on the device.
  • the Layer 2 forwarding information includes the outbound interface corresponding to the next hop and the MAC address corresponding to the next hop (that is, the MAC address corresponding to the next hop IP address). If the device does not have an outbound interface corresponding to the next hop or the next one. If the corresponding MAC address is skipped, the Layer 2 forwarding information of the next hop does not exist locally.
  • One way to determine the following is as follows:
  • Step 221 Query the local ARP table of the device according to each next hop.
  • Step 222 If a next hop is not queried, it is determined that the second layer forwarding information of the next hop does not exist locally;
  • Step 223 If the next hop is queried, the local MAC table is queried according to the MAC address corresponding to the next hop: if the MAC address corresponding to the next hop is queried, it is determined that the next hop exists locally. If the MAC address corresponding to the next hop is not queried, it is determined that the Layer 2 forwarding information of the next hop does not exist locally.
  • the next hop route can be directly used.
  • the information is sent to the forwarding information table FIB to guide data forwarding.
  • a corresponding flag bit is set for each next hop of the ECMP route in a database (assumed to be an ECMP next hop information database), where the flag bit is valid. Indicates that the Layer 2 forwarding information of the next hop exists locally. If it is invalid, it indicates that the Layer 2 forwarding information of the next hop does not exist locally.
  • Step 23 periodically traverse each next hop in the database until all the next hops are traversed, wherein if the flag of the next hop of the current traversal is valid, continue to traverse the next next hop; If the flag of the next hop of the current traversal is invalid, the ARP learning process of the next hop is triggered, and after the second layer forwarding information corresponding to the next hop is learned through the ARP learning process, the next update is performed. The flag of one hop is valid, and the routing information of the next hop is sent to the FIB.
  • each next hop in the database is traversed one by one. If traversing to a next hop, if the indication information of the next hop is valid, then continuing to traverse the next next hop; if invalid, the ARP learning process of the next hop needs to be triggered, in the ARP learning process. Sending an ARP request packet for the IP address of the next hop, receiving an ARP response packet, obtaining information such as a MAC address and an outbound interface corresponding to the IP address of the next hop, and learning through the ARP learning process.
  • the flag of the next hop is updated in the database, and
  • the next next hop in the database may be traversed without waiting for the end of the ARP learning process.
  • the device learns a new ARP entry (assumed to be the first ARP entry) through the ARP learning process. Determining, according to the IP address in the first ARP entry (assuming the first IP address), whether the database has the same next hop as the first IP address (ie, the IP address of the next hop and the first The IP address is the same). If it exists, it is determined whether the flag of the next hop is invalid.
  • the flag of the next hop in the new database is valid, and the outbound interface of the next hop can be parsed, and the next hop and its outbound interface information are sent to the FIB.
  • the MAC address corresponding to the next hop IP address can be determined by looking up the ARP entry, and then the MAC address entry is searched according to the determined MAC address, and the outbound interface corresponding to the MAC address is determined, so that the outbound interface of the next hop is obtained. .
  • the embodiment of the present invention periodically updates the next hop address of the invalid ECMP link, triggers the ARP learning process, and sends the ARP request packet to collect the link neighbor information, obtain the link outbound interface, and quickly update the route FIB table.
  • the item has high flexibility, is convenient for network discovery, operation and maintenance, and ensures the validity of the routing FIB table. It effectively utilizes the bandwidth of the ECMP multipath, facilitating load balancing and bandwidth control, and the implementation of the above method is not excessive. The burden on the system is increased, and the fast convergence of the link is ensured to meet the reliability requirements of the network.
  • an ARP entry may be aged out or an ECMP route may be deleted according to the network topology, the environment of the device, and the related protocol.
  • the state of the next hop of the ECMP route is dynamically updated according to the change of the ARP entry to match the actual network status.
  • the above describes the method for updating the egress interface of the ECMP according to the embodiment of the present invention.
  • the following describes an ECMP outgoing interface update device for implementing the foregoing method.
  • the device may be disposed on a layer 3 forwarding device, which may be an intermediate system (IS), a router, or a layer 3 switch.
  • the device has enabled dynamic routing protocols such as IS-IS or BGP and enabled ECMP.
  • the device for updating an ECMP interface according to an embodiment of the present invention includes:
  • the obtaining unit 31 is configured to obtain a newly generated ECMP route, and determine all next hops of the ECMP route;
  • the determining unit 32 is configured to determine whether the layer 2 forwarding information corresponding to each next hop of the ECMP route exists locally;
  • the processing unit 33 is configured to send the routing information of the next hop of the local layer 2 forwarding information to the forwarding information table FIB according to the judgment result of the determining unit, and the ECMP in a database.
  • a corresponding flag bit is set for each next hop of the route, where the flag bit is valid, indicating that the second layer forwarding information of the next hop exists locally, and when invalid, the layer 2 forwarding of the next hop does not exist locally. information;
  • the traversing unit 34 is configured to periodically traverse each next hop in the database until all next hops are traversed, wherein if the flag of the next hop of the current traversal is valid, then traversing the next traversal If the flag of the next hop that is currently traversed is invalid, the ARP learning process of the next hop is triggered, and after the second layer forwarding information corresponding to the next hop is learned through the ARP learning process, Update the flag of the next hop to be valid, and deliver the routing information of the next hop to the FIB.
  • the judgment processing unit 32 is configured to:
  • next hop If the next hop is not queried, it is determined that the second layer forwarding information of the next hop does not exist locally;
  • the local MAC address table is queried according to the MAC address corresponding to the next hop: if the MAC address corresponding to the next hop is queried, it is determined that the second layer forwarding information of the next hop exists locally. If the MAC address corresponding to the next hop is not queried, it is determined that the second layer forwarding information of the next hop does not exist locally.
  • the above device further includes:
  • the timing unit is configured to set a timer for timing. When the timer expires to a predetermined threshold, the traversing unit 34 is triggered to traverse the next hop of the database, and the timer is reset to restart timing.
  • the device may further include an ARP entry processing unit configured to newly generate a first ARP entry.
  • the traversal unit 34 is configured to generate the first ARP entry when the ARP entry unit generates the first ARP entry. Determining whether the database is stored according to the first IP address of the first ARP entry. The same next hop as the first IP address; if there is the same next hop as the first IP, and the flag of the next hop is invalid, the flag of the next hop is updated to be valid, and The outbound interface of the next hop is obtained, and the next hop and its outbound interface information are sent to the FIB.
  • the ARP entry processing unit is further configured to delete a second ARP entry from the ARP table; the traversal unit 34 is further configured to delete the second ARP in the ARP entry processing unit. And determining, according to the second IP address of the second ARP entry, whether the database has the same next hop as the second IP address: if yes, updating the flag of the next hop to be invalid And deleting the next hop and its outbound interface information from the FIB.
  • the traversing unit 34 is further configured to: delete, when the ECMP route is deleted, information of all next hops of the ECMP route from the database; and: present the FIB The routing information of the next hop of the ECMP route is deleted.
  • the embodiment of the present invention can automatically trigger the update of the ARP entry and update the outbound interface information corresponding to the ECMP routing entry to ensure the load balancing of the traffic and the effective use of the bandwidth, and improve the network. Reliability.
  • the Layer 3 forwarding device forwards the next hop information of the ECMP route, and saves it in a database (assumed to be the ECMP next hop information database).
  • the actual outgoing interface is also parsed. If the outgoing interface does not exist, the corresponding hop is recorded.
  • the next hop flag is an invalid flag.
  • the loop timing is used to trigger the timing message, traverse the database information, and the next hop with the flag is invalid.
  • the ARP learning is triggered, and the ARP request packet is sent to obtain the corresponding outgoing interface, and then the routing FIB is updated. Entry.
  • the Layer 3 forwarding device configures a loop timer, sets a default interval, and provides a configuration interface to ensure that the timer interval is configurable.
  • the protocol control plane of the device generates ECMP routing entries and synchronizes to the data forwarding plane.
  • the flag of the next hop will be invalid.
  • the next hop outbound interface will not be delivered to the corresponding FIB entry. If it exists, it will correspond to the next hop The flag is valid and the next outgoing interface is delivered to the corresponding FIB entry.
  • the loop timer triggers a message update, and after the timer message is triggered, traverses the ECMP next hop information database: when the flag of the next hop traversed is invalid, the ARP request packet is sent, and the next hop is triggered.
  • ARP learning of the IP address when the flag of a next hop traversed is valid, continue to traverse the next next hop until all next hops are traversed. Then, wait for the next cycle of timing messages to come, and then perform the same traversal process.
  • the device traverses the ECMP next hop information database. If the flag of the next hop corresponding to the IP address of the new ARP is invalid, the next step is reset. The hop flag is valid, and the outbound interface of the next hop is parsed to obtain the physical outbound interface. Then, the FIB entry is updated and the information of the next hop and the outbound interface is added or deleted in the FIB entry.
  • the next hop of the ECMP route is sent by the protocol control plane, and the outbound interface of the next hop is parsed. If the outbound interface does not exist, the invalid flag of the outbound interface is set, and the ARP request packet is triggered periodically. The interface is detected. Once the corresponding ARP entry is learned, the flag of the outbound interface is re-updated, and the FIB entry is updated according to the actual solution. This ensures the reliability of the load balancing link and effectively utilizes the link bandwidth.
  • a corresponding ECMP group (ECMP GROUP) is created for a newly generated ECMP route.
  • FIG. 4 is a schematic flowchart of the method for implementing timing triggering outbound interface learning in this example. As shown in FIG. 4, the process includes the following steps:
  • Step 401 The routing protocol running by the device negotiates an ECMP route and sends it to the data forwarding plane to control traffic forwarding.
  • the data forwarding layer determines whether the ECMP route is added or deleted.
  • Step 402 If an ECMP route is added, the next hop information of the ECMP group corresponding to the ECMP route needs to be searched, and the corresponding ARP entry and the MAC entry are searched by the next hop IP address to obtain the actual forwarding outbound interface.
  • Step 403 It is determined whether the forwarding outbound interface actually exists, that is, whether the ARP entry corresponding to the next hop IP address has been generated in the local ARP table, and whether the next generation has been generated in the local MAC forwarding table of the device MAC address entry of the MAC address corresponding to the IP address.
  • Step 404 If the forwarding outbound interface exists, in the ECMP next hop information database, the flag of the next hop is set to a valid flag, and then the routing information of the next hop is synchronized to the forwarding. In the FIB entry, it is used to guide traffic forwarding.
  • Step 405 If the forwarding outbound interface does not exist, that is, the ARP entry corresponding to the next hop IP address is not generated in the local ARP table of the device, or the next hop IP is not generated in the local MAC forwarding table of the device.
  • the MAC address entry of the MAC address corresponding to the address is in the ECMP next hop information database, and the flag position of the next hop is an invalid flag.
  • Step 406 If the ECMP route is deleted, the ECMP next hop information database is first searched, and the ECMP group (ECMPGROUP) corresponding to the ECMP route is obtained, and all the next hop information of the ECMP route is deleted from the ECMP next hop database information.
  • ECMPGROUP ECMP group
  • Step 407 The routing information of all the next hops of the ECMP route is deleted from the routing FIB entry to terminate the traffic forwarding by using the ECMP route.
  • the ECMP next hop address timing triggers the ARP update process:
  • Step 501 After the device is started, the software cycle timer is started, the default interval is set, the message is sent periodically, and the configuration interface is provided, and the user can configure the timer interval.
  • Step 502 The timer expires. Go to step 503. If it does not time out, continue to wait for the timer to expire.
  • Step 503 traverse the ECMP group database, query the corresponding ECMP next hop information database, determine whether the next hop flag is invalid, and if it is invalid, send the next hop ARP request packet; if it is valid, no action is performed. . After the traversal process is completed, continue to wait for the next timer timeout.
  • this example shows the process of updating ARP entries at the forwarding plane of the device:
  • Step 601 After the ARP entry is learned, the IP protocol stack synchronizes to the data forwarding layer to determine whether to add an ARP entry or delete an ARP entry.
  • Step 602 If an ARP entry is added, traverse all the ECMP groups, and find the next hop with the same IP address as the ARP entry in the ECMP next hop information database. If yes, update the next hop. The flag is valid.
  • Step 603 The routing information of the next hop is sent to the corresponding FIB forwarding entry.
  • Step 604 If the ARP entry is deleted, traverse all the ECMP groups, and find the next hop with the same IP address as the ARP entry in the ECMP next hop information database. If the next hop exists, go to Step 604 is processed.
  • Step 604 Delete the routing information of the next hop from the routing FIB entry.
  • the embodiment of the present invention periodically updates the next hop address of the invalid ECMP link, triggers the ARP learning process, sends an ARP request packet, collects the link neighbor information, and obtains the outbound interface of the link, thereby rapidly updating the routing FIB entry. It has high flexibility, facilitates network discovery, operation and maintenance, and management, improves network reliability, and effectively utilizes link bandwidth.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
  • Each of the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • Each device/function module/functional unit in the above embodiments may be stored in a computer readable storage medium when implemented in the form of a software function module and sold or used as a standalone product.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the embodiment of the present invention triggers the ARP (Address Resolution Protocol) learning process by periodically updating the next hop address of the invalid ECMP link, and sends the ARP request packet to collect the link neighbor information and obtain the link out.
  • Interfaces which quickly update routing FIB entries, have high flexibility, facilitate network discovery, operation and maintenance, and ensure the effectiveness of routing FIB tables. They effectively utilize the bandwidth of ECMP multipaths for load balancing and bandwidth control. The guarantee is provided, and the implementation process of the embodiment of the present invention does not excessively burden the system, and can ensure fast convergence of the link and meet the reliability requirement of the network.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种等价多路径的出接口更新方法及装置。本发明实施例通过周期性更新无效的ECMP链路的下一跳地址,触发ARP学习流程,获取链路出接口,从而快速更新了ECMP的FIB表项。本发明实施例具有较高的灵活性,便于网络发现、运维和管理,保证了路由FIB表的有效性,有效利用了ECMP多路径的带宽,为负载均衡和带宽控制的实现提供了保障。

Description

一种等价多路径的出接口更新方法及装置 技术领域
本发明涉及数据通信技术领域,尤其涉及一种等价多路径(ECMP,Equal-Cost Multi-Path)的出接口更新方法及装置。
背景技术
随着网际协议(IP,Internet Protocol)业务的高速发展,以及以太网在城域网中的广泛应用,三层网络的规模越来越大,使得网络的带宽以及可靠性保活成了电信运营商们越来越关注的焦点。在传统的分层网络中,汇聚层网络接入到核心网的环境中,学习到大量路由条目,上行流量大,为了保证流量的负载均衡以及保护,经常建立ECMP路由作为接入上行的链路路由。
在传统的路由技术中,发往目的路由的数据包只能利用其中的一条链路,其它链路处于备份状态或者无效状态,并且在动态路由环境下的相互切换需要一定时间。而等价多路径路由协议可以在该网络环境下同时使用多条路由,如图1所示,R1可以通过自身两个出接口将去往同一目的地址的不同数据报文路由至R2和R3,从而不仅增加了传输带宽,而且可以无延时无丢包地备份失效链路的数据传输。目前,开放式最短路径优先(OSPF,Open Shortest Path First)、中间系统到中间系统(IS-IS,Intermediate System to Intermediate System Routing Protocol)和边界网关协议(BGP,Border Gateway Protocol)等动态路由协议中都已支持ECMP功能。
ECMP路由表项中,同一个目的地址可能对应于多个出接口。然而发明人发现,在实际应用中,在获得ECMP路由表项后,设备本地可能尚未生成一个出接口的二层转发信息,进而导致路由转发信息表(FIB,Forward Information Base)中一直无法更新该出接口,导致无法实现流量的负载均衡,并且,在特定环境下可能导致业务流量的中断,不能满足网络的高可靠性需求。
发明内容
本发明实施例要解决的技术问题是提供一种等价多路径的出接口更新方法及装置,通过及时更新ECMP路由表项对应的出接口信息,为实现流量的负载均衡和链路带宽的有效利用提供了保证,并提高了网络的可靠性。
为解决上述技术问题,本发明实施例提供的一种等价多路径的出接口更新方法,包括:
获得新生成的ECMP路由,并确定所述ECMP路由的所有下一跳;
判断所述ECMP路由的每个下一跳对应的二层转发信息是否在本地已存在,并根据判断结果,仅将本地已存在二层转发信息的下一跳的路由信息下发至转发信息表FIB中,以及,在一数据库中为所述ECMP路由的每个下一跳设置一对应的标志位,其中,所述标志位有效时表示本地已存在该下一跳的二层转发信息,无效时表示本地不存在该下一跳的二层转发信息;
周期性遍历所述数据库中的每个下一跳,直至所有下一跳均遍历完成,其中,若当前遍历的下一跳的标志位为有效,则继续遍历下一个下一跳;若当前遍历的下一跳的标志位为无效,则触发该下一跳的ARP学习过程,以及,在通过所述ARP学习过程学习到该下一跳对应的二层转发信息后,更新该下一跳的标志位为有效,并将该下一跳的路由信息下发至所述FIB中。
可选地,上述方法中,所述判断所述ECMP路由的每个下一跳对应的二层转发信息是否在本地已存在,包括:
根据每个下一跳,查询本地的ARP表;
若未查询到该下一跳,则判断本地不存在该下一跳的二层转发信息;
若查询到该下一跳,则根据该下一跳对应的MAC地址查询本地的MAC表:若查询到该下一跳对应的MAC地址时,则判断本地存在该下一跳的二层转发信息,若未查询到该下一跳对应的MAC地址时,判断本地不存在该下一跳的二层转发信息。
可选地,上述方法中,通过设置一定时器进行计时,当所述定时器计时到预定门限后,触发所述遍历所述数据库的下一跳的操作,并重置所述定时器重新开始计时。
可选地,上述方法中,所述通过所述ARP学习过程学习到该下一跳对应 的二层转发信息后,更新该下一跳的标志位,并将该下一跳的路由信息下发至所述FIB中,包括:
在新生成第一ARP表项时,根据该第一ARP表项的第一IP地址,判断所述数据库是否存在与该第一IP地址相同的下一跳;
若存在与该第一IP相同的下一跳,且该下一跳的标志位为无效,则更新该下一跳的标志位为有效,并解析得到该下一跳的出接口,将该下一跳及其出接口信息下发至所述FIB中。
可选地,上述方法中,在从ARP表中删除一第二ARP表项时,所述方法还包括:
根据该第二ARP表项的第二IP地址,判断所述数据库是否存在与该第二IP地址相同的下一跳,并在存在与该第二IP相同的下一跳时,将该下一跳及其出接口信息从所述FIB中删除。
可选地,上述方法中,还包括:
在所述ECMP路由被删除时,将所述ECMP路由的所有下一跳的信息,从所述数据库中删除;以及,
将所述FIB中存在所述ECMP路由的下一跳的路由信息均删除。
本发明实施例还提供了一种等价多路径ECMP的出接口更新装置,包括:
获得单元,设置为获得新生成的ECMP路由,并确定所述ECMP路由的所有下一跳;
判断单元,设置为判断所述ECMP路由的每个下一跳对应的二层转发信息是否在本地已存在;
处理单元,设置为根据所述判断单元的判断结果,仅将本地已存在二层转发信息的下一跳的路由信息下发至转发信息表FIB中,以及,在一数据库中为所述ECMP路由的每个下一跳设置一对应的标志位,其中,所述标志位有效时表示本地已存在该下一跳的二层转发信息,无效时表示本地不存在该下一跳的二层转发信息;
遍历单元,设置为周期性遍历所述数据库中的每个下一跳,直至所有下一跳均遍历完成,其中,若当前遍历的下一跳的标志位为有效,则继续遍历下一个下一跳;若当前遍历的下一跳的标志位为无效,则触发该下一跳的 ARP学习过程,以及,在通过所述ARP学习过程学习到该下一跳对应的二层转发信息后,更新该下一跳的标志位为有效,并将该下一跳的路由信息下发至所述FIB中。
可选地,上述装置中,所述判断处理单元设置为:
根据每个下一跳,查询本地的ARP表;
若未查询到该下一跳,则判断本地不存在该下一跳的二层转发信息;
若查询到该下一跳,则根据该下一跳对应的MAC地址查询本地的MAC表:若查询到该下一跳对应的MAC地址时,则判断本地存在该下一跳的二层转发信息,若未查询到该下一跳对应的MAC地址时,判断本地不存在该下一跳的二层转发信息。
可选地,上述装置中,还包括:
定时单元,设置为设置一定时器进行计时,当所述定时器计时到预定门限后,触发所述遍历单元遍历所述数据库的下一跳,并重置所述定时器重新开始计时。
可选地,上述装置中,还包括:
ARP表项处理单元,设置为新生成一第一ARP表项;
所述遍历单元,设置为在所述ARP表项单元生成所述第一ARP表项时,根据该第一ARP表项的第一IP地址,判断所述数据库是否存在与该第一IP地址相同的下一跳;若存在与该第一IP相同的下一跳,且该下一跳的标志位为无效,则更新该下一跳的标志位为有效,并解析得到该下一跳的出接口,将该下一跳及其出接口信息下发至所述FIB中。
可选地,上述装置中,所述ARP表项处理单元,还设置为从ARP表中删除一第二ARP表项;
所述遍历单元,还设置为在所述ARP表项处理单元删除所述第二ARP表项时,根据该第二ARP表项的第二IP地址,判断所述数据库是否存在与该第二IP地址相同的下一跳,并在存在与该第二IP相同的下一跳时,将该下一跳及其出接口信息从所述FIB中删除。
可选地,上述装置中,所述遍历单元,还设置为在所述ECMP路由被删除时,将所述ECMP路由的所有下一跳的信息,从所述数据库中删除;以及, 将所述FIB中存在所述ECMP路由的下一跳的路由信息均删除。
与相关技术相比,本发明实施例提供的等价多路径的出接口更新方法及装置,至少具有以下有益效果:
本发明实施例通过周期性更新无效的ECMP链路的下一跳地址,触发地址解析协议(ARP,Address Resolution Protocol)学习流程,通过发送ARP请求报文,收集链路邻居信息,获取链路出接口,快速更新路由FIB表项,具有较高的灵活性,便于网络发现、运维和管理,保证路由FIB表的有效性,有效利用了ECMP多路径的带宽,为负载均衡和带宽控制的实现提供了保障,并且,本发明实施例的实现过程不会过于加重系统负担,能够保证链路的快速收敛,满足网络的可靠性需求。
附图概述
图1为相关技术的一种ECMP聚合链路的示意图;
图2为本发明实施例提供的ECMP的出接口更新方法的流程示意图;
图3为本发明实施例提供的ECMP的出接口更新装置的结构示意图;
图4为本发明实施例中ECMP路由更新FIB时维护ECMP下一跳信息数据库的流程示意图;
图5为本发明实施例中循环定时器触发更新ARP学习的流程示意图;
图6为本发明实施例中ARP学习更新流程中更新ECMP下一跳信息数据库的处理流程示意图。
本发明的较佳实施方式
下面将结合附图及实施例进行详细描述。
在中间系统到中间系统(IS-IS)路由协议中,一台交换机就是一个中间系统,交换机用来进行相互宣告的协议称为IS-IS协议。IS-IS路由协议是通过交换Hello PDU报文来发现邻居并形成邻接关系的,路由的公告则使用链路状态PDU报文。路由协议报文的交互不会触发邻居设备地址解析协议(ARP)的学习,因此通过路由拓扑计算处理的路由下一跳地址可能在ARP 表项中不存在,路由在转发面生成的FIB表项可能没有实际的出接口。这样,只要等到匹配路由的数据流量来到时,数据流量上送TCP/IP协议栈,触发ARP表项的生成,才能学习到出接口,进而重新更新路由FIB表,最终实现线速转发流量。
对于BGP4+路由协议来说,也存在同样下一跳表项无法更新问题。对于该路由协议来说,keepalive保活报文使用全球单播地址作为保活报文的地址,但是发布路由中使用的下一跳地址为本地链路地址,两个地址同时属于同一个接口,但是却不一致,因此会导致报文无法更新本地链路地址。
由此可见,图1所示,在设备(如路由器或三层交换机等)启用IS-IS、BGP4+路由协议的情况下,若使能ECMP功能,一个路由可能会对应等价的多个下一跳。通过路由协议学习到的多条下一跳出接口中,如果其中一条下一跳出接口的IP地址在ARP表项中不存在,在转发的FIB表项出接口就不会添加该下一跳的出接口。同时,由于流量可以继续从FIB表项中存在的其它接口转发,导致无法通过流量触发该下一跳的ARP表项学习。对于IS-IS,BGP4+路由协议,也不会触发下一跳ARP表项的学习,从而导致该下一跳的出接口一直无法更新,在路由转发FIB中也一直无法更新这条链路接口,导致流量无法在该出接口与其他接口之间负载均衡,并且在特定环境下(如流量超出已有链路带宽)可能导致业务流量的中断,可能难以满足网络的高可靠性需求。
有鉴于此,本发明实施例提供一种ECMP的出接口更新方法,用于在基于IS-IS、BGP4+路由协议的ECMP拓扑网络中,自动触发ARP的学习,实现等价路由多出接口的快速更新,从而保证路由FIB表的有效性,以便于负载均衡和带宽控制,同时该方法本身不会过于加重系统负担,保证链路的快速收敛,满足网络的可靠性需求。
本发明实施例提供的ECMP的出接口更新方法,应用于一三层转发设备中,该三层转发设备可以是中间系统(IS)、路由器或三层交换机等设备。该设备上使能了IS-IS或BGP等动态路由协议,且使能了ECMP功能。通过上述动态路由协议以及ECMP协议,该设备的协议控制层面能够生成ECMP路由表项,生成方式可与相关技术相同或类似,此处不再赘述。在生 成新的ECMP路由时,本发明实施例提供的ECMP的出接口更新方法,通过以下步骤实现了等价路由多出接口的快速更新,请参照图2所示,包括:
步骤21,获得新生成的ECMP路由,并确定所述ECMP路由的所有下一跳。
这里,可以按照与相关技术的相同方式,由该设备的协议控制层生成新的ECMP路由,并下发至该设备的数据转发平面。在转发平面收到上述ECMP路由后,确定该路由的所有下一跳的信息。ECMP路由可能存在两条以上的下一跳,下一跳的信息通常是下一跳的IP地址。
步骤22,判断所述ECMP路由的每个下一跳对应的二层转发信息是否在本地已存在,并根据判断结果,仅将本地已存在二层转发信息的下一跳的路由信息下发至转发信息表FIB中,以及,在一数据库中为所述ECMP路由的每个下一跳设置一对应的标志位,其中,所述标志位有效时表示本地已存在该下一跳的二层转发信息,无效时表示本地不存在该下一跳的二层转发信息。
如前文所述,在生成ECMP路由时,设备本地可能尚未生成该ECMP路由一个下一跳对应的出接口信息,因此本实施例在步骤22中判断每一个下一跳对应的二层转发信息是否在设备本地已存在。二层转发信息包括下一跳对应的出接口以及下一跳对应的MAC地址(即下一跳IP地址对应的MAC地址),若设备本地不存在一个下一跳对应的出接口或该下一跳对应的MAC地址,则认为设备本地不存在该下一跳的二层转发信息,一种判断方式如下:
步骤221,根据每个下一跳,查询设备本地的ARP表;
步骤222,若未查询到一个下一跳,则判断本地不存在该下一跳的二层转发信息;
步骤223,若查询到该下一跳,则根据该下一跳对应的MAC地址查询本地的MAC表:若查询到该下一跳对应的MAC地址时,则判断本地存在该下一跳的二层转发信息,若未查询到该下一跳对应的MAC地址时,判断本地不存在该下一跳的二层转发信息。
通过以上步骤221-223,可以确定出该ECMP路由的每个下一跳的二层转发信息是否存在:若本地存在一个下一跳的二层转发信息,则可以直接将该下一跳的路由信息下发至转发信息表FIB中,用以指导数据转发。另外, 本实施例在上述步骤22中,还在一数据库(假设为ECMP下一跳信息数据库)中为所述ECMP路由的每个下一跳设置一对应的标志位,其中,所述标志位有效时表示本地已存在该下一跳的二层转发信息,无效时表示本地不存在该下一跳的二层转发信息。
步骤23,周期性遍历所述数据库中的每个下一跳,直至所有下一跳均遍历完成,其中,若当前遍历的下一跳的标志位为有效,则继续遍历下一个下一跳;若当前遍历的下一跳的标志位为无效,则触发该下一跳的ARP学习过程,以及,在通过所述ARP学习过程学习到该下一跳对应的二层转发信息后,更新该下一跳的标志位为有效,并将该下一跳的路由信息下发至所述FIB中。
这里,可以通过设置一定时器并计时,该定时器具有一计时门限。当所述定时器计时到预定门限后,触发步骤23中的遍历所述数据库的下一跳的操作,并重置所述定时器重新开始计时,以实现周期性的遍历处理,该周期即为定时器的计时门限。
在上述遍历过程中,逐个遍历所述数据库中的每一个下一跳。其中,在遍历到一个下一跳时,若该下一跳的指示信息为有效,则继续遍历下一个下一跳;若无效,则需要触发该下一跳的ARP学习过程,在ARP学习过程中发送针对该下一跳的IP地址的ARP请求报文,接收ARP响应报文,获得该下一跳的IP地址对应的MAC地址及出接口等信息,并在通过所述ARP学习过程学习到该下一跳对应的二层转发信息(包括该下一跳的IP地址对应的MAC地址及出接口等信息)后,则在所述数据库中更新该下一跳的标志位为有效,并将该下一跳的路由信息,如该下一跳及其对应的出接口等信息,下发至所述FIB中。
上述步骤中,在触发该下一跳的ARP学习过程后,即可以继续遍历所述数据库中的下一个下一跳,而不必等待ARP学习过程的结束。为了在APR学习到该下一跳的二层转发信息后,能够更新所述数据库以及FIB,本实施例在设备通过ARP学习过程学习到新的ARP表项(假设为第一ARP表项)时,根据该第一ARP表项中的IP地址(假设为第一IP地址),判断所述数据库是否存在与该第一IP地址相同的下一跳(即下一跳的IP地址与该第一IP地址相同),若存在,则判断该下一跳的标志位是否为无效,若是,则更 新该数据库中该下一跳的标志位为有效,并可以解析得到该下一跳的出接口,将该下一跳及其出接口信息下发至所述FIB中。可以先通过查找ARP表项确定该下一跳IP地址对应的MAC地址,然后根据所确定的MAC地址查找MAC表项,确定该MAC地址对应的出接口,从而解析得到该下一跳的出接口。
通过以上步骤,本发明实施例定时更新无效的ECMP链路的下一跳地址,触发ARP学习流程,通过发送ARP请求报文,收集链路邻居信息,获取链路出接口,快速更新路由FIB表项,具有较高的灵活性,便于网络发现、运维和管理,保证路由FIB表的有效性,有效利用了ECMP多路径的带宽,便于负载均衡和带宽控制,同时上述方法实现过程不会过于加重系统负担,同时保证链路的快速收敛,满足网络的可靠性需求。
本发明实施例中,设备在运行过程中,随着网络拓扑、设备自身环境的变化以及相关协议的要求,可能会针对设备的ARP表项进行老化,也可能对一个ECMP路由进行删除。
为适应以上变化,本发明实施例的上述方法中,在从设备的ARP表中删除一个ARP表项(假设为第二ARP表项)时,根据该第二ARP表项的第二IP地址,判断所述数据库是否存在与该第二IP地址相同的下一跳:若存在与该第二IP相同的下一跳,则将该下一跳及其出接口信息从所述FIB中删除;若不存在,则可以不执行任何动作。
这样,本实施例可以根据ARP表项的变化,动态更新ECMP路由的下一跳的状态,使之与实际网络状况相符。
类似的,本发明实施例的上述方法,在设备上的ECMP路由被删除时,需要将所述ECMP路由的所有下一跳的信息,从所述数据库中删除,并激昂设备FIB中存在所述ECMP路由的下一跳的路由信息均删除。
以上说明了本发明实施例的ECMP的出接口更新方法,下面将提供一种ECMP的出接口更新装置,用以实现上述方法。该装置可以设置在一三层转发设备上,该三层转发设备可以是中间系统(IS)、路由器或三层交换机等设备。该设备上使能了IS-IS或BGP等动态路由协议,且使能了ECMP功能。如图3所示,本发明实施例提供的ECMP的出接口更新装置,包括:
获得单元31,设置为获得新生成的ECMP路由,并确定所述ECMP路由的所有下一跳;
判断单元32,设置为判断所述ECMP路由的每个下一跳对应的二层转发信息是否在本地已存在;
处理单元33,设置为根据所述判断单元的判断结果,仅将本地已存在二层转发信息的下一跳的路由信息下发至转发信息表FIB中,以及,在一数据库中为所述ECMP路由的每个下一跳设置一对应的标志位,其中,所述标志位有效时表示本地已存在该下一跳的二层转发信息,无效时表示本地不存在该下一跳的二层转发信息;
遍历单元34,设置为周期性遍历所述数据库中的每个下一跳,直至所有下一跳均遍历完成,其中,若当前遍历的下一跳的标志位为有效,则继续遍历下一个下一跳;若当前遍历的下一跳的标志位为无效,则触发该下一跳的ARP学习过程,以及,在通过所述ARP学习过程学习到该下一跳对应的二层转发信息后,更新该下一跳的标志位为有效,并将该下一跳的路由信息下发至所述FIB中。
其中,所述判断处理单元32设置为:
根据每个下一跳,查询本地的ARP表;
若未查询到该下一跳,则判断本地不存在该下一跳的二层转发信息;
若查询到该下一跳,则根据该下一跳对应的MAC地址查询本地的MAC表:若查询到该下一跳对应的MAC地址时,则判断本地存在该下一跳的二层转发信息,若未查询到该下一跳对应的MAC地址时,判断本地不存在该下一跳的二层转发信息。
为实现周期性的遍历,上述装置还包括有:
定时单元,设置为设置一定时器进行计时,当所述定时器计时到预定门限后,触发所述遍历单元34遍历所述数据库的下一跳,并重置所述定时器重新开始计时。
上述装置还可以包括有ARP表项处理单元,设置为新生成一第一ARP表项;此时,所述遍历单元34,设置为在所述ARP表项单元生成所述第一ARP表项时,根据该第一ARP表项的第一IP地址,判断所述数据库是否存 在与该第一IP地址相同的下一跳;若存在与该第一IP相同的下一跳,且该下一跳的标志位为无效,则更新该下一跳的标志位为有效,并解析得到该下一跳的出接口,将该下一跳及其出接口信息下发至所述FIB中。
上述装置中,所述ARP表项处理单元,还设置为从ARP表中删除一第二ARP表项;所述遍历单元34,还设置为在所述ARP表项处理单元删除所述第二ARP表项时,根据该第二ARP表项的第二IP地址,判断所述数据库是否存在与该第二IP地址相同的下一跳:若存在,则将该下一跳的标志位更新为无效,并将该下一跳及其出接口信息从所述FIB中删除。
上述装置中,所述遍历单元34,还设置为在所述ECMP路由被删除时,将所述ECMP路由的所有下一跳的信息,从所述数据库中删除;以及,将所述FIB中存在所述ECMP路由的下一跳的路由信息均删除。
以上对本发明实施例提供的ECMP的出接口更新方法及装置进行了说明。综上所述,本发明实施例可以自动触发ARP表项的更新,以及时更新ECMP路由表项对应的出接口信息,为实现流量的负载均衡和带宽的有效利用提供了保证,并提高了网络的可靠性。
为帮助理解上述方案,下面将通过一个示例并结合附图,对本发明实施例进行描述。
本示例中,三层转发设备转发层面记录ECMP路由的下一跳信息,保存在一数据库(假设为ECMP下一跳信息数据库)中,同时解析实际出接口,如果出接口不存在,记录相应的下一跳标志为无效标志,通过循环定时,触发定时消息,遍历数据库信息,对标志位为无效的下一跳,触发ARP学习,发送ARP请求报文,以获取对应出接口,进而更新路由FIB表项。
三层转发设备在执行设备初始化时,配置启用一循环定时器,设置默认时间间隔,并且提供配置接口,保证定时器时间间隔可配置。
设备的协议控制层面生成ECMP路由表项,同步到数据转发层面。在转发层面,需要记录路由信息与相应的ECMP下一跳信息,保存到相应的数据库(假设为ECMP下一跳信息数据库)中,同时解析路由所有下一跳,得到物理出接口,如果物理出接口不存在,将对应下一跳的标志位置为无效,并且不下发此下一跳出接口到对应的FIB表项中。如果存在,则将对应下一跳 的标志位置为有效,并下发此下一跳出接口到对应的FIB表项中。
循环定时器触发一消息更新,在定时消息被触发后,遍历ECMP下一跳信息数据库:当遍历到的一个下一跳的标志位为无效时,发送ARP请求报文,触发该下一跳的IP地址的ARP学习;当遍历到的一个下一跳的标志位为有效时,继续遍历下一个下一跳,直至遍历完所有的下一跳。然后,等下一次循环定时消息来到,再执行同样的遍历处理流程。
其中,若设备收到ARP响应报文,学习到新的ARP,则遍历ECMP下一跳信息数据库,如果该新的ARP的IP地址对应的下一跳的标志位为无效,则重置下一跳标志位为有效,同时解析出该下一跳的出接口,得到物理出接口,进而据此更新转发FIB表项,在FIB表项中增减该下一跳及出接口的信息。
本示例通过协议控制面下发ECMP路由下一跳信息,解析下一跳实际出接口,当出接口不存在时,设置出接口的无效标志,并且通过定时触发ARP请求报文,对链路出接口进行检测,一旦学习到对应的ARP表项,则重新更新出接口的标志位,并按照实际解开更新路由FIB表项,保证了负载均衡链路的可靠性,有效利用了链路带宽。本示例中为一新生成的ECMP路由创建一对应的ECMP组(ECMP GROUP)。
图4是本示例实现定时触发出接口学习的流程示意图,如图4所示,该流程包括以下步骤:
步骤401:设备运行的路由协议协商出ECMP路由,下发至数据转发层面,用以控制流量转发。数据转发层面判断该ECMP路由是添加还是删除。
步骤402:若是添加ECMP路由,则需要查找该ECMP路由对应的ECMP组中所有下一跳信息,通过下一跳IP地址查找相应的ARP表项以及MAC表项,得到实际的转发出接口。
步骤403:判断转发出接口是否实际存在,即,设备本地的ARP表中是否已生成有该下一跳IP地址对应的ARP表项,并且,设备本地的MAC转发表中是否已生成该下一跳IP地址对应的MAC地址的MAC表项。
步骤404:如果转发出接口存在,则在ECMP下一跳信息数据库中,将此下一跳的标志位置为有效标志,然后将该下一跳的路由信息同步到转发 FIB表项中,用以指导流量转发。
步骤405:如果转发出接口不存在,即,设备本地的ARP表中未生成有该下一跳IP地址对应的ARP表项,或者,设备本地的MAC转发表中未生成有该下一跳IP地址对应的MAC地址的MAC表项,则在ECMP下一跳信息数据库中,将此下一跳的标志位置为无效标志。
步骤406:若是删除ECMP路由时,则首先查找ECMP下一跳信息数据库,得到该ECMP路由对应的ECMP组(ECMPGROUP),从ECMP下一跳数据库信息中删除该ECMP路由的所有下一跳信息。
步骤407:从路由FIB表项中删除该ECMP路由的所有下一跳的路由信息,以终止通过该ECMP路由进行流量转发。
参见图5,本示例中为ECMP下一跳地址定时触发ARP更新的流程:
步骤501:设备启动后,启动软件循环定时器,设置默认间隔,保证定时发送消息,同时提供配置接口,用户可以自行配置的定时器间隔。
步骤502:定时器超时,转步骤503,如果未超时,继续等待定时器超时。
步骤503:遍历所有ECMP的组数据库,查询对应ECMP下一跳信息数据库,判断下一跳标志位是否为无效,如果为无效,发送下一跳的ARP请求报文;如果有效,不执行任何动作。在遍历过程执行完成后,继续等待下一次定时器超时。
参见图6,本示例为设备的转发层面更新ARP表项的流程:
步骤601:IP协议栈学习到ARP表项后,同步到数据转发层面,判断是添加ARP表项操作还是删除ARP表项操作。
步骤602:若是添加ARP表项,则遍历所有ECMP组,在ECMP下一跳信息数据库中,查找是否有与该ARP表项的IP地址相同的下一跳,如果存在,则更新该下一跳的标志位为有效。
步骤603:将该下一跳的路由信息下发至对应的FIB转发表项。
步骤604:若是删除ARP表项,则遍历所有ECMP组,在ECMP下一跳信息数据库中,查找是否有与该ARP表项的IP地址相同的下一跳,如果存在该下一跳,转到步骤604处理。
步骤604:从路由FIB表项删除该下一跳的路由信息。
综上,本发明实施例通过定时更新无效ECMP链路的下一跳地址,触发ARP学习过程,发送ARP请求报文,收集链路邻居信息,获取链路出接口,从而快速更新路由FIB表项,具有较高的灵活性,便于网络发现、运维和管理,提高了网络的可靠性,有效的利用了链路带宽。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明实施例不限制于任何特定的硬件和软件结合。
上述实施例中的每个装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的每个装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
工业实用性
本发明实施例通过周期性更新无效的ECMP链路的下一跳地址,触发地址解析协议(ARP,Address Resolution Protocol)学习流程,通过发送ARP请求报文,收集链路邻居信息,获取链路出接口,快速更新路由FIB表项,具有较高的灵活性,便于网络发现、运维和管理,保证路由FIB表的有效性,有效利用了ECMP多路径的带宽,为负载均衡和带宽控制的实现提供了保障,并且,本发明实施例的实现过程不会过于加重系统负担,能够保证链路的快速收敛,满足网络的可靠性需求。

Claims (12)

  1. 一种等价多路径ECMP的出接口更新方法,包括:
    获得新生成的ECMP路由,并确定所述ECMP路由的所有下一跳;
    判断所述ECMP路由的每个下一跳对应的二层转发信息是否在本地已存在,并根据判断结果,仅将本地已存在二层转发信息的下一跳的路由信息下发至转发信息表FIB中,以及,在一数据库中为所述ECMP路由的每个下一跳设置一对应的标志位,其中,所述标志位有效时表示本地已存在该下一跳的二层转发信息,无效时表示本地不存在该下一跳的二层转发信息;
    周期性遍历所述数据库中的每个下一跳,直至所有下一跳均遍历完成,其中,若当前遍历的下一跳的标志位为有效,则继续遍历下一个下一跳;若当前遍历的下一跳的标志位为无效,则触发该下一跳的ARP学习过程,以及,在通过所述ARP学习过程学习到该下一跳对应的二层转发信息后,更新该下一跳的标志位为有效,并将该下一跳的路由信息下发至所述FIB中。
  2. 如权利要求1所述的方法,其中,所述判断所述ECMP路由的每个下一跳对应的二层转发信息是否在本地已存在,包括:
    根据每个下一跳,查询本地的ARP表;
    若未查询到该下一跳,则判断本地不存在该下一跳的二层转发信息;
    若查询到该下一跳,则根据该下一跳对应的MAC地址查询本地的MAC表:若查询到该下一跳对应的MAC地址时,则判断本地存在该下一跳的二层转发信息,若未查询到该下一跳对应的MAC地址时,判断本地不存在该下一跳的二层转发信息。
  3. 如权利要求1所述的方法,其中,通过设置一定时器进行计时,当所述定时器计时到预定门限后,触发所述遍历所述数据库的下一跳的操作,并重置所述定时器重新开始计时。
  4. 如权利要求1所述的方法,其中,
    所述通过所述ARP学习过程学习到该下一跳对应的二层转发信息后,更新该下一跳的标志位,并将该下一跳的路由信息下发至所述FIB中,包括:
    在新生成第一ARP表项时,根据该第一ARP表项的第一IP地址,判断 所述数据库是否存在与该第一IP地址相同的下一跳;
    若存在与该第一IP相同的下一跳,且该下一跳的标志位为无效,则更新该下一跳的标志位为有效,并解析得到该下一跳的出接口,将该下一跳及其出接口信息下发至所述FIB中。
  5. 如权利要求4所述的方法,其中,
    在从ARP表中删除一第二ARP表项时,所述方法还包括:
    根据该第二ARP表项的第二IP地址,判断所述数据库是否存在与该第二IP地址相同的下一跳,并在存在与该第二IP相同的下一跳时,将该下一跳及其出接口信息从所述FIB中删除。
  6. 如权利要求1所述的方法,还包括:
    在所述ECMP路由被删除时,将所述ECMP路由的所有下一跳的信息,从所述数据库中删除;以及,
    将所述FIB中存在所述ECMP路由的下一跳的路由信息均删除。
  7. 一种等价多路径ECMP的出接口更新装置,包括:
    获得单元,设置为获得新生成的ECMP路由,并确定所述ECMP路由的所有下一跳;
    判断单元,设置为判断所述ECMP路由的每个下一跳对应的二层转发信息是否在本地已存在;
    处理单元,设置为根据所述判断单元的判断结果,仅将本地已存在二层转发信息的下一跳的路由信息下发至转发信息表FIB中,以及,在一数据库中为所述ECMP路由的每个下一跳设置一对应的标志位,其中,所述标志位有效时表示本地已存在该下一跳的二层转发信息,无效时表示本地不存在该下一跳的二层转发信息;
    遍历单元,设置为周期性遍历所述数据库中的每个下一跳,直至所有下一跳均遍历完成,其中,若当前遍历的下一跳的标志位为有效,则继续遍历下一个下一跳;若当前遍历的下一跳的标志位为无效,则触发该下一跳的ARP学习过程,以及,在通过所述ARP学习过程学习到该下一跳对应的二层转发信息后,更新该下一跳的标志位为有效,并将该下一跳的路由信息下发至所述FIB中。
  8. 如权利要求7所述的装置,其中,所述判断处理单元设置为:
    根据每个下一跳,查询本地的ARP表;
    若未查询到该下一跳,则判断本地不存在该下一跳的二层转发信息;
    若查询到该下一跳,则根据该下一跳对应的MAC地址查询本地的MAC表:若查询到该下一跳对应的MAC地址时,则判断本地存在该下一跳的二层转发信息,若未查询到该下一跳对应的MAC地址时,判断本地不存在该下一跳的二层转发信息。
  9. 如权利要求7所述的装置,还包括:
    定时单元,设置为设置一定时器进行计时,当所述定时器计时到预定门限后,触发所述遍历单元遍历所述数据库的下一跳,并重置所述定时器重新开始计时。
  10. 如权利要求7所述的装置,还包括:
    ARP表项处理单元,设置为新生成一第一ARP表项;
    所述遍历单元,设置为在所述ARP表项单元生成所述第一ARP表项时,根据该第一ARP表项的第一IP地址,判断所述数据库是否存在与该第一IP地址相同的下一跳;若存在与该第一IP相同的下一跳,且该下一跳的标志位为无效,则更新该下一跳的标志位为有效,并解析得到该下一跳的出接口,将该下一跳及其出接口信息下发至所述FIB中。
  11. 如权利要求10所述的装置,其中,
    所述ARP表项处理单元,还设置为从ARP表中删除一第二ARP表项;
    所述遍历单元,还设置为在所述ARP表项处理单元删除所述第二ARP表项时,根据该第二ARP表项的第二IP地址,判断所述数据库是否存在与该第二IP地址相同的下一跳,并在存在与该第二IP相同的下一跳时,将该下一跳及其出接口信息从所述FIB中删除。
  12. 如权利要求7所述的装置,其中,
    所述遍历单元,还设置为在所述ECMP路由被删除时,将所述ECMP路由的所有下一跳的信息,从所述数据库中删除;以及,将所述FIB中存在所述ECMP路由的下一跳的路由信息均删除。
PCT/CN2015/091128 2014-12-02 2015-09-29 一种等价多路径的出接口更新方法及装置 WO2016086713A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410720211.2A CN105721321B (zh) 2014-12-02 2014-12-02 一种等价多路径的出接口更新方法及装置
CN201410720211.2 2014-12-02

Publications (1)

Publication Number Publication Date
WO2016086713A1 true WO2016086713A1 (zh) 2016-06-09

Family

ID=56090974

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/091128 WO2016086713A1 (zh) 2014-12-02 2015-09-29 一种等价多路径的出接口更新方法及装置

Country Status (2)

Country Link
CN (1) CN105721321B (zh)
WO (1) WO2016086713A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453091A (zh) * 2016-10-28 2017-02-22 武汉烽火网络有限责任公司 路由器转发平面的等价路由管理方法和装置
EP3562098A4 (en) * 2017-01-25 2019-11-27 New H3C Technologies Co., Ltd INPUT CREATION FOR EQUAL COST ROADS

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209644B (zh) * 2016-07-25 2019-09-17 杭州迪普科技股份有限公司 一种基于等价路由的报文转发方法和装置
CN106470158B (zh) * 2016-09-13 2019-09-17 杭州迪普科技股份有限公司 报文转发方法及装置
CN107040468B (zh) * 2016-11-30 2020-05-12 新华三技术有限公司 一种通信设备及其fib表生成方法
CN109194575B (zh) * 2018-08-23 2021-08-06 新华三技术有限公司 路由选择方法及装置
CN109639581B (zh) * 2019-02-21 2021-05-28 杭州迪普科技股份有限公司 交换芯片的表项维护方法和装置
CN114268630B (zh) * 2021-12-14 2024-04-12 浪潮思科网络科技有限公司 基于静态arp表项实现随机负载均衡访问方法、装置及设备
CN114827052B (zh) * 2022-03-30 2024-06-18 阿里云计算有限公司 Ecmp节点健康状况的诊断方法及装置
CN116055382A (zh) * 2022-11-22 2023-05-02 浪潮思科网络科技有限公司 一种组网的网络收敛方法、装置、设备及介质
CN115955434B (zh) * 2023-03-14 2023-05-30 苏州浪潮智能科技有限公司 Ecmp组失效的恢复方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6721800B1 (en) * 2000-04-10 2004-04-13 International Business Machines Corporation System using weighted next hop option in routing table to include probability of routing a packet for providing equal cost multipath forwarding packets
CN101404620A (zh) * 2008-11-17 2009-04-08 杭州华三通信技术有限公司 一种创建路由表项的方法和交换设备
CN103078804A (zh) * 2012-12-28 2013-05-01 福建星网锐捷网络有限公司 等价多路径表处理方法、装置及网络设备
WO2013117166A1 (en) * 2012-02-08 2013-08-15 Hangzhou H3C Technologies Co., Ltd. Implement equal cost multiple path of trill network

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9736054B2 (en) * 2011-10-05 2017-08-15 Cisco Technology, Inc. Multicast active source discovery and management for layer-2 interconnect solutions
CN103905325B (zh) * 2012-12-26 2018-12-11 南京中兴软件有限责任公司 二层网络数据传送方法及网络节点
CN103414651B (zh) * 2013-08-02 2016-06-08 杭州华三通信技术有限公司 一种调整等价路由均衡分担的方法和网络设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6721800B1 (en) * 2000-04-10 2004-04-13 International Business Machines Corporation System using weighted next hop option in routing table to include probability of routing a packet for providing equal cost multipath forwarding packets
CN101404620A (zh) * 2008-11-17 2009-04-08 杭州华三通信技术有限公司 一种创建路由表项的方法和交换设备
WO2013117166A1 (en) * 2012-02-08 2013-08-15 Hangzhou H3C Technologies Co., Ltd. Implement equal cost multiple path of trill network
CN103078804A (zh) * 2012-12-28 2013-05-01 福建星网锐捷网络有限公司 等价多路径表处理方法、装置及网络设备

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453091A (zh) * 2016-10-28 2017-02-22 武汉烽火网络有限责任公司 路由器转发平面的等价路由管理方法和装置
CN106453091B (zh) * 2016-10-28 2019-04-30 烽火通信科技股份有限公司 路由器转发平面的等价路由管理方法和装置
EP3562098A4 (en) * 2017-01-25 2019-11-27 New H3C Technologies Co., Ltd INPUT CREATION FOR EQUAL COST ROADS
US11108682B2 (en) 2017-01-25 2021-08-31 New H3C Technologies Co., Ltd. Establishing entry corresponding to equal-cost paths

Also Published As

Publication number Publication date
CN105721321A (zh) 2016-06-29
CN105721321B (zh) 2019-09-06

Similar Documents

Publication Publication Date Title
WO2016086713A1 (zh) 一种等价多路径的出接口更新方法及装置
US10050877B2 (en) Packet forwarding method and apparatus
US9781032B1 (en) MPLS label usage in ethernet virtual private networks
US9019814B1 (en) Fast failover in multi-homed ethernet virtual private networks
WO2012075731A1 (zh) 基于arp交互的链路故障检测与恢复的方法和设备
US11611509B2 (en) Communication method, communications device, and communications system
US20160065503A1 (en) Methods, systems, and computer readable media for virtual fabric routing
US10397023B2 (en) Packet forwarding
US20150334057A1 (en) Packet forwarding
JP2015520959A (ja) 情報中心ネットワークにおける名前ベースの近隣探索及びマルチホップサービス探索
CA3104756C (en) Loop avoidance communications method, device, and system
WO2017054770A1 (zh) 集群通信
US20150029834A1 (en) Transmission path switching
US20160142287A1 (en) Packet forwarding
EP3200404B1 (en) Content-centric network on-demand distance vector route method
WO2019201209A1 (zh) 报文转发
WO2012130083A1 (zh) 一种配置地址解析协议arp表项的方法和装置
WO2016058261A1 (zh) 一种基于网络的扁平路由的实现方法
WO2021077015A1 (en) Neighbor equivalence groups
WO2015154427A1 (zh) Trill isis的路由计算方法及装置
JP5935897B2 (ja) 通信ノード、通信システム、制御装置、パケット転送方法及びプログラム
WO2017219868A1 (zh) Arp条目的处理方法及装置
US10735252B2 (en) Outside router fault detection
WO2015032261A1 (zh) 路由更新方法和路由设备
WO2015100610A1 (zh) 保持用户设备ip地址固定的方法和设备

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: 15865359

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15865359

Country of ref document: EP

Kind code of ref document: A1