Usage of Pythagorean Triple Sequence in Ospf

Shutting down a link for the purposes of a scheduled routine maintenance does cause the forwarding path to change. If these changes are not done in a required order will cause not only transient micro loops but also an overload in some links. Currently, some ISP operators use a graceful link shutdown procedure by first setting up the Interior Gateway Protocol (IGP) link metric to MAX_METRIC − 1 and then shutdown the link. In this paper, we present a Pythagorean Triple Metric Sequence as a method to use to shutdown a link during such network operations. Conducting a link shutdown of any desired link for maintenance purpose is a very delicate duty that requires extreme care to prevent transient loops during such topological changes. We thus wish to demonstrate that there exists a Pythagorean Triple Metric Sequence for any given link that can be used to shutdown a link during the routine maintenance by ISPs.


Introduction
Internet Service Providers (ISPs) have an obligation to observe the conditions set in the Service Level Agreements (SLA) with their customers.One of the conditions is to ensure that ISPs minimize the duration of the loss of connectivity.Losses of connectivity are common occurrences most especially in networks with larger topologies, although most of the times such losses of connectivity are unavoidable as the ISPs have to shut down the equipment for them to be able to conduct the scheduled routine maintenance.The link metric of a link can always be increased to a larger metric by progressively increasing the metric of the link by one, until the target metric is reached.Therefore the link can be shut down, by increasing its link metric until it becomes large that it cannot carry packets anymore.When the target metric has been reached, the link can then be safely shutdown [1].
Shutting down a link for the purposes of a scheduled routine maintenance alone accounts for about 20% of the total failures [2].The shutting down of a link due to these operations is considered as planned failures.In this paper, we make reference mainly to these planned failures.
Some ISP operators do even use some procedures to conduct a graceful link shutdown [3].The procedure involves by first setting up the Interior Gateway Protocol (IGP) link metric to MAX_METRIC − 1 and then shutdown the link that is scheduled for routine maintenance.
Shutting down a link for the purposes of a scheduled routine maintenance does cause the forwarding path to change.For instance, using a Simple Network model (in Figure 1) the forwarding matrices in Figures 2 and 3 helps to illustrate the effect of shutting down a link on the forwarding path.The forwarding matrix in Figure 2 is the forwarding information bases (FIB) for all the 5 nodes when we have no link failure.However, in when we shutdown the link between nodes 1 and 2 does cause changes in the FIB, such that node 4 becomes the next hop for traffic from node 2 destined for nodes 0 and 1.The changes in the forwarding path when the link is shutdown, if are not done in a required order, will cause not only transient micro loops but also an overload in some links.Shutting down the link due to scheduled routine maintenance is considered as a predictable failure and that the effect of such topological changes can be reduced by correctly choosing updatable order that does not only avoids transient routing loops but also avoids congestion and link overflow [4][5][6][7][8].
In this paper we show that by use of the Pythagorean Triple Properties we can compute the Pythagorean Triple Metric Sequence that we can use to configure the network topology such that the desired link can be shutdown.In our Pythagorean Triple Metric Sequence method, we use the Pythagorean Triple Sequence {3n, 4n, 5n} to determine a sequence of metrics as target metrics to use to shutdown a link.In this research we performed experiments using the network model in Figure 1 in which we assumed that all links have same IGP metrics of value n configured to each link.We then performed experiments using the network topology in Figure 2 in which we assumed that the link metric of Figure 1 are not uniform.To evaluate and validate our Pythagorean Triple Metric Sequence method we directly varied and configured the IGP link metric of each and every link in the network topology to {n, 2n, 3n, 4n, 5n} sequence by considering each link as a link desired to be shutdown.For performance evaluation we have used a Simple Network, COST239, and HLDA as example of network topology models for evaluation purposes and whilst for validation purposes we have used K 5 COMPLETE GRAPH, as our "litmus test" network topology.In all the cases we use a gravity model type of traffic generation according to the population distribution.In our performance evaluation we demonstrate at what stage of the {n, 2n, 3n, 4n, 5n} sequence is the shutting down possible.We performed simulations for each and every link in each of the network topologies to verify when each link stops carrying traffic, and thus validating the link being shutdown.
The rest of the paper is organized as follows.In Section 2, we introduce the Pythagorean Triple Sequence Method.We explain the overview of our idea and introduce our algorithm.In Section 3, we discuss the experiments and evaluation of the results.Finally, in Section 4, we provide the conclusion.

Algorithm to Shutdown a Link Using the
Pythagorean Triple Sequence where is the initial metric and is the new metric.
It has been proved further that the link can be shut down by increasing its IGP link metric until it becomes large that it cannot carry traffic anymore.It was shown that when the target metric has been reached, the link can then be safely shutdown [1].
It was illustrated in [1], that we can have a sequence of three elements to sufficiently provide a loop free convergence: We also know that currently, ISP operators must first set the IGP link metric to to "gracefully" reroute traffic before shutting down the link.An expression that can be expanded to an equation expressed as follows: In Equation (3), we have a difference of two squares, which is a property of the Pythagorean Triple.It is from this fact that we believe if the property of Equation (3) holds for any given network topology then there must exist a Pythagorean Triple that can be used to shut down the link considering the fact that to perform the graceful shut down, ISPs are currently using a Pythagorean property as illustrated in Equation (3).
It was illustrated in [5] that there exist infinitely many right-angled triangles with integral sides in which the lengths of two non-hypotenuse sides differ by 1.That is, the triple sides as a sequence will be; m n  Comparing Equations ( 2)-( 4), we can see some similarities in these expressions, i.e. the first term in Expression (2) , the second term 1 and the third term t .This analogy in the Expressions (2) and ( 4) also provide us with the motivation to believe that the use of the Pythagorean Triple Sequence is worth exploring.Further, our idea is very much encouraged by the fact that in the graceful shutting down of a link method a Pythagorean property as illustrated in Equation ( 3) is valid.
It was further stated in [5], that there exist positive integers x and y such that the lengths of the sides of the triangle are 1 and respectively fulfils the Pythagoras Theorem, that is: Examples of the Pythagorean triples are {3, 4, 5} and {20, 21, 29}.
The {3, 4, 5} triple and its multiple {3n, 4n, 5n} are the only Pythagorean triple that are in arithmetic progression and consecutively incrementing.It is for reason we have decided to use this particular type of Pythagorean Triples Sequence.
We know that in Arithmetic Sequence the difference between one term and the next is a constant as given Equation ( 6), a fact that we see in the triple sequence of {3n, 4n, 5n}. a a (6) where:  a is the first term, and  d is the common difference between the terms.

Pythagorean Triples Using Euclid Formula
In mathematics it has been shown that if {a, b, c} is a Pythagorean triple, then so is {ka, kb, kc} for any positive integer k, and that the smallest Pythagorean Triple is {3, 4, 5} when .As illustrated in [6], Euclid provided a formula to find Pythagorean triples from any two positive integers m and n, where .For instance using Euclid formula in terms of a sequence (see Figure 4) we have {a, b, c}: As an Example, Table 1 illustrates the possible Pythagorean triples using the Euclid formula given in Equa-  tions ( 7)-( 9).Further, as an Example using the Euclid formulas in (7-9), assuming n 1  we have triples given as a se- , and where for a to be a positive number.Thus Equation ( 3) can be computed as follows: 6 ,537  The above example shows that Equation (3) fulfils the Euclid formula, again qualifying our idea of using the Pythagorean Triple Sequence Method when shutting down the link for routine maintenance purpose.

The {3n, 4n, 5n} Triple Algorithm
As stated earlier in this paper, the {3, 4, 5} triple and its multiples {3n, 4n, 5n} are the only triples that are in arithmetic progression and consecutively incrementing.It is these two reasons that we have chosen to use this particular type of Pythagorean Triples Sequence in this paper.
In our method we show that using the Pythagorean Triple Metric Sequence {3n, 4n, 5n}, and given that n is the initial element of the sequence {n, 2n, 3n, 4n, 5n} and the hence the common difference of the arithmetic progression, we can determine the target link metric and directly reconfigure to the link desired to be shutdown.In Table 2 below we illustrate the idea of our algorithm in determining the target metric.When we wish to shutdown any given link in any given topology we configur-  ing all other links in the network topology with a uniform IGP link metric which we denote as n, except for the link we wish to shutdown to which we vary its link metric as per sequence {n, 2n, 3n, 4n, 5n}.

Results and Discussion
To validate our idea of the Pythagorean Triple Metric Sequence, we have used several different topologies as network models for evaluation purposes such as 1) a Simple Network Figures 1 and 5; 2) COST239 in Figure 6; 3) HLDA in Figure 7; and 4) K 5 COMPLETE GRAPH in Figures 8. We have used gravity model as the traffic condition according to the population distribution.The routing algorithm assumed is a minimum cost routing.We have assumed that the link metric is inversely proportional to link capacity.

Use of Pythagorean Triple to Shutdown a Link
The value of n was varied as shown Table 3 to avoid network over load.
The results shown below in Figures 9 and 10, illustrate the validity of our method.We validate that by varying the link metric of links as per the values in the sequence {n, 2n, 3n, 4n, 5n}, it is only when the link metric reaches the values of all or some of the elements of the {3n, 4n, 5n} sequence that the links stops to carry traffic.Thus at this point the link is considered to be safe for shutdown as the link utilization goes down to zero.
The graph in Figure 11 shows that 50% of links in the Simple Network (in Figure 1), can be shutdown when the link metric reaches {3n} of the {3n, 4n, 5n} sequence.We further observe that ALL links can be shut down after the link metric reaches {4n, 5n} of the {3n, 4n, 5n} sequence.Therefore we can say that when the link metric of the Simple Network is uniform, 50% of the links can be shutdown as per {3n, 4n, 5n} sequence thus making our algorithm to be valid.Whereas when we varied the values of the link metric (see Figure 5) so that we achieved non uniform link metric scenario, our simula-     tion results shown in Figure 11 show that we can ONLY shutdown the link after the link metric reaches the values of {4n, 5n} of the our algorithm {3n, 4n, 5n}.Thus we can say that NO links in the Simple Network (in Figure 5), can be shutdown when the link metric reaches {3n} of the {3n, 4n, 5n} sequence.However, ALL links can be shutdown when the link metric reaches {4n, 5n} of the {3n, 4n, 5n} sequence.In Figure 12, below we show the simulation results when each and every link was each in turn configured and simulated for a link shutdown in COST239, HLDA and K 5 COMPLETE GRAPH topologies using our algorithm.The validity responsiveness of these network topologies to our link shutdown method is that COST239 responded favorable to the {3n, 4n, 5n} algorithm is 96%, HLDA is 100% and K 5 COMPLETE GRAPH is also 100%.These results demonstrate that our method is valid to perform a link shutdown.

Use Pythagorean Triple to Shutdown Two Links
To further validate our method we performed experiments on the Simple Network topology (Figure 1), using our algorithm to simultaneously shutdown two links in the network topology.The graphs shown in Figures 13- 15 demonstrate that we are ONLY able to simultaneously shutdown TWO links when we have a link metric combination of {4n, 5n} or {5n, 5n}.
We have further validated our method by performing similar experiments of simultaneously shutting down two links for COST239, HLDA and K 5 COMPLETE GRAPH topologies using our algorithm.The graphs shown in Figures 16 demonstrate the responsiveness of the TWO links shutdown of each topology.The illustration is that, for COST239, we are able to simultaneously shutdown TWO links only when we have a link metric combination of {4n, 4n}, {4n, 5n} and {5n, 5n}.Whereas in the case of the HLDA model, the responsiveness of our algorithm is 100% as we are able to simultaneously shutdown TWO links for all link metric combination.That is, we are able to simultaneously shutdown TWO links for all link metric combination of {3n, 3n}, {3n, 4n}, {3n, 5n} {4n, 4n}, {4n, 5n} and {5n, 5n}.
This similar results, is obtained for the K 5 COM-PLETE GRAPH, which we have used as our "Litmus Test" for our algorithm.The results show that the K 5 COMPLETE GRAPH's performance is 100% validation as we are able to simultaneously shutdown TWO links all the link metric combination of {3n, 3n}, {3n, 4n}, {3n, 5n} {4n, 4n}, {4n, 5n} and {5n, 5n}.But as for the case of the Simple Network topology, we are only able to simultaneously shutdown TWO links when we have a  link metric combination of {4n, 5n} or {5n, 5n}.topologies to the TWO link shutdown is that the Simple Network responds favorable to the {3n, 4n, 5n} algorithm by 33%, COST239 response is 50%, whereas HLDA and K 5 COMPLETE GRAPH is 100% for both of them.The results demonstrate that our method is valid to In Figure 17, we show the performance of the TWO links shutdown using our algorithm for the Simple Network, COST239, HLDA, and K 5 COMPLETE GRAPH topologies.The validity responsiveness of these network  perform a TWO links shutdown.

Performance Evaluation
When each and every link of the Simple Network model, in Figure 12, was each in turn configured and simulated for a link shutdown using our Pythagorean Triple Metric {3n, 4n, 5n} Sequence, 50% of the links validates our algorithm whilst the other 50% the sequence could only be shutdown when their link metric reached values of {4n, 5n}, the results which we can still consider as valid the fact that the {4n, 5n} is a subset of the Pythagorean Triple Metric {3n, 4n, 5n} Sequence.
The similar link shutdown experiments reveal that were performed for other topologies, as shown in figure 12, reveals that using our Pythagorean Triple Metric {3n, 4n, 5n} Sequence, the validity is 96% for COST239 model, 100% for HLDA model and 100% for K 5 COM-PLETE GRAPH.
To further validate our method we performed experiments by shutting down TWO links simutaneously for all the four topologies.The results shown in Figure 17, summaries our dicoveries that our method still remains valid even when we conduct and shutdown TWO links simultaneously.
To further explain the effect of the wrong combination of the link metric as what effect it has on the performance of the topology, we use Figures 18-20  Further the overall effect wrong link combination has on performance as shown in Figure 18 when we compare SN2 graph to that of graph SN1.The link combination between points {3n, 3n} to {4n, 5n}, shows that despite not achieving the TWO link shutdown simultaneously which is the objective for this link combination we are already experiencing the increase in the maximum load as early as the point {3n, 4n}.This increase in maximum load problem proves worst still when we consider comparing the performance of the SN1, as shown in Figure 23 with other topologies this can be said SN1 link combination is indeed poor.The K 5 COMPLETE GRAPH was used as a "Litmus Test" of our idea and which from the results we have seen that in both experiments, that is a link shutdown experiments and a TWO link shutdown experiments, the Pythagorean Triple Sequence performed 100% validation.
The additional explaination that we can give, that can hopefully provide as some scientific explanation of the experimental results our method is by using properties such as Node Degree, Clustering Coefficient and Expected Path Length.
When comparing performance of these topologies using properties such as Node Degree, Clustering Co- that topologies with minimum Expected Path Length, that the closer the Expexted Path Length is to UNITY the better the result is seen in response to the Pythagorean Triple Sequence.The K 5 COMPLETE GRAPH helps to explain this fact.When we compare the all the three properties Expected Path Length, Clustering Coefficient and Average Node Degree of K 5 COMPLETE GRAPH to COST239, HLDA and Simple Network, it is only the Expeted Path Length that the K 5 COMPLETE GRAPH model shows some superiority.This property easily helps to provide the explanation that the Pythagorean Triple Sequence, is valid to use as a link shutdown method and that the determinant phenomena in our method is minimum cost routing responsiveness.

Conclusions
We have presented a new link shutdown method for any given link desired to be shut down for routine maintenance.The key idea of our method is the introduction of the Pythagorean Triple Metric Sequence {3n, 4n, 5n} to use to configure a link that is desired to be shut down for routine maintenance.When a link is scheduled for routine maintenance the link can be configured to one of the metric in the sequence as the target metric before shut down.In our experiments, each link was configured to {n, 2n, 3n, 4n, 5n} sequence and we performed some simulations, and it was discovered that it is only when the link metric reached values of {3n, 4n, 5n} were able to perform a link shutdown.The simulations result validated our idea of using the Pythagorean Triple Metric Sequence {3n, 4n, 5n} as a link shut down method.In our experiments to performing a link shutdown, we discovered that using our Pythagorean Triple Metric {3n, 4n, 5n} Sequence, for the Simple Network model 50% of the links validates our algorithm whilst the other 50% the sequence could only be shutdown when their link metric reached values of {4n, 5n}, the results which we consider as valid the fact that the {4n, 5n} is a subset of the Pythagorean Triple Metric {3n, 4n, 5n} Sequence.The similar link shutdown experiments revealed that as for other topologies, the validity response is 96% for COST239, 100% for HLDA and 100% for K 5 COM-PLETE GRAPH.
To further validate our algorithm we performed experiments by shutting down TWO links simutaneously for all the four topologies.The validity response is 33% for the Simple Network model, COST239 response is 50%, whereas HLDA and K 5 COMPLETE GRAPH is 100% for both of them.
The simulation results have validated our idea to use the Pythagorean Triple Metric Sequence {3n, 4n, 5n} as a link shutdown method.We further established that our method has positive responsiveness to minimum cost routing, as we have illustrated that topologies with Expected Path Length near UNITY value tend to have good performance.
As for future work, we plan to investigate further the consequences of using other Pythagorean Triple Sequences other than the {3n, 4n, 5n}.

Figure 5 .
Figure 5. Simple network model-all link metrics NOT equal to n.

Figure 9 .Figure 10 .
Figure 9.The graph validates that we are able to shutdownsome links in the Simple Network (in Figure 1) and COST239; ALL links in HLDA and K 5 COMPLETE GRAPH after the link metric reaches {3n, 4n, 5n} of {n, 2n, 3n, 4n, 5n} sequence.

Figure 11 .Figure 12 .Figure 13 .
Figure 11.Performance comparison of the Simple Network Models, that is when the value of the link metric is uniform for all links and when it is not as shown in Figures 1 and 5.

Figure 14 .
Figure 14.The graphs illustrate that in the Simple Network (in Figure 1); we are able to shutdown only ONE link when we have link metric combination of {3n, 5n} and {4n, 4n}.

Figure 15 .
Figure15.The graphs illustrate that in the Simple Network (in Figure1); we are able to shutdown TWO links when we have a link metric combination of {4n, 5n} and {5n, 5n}.

Figure 17 .
Figure 17.Performance of shutting down TWO Links.

Figure 19 .
Figure 18.Effect on maximum load (for SN1 and SN2) by mere swapping the link metric combination of the Simple Network.

Figure 20 .
Figure 20.Simple Network (SN2) with two Forwarding Trees for transporting traffic whose destination is nodes 1 and 2-SN2(Link 1-2/2-1 = 5n, Link 1-4/4-1 = 4n).metricfor Link 1-4/4-1 is 4n, and for Link 1-2/2-1is 5n as shown in Figure20.The changes can even be seen in the changes of the forwarding trees for traffic destined for nodes 1 and 2. In Figure19, the forwarding tree indicates that the link between nodes 1 and 2 is still in use such that for traffic destined for node 1 from node 2 and vice versa continues to use link 1-2/2-1.Whilst Figure20illustrates that the link between 1 and 2 is shutdown such that the forwarding tree for traffic destined for nodes 1 from node 2 use node 4 as the next hop, whereas for the case of traffic destined for node 2 from node 1 use node 0 as the next hop.Figures21 and 22provide the forwarding matrices for both SN1 and SN2.Further the overall effect wrong link combination has on performance as shown in Figure18when we compare SN2 graph to that of graph SN1.The link combination between points {3n, 3n} to {4n, 5n}, shows that despite not achieving the TWO link shutdown simultaneously which is the objective for this link combination we are already experiencing the increase in the maximum load as early as the point {3n, 4n}.This increase in maximum load problem proves worst still when we consider comparing the performance of the SN1, as shown in Figure23with other topologies this can be said SN1 link combination is indeed poor.The K 5 COMPLETE GRAPH was used as a "Litmus Test" of our idea and which from the results we have seen that in both experiments, that is a link shutdown experiments and a TWO link shutdown experiments, the Pythagorean Triple Sequence performed 100% validation.The additional explaination that we can give, that can hopefully provide as some scientific explanation of the experimental results our method is by using properties such as Node Degree, Clustering Coefficient and Expected Path Length.When comparing performance of these topologies using properties such as Node Degree, Clustering Co-