3
An efficient algorithm for topology discovery of a blackbox communication network Sheng Zhong 1 Computer Science and Engineering Department, State University of New York at Buffalo, 201 Bell Hall, Amherst NY 14260, USA Abstract A blackbox network is a network with an unknown topology that can be used for communications. For example, we can use the Internet for communications but do not have complete information about its topology. In this paper, we model topology discovery of a blackbox network as a graph-theoretic problem and present an efficient algorithm for solving this problem. We give a formal proof of the correctness and analyze the efficiency. Ó 2006 Elsevier Inc. All rights reserved. Keywords: Topology; Algorithm; Blackbox; Communication network 1. Introduction Nowadays, we have access to many communication networks. We can use them to send and receive mes- sages; however, we may not have much information about them. For example, the Internet is used by a billion of people [1], but we do not know its complete topology (though partial information like AS graphs [2] are available). In this paper, we study the following problem: given a communication network, how can we discover its topology by using it to send and receive messages? We model this problem as a graph-theoretic problem and present an efficient algorithm. 1.1. Related work and our contributions Topology discovery has been studied in various settings. A popular technique is to use the SNMP protocol [4,3]. Siamwalla et al. [5] study the case in which the SNMP protocol is not globally available. However, their result still depends on specific communication protocols like the ICMP protocol. 0096-3003/$ - see front matter Ó 2006 Elsevier Inc. All rights reserved. doi:10.1016/j.amc.2006.07.122 E-mail address: [email protected]ffalo.edu 1 Sheng Zhong was supported in part by NSF CNS-0524030. Applied Mathematics and Computation 186 (2007) 506–508 www.elsevier.com/locate/amc

An efficient algorithm for topology discovery of a blackbox communication network

Embed Size (px)

Citation preview

Applied Mathematics and Computation 186 (2007) 506–508

www.elsevier.com/locate/amc

An efficient algorithm for topology discoveryof a blackbox communication network

Sheng Zhong 1

Computer Science and Engineering Department, State University of New York at Buffalo,

201 Bell Hall, Amherst NY 14260, USA

Abstract

A blackbox network is a network with an unknown topology that can be used for communications. For example, wecan use the Internet for communications but do not have complete information about its topology. In this paper, we modeltopology discovery of a blackbox network as a graph-theoretic problem and present an efficient algorithm for solving thisproblem. We give a formal proof of the correctness and analyze the efficiency.� 2006 Elsevier Inc. All rights reserved.

Keywords: Topology; Algorithm; Blackbox; Communication network

1. Introduction

Nowadays, we have access to many communication networks. We can use them to send and receive mes-sages; however, we may not have much information about them. For example, the Internet is used by a billionof people [1], but we do not know its complete topology (though partial information like AS graphs [2] areavailable).

In this paper, we study the following problem: given a communication network, how can we discover itstopology by using it to send and receive messages? We model this problem as a graph-theoretic problemand present an efficient algorithm.

1.1. Related work and our contributions

Topology discovery has been studied in various settings. A popular technique is to use the SNMP protocol[4,3]. Siamwalla et al. [5] study the case in which the SNMP protocol is not globally available. However, theirresult still depends on specific communication protocols like the ICMP protocol.

0096-3003/$ - see front matter � 2006 Elsevier Inc. All rights reserved.

doi:10.1016/j.amc.2006.07.122

E-mail address: [email protected] Sheng Zhong was supported in part by NSF CNS-0524030.

S. Zhong / Applied Mathematics and Computation 186 (2007) 506–508 507

In this paper, we treat the network by a blackbox; we assume no knowledge of the internal operations of thenetwork. All we can use in the topology discovery is sending and receiving messages through the network.Therefore, our solution does not depend on any specific communication protocol. In addition to being pro-tocol independent, our algorithm is also highly efficient. We provide a formal analysis of its correctness.

2. A formal model of the problem

Formally, a communication network is a connected weighted undirected graph (V,E,D), where V is a finiteset of vertices, E � V · V is the set of edges, and Dð�Þ : E! Rþ is the weight function. For e 2 E, D(e) standsfor the latency of transmitting a bit through edge e.

Based on the function D(Æ), we can define an extended latency function Dþð�Þ : V � V ! Rþ. For u, v 2 V,D+(u,v) stands for the latency of transmitting a bit from u to v. For simplicity, we ignore the latency at verticesand assume messages are always transmitted through the shortest path. Therefore,

Dþðu; vÞ ¼ Dðu;w1Þ þ Dðw1;w2Þ þ � � � þ Dðw‘; vÞ;

where uw1w2 . . .w‘v is the shortest path from u to v. Moreover, we assume that any two different paths do nothappen to have exactly the same latency. That is, for all (u,v) 5 (u 0,v 0), D+(u,v) 5 D+(u,v).

Our topology discovery problem of blackbox network is that, given V and D+(Æ), we ask whether there is anefficient algorithm for computing E.

3. An efficient algorithm

We summarize our algorithm in Fig. 1.

4. Algorithm analysis

Theorem 1 (correctness). Suppose that all edges in the network are used for communications. Then at the end of

the algorithm, we have E0 = E.

Proof. Clearly E0 � E. So all we need to show is that E � E0 at the end of the algorithm. Equivalently, for alle 2 E, we need to show that e 2 E0 at the end of the algorithm.

Fig. 1. Algorithm for topology discovery of blackbox network.

508 S. Zhong / Applied Mathematics and Computation 186 (2007) 506–508

Since e is used for communications, it must be on the shortest path between a pair of vertices (otherwise e

would never be used because messages are always transmitted on shortest paths). Suppose that e is on theshortest path between v1 and v2. Since the outside ‘‘for’’ loop iterates over all r 2 V, we can consider theiteration in which r = v1.

Let the two vertices of e be u1 and u2. We distinguish two cases:

• u1 = r or u2 = r. Without loss of generality, we only consider the case of u1 = r.At the beginning of this iter-ation, u2 is in V0 because V0 = V � {r}; at the end of this iteration, u2 is not in V0 because V0 = /; thus u2

must have been deleted from V0 in the middle of this iteration. Specifically, u2 must have been deleted in aniteration of the ‘‘while’’ loop.In this iteration of the ‘‘while’’ loop, we have v0 = u2. Since there is no othervertices on the shortest path between r (=u1) and v0 (=u2), for all u0 2 V � (V0 [ {r}), D+(v0,r) 5

D+(v0,u0) + D+(u0, r). Consequently, at the end of this iteration, t = 0 and thus (u1,u2) and (u2,u1) areadded to E0.

• u1 5 r and u2 5 r.At the beginning of this iteration, both u1 and u2 are in V0 because V0 = V � {r}; at theend of this iteration, both of them are not in V0 because V0 = /; thus they must have been deleted from V0

in the middle of this iteration. Specifically, they must have been deleted in two iterations of the ‘‘while’’loop, respectively, because each iteration of the ‘‘while’’ loop only deletes one vertex from V0.Without lossof generality, assume that u1 is deleted from V0 earlier than u2. Now we consider the iteration of the ‘‘while’’loop in which u2 is deleted from V0. In this iteration, clearly v0 = u2. Since u1 is deleted from V0 earlier thanu2 and since u1 5 r, we have u1 2 V � (V0 [ {r}) in this iteration. Therefore, consider the inside ‘‘for’’ loopfor the iteration of u0 = u1: we have

Dþðv0; rÞ ¼ Dþðu2; v1Þ ¼ Dþðu2; u1Þ þ Dþðu1; v1Þ ¼ Dþðv0; u0Þ þ Dþðu0; rÞ:

(The second identity holds due to following facts: Since u1 is deleted from V0 earlier than u2, we must haveD+(u1, r) < D+(u2, r), which is equivalent to D+(u1,v1) < D+(u2,v1). So, on the shortest path from v1 to v2, u1

lies closer to v1 than u2 does. The part of this shortest path between v1 and u1 is exactly the shortest pathbetween v1 and u1, because any part of a shortest path is also a shortest path. Similarly, the part of this short-est path between u1 and u2 is exactly the shortest path between u1 and u2.) Consequently, when we finish thisinside ‘‘for’’ loop we have t = 1. Furthermore, consider other iterations of this inside ‘‘for’’ loop in whichD+(v0, r) = D+(v0,u0) + D+(u0, r): such u0 must be on the shortest path between r (=v1) and v0 (=u2). Sinceu1 is the neighbor of u2 on this shortest path, for all such u0 we have D+(u0, r) < D+(u1, r). So at the end of thisinside ‘‘for’’ loop, uI

0 ¼ u1. This implies that (u1,u2) and (u2,u1) are added to E0. h

Theorem 2. The time complexity of the algorithm is O(jVj3).

References

[1] Internet World Stats. Available from: <http://www.internetworldstats.com/top20.htm>.[2] AS Internet Graph. Available from: <http://www.caida.org/analysis/topology/as_core_network/AS_Network.xml>.[3] Yigal Bejerano, Yuri Breitbart, Minos Garofalakis, Rajeev Rastogi, Physical Topology Discovery for Large Multi-Subnet Networks,

in: Proceedings of IEEE INFOCOM 2003, 2003.[4] Y. Breitbart, M. Garofalakis, C. Martin, R. Rastogi, S. Seshadri, A. Silberschatz, Topology Discovery in Heterogeneous IP Networks,

in: Proceedings of IEEE INFOCOM2000, Tel Aviv, Israel, March 2000.[5] R. Siamwalla, R. Sharma, S. Keshav, Discovering Internet Topology, July 1998.