12.07.2015 Views

(OSPF) Routing Protocol Simulation - High Speed Network Lab ...

(OSPF) Routing Protocol Simulation - High Speed Network Lab ...

(OSPF) Routing Protocol Simulation - High Speed Network Lab ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Open Shortest Path First (<strong>OSPF</strong>)<strong>Routing</strong> <strong>Protocol</strong> <strong>Simulation</strong>*Deepinder Sidhu, Tayang Fu, Shukri Abdallah and Raj NairtMaryland Center for Telecommunications Research &Department of Computer ScienceUniversity of Maryland — BCBaltimore, MD 21228andInstitute for Advanced Computer StudiesUniversity of Maryland — CPCollege Park, MD 20742RobColtunConsultantAbstractOpen Shortest Path First (<strong>OSPF</strong>) is a dynamic,hierarchical routing protocol designed to supportrouting in TCP/IP networks. A simulation of the<strong>OSPF</strong> Election <strong>Protocol</strong> shows three results: (1)The Designated Router(DR) can be elected in constanttime, (2) If a router has a limited number ofinput buffers, a competition for buffers between theElection and the Flooding <strong>Protocol</strong>s increases theelection time and causes an oscillatory behavior.*This research was supported in part by the Department ofDefense at the University of Maryland Baltimore County. Thevie ws and conclusions contained in this document are those ofthe authors and should not be interpreted as representing the officialpolicies, either expressed or implied, of the Department ofDefense or the U.S. Govermnent.t present address: Netrix Corporation, 13595 Dnlles TechnologyDr., Herndon, VA 22071Permission to copy without fee all or part of this material isgranted provided that the copiee ara not made or distributed fordirect commercial advantage, the ACM copyright notice and thetitle of the publication and its date appear, and notice is giventhat copying is by permission of the Association for ComputingMachinery. To copy otherwise, or to republish, requires a feeand/or specific permission.SIGCOMM’93 - Ithaca, N. Y., USA 19193~ 1993 ACM 0-89791-61 9-01931000910053 ...S 1.50At each router, the Router-ID of the DR continuouslychanges causing instability. (3) In theworst case, when the DR and the BI)R fail atthe same time, the DR-agreement-time is boundedabove by twice the HelloInterval. A simulation ofthe <strong>OSPF</strong> Flooding <strong>Protocol</strong>, using 20, 50 and 80router point-to-point networks, shows three results:(1) For the 50 router network, as link speed exceeds4000 Kbps, the probability of overflowing the inputbuffers increases causing ret ransmissions. Theincrease in bootup-convergence-time from retransmissionis bounded by two and three times theRxmtInterval for link speeds of 4000 to 6000 Kbpsand above 50 Mbps respectively. The increase inthe bootup-convergence-time is due to large nunlberof unacknowledged flooding packets receivedwithin RxmtInterval. (2) For 20 and 50 router networks,the input buffer size has little impact on thebootup-convergence-time. For the 80 router network,a small change in the input buffer size clrasticallychanges the bootup-convergence-time. (3)Reducing the value of the RxmtInterval lowers thebootup-convergence-time at high link speeds.53


1 IntroductionOpen Shortest Path First ‘( <strong>OSPF</strong>) is a dynamic,hierarchical routing protocol designed to supportrouting in TCP/IP networks [1]. The <strong>OSPF</strong> routingprotocol is a collection of interrelated algorithms:the Hello, Election, Flooding and Shortest-Path-First (SPF). The Hello, Election, and Flooding<strong>Protocol</strong>s distribute and synchronize routinginformation within an autonomous system.The Shortest-Path-First algorithm computes theshortest-path tree.In this paper, we present a simulation study ofthe Election and Flooding <strong>Protocol</strong>s of <strong>OSPF</strong>. Section2 presents simulation results of the Electionand the Flooding <strong>Protocol</strong>s. Section 3 containssummary and conclusions.2 <strong>OSPF</strong> <strong>Simulation</strong>In this section, we present the results of the discreteevent simulation of the Election and Flooding ProtOcols.2.1 Election <strong>Protocol</strong>The Election <strong>Protocol</strong> elects a Designated Router(DR) and a Backup Designated Router (BDR) todistribute and synchronize topology informationamong routers on a broadcast network. Withinthe network, the DR reduces the number of messagesneeded to broadcast topology informationand hides topology information from other routerswithin the autonomous system.A router is eligible to participate in the Election<strong>Protocol</strong> if its Router-Priority is positive. Arouter nominates a DR and a BDR using the DRand BDR fields of the hello packet. Every HelloInterval,each router X transmits a hello packetcontaining among other information its Router-Id,its Router-Priority and a list of Router-Ids fromwhom X has received a hello packet, Router X discoversrouter Y when X receives for the first timea hello packet from router Y. Router X detectsthe absence of router Y when X does not receivea hello packet from router Y for a period of RouterDeadInterval.Router X considers router Y asa bidirectional neighbor when X sees its Router-Idin the list of Router-Ids in the hello packet sent byrouter Y.A router is said to declare itself a DR(BDR) ifit elects itself DR(BDR) and inserts its Router-Idin the DR(BDR) field of the hello packet. A nullvalue in these two fields indicates the absence ofDR and the BDR. We refer to the router that winsthe election as the “winning-DR’).Initial Election TimeLet tl be the time at which the first router is bootedand t2 be the time at which the winning-DR electsitself. The objective of this experiment is to determinethe DR-election-time, t2– tl,on a broadcastnet work,The network sizes vary from 10 to 100 routersall of which have unlimited amount of input andoutput buffers. The Wait Timer, RouterDeadIntervaland the Hello Timer of each router are setto 40, 40 and 10 seconds respectively. We assumezero propagation and processing delays. We alsoassume that the Election <strong>Protocol</strong> runs in zero seconds.Initially, all routers are eligible routers in theDOWN state. If router R. was booted at time t.and the next router Rv was booted at time tg suchthat tu z tz, then tv – t$ is the inter-boot-time,At. The first router is booted at time At seconds,and the remaining routers are booted in increasingorder of Router-Id. The experiment is repeated forAt of 7, 10, 22, 30 and 40 seconds.Figure la shows the result for At = 7 seconds,and Fig. lb shows the result for At = 30 and 40seconds. In Fig. la, the DR-election-time increaseslinearly with the number of routers. In Fig. lb,the DR-election-time is constant. To explain thelinear increase of the DR-election-time in Fig. la,we trace the sequence of events executed at routersR1 and Rz attached to a broadcast network. Then,we generalize this explanation to a network of nrouters.At time 7 seconds, when router RI is booted up,it broadcasts a hello packet containing its Router-Id and enters the WAIT state for a period of 40seconds. Similarly, when router R2 is booted attime 14 seconds, it broadcasts a hello packet andenters the WAIT state. Router RI upon receivingthe hello packet from R2 at time 14 seconds estab-54


lishes one-way communication with R2. At time 17seconds, the second HelloInterval, router RI broadcastsa hello packet with the Router-Ids of RI andR2. Upon receiving this hello packet, R2 establishesbidirectional communication with router RI..At time 24 seconds, when R2 broadcasts a hellopacket, both routers establish bidirectional communicationbecoming candidates for election. Arouter exits the WAIT state if its Wait Timer expiresor a Backup-Seen event is triggered.A Backup _Seen event is triggered at any routerRx if R. receives a hello packet from another routerRv such that (1) Rv declares itself to be the BDR,or (2) RV declares itself to be the DR and declaresthat it has not elected a BDR. Since R1 and .R2 arein the WAIT state, they cannot declare themselvesas DR or BDR.At time 47 seconds, the Wait Timer at RI expires,and RI elects R2 as the DR because R2 hasa higher Router-Id. R1 broadcasts the result of theelect ion in its hello packet. A Backup _Seen eventat R2 is not triggered because RI is not declaringitself to be DR or BDR. At time 54 seconds,when the Wait Timer at R2 expires, R2 elects itselfas the DR and R1 as the BDR. At the sametime, the Hello Timer at R2 expires and R2 broadcaststhe results of the election. When RI receivesthe hello packet, a Neighbor_Change event is triggeredcausing RI to run the election. R1 selectsR2 as the DR and itself as the BDR. At time 57seconds, RI declares itself as a BDR to the wholenetwork by broadcasting a hello packet. Thus, theDR-election-time for a network of two routers is54 – 7 = 47 seconds.To generalize the explanation, consider anetwork with n routers with Router-Ids ofRI, R2,. ... Rn. The boot time of these routers are7,14,21,.. .,7 * n seconds respectively. The WaitTimer at each router expires at 47,54,61,..., 7xn+40 seconds respectively. Each router remains in theWAIT state for the whole period of 40 seconds becausethe Backup _Seen event cannot be triggeredby any router. Before the Wait Timer of router i(1 < i < n – 1) expires, router i + 1 is booted,and both routers establish bidirectional communication.When the Wait Timer expires at router i,it elects the router with the highest Router-Id withwhom it established bidirectional communication.[-.0ma.! ‘w4g4al -1 1020304Q50 607080901CCI700-3rm-’200-“~-!.a.g ~, ,IsNewark S-~ Iriler-nca lTir@.e.3Q0r40Jcc Fi~ b10203040 SO 60 70 60 90 1 K1NeNwuk SueFigure 1: Election Time for Broadcast <strong>Network</strong>sFinally, router Rn is booted at time 7 x n seconds,All routers establish bidirectional communicationwith Rn before its Wait Timer expires. Asa result, all routers elect Rn as the DR.. At time,7wz+40 seconds, the Wait Timer of R. expires, andR. elects itself as the DR and R.-l as the BDR.Thus, the DR – eiection – time = 7 x n + 40 – 7,where At = 7. The election time increases linearlybecause a Backup_Seen event cannot be triggeredat any router. The same explanation holdsfor At = 10 and 22 seconds.Each router excluding & and R.-l runs theElection <strong>Protocol</strong> two additional times. 11~ andR.-l run the Election <strong>Protocol</strong> one additionaltime. First, Rn broadcasts a hello packet declaringitself as the DR which causes a Neighbor.Changeevent at all other routers. Second, R._l broadcastsa hello packet declaring itself as the BDRwhich causes a Neighbor-Change event at all otherrouters.Figure lb shows a constant DR-election-time. Inthis scenario, At = 30 and router RI is booted attime 30 seconds. Router Rz is booted at time 60155


-2 ILI&,PBoot251BDR-.-3--, -------- ----------- . . . . .. . . . .. ... -------------- . .. . .. . .. . . .. . ----i1BDR C.m&kOll 22.0 - BDR-.-3. . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . .. . . . . . ..15-DR CMAQMI 210t.... . . . . . . . . . . . . . . . . . . . . . ------------- ------------- ---------DR CMMMWU 3‘t iI InmPBmI1 Time F 7 aec F,,, . I1070304050 607080901WNelwazS12C.110 -DR CXudtwn 3... . .. . .. .. . .. . .. . . . . .. . .. . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . .. . . . . .ti-Bswt Tlmo,= 22 SCGS, F,,. b1020304050 607080 90 ICKINew-k S-10t‘lhnc , 10= w muludc i.. c107D304O5O 6070 M901WNelwmkSur,Figure 2: Election Time after Topological ChangeDR.To determine in which set a group Gk belongs,consider a router Rj in the DR-OTHER statewhich belongs to group Gk. Let tjh be the firsttime the Hello Timer expires at router Rj after theDR and BDR are brought down(tjh ~ t~b). Letz = ijh – Qh and g = tj~ – t~~. If z and g are bothless than the HelloInterval, or both are greater orequal to the HelloInterval, then Gk c S1; otherwise,if z is greater or equal to the HelloInterval,then Gk E 5’2; otherwise, Gk


and detects the absence of the BDR at the next expirationof its HelloTimer. Let T1 be the first timeat which the new DR broadcasts a hello packet, andT2 be the last time at which any group in S2 detectsthe absence of its promoted BDR. T’l and T2 mustoccur within one HelloInterval from t~l. All routersare guaranteed to have entered the EXCHANGE-START state with the new DR at time min(Tl, 7’2).Then, tdz = min(Tl, T2). At time T1 all routers runthe Election <strong>Protocol</strong> and elect a new BDR. Therefore,tbz = T1. Figures 2a-2b show the DR(BDR)-agreement times for condition 2 when N = 7 and22 seconds.If condition 3 holds, then all the groups belongto the sets S1 and S3, and the set S2 is empty.Routers in the set S1 elect a new DR and enterthe EXCHANGE-START state with the newDR. Each router in S3 elects a new BDR and entersthe EXCHANGE-START state with the newBDR. After one HelloInterval, routers in S3 detectsthe absence of the DR, promote the newBDR to the new DR and continue the databasesynchronization process with the promoted DR.If the newly elected DR is in S3, it declares itselfas a new BDR, promotes itself and elects anew BDR. Let T4 be the time at which the newlyelected DR declared itself as a new BDR. Afterone more HelloInterval, it declares itself a new DR.The first declaration does not change the identitiesof the new DR and new BDR. On receivingthe second declaration, all router agree on thenew DR and new BDR. On the other hand, if thenewly elected DR is in S1, it elects a new BDRand declares itself new DR one HelloInterval after~dl. Therefore, we expect that the DR-agreementtime to be less than one HelloInterval as shownin Figs. 2a-2b. Let T3 be the last time at whichany group in S3 detects the absence of the BDR.Therefore, all routers are guaranteed to have enteredthe EXCHANGE-START state with the newDR at time min(T1, T3). Then, tdz = min(T1, T3).All routers know about the newly elected BDR attbz = max(T1, T4+HelloInter8al) +HelloInterval.In the worst case, when the DR and the BDRfail at the same time, the DR-agreement-time isbounded above by twice the HelloInterval,In an <strong>OSPF</strong> implementation, a router maychecks the expiration of RouterDeadInterval for aneighboring router when its Hello Timer expires. Ifthe granularity of checking the RouterDeadIntervalis finer than the HelloInterval, it is possible to obtainone group of routers which detect the absenceof the DR and BDR at the same time as in Fig. 2c.Interaction of Election and Flooding <strong>Protocol</strong>sThe objective of this experiment is to determineif the Flooding <strong>Protocol</strong> affects the DR-electiontimeand DR(BDR)-agreement-time. The experimentalsettings are identical to the two previousexperiments except that & = 7 and the size of theinput-control-packet queues of all interfaces is setto 10 packets. Each interface has one input-controlpacketqueue which contains both hello and floodingpackets. If the queue is full, incoming packetsare dropped.We conducted three different runs of the sameexperiment. The results of the three runs are differentfrom each other and different from the resultsin Figs. la and 2a. This behavior results fromthe competition between the flooding packets andthe hello packets for input buffer. The floodingpackets prevented the hello packets from arrivingat the routers every HelloInterval thus increasingthe election and agreement times. As the size ofthe queues decreases, the election and agreementtimes increase. However, when we introduce separateinput queues for the hello and flooding paclietskeeping the tot al size of both queues to 10, weobtain the same results as in Figs. la and 2a. Weprocessed the hello packets before we processed theflooding packets. We strongly recommend that an<strong>OSPF</strong> implementation should have a separate controlqueue for hello packets and should process thehello packets at a higher priority than the othercent rol packets.If a router, R, has a limited amount of inputbuffer space, we observe an oscillatory behavior inthe identity of the DR at R. If R does not receivea hello packet from the DR within a RouterDeadIntervalseconds, R assumes that the DRis down. The DR may not be down except thatits hello packets are being dropped due to lackof buffer space. R runs the election and elects anew DR and starts a new synchronization process58


wit h the new DR. Upon receiving a hello packetfrom the old DR, 1? assumes that the old DR is upagain(Neighbor.Change event ) and runs the election.R elects the old DR and starts a new databasesynchronization process.In networks with a strict performance requirements,for example convergence to occur withintwenty seconds, it is crucial to impIement a separate queue for hello packets.2.2 Flooding <strong>Protocol</strong>The Flooding <strong>Protocol</strong> is a reliable information exchangemechanism which ensures that all routerswithin an area have identical topology informationfor that area. Every pair of neighboringrout ers exchange topology summaries to learnabout the most recent topology changes within theautonomous system. A router obtains the new informationby synchronizing its topology databasewith a neighboring router using the Flooding <strong>Protocol</strong>.In this section, we describe three experimentsthat measure the bootup-convergence-time and theconvergence-time for point-to-point networks. Thebootup-convergence-time is the interval between thetime all routers and links in a network are initiallybrought up until the routing-convergence-st ate isreached. The routing-convergence-state is the statein which all routers reach the FULL state and haveempty retransmission and request lists. Let t bethe time at which a topological change occurs ina network that has reached a routing-convergencestate.The convergence-time is the time intervalfrom t until the next routing-convergence-st ate isreached.We use three topologies: (20,4, 6), (50,6,4) and(80, 6, 5). In the notation (IV, d, e), IV is the numberof routers, d is the network diameter and e is themaximum router degree. To minimize topologyinducedbias, we generate a topology with randominterconnections, To exercise the Flooding <strong>Protocol</strong>,high values are chosen for d and e. All linkshave the same speed chosen from a range of 56Kbps through 2 Gbps.Link <strong>Speed</strong> and Convergence TimeThe objective of this experiment is to determinethe impact of link speed on the convergence-timeand the bootup-convergence-time. All routers haveunlimited amount of input and output buffers. TheWait Timer, RouterDeadInterval and the HelloTimer of each router are set to 40, 40 and 10 secondsrespectively.Initially, all routers are in the DOWN stateand are booted simultaneously. Aft er the networkreaches routing- convergence-st ate, the boot upconvergence-timeis measured, and a t orologicalchange is introduced at time to by bringing downa link. The routers are allowed to respond tothis topological change and reach the routingconvergence-state.The last action of the Flooding<strong>Protocol</strong> is the deletion of a link state request listor the receipt of a database description packet. Letthe time of the last action be tl.The convergencetimeis measured as the time period tl – to.Figures 3a-3c show the bootup-convergence-timeand convergence-time over a range of link speedsfor the 50 router’ network. In Figs. 3a-3b, forlink speeds less than 4000 Kbps, the bootupconvergence-time for the Rxmt Int erval of 5 and10 seconds are 20 and 30 seconds respectively.Since all routers are booted at the same time,they establish bidirectional communication in 10seconds. If a link state advertisement is not acknowledgedwithin RxmtInterval, a retransmissionoccurs. Consequently, we get the bootupconvergence-timeto be the sum of one HelloIntervaland twice the RxmtInterval. In Fig. 3b,for link speeds from 4000 to 6000 Kbps, the increasein the bootup-convergence-time is boundedby twice the RxmtInterval. For example, thebootup-convergence-time for the link speed of 6000Kbps and RxmtInterval of 10 seconds is 50 seconds,giving an increase of 20 (50-30) seconds. In Fig. 3c,for link speeds above 50 Mbps, the increase inthe bootup-convergence-time is bounded by threetimes RxmtInterval. As the link speed increases,the probability of input-buffer-overflow increasescausing retransmissions because large numbers offlooding packets are received within an RxmtInterval.When a router, l?=, receives a flooding packetfrom a router, Ry, router Rz checks if this packet59


45 .+ Boomp&mwgum-nme,1Net


acknowledges a packet on Rz’s retransmission list.Therefore, as the size of the retransmission list atRz increases, the time to acknowledge a packet increases.In Figs. 3a-3c, RxmtInterval does not affect theconvergence-time which is bounded by 10 seconds.A router in this <strong>OSPF</strong> implementation responds toa topological change when its Hello Timer expires.To explain the bounding value, let t,2 < tl, be thetime at which the Hello Timers at all routers expire.The interval tz – tl is less than or equal to theHelloInterval, 10 seconds.Buffer Size and Convergence TimeThe objective of this experiment is to determinethe impact of input buffer size on the bootupconvergence-time.In this experiment, for networksof 20, 50 and 80 routers, the link speed is fixed atT1 (1.544 Mbps) and the input buffer size is variedfrom 4 through 20. The experimental procedure isas described above.The results of this experiment are shown inFig. 3d. For any of the networks, convergence doesnot occur if the buffer size is less than or equal tothree. This result implies that the lower boundof the input buffer size for the operation of an<strong>OSPF</strong> network of 20 or more routers is greater thanthree. Consequently, a router requires an inputbuffer memory size of at least 4 times the maximumsize of a flooding packet.For the 20 and 50 router networks, the buffersize has little impact on bootup-convergence-time.The bootup-convergence-time increases at a buffersize of 6 in the 50 router network and at a buffersize of 7 in the 20 router network, This increaseresults from two retransmissions which occur afterthe loss of a packet and its acknowledgment. Thisretransmission occurs at a higher buffer size for the20 router network than for the 50 router networkbecause the 20 router network has a higher routerdegree and must send out more link-state advertisementsper output buffer than the 50 router network.The 80 router network demonstrates verynoisy behavior because the number of link-state advertisementsthat must be flooded is large. Clearly,a buffer size of 20 or more is needed for networkswith more than 80 routers.RxmtInterval and Convergence TimeThe objective of this experiment is to demonstratethe effect of a low setting of the RxmtInterval. Theexperimental procedure is as described above. Inthis experiment, we used the 50 router networkwith link speeds from 25 to 200 Mbps. Outputand input buffer size is unlimited.The results of this experiment are shown inFig. 3e. Reducing the value of the retransmissiontimer lowers the bootup-convergence-time for alllink speeds. However, the reduction is larger forhigher link speeds. For example, at the link speedof 100 Mbps, a speedup of 14 seconds is observedwhen the retransmission timer is reduced from 10to 3. This result verifies the suggestion in [1] thatthe setting of the retransmission timer can be reducedfor high speed networks.Buffer management is vital to the performanceof the Flooding <strong>Protocol</strong>; otherwise, there is potentialfor performance degradation due to high contentionfor memory. The Flooding <strong>Protocol</strong> in an<strong>OSPF</strong> implementation may use inherent rate-basedcontrol mechanisms such as: (1) limit the numberof simult aneous synchronizations, or (2) reduce t hevalue of the retransmission timer. It is also recommendedthat a linear search of the retransmissionlist be avoided.3 Summary and ConclusionsOpen Shortest Path First (<strong>OSPF</strong>) is a dynamic, hierarchicalrouting protocol to support the TC!P /IPnetworks. In this paper, a simulation of the <strong>OSPF</strong>Election <strong>Protocol</strong> shows three results: (1) The DesignatedRouter(DR) can be elected in constanttime. (2) If a router has a limited number of inputbuffers, a competition for buffers between the Electionand the Flooding <strong>Protocol</strong>s increases the electiontime and causes an oscillatory behavior. Ateach router, the Router-ID of the DR continuouslychanges causing instability. To solve these problems,Hello packets must be queued in a separatecontrol queue and processed at a higher priority,(3) In the worst case, when the DR and the BDRfail at the same time, the DR-agreement-time isbounded above by twice the HelloInterval.A simulation of the <strong>OSPF</strong> Flooding <strong>Protocol</strong>61


using 20, 50 and 80 router point-to-point networksshows three results: (1) For the 50 routernetwork, as link speed exceeds 4000 Kbps, theprobability y of overflowing the input buffers increasescausing retransmissions. The increase inbootup-convergence-time from retransmissions isbounded by two and three times the RxmtIntervalfor link speeds of 4000 to 6000 Kbps and above50 Mbps respectively. The increase in the bootupconvergence-timeis due to large number of unacknowledgedflooding packets received within Rxmt-Interval. (2) For 20 and 50 router networks, theinput buffer size has little impact on the bootupconvergence-time.For the 80 router network, asmall change in the input buffer size drasticallychange the bootup-convergence-time. (3) Reducingthe value of the RxmtInterval lowers the bootupconvergence-timeat high link speeds.References[1] J. Moy. The open shortest path first (<strong>OSPF</strong>)specification. Technical Report RFC- 1131, SRI<strong>Network</strong> Information Center, October 1989.[2] Deepinder Sidhu, Tayang Fu, Shukri Abdallah,Raj Nair, and Rob Coltun. Open shortest pathfirst simulation. under preparation.62

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!