Phyical Topology Dicovery for Large Muli-Subne Nework Yigal Bejerano, Yuri Breibar, Mino Garofalaki, Rajeev Raogi Bell Lab, Lucen Technologie 600 Mounain Ave., Murray Hill, NJ 07974. {bej,mino,raogi}@reearch.bell-lab.com Abrac Knowledge of he up-o-dae phyical (i.e., layer-2) opology of an Eherne nework i crucial o a number of criical nework managemen ak, including reacive and proacive reource managemen, even correlaion, and roo-caue analyi. Given he dynamic naure of oday IP nework, keeping rack of opology informaion manually i a dauning (if no impoible) ak. Thu, effecive algorihm for auomaically dicovering phyical nework opology are neceary. In hi paper, we propoe he fir complee algorihmic oluion for dicovering he phyical opology of a large, heerogeneou Eherne nework compriing muliple ubne a well a (poibly) dumb or uncooperaive nework elemen. Our algorihm rely on andard SNMP MIB informaion ha i widely uppored in modern IP nework and require no modificaion o he operaing yem ofware running on elemen or ho. Furhermore, we formally demonrae ha our oluion i complee for he given MIB daa; ha i, if he MIB informaion i ufficien o uniquely idenify he nework opology hen our algorihm i guaraneed o recover i. To he be of our knowledge, our i he fir oluion o provide uch a rong compleene guaranee. Index Term Layer-2 Topology Dicovery, Graph Theory, Eherne LAN, Subne, SNMP MIB, Swiche, Hub. I. INTRODUCTION Phyical nework opology refer o he characerizaion of he phyical conneciviy relaionhip ha exi among eniie in a communicaion nework. Dicovering he phyical layou and inerconnecion of nework elemen i a prerequiie o many criical nework managemen ak, including reacive and proacive reource managemen, erver iing, even correlaion, and roo-caue analyi. For example, conider a faul monioring and analyi applicaion running on a cenral IP nework managemen plaform. Typically, a ingle faul in he nework will caue a flood of alarm ignal emanaing from differen inerrelaed nework elemen. Knowledge of elemen inerconnecion i eenial o filer ou econdary alarm ignal and correlae primary alarm o pinpoin he original ource of failure in he nework [], [2]. Furhermore, a full phyical map of he nework enable a proacive analyi of he impac of link and device failure. Depie he criical role of phyical opology informaion in enhancing he manageabiliy of modern IP nework, obaining uch informaion i a very difficul ak. The majoriy of commercial nework-managemen ool feaure an IP mapping funcionaliy for auomaically dicovering rouer and ubne and generaing a nework layer (i.e., ISO layer-3) opology howing he rouer-o-rouer inerconnecion and rouer Curren affiliaion Dep. of Compuer Science, Ken Sae Univeriy, Ken, OH 44242. breibar@c.ken.edu inerface-o-ubne relaionhip. Building a layer-3 opology i relaively eay becaue rouer mu be explicily aware of heir neighbor in order o perform heir baic funcion. Therefore, andard rouing informaion i adequae o capure and repreen layer-3 conneciviy. Unforunaely, layer-3 opology cover only a mall fracion of he inerrelaionhip in an IP nework, ince i fail o capure he complex inerconnecion of layer-2 nework elemen (wiche, bridge, and hub) ha comprie each Eherne LAN. Hardware provider, like Cico and Inel, have deigned heir own proprieary proocol for dicovering phyical inerconnecion bu hee ool are of no ue in a heerogeneou, muli-vendor environmen. More recenly, he IETF ha acknowledged he imporance of hi problem by deignaing a phyical opology SNMP Managemen Informaion Bae (MIB) [3], bu he propoal merely reerve a porion of he MIB pace wihou defining any proocol or algorihm for obaining he opology informaion. Clearly, a more wiche, bridge, and hub are deployed o provide more bandwidh hrough ubne microegmenaion, he porion of he nework infrarucure ha are ranparen o curren nework-managemen ool will coninue o grow. Under uch condiion, i i obviou ha he nework manager abiliy o roublehoo end-o-end conneciviy or ae he poenial impac of link or device failure in wiched nework will be everely impaired. Developing effecive algorihmic oluion for auomaically dicovering he up-o-dae phyical opology of a large, heerogeneou Eherne nework poe everal difficul challenge. More pecifically, here are hree fundamenal ource of complexiy for phyical opology dicovery. ) Inheren Tranparency of Layer-2 Hardware. Layer-2 nework elemen (wiche, bridge, and hub) are compleely ranparen o endpoin and layer-3 hardware (rouer) in he nework. Swiche hemelve only communicae wih heir neighbor in he limied exchange involved in he panning ree proocol [4], and he only ae mainained i in heir Addre Forwarding Table (AFT), which are ued o direc incoming packe o he appropriae oupu por. Forunaely, mo wiche/bridge (ee (3) below) make hi informaion available hrough a andard SNMP MIB [5], [6]. 2) Muli-Subne Organizaion. Modern wiched nework uually comprie muliple ubne wih elemen in he ame ubne communicaing direcly (i.e., wihou involving rouer) wherea communicaion beween elemen in differen ubne mu ravere hrough he 0-7803-7753-2/03/$7.00 (C) 2003 IEEE IEEE INFOCOM 2003
rouer for he repecive ubne. Furhermore, elemen of differen ubne are ofen direcly conneced o each oher. Thi obviouly inroduce eriou problem for phyical opology dicovery, ince i mean ha an elemen can be compleely ranparen o i direc phyical neighbor(). 3) Tranparency of Dumb or Uncooperaive Elemen. Beide SNMP-enabled bridge and wiche ha are able o provide acce o heir AFT, a wiched nework can alo deploy dumb elemen like hub o inerconnec wiche wih oher wiche or ho. Hub do no paricipae in wiching proocol and, hu, are eenially ranparen o wiche and bridge in he nework. Similarly, he nework may conain wiche from which no addre-forwarding informaion can be obained eiher becaue hey do no peak SNMP or becaue SNMP acce o he wich i diabled. Clearly, inferring he phyical inerconnecion of hub and uncooperaive wiche baed on he limied AFT informaion obained from oher elemen poe a non-rivial algorihmic challenge. Relaed Work. SNMP-baed algorihm for auomaically dicovering nework layer (i.e., layer-3) opology are feaured in many common nework managemen ool, uch a HP OpenView (www.openview.hp.com) and IBM Tivoli (www.ivoli.com). Recognizing he imporance of layer-2 opology, a number of vendor have recenly developed proprieary ool and proocol for dicovering phyical nework conneciviy. Example of uch yem include Cico Dicovery Proocol (www.cico.com) and Bay Nework Opiviy Enerprie (www.baynework.com). Such ool, however, are ypically baed on vendor-pecific exenion o SNMP MIB and are no ueful on a heerogeneou nework compriing elemen from muliple vendor. Peregrine Infraool ofware (www.peregrine.com), Riverof NMOS produc (www.riverof.com), and Micromue Necool/Preciion applicaion (www.micromue.com) claim o uppor layer-2 opology dicovery, bu hee ool are baed on proprieary echnology o which we do no have acce. In our recen work [8], we have propoed an algorihm ha relie olely on andard AFT informaion colleced in SNMP MIB o dicover he phyical opology of heerogeneou nework compriing wiche and bridge organized in muliple ubne. Unforunaely, our algorihm aume ha AFT informaion i available from every node in he underlying nework and, hu, canno cope wih hub or uncooperaive wiche. In a follow-up paper, Lowekamp e al. [7] ugge echnique for inferring nework-elemen conneciviy uing incomplee AFT informaion and alo dicued how o handle dumb/uncooperaive elemen; however, heir algorihm i deigned o work only in he much impler cae of a ingle ubne and can eaily be hown o fail when muliple ubne are preen. Thu, here i really no earlier work on phyical opology dicovery ha addree all hree key reearch challenge oulined earlier in hi ecion. Our Conribuion. In hi paper, we propoe a novel, Even hough properly-deigned nework would no ue hub o inerconnec muliple wiche, hi i a cenario ha can eaily arie in pracice [7]. pracical algorihmic oluion for dicovering he phyical opology of large, heerogeneou IP nework compriing muliple ubne a well a (poibly) dumb or uncooperaive elemen; hu, our algorihm i eenially he fir o addre he he phyical opology dicovery problem in i full generaliy. Similar o our earlier work [8], he pracicaliy of he oluion propoed in hi paper em from he fac ha hey rely olely on andard informaion rouinely colleced in he SNMP MIB [5], [6] of elemen and hey require no modificaion o he operaing yem ofware running on elemen or ho. Unlike [8], however, our algorihm i deigned o infer conneciviy informaion in he preence of hub and/or wiche no peaking SNMP; in fac, i can be hown ha he algorihm propoed here compleely ubume he oluion propoed in our earlier paper. Abracly, our opology-dicovery algorihm iniially employ he AFT informaion upplied by SNMP-enabled elemen o produce a parial, coare view of he underlying nework opology a a collecion of keleon pah. Our keleon-pah mechanim i a generalizaion of radiional pah ha baically capure whaever parial knowledge we have accumulaed on he acual nework opology. Our algorihm hen ener an ieraive, keleon-pah refinemen proce during which conrain inferred from he overall keleonpah collecion are exploied o refine he opology informaion in individual keleon pah. 2 Finally, once all keleon pah have been reolved ino complee arrangemen of nework elemen, our algorihm iche he pah ogeher o infer he underlying nework opology including he connecion of inviible hub and uncooperaive wiche. I i well known ha even complee AFT informaion from all nework node i ofen inufficien o uniquely idenify he underlying phyical nework opology; ee, e.g., [8] for example of differen nework opologie generaing idenical collecion of AFT. We are able, however, o demonrae a rong compleene propery for he oluion propoed in hi paper. More pecifically, we formally prove ha if he AFT informaion i ufficienc o uniquely idenify he nework opology hen our algorihm i guaraneed o recover i. To he be of our knowledge, our i he fir SNMP-baed opologydicovery algorihm o provide uch a rong compleene guaranee. Due o pace conrain, ome heoreical reul in hi paper are preened wihou a complee proof; he deail can be found in he full paper [9]. Our algorihm i currenly under implemenaion for Lucen NeInvenory opology-dicovery ool. II. DEFINITIONS AND SYSTEM MODEL In hi ecion, we preen neceary background informaion and he yem model ha we adop for he phyical opology dicovery problem. We refer o he domain over which opology dicovery i o be performed a a wiched domain, which eenially comprie a maximal e S of wiche uch ha here i a pah beween every pair of wiche involving only wiche in S. (Swiche are eenially bridge wih many por, o he erm wich and bridge can be 2 To he be of our knowledge, exiing conrain-olving ool canno handle or olve he ype of conrain conidered here in order o idenify he underlying nework opology. 0-7803-7753-2/03/$7.00 (C) 2003 IEEE IEEE INFOCOM 2003
ued inerchangeably; we will primarily ue wich in he remainder of hi paper.) More pecifically, we model he arge wiched domain a an undireced ree G = (V,E), where each node in V repreen a nework elemen and each edge in E repreen a phyical connecion beween wo elemen por. The e V comprie boh labeled and unlabeled node. Labeled node baically repreen wiche, rouer, and ho ha have a unique idenifying MAC addre and can provide AFT informaion hrough SNMP querie o he appropriae par of heir MIB; unlabeled node, on he oher hand, repreen boh dumb hub device or wiching elemen wih no SNMP uppor 3. To implify he dicuion, we refer o labeled and unlabeled node imply a wiche and hub (repecively) in he remainder of he paper. Noe ha he graph G eenially capure he (ree) opology of unique acive forwarding pah for elemen wihin a wiched domain a deermined by he panning ree proocol [4]. Our opology dicovery algorihm i baed on uing he MAC addree learned hrough backward learning on por ha are par of he wiched-domain panning ree (and ored a he por AFT of labeled nework node). We ue he noaion (v, k) o idenify he k h por of node v V, and F v,k o denoe he e AFT enrie a por (v, k) (i.e., he e of MAC addree ha have been een a ource addree on frame received a (v, k)). (To implify noaion, we will ofen omi he parenhee and comma from our por-id noaion when referring o a pecific por of v, e.g., v, v2, and o on.) Since G i a ree, we obviouly have a unique pah in G beween every pair of node, V, and we ue he ymbol P o idenify he e of por-id along he pah from o (alo referred o a he pah ). We alo ue he noaion v(u) o denoe he por of node v ha (he addre of) node u i found off of (i.e., he por of v leading o u in G). Table I ummarize he key noaion ued hroughou he paper wih a brief decripion of i emanic. Addiional noaion will be inroduced when neceary. Symbol Semanic G =(V,E) Swiched-domain nework graph (ree) (v, k) k h por of node v V (v, v2,...) F v,k AFT enrie a (i.e., node reachable from) (v, k) v(u) Por of node v leading o node u in G N v Subne in G conaining v in heir panning ubree P Se of wich por along he pah from o in G Q Skeleon pah from o in G Ix,z Se of por a he inerecion of P and P x,z Q x,z Projecion of pah Q x,z ono pah Q TABLE I NOTATION. Every labeled node in our wiched domain G i aociaed wih one or more ubne. A ubne i a maximal e of nework elemen N V uch ha any wo elemen in N can communicae direcly wih each oher wihou involving a rouer, while communicaion acro differen ubne mu go hrough a rouer. Thu, a packe from node o node in he ame ubne N will ravere exacly along he e of 3 Noe ha end-ho and rouer in he nework are repreened a leaf node in G, and are pracically indiinguihable for he purpoe of layer-2 opology dicovery. por P in G. Typically, every nework elemen wihin a wiched domain i idenified wih a ingle IP addre and a ubne mak ha define he IP addre pace correponding o he elemen ubne. For example, IP addre 35.04.46. along wih mak 255.255.255.0 idenifie a ubne of nework elemen wih IP addree of he form 35.04.46.x, where x i any ineger beween and 254. LeN be he collecion of ubne of he graph G. Every ubne N N define a connecing ubree in G; ha i, a ree ubgraph of G ha i eenially panned by he node in ubne N, and conain all node and edge of G ha lie on pah beween any pair of node in N. LeN v N denoe he collecion of ubne conaining node v V in heir connecing ubree; clearly, he AFT a he por of node v conain node-reachabiliy informaion only for he ubne in N v. We ay ha he AFT F v,k of v i complee if, for all N N v, F v,k conain he MAC addree of all node in N ha are reachable by por (v, k). Similar o [8], our phyical opology dicovery algorihm rely on he aumpion ha he AFT informaion obained from labeled node in he nework i complee. Thi compleene requiremen can be enforced uing echnique imilar o hoe in [8] (e.g., uing poofed ICMP-echo packe o force wich communicaion). A econd poibiliy (alo propoed in [8]) i o relax hi compleene requiremen and allow our cheme o make approximae deciion while working wih only parial AFT informaion. III. OVERVIEW OF OUR TOPOLOGY DISCOVERY ALGORITHM The goal of our propoed algorihm i o dicover he phyical opology of he underlying muli-ubne nework repreened by he wiched domain graph G = (V,E) a accuraely a poible uing only he AFT informaion provided by labeled node in G. Thu, our opology-dicovery algorihm ue he AFT informaion provided o () dicover he direc phyical connecion beween labeled elemen (i.e., wich) por, and (2) infer he exience of unlabeled node (i.e., hub) in G a well a he e of wich por ha are conneced o each hub. A key concep in our opology dicovery algorihm i he concep of keleon pah defined formally below. Definiion 3. A keleon pah from node o node in G i defined a a equence Q =<U,U 2,...,U K > of non-empy por-id e U,...,U K forming a pariion of P (U i U j = φ, i U i = P ) uch ha () Each U j conain he por-id of a coniguou egmen of he pah; and, (2) For each i<j, all he por-id in U i precede hoe in U j on he pah. Inuiively, an keleon pah decribe ome parial knowledge (i.e., por ordering informaion) ha we have abou he acual pah in he nework graph G. Thi parial knowledge baically decribe ube of por U j ha we know o be coniguou in he pah from o in G, awell a he ordering of hee ube a we ravere G from o. Thu, he coare keleon pah comprie a ingle large ube U i beween node and wih eenially no porordering informaion, wherea in he fine keleon pah each U i i a ingleon (a ingle por-id) and he complee ordering of he por on he pah i pecified. 0-7803-7753-2/03/$7.00 (C) 2003 IEEE IEEE INFOCOM 2003
Fig.. v 2 e u a b w c x d y 2 2 2 2 2 2 f 2 m c - wich - hub n 3 The e of iniial keleon-pah Example nework graph and i decompoiion in keleon pah. Noe ha deermining he e of wich por-id o be included in an keleon pah uing AFT informaion i fairly raighforward when and belong o he ame ubne. The key obervaion i ha a node v i on he pah from o in G if and only if here are wo diinc por v() and v() of v uch ha v ee node () a por v() (rep., v()) (i.e., F v,v() and F v,v() ). Alo noe ha, ince our keleon-pah definiion aume ha he pah i oriened from o, por v() will alway precede por v() on he pah; hu, we will alway denoe v() before v() in he keleon pah Q (even when hee por are in he ame U i ube). Obviouly, hi imple por-ordering rule for each node i eaily obained from he AFT informaion a v. Example 3. Conider he nework depiced in Figure, where he number near he link repreen he por-id. Node u, v, w, x, y are in one ubne, node m, n in anoher ubne, and every one of he node a, b, c, d, e, f define a eparae ubne (wih only one node). One poible keleon pah from node u o node x i Q u,x = < {u}, {a,a2,b,b2}, {w}, {w2}, {c}, {c2}, {x} >. Clearly, hi keleon pah only provide parial informaion on he he opology of he rue u x pah in G. More pecifically, Q u,x pecifie ha he por x and c2 are direcly conneced or hey are conneced o he ame hub. Similarly, Q u,x alo indicae ha por w i conneced (eiher direcly or hrough a hub) o one of a2 or b2. (Noe ha, ince por a (b) precede a2 (rep., b2) on he u x pah and w ucceed node a and b in Q u,x, w can only be conneced o a2 or b2.) A a high level, our propoed opology-dicovery algorihm (depiced in Figure 2) repreen he underlying nework by a collecion of keleon pah, Q, beween pair of node belonging o he ame ubne, and proceed by ieraively refining Q o provide more accurae opology informaion for G. The iniial inpu o our algorihm i he collecion of ubne N in he nework G a well a he AFT informaion from all labeled node (wiche) in G. Aafir ep, our algorihm compue an iniial collecion of keleon pah Q ha, eenially, capure he given AFT informaion by idenifying he e of por-id beween eleced pair of node ha cover all pah in G (procedure INITSKELETONPATHS). Our algorihm hen ener an ieraive keleon-pah refinemen proce, ha rie o deermine a complee por order for each keleon pah in Q. The key idea here i o ue he aggregae informaion in Q o furher divide he inernal U i ube of each keleon-pah Q Q ino maller ube, unil eiher a complee order i obained or no furher refinemen i poible. Thi pah-refinemen ak for keleon pah Q i accomplihed wih he help of wo key procedure. Fir, procedure COMPUTECONSTRAINTS exploi he informaion in Q (more pecifically, he inerecion of Q wih oher keleon pah in Q) o obain a collecion S of addiional conrain (ermed pah conrain) on he por order in Q. Second, procedure REFINEPATH ue he dicovered e of pah conrain S o furher refine Q. When no furher keleon-pah refinemen are poible, our algorihm invoke a FINDCONNECTIONS procedure ha ue he refined pah o oupu he wich and hub connecion dicovered in G. Fig. 2. procedure TOPOLOGYDISCOVERY(N,AFT). Q = INITSKELETONPATHS(N,AFT) 2. do 3. done = rue 4. for each Q Qdo 5. P = U k Q U k 6. S =COMPUTECONSTRAINTS(Q, Q) 7. Q new =REFINEPATH(P, S) 8. if (Q new Q ) hen 9. replace Q by Q new in Q 0. done = fale. endif 2. endfor 3. while (no done) 4. FINDCONNECTIONS(Q) Our Topology Dicovery Algorihm. One of he main challenge in our work lie in deermining he mo complee e of pah conrain for each keleon pah Q, o ha we maximize he amoun of por-ordering knowledge incorporaed in Q during fuure ieraive-refinemen ep. A we how laer in hi paper, uch pah conrain can reul from raher complicaed inerecion paern of everal keleon pah in Q. Thu, i i very hard o direcly obain he full e of pah conrain ha would allow u o refine an iniial Q keleon pah ino a complee por order in a ingle ep. However, even parial-order informaion obained hrough a ube of he conrain impoed on Q can be ued o furher refine oher keleon pah in Q during fuure ieraion. Thu, our opology-dicovery algorihm may require everal ieraive-refinemen ep, during which keleon pah in Q are furher refined from ieraion o ieraion, unil he algorihm evenually converge o he maximal poible porordering informaion for each pah in G for he given e of inpu. We dicu he key algorihmic componen of our opology-dicovery algorihm in deail in he ecion ha follow. IV. THE INITIAL SKELETON-PATH COLLECTION The fir ak faced by our algorihm i o ranlae he inpu AFT and ubne informaion ino an iniial collecion of keleon pah. The key obervaion here (already dicued in Secion III) i ha, for node and belonging o he ame ubne, we can eaily ue he AFT informaion o deermine he e of wich por P on he pah in G if, for a node v,, here exi wo diinc por v() v() uch ha F v,v() and F v,v() hen v(),v() P ; oherwie, v canno be on he pah in G. (Of coure, he ource and deinaion por on node and can alo be imply deermined from heir AFT informaion.) 0-7803-7753-2/03/$7.00 (C) 2003 IEEE IEEE INFOCOM 2003
Thu, a imple oluion o he iniial keleon-pah conrucion problem i o build a keleon pah Q for each pair, of diinc node belonging o he ame ubne, for each of he underlying ubne. The problem wih uch a impliic approach i ha i reul in very ignifican overlap beween he reuling pah in Q; hi, in urn, implie ha our algorihm may need o compue he por order for he ame pah egmen everal ime, reuling in ignifican compuaion-ime overhead. Inead, our oluion relie on conrucing a concie collecion of keleon pah for each ubne N uch ha pah beween node of N in Q (a) are no conained in oher pah beween N node, and (b) canno be broken ino maller pah beween N node. Inuiively, he reuling keleon pah for ubne N minimally cover all node of N uing he malle poible egmen beween uch node. Our INITSKELETONPATHS procedure (depiced in Figure 3) build hi concie collecion by imply conidering, for each ubne N, all poible pah wih, N and adding an iniial Q keleon pah o Q only if he collecion of inermediae node on he pah (denoed by X in Figure 3) doe no conain anoher N node. A an example, Figure depic he ix iniial keleon pah in Q for he nework in Example 3.. Fig. 3. procedure INITSKELETONPATHS(N,AFT). Q = 2. for each N N do 3. for each {, } N do 4. X = {v v V {, } v() v(), uch ha F v,v() F v,v() } 5. if (X N = φ) hen 6. Q =< {()}, {v(),v() v X}, {()} > 7. Q = Q {Q }. 8. endif 9. endfor 0. endfor. reurn(q) The INITSKELETONPATHS Procedure. V. COMPUTING SKELETON-PATH CONSTRAINTS In hi ecion, we addre he problem of dicovering a collecion of conrain ha will allow our algorihm o refine he por order for a given keleon pah Q Q. Abracly, hee conrain follow (eiher explicily or implicily) from he inerecion of Q wih oher keleon pah in he Q collecion. We begin by preening ome ueful definiion and noaional convenion. A. Skeleon-Pah Conrain Definiion and Noaion We ay ha a keleon pah Q x,z Q inerec Q if P Px,z φ. Our keleon-pah collecion Q can be pariioned ino wo ube Q = Q I Q NI, where Q I (Q NI ) conain all he pah in Q ha inerec (rep., do no inerec) pah Q. (Noe ha, rivially, Q Q I.) For any keleon pah Q x,z Q I, leix,z denoe he collecion of por-id in he inerecion of he and x z keleon pah, i.e., Ix,z = P Px,z. To implify he expoiion, we aume ha all pah Q x,z Q I have he ame orienaion a Q ; ha i, any por in heir inerecion Ix,z face eiher and x, or and z (he aring and ending poin of he pah are on he ame ide of he nework graph). Of coure, eiher Q x,z or Q z,x mu have he ame orienaion a Q, and hi can be eaily reolved from he AFT of por in Ix,z. Conrain on he por order in Q can reul from he projecion of anoher pah Q x,z Q I ono Q, which i formally defined below. Definiion 5. The projecion of Q x,z Q I ono Q, denoed by Q x,z, i he keleon pah ha reul by aking he inerecion of every ube U k Q x,z wih he e P and omiing empy e; ha i, Q x,z =< U P,...,U K P U i Q x,z and U i P φ>. Clearly, any pah projecion ono Q i eenially a valid keleon repreenaion for a egmen of he rue pah in G and, a uch, can enforce addiional conrain on he por order in Q. Such conrain can be broadly claified ino wo ype () Coniguiy conrain forcing a given ube S P of por-id o define a coniguou egmen of he pah (e.g., any S = U i P φ in Definiion 5.); and, (2) Order conrain forcing all por-id in a ube S P o precede hoe of anoher ube S 2 P (e.g., S = U i P and S 2 = U i+ P in Definiion 5.). We give a generic definiion of pah conrain ha capure boh coniguiy and order conrain. Definiion 5.2 A pah conrain S i =< Si,S2 i > for keleon pah Q i an ordered pair of wo dijoin ube of por-id Si,S2 i P uch ha () Si, S2 i, and S i S2 i define coniguou egmen of por on he pah, and (2) he por in Si precede hoe in S2 i in he pah from o in G. Noe ha a imple coniguiy conrain S can be imply repreened a <S,φ>. B. Compuing Skeleon Pah Conrain We now urn o our algorihm for compuing a collecion of pah conrain S on he keleon pah Q uing oher pah in Q (i.e., procedure COMPUTECONSTRAINTS in Figure 2). We fir conider he dicovery of explici pah conrain, i.e., conrain ha can be inferred direcly from he AFT informaion and he projecion of oher keleon pah in Q I ono Q. We hen dicu he more uble cae of implici pah conrain. Explici Pah Conrain. Conider any wich v on he Q keleon pah. Uing he AFT informaion from v we can readily define he pah conrain < {v()}, {v()} >, baically aing ha he wo por of v on he pah from o mu be coniguou and he por facing mu precede ha facing. We add hee conrain o S for all node v, on he Q pah. Furher, conider any (inerecing) keleon pah Q x,z Q I and i projecion Q x,z ono Q. A menioned earlier, uch a projecion define a valid keleon repreenaion for a egmen of he rue pah in G and, hu, define addiional coniguiy and order conrain on Q. More pecifically, for all projecion Q x,z = {U,U 2,,U K }, we augmen S by adding he pah conrain <U i,u i+ > for all i =,...,K (where, we aume U K+ = φ o cover he cae K =). Implici Pah Conrain. Abracly, implici pah conrain on Q are obained hrough he inerecion of wo 0-7803-7753-2/03/$7.00 (C) 2003 IEEE IEEE INFOCOM 2003
or more pah wih Q a well a oher par of he nework graph G. More pecifically, conider he ubgraph of G ha i obained by removing all por in P from our nework. Since G i a ree, i i eay o ee ha hi ubgraph i eenially a collecion of ubree T of G uch ha each T T i aached o a ingle connecion poin (i.e., wich or hub) on he Q keleon pah. Implici pah conrain reul from he inerecion of pah in Q I wih a given ubree T T aking advanage of he above ingle-connecionpoin obervaion. Of coure, a problem here i ha our algorihm need o employ ome knowledge abou he e of por-id wihin differen ubree in T wihou knowing heir exac opology. Our algorihm collec hi knowledge uing a por-aggregaion echnique ha pariion he por no included in P ino a collecion B of maximal, dijoin bin, uch ha he por in each bin B Bare guaraneed o be included in a ingle ubree of T T of G. Noe ha hi i only a ufficien condiion, o ha por-id belonging o he ame ubree in T can in fac end up in differen bin of B in our algorihm. Neverhele, hi condiion ill (conervaively) guaranee ha pah in Q I inerecing wih he ame bin B B hare a ingle connecion poin on Q and, herefore, can enforce implici pah conrain on Q. Our echnique for aggregaing por ino bin relie on he following propery, which follow direcly from he fac ha our nework graph G i a ree. Propery 5. Any pair of pah Q x,z, Q u,v no inerecing Q (i.e., Q x,z,q u,v Q NI ) wih P x,z P u,v φ belong o he ame ubree T T. Thu, all por on any wo inerecing pah in Q NI can be afely placed in he ame bin in B. Our algorihm work by iniially defining () for every node v P,abinB v conaining all of v por, i.e., B v = {(v, k) (v, k) i a por of v}; and, (2) for every pah Q u,v Q NI,abinB u,v = P u,v. The algorihm hen form he final collecion of bin B by ieraively merging any wo bin whoe inerecion i nonempy unil all bin are dijoin (baed on Propery 5.). Given ha he por bin B compued above are guaraneed o connec o a ingle poin of he Q keleon pah, we can ue hem in a manner equivalen o ubree in T for compuing implici pah conrain on Q. Conider wo (inerecing) pah Q x,z,q u,v Q I ha alo inerec wih a ingle bin B B, and le Ix,z and Iu,v denoe heir repecive inerecion wih P. Since B ha a ingle connecion poin o Q, he egmen of P defined by Ix,z and Iu,v have a common end-poin (wich or hub) on he Q pah. If Ix,z and Iu,v are dijoin hen hey are on oppoie ide of he common connecion poin (Figure 4(a)), o heir union I I x,z u,v, define a coniguiy conrain on Q. If, on he oher hand, Ix,z and Iu,v inerec, hen hey are on he ame ide of heir common end-poin (Figure 4(b)), and one of hem conain he oher. Suppoe ha Ix,z Iu,v; hen, clearly, Ix,z Iu,v alo define a coniguiy conrain on Q.In general, given Q x,z,q u,v Q I inerecing wih a ingle por bin B B, all he implici coniguiy conrain added o our pah conrain e S are Ix,z Iu,v, Ix,z Iu,v, Ix,z Iu,v, and Iu,v Ix,z (where, of coure, empy e are ignored). The compued por bin and he ingle connecion poin (a) (b) x x z I x,z u I x,z u I u,v B I u,v Fig. 4. Compuing implici pah conrain uing bin B. propery can alo be exploied o infer order conrain on he Q keleon pah. Conider wo pah Q x,z,q u,v Q I inerecing wih bin B B, and aume ha and Iu,v are dijoin (Figure 4(a)) (he cae of inerecing Ix,z, Iu,v can be handled imilarly). The key o deermining he order of Ix,z and Iu,v on he pah lie in dicovering if one of he wo pah egmen precede or ucceed he connecion poin of he B bin. To decribe he wo cenario uccincly, we define he funcion FIRST(Q, S) and LAST(Q, S) ha receive a inpu a keleon pah Q and a e of por S, and reurn he index j of he fir and la (repecively) ube U j Q ha inerec S. I i eay o ee ha if FIRST(Q x,z,ix,z) < LAST(Q x,z,b), hen (ince he and x z pah have he ame orienaion) he egmen Ix,z precede he connecing poin of bin B and we can conclude he pah conrain <Ix,z,I u,v >. Oherwie, if LAST(Q x,z,ix,z) > FIRST(Q x,z,b), hen he egmen Ix,z ucceed he connecing poin of B, giving he pah conrain <Iu,v,I x,z >. (Noe ha a mo one of he above condiion can hold ince, by definiion, B Ix,z = φ.) If boh condiion are fale, hen we alo check he correponding FIRST/LAST condiion for Q u,v o ee if hey can deermine an ordering for he wo pah egmen. Example 5. Conider he nework depiced in Figure 5(a), where ho (i.e., leaf node) comprie four differen ubne, {u, v}, {, }, {x, z}, and {r, q}, and each wich (i.e., inernal node) comprie a ingle-elemen ubne. The complee elemen AFT are given in Figure 5(b) and he iniial collecion of keleon pah, Q, i hown in Figure 5(c). Conider he pah conrain impoed by Q on he Q u,v pah. From he AFT informaion, we direcly conclude he conrain < {d 3 }, {d } > and < {c }, {c 2 } >. Alo,P u,v inerec boh P and P x,z wih I u,v = {d } and I u,v = {c,c 2 }. x,z Furher, ince boh P and P x,z inerec wih he bin B r,q = {r,a,a 2,b,b 2,q } (reuling from P r,q Q NI u,v), we have he implici coniguiy conrain < {d 3,c,c 2 },φ>. I i eay o ee ha he only u v pah arrangemen aifying he above conrain i Q u,v =< {u }, {d 3 }, {d }, {c }, {c 2 }, {v } >. Now, conider pah Q. Through he inerecion of P and P r,q, we conclude he (explici) coniguiy conrain < {a,a 2,b,b 2 },φ>. Alo, hrough he inerecion of P u,v and P x,z wih boh P and he bin B d = {d,d 2,d 3 },weinfer he (implici) coniguiy conrain < {b,b 2,c,c 2 },φ >. z v v B 0-7803-7753-2/03/$7.00 (C) 2003 IEEE IEEE INFOCOM 2003
r Q u,v Q Q x,z Q r,q Fig. 5. x z 2 3 d u a b c 2 2 2 (a) The conidered nework. u x r T' q c,c2,d3,d a,a2,b,b2,c,c2 b,b2,d,d2 a,a2,b,b2 (c) The iniial keleon-pah. v z q v Q u,v Q Q x,z Q r,q F a ={r,} F a2 ={q,} F b ={,x} F b2 ={,z} F c ={,u} F c2 ={,v} F d ={x,v} F d2 ={z} F d3 ={u} F ={} F x ={z} F u ={v} F r ={q} F ={} F z ={x} F v ={u} F q ={r} (b) The complee AFT. u x r d3 d c c2 v a a2 b b2 c c2 z q (d) The refined keleon-pah Q u,v and Q. An example of implici coniguiy and order conrain. Thee wo conrain are no ufficien o define he por order on P ince boh a b c and c b a aify hem. However, wih he knowledge of he complee u v pah (above) we can infer an addiional implici order conrain; pecifically, ince Iu,v and Ix,z are dijoin and LAST(Q u,v,iu,v) =5> FIRST(Q u,v,b d )=2, he connecion poin of B d mu precede he c node on he pah. Thi implie he conrain <Ix,z,I u,v > = < {b,b 2 }, {c,c 2 } > which, in urn, uniquely idenifie he underlying pah a a b c. The deailed peudo-code for our COMPUTECONSTRAINTS procedure i depiced in Figure 6. A i alo clear from he dicuion in Example 5., i may be impoible o ue our pah conrain o infer he complee pah opology for a given keleon pah in Q unle ome oher pah() in Q have been appropriaely refined (e.g., conider Q and Q u,v in our example). A key problem here em from our parial knowledge of he por ha lie in he ingle-connecion-poin bin ued o infer implici conrain. Thu, our oluion (Figure 2) need o employ ieraive-refinemen pae over all keleon-pah in Q unil no furher pah refinemen are poible. VI. THE SKELETON-PATH REFINEMENT ALGORITHM Once our opology-dicovery algorihm ha compued he e of pah conrain S impoed on he Q keleon pah, i invoke he REFINEPATH procedure (Sep 7 in Figure 2) o refine he ordering of he por-id in he P e uing he newly-dicovered conrain. Our REFINEPATH algorihm (decribed in deail in hi ecion) i a recurive procedure ha receive a inpu he collecion of por-id P along he nework pah being conidered, a well a a collecion of pah conrain S on he arrangemen of hoe por. I oupu i a keleon pah Q =< U,U 2,...,U K > over he por in P ha aifie all he conrain in S. Furhermore, a we demonrae analyically laer in hi ecion, if he conrain collecion S uniquely define he por order for P hen every ube U i in he oupu pah Q comprie a ingle por in procedure COMPUTECONSTRAINTS(Q, Q). Q I = {Q x,z Q x,z Qand P x,z P φ} 2. 3. Q NI = Q Q I S = {< {v()}, {v()} > v, on he pah} 4. for each Q x,z Q I do // Noe ha Q Q I 5. Compue he projecion Q x,z = {U,,U K} 6. S = S {<U,φ>} 7. for j =2o K do 8. S = S {<U j,u j >} 9. endfor 0. // Compue he por-bin collecion B. B = {{P u,v} Q u,v Q NI } {{ all por (v, k)} v V P } 2. while here are B,B 2 B.. (B B 2 φ) do 3. B = B {B,B 2} {{B B 2}} 4. // Dicover implici pah conrain on Q 5. for each Q x,z,q u,v Q I and B B.. [ (Ix,y Iu,v) and (P x,y B φ) and(p u,v B φ) ]do 6. S = S {<Ix,z Iu,v,φ>,<I x,z Iu,v,φ>, <Ix,z Iu,v,φ>,<I u,v Ix,z,φ>} 7. if ( Ix,z Iu,v = φ ) hen 8. if [ FIRST(Q x,z,ix,z) < LAST(Q x,z,b) or LAST(Q u,v,iu,v) > FIRST(Q u,v,b) ] hen 9. S = S {<Ix,z,I u,v >} 20. ele if [ FIRST(Q u,v,iu,v) < LAST(Q u,v,b) or LAST(Q x,z,iu,v) > FIRST(Q x,z,b) ] hen 2. S = S {<Iu,v,I x,z >} 22. endif 23. ele // i.e., Ix,y Iu,v φ, aume Ix,y Iu,v 24. if [ FIRST(Q x,z,ix,z) < LAST(Q x,z,b) or FIRST(Q u,v,iu,v) < LAST(Q u,v,b) ] hen 25. S = S {< (Ix,z Iu,v),I u,v >} 26. ele if [ LAST(Q x,z,ix,z) > FIRST(Q x,z,b) or LAST(Q u,v,iu,v) > FIRST(Q u,v,b) ] hen 27. S = S {<Iu,v, (Ix,z Iu,v) >} 28. endif 29. endif 30. endfor 3. reurn S Fig. 6. The COMPUTECONSTRAINTS Procedure. P (i.e., Q define he complee por order for he conidered nework pah). Abracly, our REFINEPATH algorihm coni of hree key ep () Mapping he pah-conrain collecion S o a collecion of coniguiy conrain R; (2)Uing R and S o conruc an auxiliary keleon pah L; and, (3) Recuring he refinemen proce on each ube of he auxiliary keleon pah L o obain he oupu keleon pah Q. Inuiively, he e of coniguiy conrain R enable u o idenify egmen of por-id on he arge pah ha are conneced hrough he given e of conrain; hee are baically he only (ub)pah for which we and a chance o recover a complee por order (uing he given conrain). The ube in he auxiliary keleon pah L are hen conruced uing he derived coniguiy conrain R he goal here i o enure ha our refinemen algorihm can afely recure wihin each individual ube of L while only conidering he conrain local o hi ube. Furher, he pah conrain in S are ued o deermine he order of ube in L. Finally, we recure on each ube of L and concaenae he keleon (ub)pah reurned o obain he final keleon pah Q. In he remainder of hi ecion, we fir decribe he con- 0-7803-7753-2/03/$7.00 (C) 2003 IEEE IEEE INFOCOM 2003
rucion of he coniguiy conrain e R and he auxiliary keleon pah L. Then, we dicu our overall REFINEPATH algorihm in deail. The Coniguiy Conrain Se R and Conneced Por Group. The e of coniguiy conrain R eenially conain all he coniguiy conrain ha can be direcly inferred from he inpu e of pah conrain S. (To implify he expoiion, we will rea R a a e of por-id e, i.e., each R Ri a e of por.) To enure ha R cover all por in P we add ingleon conrain for each por in P ;wealo exclude from R he rivial coniguiy conrain P and φ. Thu, we define R = {Si,Si 2,Si Si 2 <Si,Si 2 > S} {{k} k P } {P, φ}. We ay ha wo e R, R R are conneced in R if here exi a equence of e R = R, R 2,,R k = R in R uch ha R j inerec R j for every j =2,...,k. A ub-collecion C Ri called a conneced group in R if every pair R, R C i conneced in C and any R C i no conneced wih any e in R C.Wealodefine C = R C R, i.e., he union e of he collecion C. I i eay o ee ha he union e of all conneced group of R are dijoin and form a pariion of P. The following lemma ue he concep of conneced por group o decribe a neceary condiion for he given e of pah conrain o define a unique por order over P. Lemma 6. If he pah conrain S uniquely deermine he arrangemen of por in P hen he derived coniguiy conrain R aify one of he following wo condiion (a) R comprie a ingle conneced group; or, (b) R conain wo conneced group C, C 2 Rand S conain he pah conrain <C,C 2 > or <C 2,C >, where C i i he union e for group C i. Inuiively, he above heorem ae ha, in order for S o deermine a unique arrangemen of P, he coniguiy and order conrain in S hould pan he enire e of por in P ; oherwie, here would cerainly be egmen of he pah where he por arrangemen canno be deermined baed on he conrain. Noe ha Cae (b) in Theorem 6. could only arie when C C 2 = P, ince we have excluded he (rivial) coniguiy conrain P from R. The Auxiliary Skeleon Pah L. Conider a conneced group C in R, and le C P denoe i union e. Our goal i o conruc a valid por arrangemen for he por in C uing he given e of pah conrain. Inuiively, our algorihm will accomplih hi by building a (coare) auxiliary keleon pah L =< U,...,U L > and hen recuring on each ube U i of L, concaenaing he reul of he recurive call. However, o be able o recure independenly on each U i ube uing only i local e of pah conrain, hi auxiliary keleon pah L need o be conruced carefully. Our conrucion i baed on he concep of Inerecing, Non-Conaining (INC) por e ha we formally define here. Definiion 6. Two por e R i,r j P are aid o be Inerecing, Non-Conaining (INC) if and only if hey inerec and neiher one of hem conain he oher, i.e., R i R j φ, R i R j, and R j R i. I i eay o ee ha having a coniguiy conrain R in C ha i INC wih one of he ube U i in our keleon pah L eenially mean ha we canno independenly recure on ha U i ube. The problem, of coure, i ha R would alo inerec neighbor of U i in L and he por in hee e inereced by R canno be arranged independenly ince ha would no guaranee ha R i aified in he final (concaenaed) arrangemen. On he oher hand, recuring on U i i imple if R i fully conained in or conain U i in he former cae, R i imply paed a an argumen o he recurive call and in he laer R ha no effec on he arrangemen of U i ince U i i already required o be coniguou (by he keleon pah definiion). Thu, we would like o build an auxiliary pah L ha i INC-free for C a defined below. Definiion 6.2 We ay ha he keleon pah L =< U,...,U L > i INC-free for C if and only if for every coniguiy conrain R Ceiher (a) R i conained in a ingle U j L (i.e., R U j for ome j); or, (b) R i equal o he union of a (ub)equence of ube in L (i.e., R = k 2 j=k U j for ome k k 2 L ). The mehod we ue for building a keleon pah L ha i INC-free for C i a follow. Iniially, we find he large por e R i Cand any e R j R ha i INC wih R i.(noe ha wo uch e mu exi ince C i a ingle conneced group and he rivial coniguiy conrain C i ignored.) From hee wo e, we conruc an iniial keleon pah wih hree ube L =< R i R j,r i R j,r j R i >. (A hi poin, he orienaion of he L pah i arbirary; i i reolved uing he given pah conrain S afer he whole INC-free pah ha been buil.) Le L =< U,...,U L > denoe he curren ae of our keleon pah and le P L be he e of all por in L. While here exi a e R Cha i INC wih P L or one of he ube U j L (e.g., Figure 7(a)) our algorihm perform he following operaion. Fir, every U j L ha i INC wih R i replaced by he wo ube U j R and U j R. The order of hee wo ube in L i deermined a follow. If j< L and R inerec U j+,orj = L and R doe no inerec U j, hen U j R precede U j R in L (e.g., he pli of U 2 ino U 2 and U 3 in Figure 7); oherwie, he wo ube are inered in he oppoie order in L. Second, uppoe ha R and P L are INC; hi implie ha R conain node ha are no included in he curren keleon pah L. Afer he above pliing of U j baed on R, i i eay o ee ha R mu compleely conain eiher he fir or he la ube of L. If U R hen we iner he e R P L a he fir e of L, i.e., L =< R P L > L (where denoe pah concaenaion); oherwie, we e L = L <R P L > (e.g., aaching U 5 o L in Figure 7). Finally, we updae he e P L = P L R, and reurn o elec a new coniguiy conrain R. Lemma 6.2 Given a ingle conneced group of coniguiy conrain C R, he above-decribed procedure conruc a keleon pah for C ha i INC-free for C. Remember ha we buil he INC-free pah L wihou paying aenion o i orienaion. Thu, a hi poin, eiher L or REVERSE(L) i he correc keleon pah for C (where he REVERSE funcion imply revere he ube order in a given keleon pah). A will become clear in he decripion of our refinemen algorihm, we reolve he orienaion for L uing 0-7803-7753-2/03/$7.00 (C) 2003 IEEE IEEE INFOCOM 2003
(a) (b) coniguiy conrain R L=< U, U 2, U 3 > L=< U', U' 2, U' 3, U' 4, U' 5 > Fig. 7. Building an INC-free auxiliary keleon pah L. he inpu e of pah conrain S. The REFINEPATH Algorihm. The deailed peudo-code for our REFINEPATH procedure i depiced in Figure 8. In i fir phae (Sep 2-6), REFINEPATH build he collecion of inferred coniguiy conrain R on P and he reuling conneced por group, and applie Lemma 6. o decide if S can define a unique por arrangemen for P. If we dicover more han 2 conneced group hen, by Theorem 6., our algorihm canno hope o build a keleon pah wih ordered ube of P o i imply reurn he rivial keleon pah L =< P >.Ifwefind exacly wo conneced group (wih union e C and C 2 )inr hen procedure ORIENTPATH (decribed in deail below) i invoked o deermine he correc ordering of C and C 2 in he keleon pah uing S; hen, in Sep 30-37 our algorihm recure on he wo union e C and C 2 o deermine heir inernal por arrangemen and appropriaely concaenae he reuling ubpah. Finally, if R comprie a ingle conneced por group hen REFINEPATH build he auxiliary INC-free keleon pah L a decribed earlier in hi ecion (Sep -26) and ue he ORIENTPATH procedure o deermine he correc orienaion for L; hen, again uing Sep 30-37, REFINEPATH recure on each (noningleon) ube U j in he L pah uing only he conrain local o ha ube (i.e., conrain <Si,S2 i > Such ha Si S2 i U j ) and concaenae he reul of he recurive call o build he final oupu pah Q. The ancillary ORIENTPATH procedure (hown in Figure 9) ue he original e of pah conrain S in order o idenify he correc direcion for an inpu keleon pah L. ORIENT- PATH relie on he wo funcion FIRST(L, S) and LAST(L, S) inroduced in Secion V for idenifying he index of he fir/la occurrence of an elemen of S in he L pah. More pecifically, conider a pah conrain < Si,S2 i > S uch ha FIRST(L, Si ) < LAST(L, S2 i ); hen, clearly, ince he conrain in S characerize a rue nework pah, he por in Si hould precede hoe in Si 2 and, hu, L i he correc keleon pah. Similarly, if here i a pah conrain <Si,S2 i > S uch ha FIRST(L, S2 i ) < LAST(L, S i ), hen he correc pah i REVERSE(L). Oherwie, if no conrain in S can deermine he direcion of he L pah hen ORIENTPATH imply reurn a rivial ingle-e keleon pah. The following heorem eablihe he correcne of our algorihm, demonraing analyically ha REFINEPATH alway recover he correc opology for he inpu por P a long a i can be idenified uniquely from he given e of pah conrain S. Theorem 6. The REFINEPATH algorihm reurn a feaible keleon pah for he por collecion P. Furher, if S uniquely define he por arrangemen in P, hen he Fig. 8. procedure REFINEPATH( P, S). L =< P > 2. R = {S i,s 2 i,s i S 2 i <S i,s 2 i > S} {{k} k P } {P, φ} 3. C = R 4. while here exi R i R j C.. R i R j φ do 5. C = C {R i,r j} {R i R j} 6. endwhile 7. if C > 2 hen reurn(l) 8. ele if (C = {C,C 2}) hen 9. L =ORIENTPATH( <C,C 2 >, S) 0. ele // R comprie a ingle conneced group. R i =helargeeinr 2. R j =einr ha i INC wih R i. 3. L = <R i R j,r i Rj,R j R i >; P L = R i Rj 4. while here exi R R.. [ (R and P L are INC) or (R and ome U j L are INC) ] do 5. for each U j L ha i INC wih R do 6. if [(j< L and U j+ R φ) or (j = L and U j R = φ) ]hen 7. replace U j wih <U j R, U j R>. 8. ele replace U j wih <U j R, U j R>. 9. endif 20. endfor 2. if R and P L are INC hen 22. P L = P L R 23. if (U R) hen L = <R P L > L 24. ele L = L <R P L > 25. endif 26. endwhile 27. L =ORIENTPATH(L, S) 28. endif 29. if L =hen reurn(< P >) 30. Q = ɛ // he empy pah 3. for j =o L do 32. if ( U j =) hen Q = Q <U j > 33. ele 34. S j = {< S i,s 2 i > S uch ha S i S 2 i U j} 35. Q = Q REFINEPATH(U j, S j) 36. endif 37. endfor 38. reurn(q) The REFINEPATH Procedure. REFINEPATH algorihm i guaraneed o reurn he (unique) correc pah opology. VII. INFERRING THE NETWORK TOPOLOGY The final ep of our opology-dicovery algorihm i o ue he daa in he reolved keleon pah in order o infer he conneciviy informaion for wiche and hub in he underlying nework (procedure FINDCONNECTIONS in Figure 2). Given a e of reolved keleon pah (i.e., pah for which a complee por arrangemen ha been deermined), he procedure for inferring elemen conneciviie i fairly raighforward Por ha are adjacen on ome pah are direcly conneced; and, if a por ha more han one neighbor in he reolved pah, hen a hub i placed o inerconnec ha por wih all i neighboring por (a well a all oher por conneced o por already on he hub). The following heorem idenifie a rong compleene propery of our propoed opology-dicovery algorihm and i he main heoreical reul of hi paper. Due o pace conrain, a kech of he proof can be found in he appendix; he complee deail can be found in he full verion of hi 0-7803-7753-2/03/$7.00 (C) 2003 IEEE IEEE INFOCOM 2003
Fig. 9. r x u r procedure ORIENTPATH(L, S). for each <Si,Si 2 > S do 2. if ( FIRST(L, Si ) < LAST(L, Si 2 ))hen reurn(l) 3. ele if ( FIRST(L, Si 2 ) < LAST(L, Si ))hen 4. reurn(reverse(l)) 5. endif 6. endfor 7. reurn(< Uj >) U j L The ORIENTPATH Procedure. a,a2,b,b2,c,c2,d,d2 x e2 e b,b2,c,c2 y b,b2, u e2 e d d2 v c,c2 r a,a2,b,b2 q (c) The keleon-pah afer he fir ieraion. a a2 b b2 c c2 d d2 e2 x e 2 3 e u b b2 c c2 e2 e b b2 c c2 d d2 a a2 b b2 (e) The keleon-pah afer he hird ieraion. Fig. 0. a b c 2 2 2 q y d 2 (a) The rue nework opology. An example execuion of our algorihm. y v q v a,a2,b,b2,c,c2,d,d2 x b,b2,c,c2,e2,e y u b,b2,c,c2,d,d2,e3,e v r a,a2,b,b2 q (b) The iniial keleon-pah. a a2 b b2 c c2 d d2 x e2 e b,b2,c,c2 y u e2 e b,b2,c,c2 d d2 v r a,a2,b,b2 q r (d) The keleon-pah afer he econd ieraion. c2 y a d a2 d2 e b u b2 e2 e3 (f) The reuling connecion from he keleon-pah. paper [9]. To he be of our knowledge, hi i he fir reul of hi ype in he area of SNMP-baed phyical opology dicovery. Theorem 7. Our opology-dicovery algorihm (depiced in Figure 2) run in ime ha i polynomial in he number of nework node and i complee for he given AFT and ubne informaion. Tha i, if he inpu SNMP and ubne daa i ufficien o uniquely idenify he phyical opology of he underlying nework, hen our algorihm i guaraneed o recover ha (unique) opology. VIII. AN EXAMPLE EXECUTION In hi ecion, we preen ome key ep of our opologydicovery algorihm in inferring he opology of he example nework depiced in Figure 0(a), where we aume ha he ho comprie four differen ubne {, }, {x, y}, {u, v} and {r, q}, and each wich a, b, c, d, e belong o a differen ubne. Our goal i o demonrae how our algorihm accumulae parial opology informaion during keleon-pah refinemen ieraion unil he complee nework opology i recovered. Le Q i denoe he keleon-pah collecion a he end of he i-h ieraion (Q 0 i he iniial e). To implify our dicuion, we aume ha refinemen during he i-h ieraion only ue keleon pah in Q i. q x u c The iniial keleon pah collecion Q 0 = { Q 0, Q 0 x,y, Q 0 u,v, Q 0 r,q} i hown in Figure 0(b). Suppoe ha our pah are refined in he order P,P x,y,p u,v, and P r,q.forq 0 we compue he collecion of pah conrain S S =<{}, {a,a2,b,b2,c,c2,d,d2}>, S 2 =<{a,a2,b,b2,c,c2,d,d2}, {}>, S 3 =<{b,b2,c,c2,d,d2},φ>, S = S 4 =<{b,b2,c,c2},φ>,, S 5 =<{a,a2,b,b2},φ>, S 6 =<{a}, {a2}>, S 7 =<{b}, {b2}>, S 8 =<{c}, {c2}>, S 9 =<{d}, {d2}> where S S 5 follow from he inerecion of Q wih pah in Q 0 (including Q ielf), and S 6 S 9 come from he AFT informaion a inermediae node. To refine P, we ue S o compue he INC-free auxiliary pah L = < {}, {a,a2,b,b2,c,c2,d,d2}, {} > which ha he correc orienaion (by conrain S, S 2 ). We hen recure on he ube U 2 = {a,a2,b,b2,c,c2,d,d2} L, and ue he conrain local o U 2 (i.e., S 3 S 5 ) o compue he ubpah L =< {a, a2}, {b, b2}, {c, c2}, {d, d2} >. Unforunaely, a hi poin, ORIENTPATH canno ue he inpu conrain o deermine he correc direcion for L, o i iply reurn he e U 2, which mean ha he keleon pah reurned by REFINEPATH i exacly he ame a Q 0. Nex, for Q 0 x,y, we compue he pah conrain Sx,y S =<{x}, {b,b2,c,c2,d,d2,e2,e}>, S 2 =<{b,b2,c,c2,d,d2,e2,e}, {y}>, S 3 =<{b,b2,c,c2,d,d2},φ>, Sx,y = S 4 =<{b,b2,c,c2,e},φ>, S 5 =<{b,b2},φ>, S 6 =<{b}, {b2}>, S 7 =<{c}, {c2}>, S 8 =<{d}, {d2}>, S 9 =<{e2}, {e}>. To refine P x,y, REFINEPATH compue he INC-free auxiliary pah L x,y =< {x}, {b,b2,c,c2,d,d2,e2,e}, {y} >, and recure o refine i econd ube U 2 = {b,b2,c,c2,d,d2,e2,e} L x,y. Uing conrain S 3,S 4,S 5 and S 9, i compue he ubpah L = < {d,d2}, {b,b2,c,c2}, {e}, {e2} >. Then, by conrain S 9,ORI- ENTPATH conclude he revere direcion for L, reurning he final ubpah < {e2}, {e}, {b, b2, c, c2}, {d, d2} >. Addiional recurive call reolve he por order for ube {d,d2} bu no for ube {b,b2,c,c2}; hu, he final x y keleon pah reurned i Q x,y = < {e2}, {e}, {b,b2,c,c2}, {d}, {d2} >. The oher wo refined keleon pah Q u,v and Q r,q are compued imilarly, and he pah collecion Q i hown in Figure 0(c). Noe ha, afer he fir refinemen ieraion, none of he pah in Q pecifie a complee arrangemen. However, a we now how, he refined pah Q x,y Q allow u o refine Q in he econd ieraion of our algorihm. Conider he e of pah conrain S 2 compued for Q during he econd ieraion. Thi e i idenical o S, wih he excepion of conrain S 3 (reuling from he projecion of Q x,y ono Q ); more pecifically, conrain S 3 for hi econd ieraion over Q i S 3 =< {{b,b2,c,c2}, {d,d2} >. Thu, afer REFINEPATH recompue he ubpah L = < {a,a2}, {b,b2}, {c,c2}, {d,d2} >, conrain S 3 can now be ued by ORIENTPATH o deermine he correc direcion for L, and he reuling kele- 0-7803-7753-2/03/$7.00 (C) 2003 IEEE IEEE INFOCOM 2003
on pah reurned i Q 2 = < {}, {a}, {a2}, {b}, {b2}, {c}, {c2}, {d}, {d2}, {} > (Figure 0(d)). In i hird ieraion, our opology-dicovery algorihm acually recover he complee por arrangemen for all keleon pah a hown in Figure 0(e). Finally, he FINDCONNEC- TIONS procedure ue he reolved pah o dicover he elemen conneciviie depiced in Figure 0(f). I i eay o ee ha he connecion dicovered pecify exacly he rue nework opology hown in Figure 0(a). IX. CONCLUSIONS Auomaic dicovery of phyical opology informaion play a crucial role in enhancing he manageabiliy of modern IP nework. In hi paper, we have propoed he fir complee algorihmic oluion for dicovering he phyical opology of a large, heerogeneou Eherne nework compriing muliple ubne a well a (poibly) dumb or uncooperaive nework elemen. Our propoed algorihm relie on andard SNMP MIB informaion ha i widely uppored in modern IP nework and i he fir SNMP-baed opology-dicovery ool o offer rong compleene guaranee for recovering he rue nework opology from he given MIB daa. REFERENCES [] I. Kazela and M. Schwarz, Scheme for Faul Idenificaion in Communicaion Nework, IEEE/ACM Tranacion on Neworking, vol. 3, no. 6, pp. 753 764, Dec. 995. [2] S. Yemini, S. Kliger, E. Moze, Y. Yemini, and D. Ohie, High Speed & Robu Even Correlaion, IEEE Communicaion, May 996. [3] A. Bierman and K. Jone, Phyical Topology MIB, Sep. 2000, Inerne RFC-2922 (available from hp//www.ief.org/rfc/). [4] S. Kehav, An Engineering Approach o Compuer Neworking. Addion-Weley Profeional Compuing Serie, 997. [5] J. Cae, M. Fedor, M. Schoffall, and J. Davin, A Simple Nework Managemen Proocol (SNMP), May 990, Inerne RFC-57 (available from hp//www.ief.org/rfc/). [6] W. Salling, SNMP, SNMPv2, SNMPv3, and RMON and 2. Addion-Weley Longman, Inc., 999, (Third Ediion). [7] B. Lowekamp, D. R. O Hallaron, and T. R. Gro, Topology Dicovery for Large Eherne Nework, in Proceeding of ACM SIGCOMM, San Diego, California, Aug. 200. [8] Y. Breibar, M. Garofalaki, C. Marin, R. Raogi, S. Sehadri, and A. Silberchaz, Topology Dicovery in Heerogeneou IP Nework, in Proceeding of IEEE INFOCOM 2000, Tel Aviv, Irael, Mar. 2000. [9] Y. Bejerano, Y. Breibar, M. Garofalaki, and R. Raogi, Phyical Topology Dicovery for Large Muli-Subne Nework, July 2002, Bell Lab Tech. Memorandum. APPENDIX Proof Skech for Theorem 7.. Le Q 0 be he iniial collecion of keleon-pah calculaed by he INITSKELETONPATHS procedure and le Q i, i>0, be he keleon-pah collecion a he end of he i-h ieraion. Iniially, we prove ha he keleon-pah collecion Q i, for every i 0, comprie all he AFT informaion. We conider he connecing ree T N of every ubne N and we conruc an ieraive algorihm ha compue he complee AFT for ubne N of every node v T N. The algorihm fir populae he AFT of node v wih he end-poin of he keleon-pah compriing v. Then, ieraively, i find which por of v lead o he node of he oher keleon-pah in T N. A a reul, any opology ha aifie he keleon-pah conrain alo aifie he nework AFT informaion. Nex, we conider our REFINEPATH procedure and we prove ha if he conrain collecion S uniquely define he por order of he pah ˆP, hen hi procedure reurn he correc and complee pah opology. Thi heorem reul from he recurive behavior of he REFINEPATH procedure. The procedure conruc an auxiliary keleon pah L =< U,...,U L > by uing only he coniguiy conrain in S, uch ha every pair of U i,u j L, i j are INCfree. Thu, he inernal arrangemen of he por in every e U i L doe no affec he por order of any oher e U j L. Thi enable he procedure o recurively refine any e U i L unil e wih ingle por-id are obained. A hi poin, eiher L or REVERSE(L) i he correc keleon pah for ˆP. By employing he order conrain in S, he ancillary ORIENTPATH procedure idenifie he correc direcion of L a he end of each invocaion of he REFINEPATH procedure. For compleing he proof, we only have o how ha our COMPUTECONSTRAINTS procedure compue all he coniguiy and order conrain ha are eenial for deermining he nework opology. We conider fir he coniguiy conrain. Since uch conrain eenially reul from pah-inerecion operaion, we how ha all he coniguiy conrain can be deduced direcly from he iniial keleon pah, Q 0. Idenifying all he required order conrain in more challenging ak. Recall ha he order of a keleon pah L may be enforced by he order of anoher keleon pah L 2 a a reul of an implici order conrain (even when he wo pah do no have any por-id in common). In uch cae, we can deermine he required order conrain of L only afer refining he keleon-pah L 2. We reolve hi problem a follow. For impliciy, we aume ha all he keleon-pah are compued in advance wihou deermining heir direcion and le L denoe he collecion of compued keleon-pah. Then, we divide L ino dijoin e {L, L 2,...,L M } uch ha (a) for every pair L,L 2 L k, k [,...,M], he ordering of pah L and L 2 are dependen (i.e., ordering one pah deermine he order of he oher); and, (b) for any pair L L k, L 2 L k, k k, pah L and L 2 are order-independen. We prove ha each uch e L k ha he following wo properie (a) Every L k induce a conneced componen; in oher word, for every L,L L k here i a equence {L = L,L 2,...,L l = L } uch, ha for every i [,...,(l )], pah L i and L i+ inerec; and, (b) If S define a unique nework opology hen every L k conain a lea one explici order conrain. By uing hee wo properie, we can how ha he do-while loop of our TOPOLOGYDISCOVERY algorihm enure he inference of all explici order conrain for each keleon-pah. Finally, we ie all our deducion ogeher and conclude ha if he AFT define unique nework hen our TOPOLOGYDISCOVERY algorihm will idenify i. Our running-ime analyi i baed on he obervaion ha he number of keleon-pah and pah conrain ha our TOPOLOGYDISCOVERY algorihm compue are O(n 2 ) and O(n 3 ), repecively. The algorihm conain everal finie loop, where e operaion are performed on he keleonpah or he conrain. Therefore, our algorihm running ime i polynomial and, in fac, i i comparable o ha of exiing echnique for layer-2 opology dicovery [8], [7]. 0-7803-7753-2/03/$7.00 (C) 2003 IEEE IEEE INFOCOM 2003