SYNCHRONIZATION OF MULTICAST INFORMATION USING BICASTING
Techniques that enable a network device such as a router to provide multicast routing services without interruption. Techniques are provided for using bicasting to synchronize multicast information maintained by a first processor and multicast information maintained by a second processor. A multicast protocol related event of packet is sent to both a first processor operating in active mode and a second processor operating in standby mode. Each processor then updates its multicast information based upon the bicasted event or packet.
Latest Brocade Communications Systems, Inc. Patents:
The present application is a continuation of U.S. patent application Ser. No. 12/913,598, filed Oct. 27, 2010, entitled SYNCHRONIZATION OF MULTICAST INFORMATION USING BICASTING, which claims priority under 35 U.S.C. 119(e) to U.S. Provisional Application No. 61/315,808, filed Mar. 19, 2010, entitled HITLESS UPGRADES FOR MULTICAST, the entire contents of which are incorporated herein by reference for all purposes.
This application also incorporates by reference for all purposes the entire contents of the following related and commonly-assigned non-provisional applications, all filed concurrently with the present application:
(1) U.S. application Ser. No. 12/913,572 (U.S. Pat. No. 8,406,125), filed Oct. 27, 2010, entitled SYNCHRONIZATION OF MULTICAST INFORMATION USING INCREMENTAL UPDATES;
(2) U.S. application Ser. No. 12/913,612 (Abandoned) filed Oct. 27, 2010, entitled PROVIDING MULTICAST SERVICES WITHOUT INTERRUPTION UPON A SWITCHOVER; and
(3) U.S. application Ser. No. 12/913,650 (U.S. Pat. No. 8,503,289), filed Oct. 27, 2010, entitled SYNCHRONIZING MULTICAST INFORMATION FOR LINECARDS.
Embodiments of the present invention relate to networking and more particularly to techniques for supporting hitless or non-stop routing (NSR) capability for multicast routing.
Multicast routing protocols are used to distribute data to multiple recipients. IP multicasting enables a sender device (or sender host) to send a packet to a set of recipients. The set of recipients is referred to as a multicast group and is represented by an IP address referred to as the multicast address. A multicast address thus corresponds to or represents a group of IP hosts that have joined the multicast group and want to receive packets whose destination address is the multicast address. By specifying a multicast address as the destination address for a packet (referred to as a multicast packet or multicast IP datagram), the packet is then delivered to the zero or more members (receivers) of the multicast group.
The membership of a multicast group is dynamic—hosts may join and leave multicast groups at any time. There is typically no restriction on the location or number of members in a multicast group. An IP host may be a member of more than one multicast group at a time. A host need not be a member of a group to be able to send multicast packets. Internet Group Membership Protocol (IGMP) is an example of a protocol that facilitates formation and management of multicast groups. Hosts may use IGMP to join or leave multicast groups. Hosts may also use IGMP to advertise their membership in a multicast group.
Forwarding of multicast packets from senders to receivers is performed by a fabric of network devices (e.g., routers, switches) that execute a multicast routing protocol. For example, multicast routing may be performed using Protocol Independent Multicast (PIM), which is a collection of multicast routing protocols including protocols such as PIM Sparse-Mode, PIM dense Mode, Bi-directional PIM, and others. PIM and its variants provide a set of protocols that can be used by network devices such as routers providing multicast routing services to distribute information about multicast group membership.
Network devices such as routers that are configured to perform multicast routing are also referred to as multicast routers. A multicast router typically maintains multicast state information (also referred to as multicast information) that is used by the router to forward a multicast packet to its multicast group receivers.
In order to reduce the down-time, several network devices provide redundant components such as redundant management processors (MPs) that are configured to facilitate data forwarding performed by the network device. In a router with redundant MPs, at any point in time, one of the MPs is configured to operate in active mode while the other MP operates in standby mode. The MP operating in standby mode thus provides redundancy. Various events during the operation of the router may cause a switchover (also sometimes referred to as a failover), which causes the standby MP to become the active MP and takes over data forwarding functions, including multicast forwarding functions, from the previous active MP. The previous active MP may become the standby MP as a result of the switchover.
When a switchover occurs, the new active MP has to rebuild its multicast state information from scratch. This rebuilding or restoring of the multicast state can take several seconds or even minutes, during which all line-rate multicast traffic is interrupted until the multicast state information has been rebuilt by the new active MP.
The building of multicast state information by a network device such as a router is also dependent upon receiving information from the network device's neighboring network devices. This further delays the restoration of the multicast state information thereby further adding to the down time of the network device. For example, according to the PIM protocol, PIM neighbors periodically exchange PIM hello messages to monitor the status of neighboring devices. Each PIM hello packet comprises a GenID (per RFC 4601), which is used to indicate to a network device's neighbors when a change of state has occurred in the network device (e.g., due to a switchover or failover). For example, when a switchover occurs in a router causing a new active management processor to take over, the new active management processor modifies the GenID and sends PIM hello packets with the new GenID to its neighbors. When a neighbor detects a PIM hello packet with a new GenID, it sends its multicast information to the sender of the hello packets. The multicast information may include information related to (*, G) and (S, G) multicast routes. The new active management processor then uses the multicast information received from its neighbors to build its multicast forwarding state. This process can take time during which multicast routing services provided by the router are interrupted. Further, in order to be able to build its multicast state, the router imposes a requirement that its neighboring network devices support GenID processing.
BRIEF SUMMARYEmbodiments of the present invention provide various techniques that enable a network device such as a router to provide multicast routing services without interruption. These techniques enable the network device to provide non-stop routing (NSR) capability for multicast routing even in the event of a switchover. In one embodiment, the line rate for multicast data forwarding is sustained even during a switchover.
In one embodiment, techniques are provided for using bicasting to synchronize multicast information maintained by a first processor and multicast information maintained by a second processor. A multicast protocol related event of packet is sent to both a first processor operating in active mode and a second processor operating in standby mode. Each processor then updates its multicast information based upon the bicasted event or packet.
In one embodiment, a network device may comprise a first processor operating in active mode and a second processor operating in standby mode. The first processor may perform a set of multicast routing-related functions in the active mode, which are not performed by the second processor operating in the standby mode. The network device may receive a multicast protocol-related packet. The packet is then bicasted to the first processor and the second processor. As a result of bicasting, both the first processor and the second processor receive a copy of the multicast protocol-related packet. The first processor is configured to update first multicast information maintained by the first processor based upon the copy of the multicast protocol-related packet received by the first processor. The second processor is configured to update second multicast information maintained by the second processor based upon the copy of the multicast protocol-related packet received by the second processor. Examples of multicast protocol-related packets include a Protocol Independent Multicast (PIM) packet, an Internet Group Membership Protocol (IGMP) packet, and the like.
In one embodiment, the network device also comprises a linecard. The multicast protocol packet is received by the linecard. The linecard is configured to sending a copy of the multicast protocol-related packet to the first processor and a copy to the second processor. Ine one embodiment, the first multicast information updated by the first processor comprises information related to neighbors of the network device that support PIM protocol. The first multicast information updated by the first processor may also comprise information related to IGMP.
In one embodiment, update information may be communicated from the first processor to the second processor, the update information comprising information indicative of a change made to the first multicast information. The second multicast information may be based upon the update information.
The foregoing, together with other features and embodiments will become more apparent when referring to the following specification, claims, and accompanying drawings.
In the following description, for the purposes of explanation, specific details are set forth in order to provide a thorough understanding of embodiments of the invention. However, it will be apparent that the invention may be practiced without these specific details.
Embodiments of the present invention provide various techniques that enable a network device such as a router to provide multicast routing services without interruption. The techniques described herein enable the network device to provide non-interrupted or non-stop routing (NSR) capability for multicast traffic even in the event of a switchover. The line rate for multicast data forwarding is sustained even after a switchover.
Various different communication protocols may be used to facilitate forwarding of packets from senders 102 to receivers 104 including one or more unicast forwarding protocols and multicast protocols. The multicast protocols supported may include the PIM protocol, which is a collection of multicast routing protocols including protocols such as PIM Sparse-Mode, PIM dense Mode, Bi-directional PIM, and others. For example, in one embodiment, multicast router 108 may execute the PIM protocol to facilitate multicast routing. The protocols used in network 106 may include wired and/or wireless protocols. While embodiments have been described below using the PIM protocol, other multicast protocols are also included within the scope of embodiments of the present invention.
In
Multicast router 108 is configured to receive packets, including unicast and multicast packets, and forward the packets in such a way that it facilitates delivery of the packets to their intended one or multiple destinations. For a multicast packet, router 108 may be configured to replicate the packet depending upon the number of recipients of the packet and forward the replicates to facilitate delivery of the packets to members of the multicast group corresponding to the packet's multicast destination address.
A simplified block diagram of a multicast router 108 is depicted in
The components of router 108 depicted in
Ports 116 represent the I/O plane of router 108. Router 108 is configured to receive and forward data, including unicast and multicast packets, using ports 116. A port within ports 116 may be classified as an input port or an output port depending upon whether router 108 receives or transmits a packet using the port. A port over which a packet is received by router 108 is referred to as an input port. A port used for communicating or forwarding a packet from router 108 is referred to as an output port. A particular port may function both as an input port and an output port. A port may be connected by a link or interface to a neighboring network device or network. Ports 116 may be capable of receiving and/or transmitting different types of data traffic including multicast data traffic at different speeds including 1 Gigabit/sec, 10 Gigabits/sec, 40 Gigabits/sec, or more. In some embodiments, multiple ports of router 108 may be logically grouped into one or more trunks.
Linecards 112 represent the data forwarding plane of router 108. Each linecard 112 may be coupled to one or more ports 116. A linecard coupled to an input port is referred to as an ingress linecard and a linecard coupled to an output port is referred to as an egress linecard. A linecard may serve as both the ingress linecard and the egress linecard for a packet. Upon receiving a packet via an input port, router 108 performs processing to determine an output port for transmitting the packet from router 108 to facilitate delivery of the packet to its intended recipient. The packet is then forwarded from the input port to the determined output port and then forwarded from router 108 using the output port. In one embodiment, as part of the processing, the ingress linecard is configured to determine an output port for a received packet within router 108. The output port may be coupled to the ingress linecard itself or to some other linecard. In the case where the egress linecard is different from the ingress linecard, the packet may be forwarded to the egress linecard via switch fabric 110. In some instances, the packet may have to be forwarded to a management card in order to determine how the packet is to be forwarded.
Since a multicast packet can have multiple destinations, a received multicast packet may have to be replicated and the replicates then forwarded to one or multiple output ports to facilitate forwarding of the packets to their intended multiple recipients. For a multicast packet received on an input port coupled to an ingress linecard, the output ports for the packet may include ports on the same ingress linecard itself, and/or ports on other linecards. Depending upon the location of the output ports determined for a received multicast packet, replication of the multicast packet may occur at various locations within router 108. For example, in the case where the packet is to be forwarded from an ingress card to two different egress linecards, the replication may performed by switch fabric 110 with one replicate being sent to the first egress linecard and the second replicate being sent to the second egress linecard. In the case where the packet is to be forwarded to different ports of the ingress linecard, the replication may be performed by the ingress linecard itself. In the case of VLANs, a multicast packet may need to be replicated and forwarded to different VLANs on the same output port. In this scenario, replication of the multicast packet may be performed by the output port itself.
Management cards 114A and 114B represent the control or management plane of router 108 and are configured to perform management and control functions including functions that facilitate multicast routing services provided by router 108. For example, management cards 114 may perform management functions related to linecards 112. These management functions may include maintaining and downloading routing information, including unicast and multicast routing information, to a linecard so that the linecard can use the information to perform data forwarding. The management functions may also include keeping the routing information up-to-date as changes occur in the network, responding to network events and messages, and the like.
In the embodiment depicted in
Multiple management cards 114A and 114B comprising MPs 118A and 118B provide for redundancy. During normal operation of router 108, one of the two MPs 118A and 118B operates in active mode while the other MP operates in standby mode. The MP operating in active mode is referred to as the active MP and is responsible for performing the control and forwarding functions, including functions for providing multicast services, for router 108. The other MP operates in standby mode and is referred to as the standby MP and does not perform the functions performed by the active MP. The management card comprising the active MP is referred to as the active management card and the management card comprising the standby MP is referred to as the standby management card. In the embodiment depicted in
During normal operations, the active MP of router 108 is configured to manage the hardware resources of router 100 and perform a set of functions. During this time, the standby MP is passive and does not perform the set of functions performed by the active MP. When a switchover occurs, the standby MP becomes the active MP and takes over management of hardware resources of router 108 and performance of the set of functions related to router 108 that were previously performed by the MP that was previously active and, as a result, the set of functions continue to be performed. The previous active partition may then become the standby partition and be ready for a subsequent switchover. For example, for the embodiment depicted in
Conceptually, when operating in active mode the active MP performs a set of functions that are not performed by the standby MP. This set of functions may include networking-related functions including multicast routing-related functions. When a switchover occurs, the standby MP becomes the active MP and takes over performance of the set of functions from the previous active MP. The active-standby model coupled with techniques described in this application enable the set of functions including multicast-related functions to be performed without any interruption even during or after a switchover. This translates to higher availability of router 108. This enables router 108 to provide for uninterrupted or hitless (also referred to as non-stop routing (NSR)) multicast routing capabilities. The previous active partition may then become the standby partition after a switchover.
A switchover may be caused by various different events, including anticipated or voluntary events and unanticipated or involuntary events. A voluntary or anticipated event is typically a voluntary user-initiated event that is intended to cause the active MP to voluntarily yield control to the standby MP. An instance of such an event is a command received from a network administrator to perform a switchover. There are various situations when a network administrator may cause a switchover to occur on purpose, such as when software on the MPs and linecard processors (LPs) is to be upgraded to a newer version. As another example, a switchover may be voluntarily initiated by the system administrator upon noticing performance degradation on the active MP or upon noticing that software executed by the active MP is malfunctioning. In these cases, the network administrator may voluntarily issue a command that causes a switchover, with the hope that problems associated with the current active MP will be remedied when the standby MP becomes the new active MP. A command to cause a switchover may also be initiated as part of scheduled maintenance. Various interfaces, including a command line interface (CLI), may be provided for initiating a voluntary switchover.
An involuntary or unanticipated switchover (also sometimes referred to as a failover) may occur due to some critical failure (e.g., a problem with the software executed by the active MP, failure in the operating system loaded by the active MP, hardware-related errors on the active MP or other router component, and the like) in the active MP.
In one embodiment, router 108 is able to perform a switchover without interrupting the multicast forwarding services offered by router 108. Router 108 is able to continue providing multicast forwarding services at line rates while performing a switchover without experiencing any multicast packets loss after or due to a switchover. Accordingly, router 108 is able to perform switchovers without impacting the forwarding of multicast packets during or as a result of the switchover. Such a switchover is thus characterized as “hitless” for multicast routing services since there is no hit on the multicast forwarding capabilities of the router. In this manner, router 108 provides multicast NSR.
The operation of multicast routing protocols results in the creation of various multicast forwarding states that are used for providing multicast services. Router 108 thus maintains multicast state information (multicast information) and uses it for providing multicast forwarding services. Multicast information may be stored by various components of router 108. For example, the active MP 118A maintains multicast information 120A on active management card 114A and uses it to perform multicast routing-related functions. Each linecard 112 may also maintain multicast information that is used by the linecard to perform multicast routing. The multicast information maintained by one component of router 108 may be the same as or different from the multicast information maintained by another component. For example, a linecard may only maintain a subset of the multicast information 120A maintained by the active MP. Various synchronization techniques may be used to synchronize multicast information 120A or portions thereof maintained by active MP 118A with multicast information stored by a linecard 112, as discussed below in more detail.
In one embodiment, the standby MP also maintains multicast information and the multicast information maintained by the standby MP is periodically synchronized with the multicast information maintained by the active MP. Various synchronization techniques are used to synchronize the multicast information maintained by the standby MP with multicast information maintained by the active MP.
The active MP thus stores multicast information, which is then synchronized in its entirety or portions thereof to the standby MP and the linecards. Various techniques are used to perform the synchronization. According to one technique, referred to as incremental updates, active MP 118A is configured to send updates 122 to the entity whose multicast information is being synchronized. For example, active MP 118A is configured to periodically send incremental updates 122 to standby MP 118B comprising portions of multicast information 120A maintained by the active MP. Multicast information 120B maintained by standby MP 118B is then updated based upon the updates received from the active MP. Active MP 118A may also use the incremental updates technique to send updates 128 to one or more linecards 112 comprising portions of multicast information 120A in order to synchronize the multicast information maintained by the linecards. According to another synchronization technique, referred to as bicasting, multicast control protocol packets received by router 108 are sent to both the active MP and the standby MP. This enables both the active MP and standby MP to build multicast information based upon the control protocol packets. Further details related to various synchronization techniques are provided below. In one embodiment, router 108 uses a combination of incremental updates and bicasting to synchronize multicast information between an active MP and a standby MP.
In one embodiment, synchronization is performed such that the standby MP (e.g., standby MP 118B in
Further, unlike conventional techniques, the new active MP does not have to rely on information received from router 108's neighboring network devices to build its multicast routing state information. The dependency on the neighboring network device is thus removed leading to faster switchover times. Due to the removal of the dependency, in one embodiment, router 108 may not have to advertise the switchover to neighboring network devices. As a result, in one embodiment, router 108 may not change the GenID in PIM hello packets that it sends out to its neighbors. In fact, router 108's neighboring network devices may not even know that a switchover has occurred since there is no change in the GenID. This reduces the processing burden on neighboring network devices since they can continue to perform their processing in a normal manner and do not have to undertake any special processing to aid router 108 in building its multicast routing information. Since router 108 is not dependent upon its neighbors, the multicast routing services provided by router 108 are independent of whether or not the neighbors support GenID. The provision of multicast routing provided by router 108 is thus not affected by any problems that may occur in the neighbor routers or in receiving information from the neighbors.
As shown, linecard 112 comprises a processor (referred to as linecard processor or LP) 202 that is configured to execute software related to functions performed the linecard. LP 202 may be a PowerPC, Intel, AMD, or ARM microprocessor, operating under the control of software. LP 202 may have an associated non-volatile memory 234 and a volatile memory (e.g., RAM) 204. Non-volatile memory 234 may store programs/code/instructions and data constructs that are used for processing performed by LP 202. Non-volatile memory 234 may be of different types including a compact flash, a hard disk, an optical disk, and the like. In one embodiment, non-volatile memory 234 may store a software image (of a particular version) that is executed by LP 202.
LP 202 may maintain multicast information 201 in volatile memory 204. LP 202 may use multicast information 201 to perform multicast routing-related functions. In one embodiment, multicast information 201 may be downloaded to the linecard by the active MP and may represent a portion of the multicast information stored by the active MP. As the multicast information changes, the active MP may be configured to download the changes or updates to linecard 112. Multicast information 201 represents the software multicast information.
As shown in
Packet processor 210 may have associated memories to facilitate packet forwarding. In one embodiment, as depicted in
In one embodiment, packet processor 210 is configured to form a forwarding bitmask (referred to as a forwarding identifier) using the information from the PRAM, where the bits of the bit mask indicate the one or more output ports of the router to which the packet is to be forwarded. A forwarding identifier thus identifies a set of one or more output ports of the router to which the packet is to be forwarded. The forwarding bitmask may be associated with the packet and then used by various components of router 108 to facilitate forwarding of the packet within router 108 from an input port to one or more output ports. In one embodiment, the forwarding bitmask is associated with the packet by appending information to the packet comprising the forwarding bitmask. The appended information is removed from the packet prior to the packet being forwarded from router 108 using an output port. In one embodiment, a forwarding identifier is used to index into a forwarding identifier table and the indexed entry shows which ports are the output interfaces for the packet. In this manner, the forwarding identifier is used to route a packet (or copies of the packet for multicast forwarding) from an input port to an output port of router 108.
The forwarding identifier thus is used to determine an output port (also referred to as an outgoing interface or OIF) to be used for forwarding a packet from router 108. For a multicast packet, there may be multiple output ports (or OIFs) on the same or different linecards. For example, for a particular forwarding identifier, the lookup in the CAM and PRAM may yield forwarding information such as: for a multicast packet received on input interface 1/1 (linecard 1 port 1), the packet is to be output using output interfaces 2/1 (linecard 2 port 1) and 3/1 (linecard 3 port 1). In this example, the output ports are on different linecards. In this case the packet may be replicated by switch fabric 110 and one replicate forwarded to linecard 2, port 1 and the other forwarded to linecard 3, port 1.
For a particular output port, there may be multiple VLANs mapped to that output port. A multicast packet may need to be forwarded to multiple VLANs associated with the output port. Router 108 stores information that it uses to determine how a multicast packet is to be replicated with respect to multiple VLANs for a port. This information is stored in the form of MVID table 217 and replication table 216. The router thus uses forwarding identifier information, MVID table 217, and replication table 216 for performing egress forwarding of multicast packets.
In one embodiment, MVID table 217 and replication table 216 are stored on a per port basis by a linecard. The MVID table for a port stores the multicast-VLAN-identifiers (MVIDs) for that port. For example, an MVID table for port 0 may store MVIDs MVID0, MVID1, etc. Likewise, an MVID table for port 1 may store MVIDs associated with port 1. In an alternative embodiment, all the MVIDs for ports on a linecard may be stored in a single MVID table. In one embodiment, each MVID entry in an MVID table stores a pointer to an entry in replication table 216. Replication table 216 stores information that is used to determine how the multicast packet is to be replicated and forwarded. In one embodiment, replication table 216 stores L2 specific multicast information.
Accordingly, for egress routing of a multicast packet, the forwarding identifier appended to the packet may be used to determine the output ports to be used for forwarding the packet. The multicast packet is then replicated and sent to the output ports, which may be on the same or different linecards of router 108. An output port may be local or remote to the linecard on which the multicast packet is received (i.e., the input port) by router 108. Further, for a port, the MVID table and replication table for the port is used to determine the one or more VLANs on the port to which the packet is to be replicated and forwarded. The multicast packet may then be replicated at an output port and forwarded to the one or more VLANs on the port. An MVID thus represents a port and VLAN combination. The MVID table and replication table implementation described above store the VLAN information in a port-centric manner, which allows for port-centric processing of VLANs.
For a multicast packet to be delivered, processing is performed to determine the ports of router 108 to which the packet is to be forwarded. A port may have multiple associated VLANs to which the multicast packet is to be forwarded. For a port, the MVID table associated with that port and its associated replication information may be used to determine the one or more VLANs to which a multicast packet is to be forwarded.
In one embodiment, the entries in CAM 212, PRAM 214, MVID table 217, and replication table 216 are programmed by LP 202 based upon information received from the active MP. The allocation and management of forwarding identifiers and the MVIDs is done by the active MP.
Router 108 comprises two management cards, each with an MP. During operation of router 108, one of the two MPs is configured to operate in active mode and is called the active MP. While one MP is operating in active mode, the other MP may operate in standby mode. In the embodiment depicted in
The multicast information stored by router 108 controls the path that multicast packets take through a network from a sender to a receiver. The routing information used for multicast may be generated by a multicast routing protocol such as PIM that is executed by the active MP of router 108. Multicast packets are forwarded in a network using a multicast distribution tree. A multicast packet is replicated at each fork in the distribution tree such that only one copy of the packet is received by each intended recipient of the packet. A multicast protocol such as PIM may be used to set up multicast distribution trees such that data packets from senders to a multicast group reach all receivers who have joined the group.
There are generally two types of multicast distribution trees: a source multicast distribution tree and a shared multicast distribution tree. A source multicast distribution tree is rooted at the sender (i.e., the source of a multicast packet) and the receivers are located at the ends of the branches of the tree. The branches of a source multicast distribution tree form a Shortest Path Tree through the network from the sender to the one or more receivers. A separate source multicast distribution tree is built for each sender host sending data to a multicast group. An (S,G) notation is used to represent forwarding entries based upon a source distribution tree, with each active source having an (S,G) entry, where S represents the IP address of the source and G represents the multicast group address to which the packet is to be sent.
Shared multicast distribution trees use a single common root placed at some chosen node in the network. In PIM, the common root is referred to as the Rendezvous Point or RP. The RP is the point at which receivers join to learn of active sources. Multicast sources transmit their traffic to the RP. When receivers join a multicast group on a shared tree, the root of the tree is always the RP, and multicast traffic is transmitted from the RP down toward the receivers. Therefore, the RP acts as a go-between for the sources and receivers. Multicast forwarding entries for a shared tree use the notation (*, G), with the * representing that all sources for a particular group share the same tree and G representing the multicast group address.
PIM mcache information 218A stores information related to multicast routes, which is used for forwarding multicast packets. In one embodiment, mcache information 218A comprises multiple forwarding entries (referred to as mcache entries) that are cached by router 108 and are used to determine how a multicast packet is to be forwarded by the router. The entries comprise (S,G) or (*,G) entries, with each entry identifying an incoming interface information (e.g., input port information) and associated one or more outgoing interfaces (e.g., output ports) information. The incoming interface information associated with a forwarding entry identifies an interface of the router over which a multicast packet is received. The outgoing interface information associated with a forwarding entry identifies, for a multicast packet received via the incoming interface identified by the entry, one or more interfaces of the router to be used for forwarding the multicast packet from the router. For example, a forwarding entry may be of the form:
(S,G),Incoming interface: 1/1
Outgoing interface list: 2/1, 3/1
This entry implies that a multicast packet originating from a source host S and destined for multicast group G, and received over interface 1/1 of the router is to be forwarded from the router using interfaces 2/1 and 3/1 of the router. The multicast packet is replicated to interfaces 2/1 and 3/1.
The forwarding entries stored by mcache information 218A are used by the active MP to determine how a multicast packet received over an input port is to be replicated and forwarded to one or more outgoing interfaces. Multiple protocol events may cause the forwarding entries in mcache table 218A to be created, updated, or deleted. The active MP is responsible for maintaining mcache information 218A.
In one embodiment, RPSet information 220A comprises information related to the RP that is learned from PIM BootStrap Router (BSR). In one embodiment, this information comprises candidate-RP address, candidate-RP priority, multicast prefix range, and prefix length that the candidate-RP serves. There could be multiple RPs associated with a multicast domain.
BSR state information 222A comprises state information of the PIM BootStrap Router (BSR), including the Elected BootStrap Router (E-BSR) address, E-BSR hash mask length, E-BSR priority, and the BSR acceptance state.
PIM neighbor table 226A stores information related to routers in the network that are configured as PIM routers (i.e., routers that support the PIM protocol). This information is created and updated by the active MP based upon PIM control packets (e.g., PIM hello packets) received by router 108. The information in PIM neighbor table 226A is stored for each interface of the router. An entry in PIM neighbor table 226A specifies an interface and an address of a PIM router associated with the interface. Additionally, each entry may have an associated expiry or hold time associated with the PIM router and a DR (designated router) priority. Each neighbor is configured to indicate that it is alive by sending hello messages to router 108. When a neighbor stops sending such hello messages, there is a period of time (specified by the hold time in the entry) until which the neighbor is held onto and after which it is expired. The description of information stored by PIM neighbor table 226A is not meant to be exhaustive. The contents of PIM neighbor table are known to one of ordinary skill in the art and are defined by RFC 4601.
The IGMP protocol is used to identify members of a multicast group and allows IGMP-configured hosts to join or leave multicast groups and to advertise their membership in a multicast group. IGMP table 228A stores information related to the IGMP protocol. This table is built by the active MP based upon IGMP control packets (e.g., IGMP membership report packets) received by router 108. The standby MP maintains its own IGMP table 228B independently of the IGMP table maintained by the active MP. As described below, bicasting is used to enable the active MP and the standby MP to maintain their respective IGMP tables. Using bicasting, IGMP membership reports are bi-casted to both MPs, and they maintain the tables independently.
As described above, multicast information 120A maintained by active MP 118A may comprise various pieces of information including mcache information 218A, RPSet information 220A, BSR State information 222A, PIM neighbor table 226A, and IGMP table 228A. Router 108 uses various techniques to synchronize multicast information maintained by the standby MP and the linecards with the multicast information maintained by the active MP. With regards to the standby MP, multicast information is synchronized to the standby MP such that the standby MP has sufficient information to provide multicast routing services without interruption after the standby MP becomes the active MP upon a switchover and without having to wait to receive information from other neighboring routers. The various synchronization techniques that are used strive to reduce the amount of messaging between the active MP and standby MP while at the same time ensuring that the requisite information is provided to the standby MP and also to the linecards so as to enable multicast routing services to be provided without disruption.
In one embodiment, the following two synchronization techniques are used:
(1) Bicasting; and(2) Incremental updates.
(1) BicastingIn this technique, a piece of information is sent to both the active MP and the standby MP. Each MP then, independently of the other MP, uses the received piece of information to update multicast information maintained by the MP. In one embodiment, using bicasting, certain control packets received by router 108 are sent to both the active MP and the standby MP. This sending of a control packet to both the MPs is referred to as bicasting. The active MP updates its multicast information based upon the control packet that it receives. The standby MP updates its multicast information based upon the control packet that it receives. Since both MPs receive the control packet, the same updates to the multicast information are made to the active MP and the standby MP and as a result the multicast information is synchronized. Accordingly, bicasting is a mechanism that delivers control packets to both active and standby MPs, so that they can populate the same information based upon the control packets.
The PIM neighbor table is created and updated based upon PIM control packets (e.g., PIM hello packets) received by router 108. A PIM control packet may be received on a port coupled to an ingress linecard. The linecard receiving a PIM control packet is configured to send a copy of the packet to the active MP and send another copy to the standby MP. In this manner, linecard 112 is configured to send the PIM control packet to both the active MP and the standby MP. This is referred to as bicasting of the PIM control packet. As a result of the bicasting, both the active MP and the standby MP receive a copy of the PIM control packet. Each MP can then independently update its PIM neighbor table based upon the received control packet. For example, active MP 118A can update its PIM neighbor table 226A based upon the control packet copy that it receives from linecard 112 and standby MP 118B can update its PIM neighbor table 226B based upon the control packet copy that it receives from linecard 112. In this manner, by making PIM control packets available to both the MPs, the PIM neighbor information maintained by the MPs can be independently updated and kept in a synchronized state. In one embodiment, only PIM hellos are delivered to both the active MP and the standby MP, all other PIM control messages are blocked from the standby MP.
The IGMP table is created and updated based upon IGMP control packets (e.g., IGMP membership report packets) received by router 108. An IGMP control packet may be received on a port coupled to an ingress linecard. The linecard receiving an IGMP control packet is configured to send a copy of the packet to the active MP and send another copy to the standby MP. In this manner, linecard 112 is configured to send the IGMP control packet to both the active MP and the standby MP. This is referred to as bicasting of the IGMP control packet. As a result of the bicasting, both the active MP and the standby MP receive a copy of the IGMP control packet. Each MP can then independently update its IGMP table based upon the received control packet. For example, active MP 118A can update its IGMP table 228A based upon the control packet copy that it receives from linecard 112 and standby MP 118B can update its IGMP table 228B based upon the control packet copy that it receives from linecard 112. In this manner, by making IGMP control packets available to both the MPs, the IGMP table information stored by the MPs can be independently updated and kept in a synchronized state.
In one embodiment, IGMP membership reports are received by both the active MP and the standby MP. The standby MP is configured to create IGMP states based upon the reports and update its IGMP table 228B.
In order to process IGMP control packets, both the active MP and the standby MP run an IGMP timer. This timer is used for executing the IGMP protocol on the active MP and standby MP and for keeping the IGMP table 228B maintained by the standby MP in synchrony with the IGMP table 228A maintained by the active MP.
In one embodiment, a PIM timer is blocked on the standby MP and thus the standby MP is prevented from PIM timer driven events.
(2) Incremental UpdatesAccording to this technique, multicast information updates are periodically communicated from the active MP to the standby MP (or a linecard) such that the multicast information maintained by the standby MP (or the linecard) is synchronized with multicast information maintained by the active MP. In one embodiment, this technique is used to synchronize the PIM mcache information, the RPSet information, and the BSR State information, or portions thereof, between the active MP and the standby MP. This technique may also be used to synchronize the PIM mcache information and the RPSet information or portions thereof between the active MP and a linecard.
According to this technique, the active MP (e.g., active MP 118A in
Various different delivery/transportation techniques may be used to communicate updates from the active MP to the standby MP and from the active MP to a linecard. These may include software-implemented techniques, hardware-implemented techniques, or combinations thereof. The delivery mechanism used to communicate updates from the active MP to the standby MP may be the same as or different from the delivery mechanism used for communicating updates from the active MP to a linecard.
In one embodiment, a synchronization library (sync library) 224 is used to send updates from the active MP to the standby MP and also from the active MP to an LP 202 on a linecard. Sync library 224 may comprise software, which when executed by the active MP, provides a delivery mechanism for transferring information from an active MP to a standby MP and/or from an active MP to an LP on a linecard. In one embodiment, sync library 224 provides a framework for synchronizing data object instances between applications/processes in an efficient manner. For example, the sync library may be used to synchronize data between a process running on an active MP and a process running on a standby MP. The sync library is used to synchronize information between the active MP and the standby MP to facilitate features such as non-stop routing (NSR).
In one embodiment, synchronize library 224 provides APIs or functions that may be called for packing and unpacking data into synchronization buffers and to transmit data between an application executing on active MP 118A to an application executing on the standby MP or LP. The use of sync library 224 as described below is, however, not meant to be limiting. Other delivery mechanisms may be used to send multicast information updates from the active MP to the standby MP and/or to the linecard in alternative embodiments.
Since sending an update from an active MP to a standby MP (or to a linecard processor) involves computing resources of the active MP, it is beneficial, if possible, to reduce the number of such updates, to reduce the amount of data passed between the sender (e.g., the active MP) and the receiver (e.g., the standby MP), and to reduce/simplify the signaling between the active MP and the standby MP (or linecard) involved in performing such updates. In one embodiment, this is achieved by using an incremental updates technique. The incremental update technique provides an efficient, light-weight, and scalable mechanism for synchronizing information between an active MP and a standby MP and/or a linecard.
The incremental updates technique may be described using PIM mcache information as an example.
As shown in
Various events may cause the PIM mcache information maintained in mcache table 300 by active MP 118A to change. These events may include but are not limited to changes in the information received from one or more linecards 112, changes in network topology, multicast information received by the active MP (e.g., PIM-related information), changes made to the unicast routing table, and the like. A change made to mcache table 300 may involve adding/creating a new mcache entry in mcache table 300, deleting an existing mcache entry from mcache table 300, or modifying one or more fields of an existing entry in mcache table 300. As changes are made to PIM cache information in mcache table 300, active MP 118A causes these changes to be periodically propagated to standby MP 118B using incremental updates. The changes are communicated to the standby MP such that the PIM cache information maintained by the standby MP is kept in synchrony with PIM mcache information maintained in mcache table 300 by active MP 118A.
In one embodiment, all the fields of an mcache entry may be synchronized between an active MP and a standby MP or linecard. For example, in such an embodiment, an mcache entry 302-1 maintained by active MP 118A and a corresponding mcache entry maintained by standby MP 118B would have the same fields. In another embodiment, only a subset of the fields, and consequently only a subset of the PIM mcache information may be synchronized between the active MP and the standby MP (or LP). For example, while mcache entries maintained by active MP 118A may have “n” fields (as shown in
Further, the mcache information that is synchronized between the active MP and the standby MP may be the same as or different from the mcache information that is synchronized between the active MP and a linecard LP. In one embodiment, the mcache information that is synchronized between the active MP and a linecard LP is a subset of the mcache information that is synchronized between the active MP and the standby MP.
In one embodiment, a set of opcodes is defined and used to propagate changes from mcache table 300 maintained by active MP 118A to the standby MP or to a linecard LP. An opcode identifies a portion of an mcache table entry that is to be changed or amended, where the portion could be the entire mcache entry or a portion thereof. An opcode may also identify the type of change to be made to the mcache information maintained by the standby MP. The type of change could be to insert a new mcache entry in the mcache table maintained by the standby MP, delete an mcache entry, change a specific set of fields of an mcache entry, and the like. Multiple opcodes may be defined for identifying different subsets of fields of an mcache entry to be changed.
In general, for purposes of this application, an opcode represents any information that identifies a change that is to be made to information maintained by a processor operating in standby mode, a line processor on a linecard, etc. An opcode thus indicates a change to be made to the information that is to be synchronized with information stored by the active MP.
Examples of opcodes that may be defined for a network device in one embodiment include but are not restricted to:
- MCAST_INIT: Used to update/initialize all the fields of an mcache entry. Also used for inserting a new mcache entry in the mcache table.
- MCAST_DEL_ENTRY: Used to delete an mcache entry.
- MCAST_ASSERT: Used to update fields of an mcache entry related to assert information.
- MCAST_FLAG_CHANGE: Used to update the flag field(s) of an mcache entry.
Other opcodes may be defined for alternative embodiments.
As previously indicated, the information that is synchronized from the active MP to the standby MP may be different from the information that is synchronized from the active MP to a linecard. Accordingly, while some opcodes may be used for both active MP-to-standby MP and active MP-to-linecard LP synchronization, other opcodes may be specific to active MP-to-standby MP or active MP-to-linecard LP synchronization.
In one embodiment, to facilitate incremental updates, a data structure (e.g., an array, a list) is maintained for each mcache entry. For example, in
In one embodiment, the data structures may be an extension of the mcache entries themselves. For example, the arrays structures 304 depicted in
An array 304 associated with an mcache entry 302 is configured to store opcodes corresponding to changes that have been made to the corresponding mcache entry in table 300 and which are to be propagated to a corresponding mcache entry in mcache table 310 maintained by standby MP 118B. Each opcode in an array associated with an mcache entry thus represents a change that has to be made to a corresponding mcache entry maintained by the active MP to synchronize it with the mcache entry maintained by the active MP.
An array associated with an mcache entry may comprise zero or more opcodes. For example, in
In one embodiment, an opcode is written to an array associated with an mcache entry after a change has been made to that mcache entry. The change could be insertion of a new mcache entry, deletion of the mcache entry, or changing one or more fields of the mcache entry. For example, when a new mcache entry is added to mcache table 300, an opcode indicating a new entry (e.g., MCAST_INIT) may be added to the array associated with the newly added mcache entry. In one embodiment, each array is filled starting from the head of the array (i.e., the first available empty position in the array). In this manner, the positioning of opcodes within an array gives a timeline of when the changes were made to the corresponding mcache entry. As another example, when all the fields of an mcache entry are to be reset or initialized, then again an MCAST_INIT opcode may be written to the array associated with the mcache entry. As another example, for an mcache entry in mcache table 300 that is deleted and which is to be deleted from mcache table 310 maintained by the active MP, the mcache entry in mcache table 300 may be deleted but the array corresponding to the entry is still preserved and an opcode indicating a delete entry (e.g., MCAST_DEL_ENTRY) added to the array. This mcache entry and associated array may be preserved until the information is synchronized to the standby MP (or linecard). Likewise, when one or more fields of an mcache entry have been changed, an opcode corresponding to the changes (or comprising a superset of the changes) may be added to the array associated with the mcache entry.
As shown in
A check is made to see if the number of opcodes in the opcode array corresponding to the changed mcache entry is below a threshold (step 406). The opcode array for the mcache entry maintained by the active MP may have zero or more entries. In one embodiment, the threshold used in 406 corresponds to the maximum size of the opcode array. In such an embodiment, the check performed in 406 amounts to checking whether the opcode array associated with the changed mcache entry is full. For example, for the embodiment depicted in
If it is determined in 406 that the number of opcodes in the opcode array is not below the threshold, then all the opcodes in the opcode array are removed and replaced by a single opcode indicating an update or reset of the entire mcache entry (step 408) and processing ends. For example, the opcodes in the opcode array may be replaced by a single MCAST_INIT opcode entry. The reasoning here is that if the number of updates to be synchronized to the standby MP for the mcache entry is above a certain number, represented by the threshold, then it is more cost effective to do a complete re-initialization of the mcache entry on the standby MP rather than performing individual updates.
If it is determined in 406 that the number of opcodes in the opcode array is below the threshold, then it is determined whether a consolidation of multiple opcodes can be performed based upon the opcode determined in 404 and the zero or more opcodes in the opcode array of the changed mcache entry (step 410). If possible, consolidation is then performed (step 412).
In one embodiment, consolidation seeks to reduce the number of opcodes associated with an mcache entry, where the opcodes associated with the entry include the opcode determined in 404 and the opcodes, if any, already in the array corresponding to the mcache entry. As a result of consolidation, instead of at least two opcodes associated with the mcache entry, only one opcode is associated with the mcache entry thereby reducing the total number of opcodes associated with the mcache entry.
Example 1Before consolidation: OP1, OP2 are associated with an mcache entry.
After consolidation: OP3 is associated with the mcache entry instead of OP1 and OP2 and written to the array associated with the mcache entry.
Before consolidation: OP1, OP2 are associated with an mcache entry.
After consolidation: OP1 is associated with the mcache entry and not OP2. OP1 is written to the array associated with the mcache entry (if not already in the array).
In the above examples, OP1 and OP2 may include the opcode determined in 404 or may include opcodes already in the array corresponding to the mcache entry.
Consolidation may involve replacing multiple opcodes associated with an mcache entry with a single opcode, thereby reducing the total number of opcodes associated with mcache entry. In one embodiment, a first set of multiple opcodes may be replaced by a second set of multiple opcodes, where the number of opcodes in the second set of opcodes is less then the number of opcodes in the first set of opcodes.
Example 3Before consolidation: OP1, OP2, OP3 are associated with an mcache entry.
After consolidation: OP4 and OP5 are associated with the mcache entry instead of OP1, OP2, and OP3. OP4 and OP5 are written to the array associated with the mcache entry and OP1, OP2, and OP3, if in the array, are removed.
In one embodiment, the consolidation processing is guided by a set of consolidation rules that may be configured for the router. A consolidation rule may identify the condition(s) under which a consolidation of opcodes may be performed and the manner in which the consolidation is to be performed. Processing performed in 410 and 412 may comprise determining one or more consolidation rules that are applicable based upon the opcodes associated with an mcache entry. The applicable rules may be determined based upon the opcode determined in 404 and based upon zero or more opcodes that already exist in the array associated with the mcache entry. Consolidation may then be performed as specified by the applicable consolidation rules. In one embodiment, the threshold related processing performed in 406 and 408 may also be configured as a consolidation rule, in which case the processing in 406 and 408 may also be performed as part of 410 and 412.
Examples of consolidation rules include:
(1) If the total number of opcodes, including the opcode determined in 404 and opcodes in the opcode array for the mcache entry, equals or exceeds some threshold (which may be configurable), then all the existing opcodes are to be replaced with a single opcode indicating that the entire mcache entry (i.e., all the fields) is to be synchronized to the standby MP (or linecard).
(2) If the opcode determined in 404 indicates a full initialization of the mcache entry (e.g., the opcode is MCAST_INIT), then all the existing opcodes in the opcode array are to be replaced with the single opcode determined in 404. In one embodiment, if the opcode array comprises a MCAST_DEL_ENTRY opcode, then the MCAST_INIT is given higher priority and all the opcodes in the array are replaced with the MCAST_INIT determined in 404.
(3) If the opcode determined in 404 indicates a deletion of the mcache entry, (e.g., the opcode is MCAST_DEL_ENTRY), then all the existing opcodes in the opcode array are to be replaced with the single opcode determined in 404.
(4) If the opcode array comprises an opcode indicating a full initialization of the mcache entry (e.g., MCAST_INIT), then the opcode determined in 404 is to be ignored and not added to the opcode array; unless the opcode determined in 404 is an opcode that indicates deletion of the mcache entry, in which case rule (3) is followed.
(5) If the opcode array comprises an opcode indicating a deletion of the mcache entry (e.g., MCAST_DEL_ENTRY), then the opcode determined in 404 is to be ignored and not added to the opcode array.
(6) If the opcode determined in 404 already exists in the opcode array then the opcode determined in 404 is to be ignored and not added to the opcode array.
(7) If the opcode determined in 404 indicates a change in a first set of fields of the mcache entry, and the first set of fields is a superset of (or includes) fields indicated by one or more opcodes in the opcode array, then those one or more opcodes in the array are to be replaced by the opcode determined in 404. As an example, if the opcode determined in 404 indicates changes to be made to fields #2 and #3 of the mcache entry, and the opcode array comprises a first opcode that indicates a change to field #2 and a second opcode that indicates a change to field #3, then the first and second opcodes are replaced by the opcode determined in 404.
(8) If the opcode determined in 404 indicates a change to be made to a first set of fields of the mcache entry, and the opcodes in the array already encompass the first set of fields, then the opcode determined in 404 is to be ignored and not written to the opcode array. For example, if the opcode determined in 404 indicates a change to field #2, and the opcode array already comprises an opcode that indicates a change to be made to field #2 and possibly other fields, then the opcode determined in 404 is ignored and not added to the opcode array.
(9) If the changes indicated by the opcode determined in 404 and one or more opcodes in the opcode array can be consolidated and represented by a single opcode, then the single opcode is added to the opcode carry in place of the one or more opcodes. For example, if the opcode determined in 404 indicates a change to be made to field #1 of the mcache entry and the opcode array for the mcache entry comprises a first opcode indicating a change to be made to field #2 and a second opcode indicating a change to be made to field #3, and if there exists a single opcode that encompasses changes to be made to fields #1, #2, and #3, then that single opcode is written to the opcode array to replace the first and second opcodes the opcode determined in 404 is ignored and not written to the array.
As described above, various different consolidation rules may be configured for the router. In one embodiment, the consolidation rules may be ordered (or prioritized) and executed according to the ordering. The goal of the consolidation rules is to optimize the synchronization updates that are communicated from the active MP to the standby MP. In one embodiment, the consolidation rules seek to, wherever possible, reduce the number of opcodes in an opcode array associated with an mcache entry, which translates to a reduced number of updates being sent to the standby MP (or linecard) while at the same time optimizing (i.e., minimize) the amount of data that is communicated from the active MP to the standby MP (or linecard).
Referring back to
Referring back to
Synchronizer 306 operates asynchronously from the process(es) responsible for the processing depicted in
In one embodiment, synchronizer 306 is configured to, in a round-robin manner, visit each mcache entry and see if there are any opcodes in the opcode array associated with that mcache entry that have not yet been processed (step 502). In one embodiment, a flag may be associated with each opcode in the array to indicate whether or not that opcode has been processed. If there are one or more unprocessed opcodes, then for each unprocessed opcode in the array, a request is made to the active MP to provide mcache entry information corresponding to the unprocessed opcode (step 504). For example, if the array comprises a single MCAST_INIT opcode, then the information for the entire mcache entry may be requested. As another example, if the array comprises a first opcode corresponding to a first subset of fields of the mcache entry and a second opcode corresponding to a second subset of fields of the mcache entry, then in 504, information is requested for the first subset of fields and the second subset of fields. In one embodiment, if there is an overlap between the first subset of fields and the second subset of fields, then information may be requested for a union of the first subset of fields and the second subset of fields. The union may be less than all the fields of the mcache entry.
The information requested in 504 is provided by the active MP and packaged in a message 308 (step 506) that is then communicated to the standby MP (step 508). In one embodiment, if the array comprises multiple opcodes, then information requested for the multiple opcodes is packaged in a single message in 506 and then the single message communicated to the standby MP. This increases the efficiency of the information delivery since the multiple updates corresponding to the multiple opcodes can be packaged into a single message and delivered to the standby MP in a single shot. The flag associated with each opcode for which information is requested in 504 is set to indicate that the opcode has been processed (step 510).
In one embodiment, each mcache entry is uniquely identified using source information and group information stored by the entry. Accordingly, the information packaged in 506 includes at least these pieces of information. Depending upon the opcode, the information packaged in 506 may also include information related to other fields from the mcache entry. If the opcode indicates deletion of an mcache entry (e.g., an MCAST_DEL_ENTRY opcode), then the information packaged in 506 may include only source information and group information to identify the mcache entry to be deleted. If the opcode indicates a subset of fields of an mcache entry to be updated, then information related to only those fields (in addition to the source information and group information) may be packaged in 506. Accordingly, in one embodiment, the information packaged in 506 comprises source information, group information and additionally information related to only those fields identified as being changed by the opcode, and not all the fields.
At the standby MP the message is received and unpacked (step 512), and the information contained in the message is written to the corresponding mcache entry in mcache table 310 (step 514). The processing in 514 comprises identifying the mcache entry to be updated and then updating the information in the entry. In one embodiment, the mcache entry to be updated is identified using the source information and group information. In the case of a new mcache entry to be added, the location within mcache table 310 where the new entry is to be inserted may be determined and then a new mcache entry created at that location.
In one embodiment, once the update has been successfully made to mcache table 310, an acknowledgment (ACK 312) is communicated from the standby MP to the active MP (step 516). Synchronizer 306 may facilitate delivery of ACK 312 from the standby MP to the active MP. Upon receiving the ACK, active MP 114A is configured to delete all the opcodes in the array associated with the mcache entry whose processing resulted in the ACK being received (step 518). In this manner, an opcode is cleared from the opcode array for an mcache entry only after receiving acknowledgment that the mcache information corresponding to the opcode has been properly synchronized to the standby MP.
In the embodiment depicted in
In the embodiment described above, synchronizer 306 is configured to visit each mcache entry in mcache table 300 to determine whether an update is waiting to be propagated to the standby MP for that mcache entry. Accordingly, the processing depicted in
In one embodiment, a change made to mcache table 300 is synchronized to both the standby MP and a linecard processor (LP) on a linecard. In such an embodiment, two sets of arrays may be maintained for the mcache table entries, with one set of arrays being used for updating the standby MP and the other set of arrays being used for updating the LP.
Hitless SwitchoversAs described above, when a switchover occurs, the standby MP becomes the active MP and takes over management of hardware resources of router 108 and performance of the set of functions related to router 108 that were previously performed by the MP that was previously active. The previous active MP may then become the standby MP and be ready for a subsequent switchover. In one embodiment, a switchover is performed without any interruption to the multicast routing services provided by the network device.
A switchover may be caused by various different events, including anticipated or voluntary events and unanticipated or involuntary events. For example, a network administrator may cause a switchover to occur on purpose, such as when software on the MPs and LPs is to be upgraded to a newer version. In one embodiment, this switchover is performed without affecting multicast services provided by the router and thus is commonly referred to as a hitless upgrade.
As previously described with regards to
Typically, the version of software running on both the MPs and also the LPs of linecards is the same (but not required). However, newer versions of the software are frequently released for various reasons such as to add new features, to improve functionality, to solve bugs in existing versions, to improve router performance, and the like. When a new version is released, the router, including the active MP, standby MP, and the linecards, has to be upgraded to the newer version. In one embodiment, a voluntary switchover is used to perform the upgrade in a manner that does not interrupt the multicast routing services by the router.
An image of the newer version of the software is stored in non-volatile memories used by the standby MP, the active MP, and the LPs to load software (step 602). For example, an image of the new version of the software may be written to a CF device used by the standby MP for boot purposes and to a CF device used by the active MP to boot up. The new software version may also be written to a non-volatile memory used by each LP for booting.
A command may then be received to perform an upgrade (step 604). A user may issue the command in 604 via various interfaces such as via a CLI and others. In response to the command in 604, the standby MP reboots itself using the new software version stored in its associated non-volatile memory and comes up again in standby mode as the standby MP (step 606).
The active MP detects when the standby MP has rebooted and come up successfully as the standby MP with the new version of the software (step 608).
When the standby MP comes up with the new software version loaded, it has lost the multicast information maintained by the standby MP prior to the bootup. For example, the PIM mcache table, the RPSet information table, the BSR state information table, the PIM neighbor table, and the IGMP table are all cleared. Upon detecting that the standby MP has rebooted and come up successfully as the standby MP with the new version of the software in 608, the active MP then sends multicast information to the standby MP to synchronize the standby MP's multicast state information with the multicast information maintained by the active MP (step 610). The information sent by the active MP to the standby MP in 610 may include the PIM mcache information, RPSet information, and the BSR state information. Meanwhile, after rebooting, the standby MP independently builds its PIM neighbor table and IGMP table using bicasting. As a result of bicasting, there is no need to send the PIM neighbor table information and the IGMP table information from the active MP to the standby MP in 610—the standby MP can build its own PIM neighbor state information and IGMP table information from the bicasted control packets.
Upon determining that the multicast information maintained by the standby MP is synchronized with the information maintained by the active MP, a switchover is initiated (step 612). A switchover is performed due to which the standby MP becomes the new active MP (step 614). In one embodiment, when the previous standby MP becomes the new active MP, it is put in a switchover-in-progress (SOIP) mode. In this mode, no timers are run (even though in active mode) to avoid any premature aging of information. There are two ways in which the new active MP can switch out of SOIP mode and enter normal active mode: (1) upon the expiry of a timer (e.g., a 90 s timer); or (b) after unicast routing has declared convergence.
The multicast routing state information depends (needs services) upon unicast routing information. For example, PIM uses contents of the unicast routing table. However, a unicast routing table is not available to the active MP immediately after a switchover and accordingly the new active MP needs to know when the unicast routing information has converged. If the unicast routing information cannot converge for some reason, then the timer forces the active MP out of the SOIP mode.
In one embodiment, in 614, the multicast state information that is available to the new active MP is traversed and used to build additional information used for providing multicast routing services. For example, the mcache entries in the mcache table are traversed and synchronized. The new active MP also claims ownership of hardware resources within the router that are used for multicasting, and which were previously managed by the previous active MP.
It is to be noted that in 614, the information that is used by the new active MP to build the active multicast routing state does not have to be built from scratch. This information or portions thereof were available to the MP when it was the standby MP at the time of the switchover. Additional multicast information that may be used by the new active MP for multicast routing is built using this available information. The building of the active multicast routing state for the new active MP does not have to depend upon information received from neighboring network devices or routers.
In one embodiment, the previous active MP is rebooted using the new version of the software and comes up as the new standby MP (step 616). As previously described, the new software version may be stored in a non-volatile memory associated with the previous active MP.
The multicast information maintained by the new standby MP is then synchronized with the multicast information maintained by the new active MP (step 618). Synchronization in 618 may be performed using incremental updates and bicasting, as previously described.
While the switchover processing described above is being performed, the linecard processors on the linecards are not aware of the switchover. The linecards continue to perform hardware-based forwarding as before the switchover. In one embodiment, each LP is then reset thereby causing the LP to boot up running the new version of the software (step 620). For an LP, the new software version may be stored in a non-volatile memory used by the LP to perform a boot and then loaded by the LP after the reset.
The new active MP detects the one or more LPs after they have rebooted and come up with the new software version and then performs a full download of multicast state information to each rebooted LP (step 622). In one embodiment, in order to perform a full download to an LP, for PIM mcache information maintained by the active MP, an MCAST_INIT opcode is added to the array associated with each mcache entry. A synchronization mechanism is then used to update the mcache table entries maintained by the LP according to the processing depicted in
In the manner described above with respect to
Additionally, embodiments of the present invention do not have to rely on using the GenID mechanism to build multicast state information. When a standby MP becomes an active MP due to a switchover, the new active MP already has sufficient multicast information, received using bicasting and/or incremental updates, which enable the new active MP to provide multicast routing services without any interruption. The new active MP does not have to receive any multicast information from neighboring network devices in order to build its multicast state information. In fact, there is no need to even change the GenID upon a switchover. By not relying on the GenID, the router does not have to care whether its neighboring devices support GenID.
From the neighbors' perspective, the neighboring network devices do not need to support the GenID concept. Since the GenID is not changed, the switchover is transparent to the neighbors and as a result less processing is required by the neighbors. A neighbor may not even know that a switchover has occurred and no coordination or information is needed from the outside world. This reduces the processing burden on neighboring network devices since they can continue to perform their processing in a normal manner and do not have to undertake any special processing to another neighbor network device building its multicast routing information. Further, due to non-reliance on neighboring network devices, the router performing a switchover is not affected by any problems that may occur in the neighbor routers or in receiving information from the neighbors.
The processing described above with respect to
As depicted in
The previous active MP is then rebooted and comes up as the new standby MP (step 1008). The multicast information maintained by the new standby MP is then synchronized with the multicast information maintained by the new active MP (step 1010). Synchronization in 1010 may be performed using incremental updates and bicasting, as previously described.
While the switchover processing described above is being performed, the linecard processors on the linecards are not aware of the switchover. The linecards continue to perform hardware-based forwarding as before the switchover. The new active MP then download its multicast information to each LP (step 1012).
In one embodiment, the following switchover-related operations may be performed: hitless software upgrade, voluntary MP switchover, and involuntary MP switchover. The hitless software upgrade has been described above with respect to
In both the flowcharts depicted in
The multicast information maintained by a linecard comprises software multicast state information and hardware multicast state information. The software multicast state information is the multicast information maintained by an LP in a volatile memory associated with the LP. For example, referring to
As described above, forwarding identifiers and MVIDs are used for performing egress forwarding of multicast packets. Allocation and management of the forwarding identifiers and MVIDs is performed by the active MP. When a switchover occurs and a new active MP takes over, the LP of a linecard needs to use the same forwarding identifiers and MVIDs that were being used prior to the switchover. However, when a standby MP becomes the active MP, all the forwarding identifiers and MVIDs are initially free. When the new active MP takes over management of hardware resources after a switchover, it is provided information regarding the mapping of forwarding identifiers to output ports/interfaces (OIFs). After the standby MP takes over as active, the mcache information maintained by the active MP is used to reserve the forwarding identifiers and MVIDs.
A forwarding identifier identifies a set of one or more output ports of the router to which the packet is to be forwarded. Since a unicast packet has only one destination and is sent to only one output port, the forwarding identifier for a unicast packet identifies a single output port. Accordingly, for unicast routing, the number of forwarding identifiers that are needed is limited to the number of ports available in the router. However, in the case of a multicast packet, there can be multiple destinations and as a result the forwarding identifier for a multicast packet typically identifies multiple ports and combinations of ports. As a result, forwarding identifiers for multicast packets are managed dynamically. For example, when a new port or output interface is added, a request for a new forwarding identifier is made and it is mapped to the new output port. This mapping is done by the active MP. The active MP thus needs to have knowledge about allocated forwarding identifiers and their mapping to output ports.
There are various situations as a result of which one or more LPs of a network device may have to synchronize their multicast information with multicast information maintained by the active MP. Examples of such situations include (1) when the LP performs a cold reboot, (2) when an LP detects that an MP switchover has occurred, or (3) when an LP reboots as part of a hitless software upgrade. Each of these scenarios is explained below.
When a cold reboot of an LP is performed, after the reboot the LP loses all its multicast information and comes up with a blank slate.
The processing may be initiated when an LP is cold rebooted (step 702). The LP then reboots and comes up with all its multicast information, including software multicast state information and hardware multicast state information, cleared (step 704). The rebooted LP then receives a download of multicast information from the active MP (step 706). In one embodiment, the multicast information downloaded in 706 includes information related to PIM mcache information and RPSet information. Other multicast-related information may be downloaded in alternative embodiments. The LP uses the information downloaded by the active MP to build its software multicast state (step 708). The LP then uses the multicast routes information (e.g., the PIM mcache information) built in 708 (or downloaded in 706) to program the hardware resources on the linecard to enable the hardware resources to perform multicast forwarding (step 710). The hardware resources that are programmed in 706 may include CAM 212, PRAM 214, MVID table 217, and replication table 216. Accordingly, in 710, the hardware multicast state information is built.
Subsequent to initial download and building of multicast information and the programming of the hardware resources, the LP may incrementally receive multicast information updates from the active MP when changes (e.g., a new entry is added, an entry is deleted, and entry is modified) occur to the multicast information maintained by the active MP (step 712). The LP may then make changes to its multicast information based upon the updates received in 712 (step 714). The LP may then program the hardware forwarding resources corresponding to the incremental updates (step 716). Steps 712, 714, and 716 may be repeated multiple times as changes are made to the multicast information.
In one embodiment, correlation information is maintained that correlates the software multicast state information maintained by an LP with the hardware multicast state information used by the hardware resources of a linecard to perform forwarding of multicast packets. The correlation information may comprise pointers or links or indices linking the software information with the hardware information. In one embodiment, the correlation links are memory addresses or handles into the packet processor memory where the corresponding resources are programmed. For example, when a multicast route entry is programmed into a CAM associated with a packet processor, the address of the CAM location where the entry is programmed is determined. This address represents a “handle” that can be used to refer to this programmed entry, in case the CAM entry is to be updated or deleted. This handle is usually stored in the software route entry (in the case of multicast information, the mcache entry) that represents the CAM entry. When a soft-reset is performed on an LP, the software multicast information is cleared and thus lost. However, the CAM information (which is part of the hardware multicast information) is preserved. Accordingly, the handles need to be stored in non-volatile memory, so that when the LP rebuilds its software multicast information and recreates the mcache entries, the stored correlation information can be used to link the software multicast information (e.g., the mcache entries) with the hardware multicast information.
Considering that mcache entries are represented by a source and a multicast group, (S, G), the correlation information that is stored comprises information that map an (S, G) entry to its CAM handle. Similarly, the MVID, the forwarding identifier, and the replication offset (this last information is per outgoing port of an entry) all represent various locations in their corresponding tables in the packet processor, all of which is used for the complete replication and forwarding of the (S, G) stream. Once the LP comes back up and the software mcache state is re-created, this mapping information is used to attach the software entry to their hardware handles. The correlation information thus represents information that connects the software multicast information to the hardware multicast routing information.
Another situation where an LP may have to synchronize its multicast information state with that maintained by an active MP is during a hitless upgrade procedure.
As depicted in
In one embodiment, a portion of memory 204 may be set aside as protected memory 208, wherein information stored in the protected memory is preserved across a soft reboot. In such an embodiment, the correlation information may be stored in protected memory 208. It is to be noted that during this time, the hardware-based forwarding (i.e., forwarding performed by packet processor 210 using CAM 212, PRAM 214, MVID table 217, and replication table 216) of multicast traffic continues without interruption.
The LP then performs a soft-reboot and loads a new version of the software (step 806). In a soft-reboot of a linecard, power to the linecard is not cycled. The new version of software may be executed by the LP and loaded in volatile memory 204 associated with the LP. As a result of the reboot performed in 806, the software multicast information maintained by the LP in volatile memory (but not in protected memory 208) prior to the reboot is cleared.
It is to be noted that, since power to the linecard is not cycled in a soft-reboot, a soft-reset of the LP does not affect the hardware multicast information maintained by the hardware resources (e.g., packet processor and associated memories) of the linecard. The hardware multicast information is preserved across a soft-reboot and is used by the hardware resources to continue performing forwarding of multicast packets without interruption.
The LP then receives multicast information from the active MP (step 807). In one embodiment, the multicast information received in 807 includes information related to PIM mcache information and RPSet information. The LP uses the information received in 807 to build its software multicast state (step 808). For example, as part of 808, the LP builds a PIM mcache table comprising mcache entries.
The LP then uses the correlation information, which was stored in 804 prior to the reboot, to link the software multicast information built in 808 to the hardware multicast information (step 810). The LP then updates the hardware multicast state based upon the software multicast state built in 808 (step 812). For example, the multicast software state information built in 808 may be used to update the CAM, PRAM, MVID table, and replication table information. For example, if there are discrepancies in the hardware multicast forwarding state as a result of the new software state, then these discrepancies are corrected in 812. In one embodiment, any conflicts are resolved by updating the hardware multicast information. Any hardware multicast information entries that did not change during the software upgrade process will continue to be forwarded uninterrupted and will not take an unnecessary hit. This marks the end of the LP upgrade.
Another scenario where the multicast information maintained on a linecard may be affected is when an LP detects that an MP switchover has occurred, which is not part of a software upgrade operation.
As depicted in
The LP then updates the software multicast information maintained by the LP based upon the multicast information received in 906 from the active MP (step 908). It is to be noted that since the LP has not been rebooted, the software multicast information maintained by the LP and the hardware multicast information used for forwarding of multicast packets by hardware resources (e.g., packet processor on a linecard) on the linecard is still intact. Accordingly, upon receiving the multicast information from the active MP, the LP updates its own software multicast information only if the new information received in 906 differs from the software multicast information the LP was already maintaining.
In one scenario, it is possible that the multicast information maintained by the new active MP has changed from the multicast information maintained by the LP. For example, it is possible that new active MP's version of the mcache information might not have some mcache entries present in the mcache information maintained by the LP. This may, for example, happen if the MP switchover happened at the exact time of the deletion of the mcache entries at the MP. In order to identify such mcache entries, prior to the LP requesting software multicast information from the active MP (i.e., before step 904), the LP traverses through all its maintained list of mcache entries and marks each as “to be deleted”. Upon receiving the multicast information from the active MP in 906, in 908, the LP refreshes each of its mcache entries if a corresponding entry exists in the information received from the active MP. When an mcache entry is refreshed, the “to be deleted” mark associated with the entry is cleared. Once the complete refresh finishes, the LP traverses its mcache entries again and deletes any mcache entry that still has an associated “to be deleted” mark (these entries are those that were not refreshed based upon information received from the active MP). This processing ensures that any mcache entry that did not change during the switchover will continue to be used for forwarding uninterrupted, and will not take an unnecessary hit.
The LP then updates the hardware multicast information based upon the information received in 906 (step 910). As with the software mcache entries, only those portions of the hardware multicast information that have changed, based upon the information received in 906, are updated.
It is to be noted that since the LP never went down in this scenario, while steps 902, 904, 906, and 908 are being performed, the hardware continues to forward multicast traffic uninterrupted using its existing hardware multicast state information. Even in 910, forwarding of multicast traffic continues uninterrupted for multicast routes that have not changed from prior to the switchover.
Although specific embodiments of the invention have been described, various modifications, alterations, alternative constructions, and equivalents are also encompassed within the scope of the invention. Embodiments of the present invention are not restricted to operation within certain specific data processing environments, but are free to operate within a plurality of data processing environments. Additionally, although embodiments of the present invention have been described using a particular series of transactions and steps, these are not intended to limit the scope of inventive embodiments.
Further, while embodiments of the present invention have been described using a particular combination of hardware and software, it should be recognized that other combinations of hardware and software are also within the scope of the present invention. Embodiments of the present invention may be implemented only in hardware, or only in software, or using combinations thereof.
The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense. It will, however, be evident that additions, subtractions, deletions, and other modifications and changes may be made thereunto without departing from the broader spirit and scope of the invention.
Claims
1. A method comprising:
- selectively bicasting a multicast protocol-related packet, received at a processing component of a network device, to a first processor and a second processor based upon a multicast protocol-related packet type, wherein selectively bicasting comprises:
- upon determining the multicast protocol-related packet to be of a first type, sending, from the processing component, the multicast protocol-related packet to the first processor and a copy of the multicast protocol-related packet to the second processor;
- updating, by the first processor, first multicast information maintained by the first processor based upon the multicast protocol-related packet received by the first processor; and
- updating, by the second processor, second multicast information maintained by the second processor based upon the copy of the multicast protocol-related packet received by the second processor.
2. The method of claim 1 wherein the multicast protocol-related packet is a Protocol Independent Multicast (PIM) packet.
3. The method of claim 2 wherein the first multicast information updated by the first processor comprises information related to neighbors of the network device that support PIM protocol.
4. The method of claim 1 wherein the multicast protocol-related packet is an Internet Group Membership Protocol (IGMP) packet.
5. The method of claim 4 wherein the first multicast information updated by the first processor comprises information related to the IGMP.
6. The method of claim 1 further comprising:
- communicating update information from the first processor to the second processor, the update information comprising information indicative of a change made to the first multicast information; and
- updating the second multicast information based upon the update information.
7. The method of claim 1, wherein the first processor is configurable to operate in active mode, the first processor performing a set of multicast routing-related functions in the active mode and the second processor is configurable to operate in standby mode, the second processor not performing the set of multicast routing-related functions in the standby mode.
8. A network device comprising:
- a processing component;
- a first processor and a second processor; wherein the processing component is operable to determine whether a multicast protocol-related packet is of a first type, and upon determining that the multicast-protocol related packet is of the first type, to send the multicast protocol-related packet to the first processor, and a copy of the multicast protocol-related packet to the second processor;
- wherein the first processor is further configurable to: receive, from the processing component, the multicast protocol-related packet; and update first multicast information maintained by the first processor based upon the multicast protocol-related packet received by the first processor, the first multicast information used by the first processor for performing the set of multicast routing-related functions;
- wherein the second processor is further configurable to: receive, from the processing component, a copy of the multicast protocol-related packet; and update second multicast information maintained by the second processor based upon the copy of the multicast protocol-related packet received by the second processor.
9. The network device of claim 8 further comprising a linecard, wherein the linecard comprises the processing component.
10. The network device of claim 8 wherein the multicast protocol-related packet is a Protocol Independent Multicast (PIM) packet.
11. The network device of claim 10 wherein the first multicast information updated by the first processor comprises information related to neighbors of the network device that support PIM protocol.
12. The network device of claim 8 wherein the multicast protocol-related packet is an Internet Group Membership Protocol (IGMP) packet.
13. The network device of claim 12 wherein the first multicast information updated by the first processor comprises information related to the IGMP.
14. The network device of claim 8 wherein:
- the first processor is configurable to communicate update information to the second processor, the update information comprising information indicative of a change made to the first multicast information; and
- the second processor is configurable to update the second multicast information based upon the update information.
15. The network device of claim 8, wherein:
- the first processor is configurable to operate in an active mode, wherein the first processor is configurable to perform a set of multicast routing-related functions in the active mode; and
- the second processor is configurable to operate in a standby mode when the first processor is operating in the active mode, wherein the second processor is configurable to not perform the set of multicast routing-related functions in the standby mode.
Type: Application
Filed: Oct 9, 2013
Publication Date: Feb 6, 2014
Applicant: Brocade Communications Systems, Inc. (San Jose, CA)
Inventors: Mehul Dholakia (Cupertino, CA), Wing-Keung Adam Yeung (Pleasanton, CA), Ajeer S. Pudiyapura (Sunnyvale, CA)
Application Number: 14/050,263
International Classification: H04L 12/18 (20060101);