Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints By Lami Kaya, LKaya@ieee.org © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
Chapter 18 WAN Technologies And Dynamic Routing © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
Topics Covered 18.1 Introduction 18.2 Large Spans And Wide Area Networks 18.3 Traditional WAN Architecture 18.4 Forming A WAN 18.5 Store And Forward Paradigm 18.6 Addressing In A WAN 18.7 Next-Hop Forwarding 18.8 Source Independence 18.9 Dynamic Routing Updates In A WAN 18.10 Default Routes 18.11 Forwarding Table Computation 18.12 Distributed Route Computation 18.13 Shortest Path Computation In A Graph 18.14 Routing Problems © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.1 Introduction This chapter considers the structure of a network that spans an arbitrarily large area describes the basic components used to build a packet switching system explains the fundamental concept of routing presents the two basic routing algorithms explains the advantages of each algorithm extends the discussion of routing to the Internet presents routing protocols that use the algorithms described here © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.2 Large Spans And Wide Area Networks Networking technologies can be classified according to the distance spanned: PAN spans a region near an individual LAN spans a building or campus MAN spans a large metropolitan area WAN spans multiple cities or countries Consider a company that uses a satellite bridge to connect LANs at two sites Should the network be classified as a WAN or as an extended LAN? © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.2 Büyük yayılma alanlı ve geniş alanlı Networkler Network teknolojileri yayılma alanlarına göre sınıflandırılır: PAN yakındaki bir bireye kadar ulaşan bir alana yayılır LAN bir bina veya kampüs MAN büyük bir metropol alana WAN birden fazla şehir ve ülke Bir uydu köprüyü kullanarak iki sitede LAN leri bağlayan bir şirket düşünün Bu network WAN veya genişletilmiş LAN olarak mı sınıflandırılır? © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.2 Large Spans And Wide Area Networks The key issue that separates WAN technologies from LAN technologies is scalability A WAN must be able to grow as needed to connect many sites spread across large geographic distances A technology is not classified as a WAN unless it can deliver reasonable performance for a large scale network A WAN does not merely connect to many computers at many sites it must provide sufficient capacity to permit all computers to communicate Thus, a satellite bridge that connects a pair of PCs and printers is merely an extended LAN © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.2 Büyük yayılma alanlı ve geniş alanlı Networkler WAN teknolojisini LAN teknolojisinden ayıran anahtar konu ölçeklendirilebilirlikleridir (scalability). Bir WAN bağlantıya ihtiyaç duyulan pek çok site için büyütülebilir. Büyük coğrafi uzaklıklara yayılır büyük ölçekli bir ağ için makul performans sağlamadıkça, bir teknoloji WAN olarak sınıflnadırılmaz. Bir WAN sadece pek çok sitede pek çok bilgisayarla bağlanmaz. it must provide sufficient capacity to permit all computers to communicate Böylece, bir PC ikilisini ve yazıları bağlayan bir uydu köprüsü sadece genişletilmiş LAN (extended LAN)dır © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.3 Traditional WAN Architecture WAN designers chose to create a special-purpose hardware device that could be placed at each site A packet switch provides local connections for computers at the site as well as connections for data circuits that lead to other sites A packet switch consists of a small computer system with a processor, memory, and I / O devices used to send and receive packets Early packet switches were constructed from conventional computers the packet switches used in the highest-speed WANs require special-purpose hardware Figure 18.1 illustrates the internal architecture © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.3 Traditional WAN Architecture © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.3 Traditional WAN Architecture Since the advent of LAN technology, most WANs separate a packet switch into two parts: a Layer 2 switch that connects local computers a router that connects to other sites Part 4 of the text discusses Internet routers in detail and explains how the concepts covered here apply to the Internet Communication with local computers can be separated from transmission across a WAN Figure 18.2 illustrates the separation © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.3 Traditional WAN Architecture © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.4 Forming A WAN A WAN can be formed by interconnecting a set of sites The exact details of the interconnections depend on the data rate needed the distance spanned and the delay Many WANs use leased data circuits However, other forms are also available such as microwave and satellite channels A network designer must choose a topology For a given set of sites, many topologies are possible Figure 18.3 illustrates a possible way to interconnect a WAN does not need to be symmetric the interconnections among packet switches the capacity of each connection can be chosen to accommodate the expected traffic and provide redundancy in case of failure © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.4 Forming A WAN © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.5 Store And Forward Paradigm The goal of a WAN is to allow as many computers as possible to send packets simultaneously The fundamental paradigm used to achieve simultaneous transmission is known as store and forward To perform store and forward processing a packet switch buffers packets in memory The store operation occurs when a packet arrives: I / O hardware in the switch places a copy of the packet in memory The forward operation occurs once a packet has arrived and is waiting in memory. The processor examines the packet determines its destination and sends the packet over the I / O interface that leads to the destination © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.5 Depola ve İlet Paradigm Bir WAN ın amacı pek çok bilgisayarın eş zamanlı paket göndermesine imkan sağlamaktır. Eş zamanlı iletimi başarmak için bilinen temel yöntem depola ve ilet. store and forward işlemi için Bir paket anahtarı, paketi belleğe alır Depolama işlemi paket geldiğinde olur: I / O donanımı belleğe paketin bir kopyasını yerleştirir İletme işlemi paket geldikten ve bellekte beklerken gerçekleşir. İşlemci Paketi inceler Hedefine karar verir Ve paketi I/O ara yüzünden hedefine doğru gönderir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.6 Addressing In A WAN From the view of an attached computer a traditional WAN network operates similar to a LAN Each WAN technology defines the exact frame format a computer uses when sending and receiving data Each computer connected to a WAN is assigned an address WANs addresses follow a key concept that is used in the Internet: hierarchical addressing Hierarchical addressing divides each address into two parts: (site, computer at the site) In practice, instead of a identifying a site, each packet switch is assigned a unique number first part of an address identifies a packet switch second part identifies a specific computer Figure 18.4 shows two-part hierarchical addresses assigned to computers connected to a pair of packet switches © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.6 Addressing In A WAN © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.6 Addressing In A WAN Figure 18.4 shows each address as a pair of decimal integers A computer connected to port 6 on packet switch 2 is assigned address [2, 6] In practice, an address is represented as a single binary value with some bits of the binary value used to represent a packet switch and others used to identify a computer In Part 4 of the text, we’ll show that each Internet address consists of a binary number, where a prefix of the bits identify a specific network in the Internet the remainder of the bits identify a computer attached to the network © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.7 Next-Hop Forwarding What is the importance of hierarchical addressing? When a packet arrives a switch must choose an outgoing path over which to forward it If a packet is destined for a local computer the switch sends the packet directly to the computer Otherwise the packet must be forwarded over to another switch To make the choice, a packet switch examines the destination address in the packet and extracts the packet switch number If the number in the destination address is identical to the packet switch's own ID the packet is intended for a computer on the local packet switch Otherwise, the packet is intended for a computer on another switch Algorithm 18.1 explains the computation © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.7 Next-Hop Forwarding © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.7 Next-Hop Forwarding A packet switch does not need to keep complete information about how to reach all possible computers nor does a switch need to compute the entire route a packet will follow Instead, a switch bases forwarding on packet switch IDs which means that a switch only needs to know which outgoing link A switch only needs to compute the next hop for a packet The process is called next-hop forwarding and is analogous to the way airlines list flights To make the computation efficient, switches use table lookup That is, each packet switch contains a forwarding table such tables were originally called routing tables lists all possible packet switches and gives a next hop for each Figure 18.5 illustrates next-hop forwarding with a trivial example © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.7 Next-Hop Forwarding © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.7 Next-Hop Forwarding Using only one part of a two-part hierarchical address to forward a packet has two practical consequences First, the computation time required to forward a packet is reduced because the forwarding table can be organized as an array that uses indexing instead of searching Second, the forwarding table contains one entry per packet switch instead of one entry per destination computer The reduction in table size can be substantial, especially for a large WAN that has many computers attached to each packet switch A two-part hierarchical addressing scheme allows packet switches to use only the first part of the destination address until the packet reaches the final switch Once the packet reaches the final switch the switch uses the second part of the address to choose a specific computer As Algorithm 18.1 describes © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.8 Source Independence Next-hop forwarding does not depend on the packet's original source or on the path the packet has taken before it arrives at a particular packet switch Instead, the next hop to which a packet is sent depends only on the packet's destination The concept, which is known as source independence Source independence allows the forwarding mechanism in a computer network to be compact and efficient Because all packets follow the same path, only one table is required Because forwarding does not use source information, only the destination address needs to be extracted from a packet A single mechanism handles forwarding uniformly packets that originate on directly connected computers and packets that arrive from other packet switches use the same mechanism © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.9 Dynamic Routing Updates In A WAN Forwarding table must guarantee the following: Universal communication The forwarding table in each switch must contain a valid next-hop route for each possible destination address Optimal routes In a switch, the next-hop value in the forwarding table for a given destination must point to the shortest path to the destination Network failures further complicate forwarding For example, if two paths exist to a given destination and one of the paths becomes unavailable because hardware fails, forwarding should be changed to avoid the unavailable path A network manager cannot merely configure a forwarding table to contain static values that do not change Instead, software running on the packet switches continually tests for failures, and reconfigures the forwarding tables automatically © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.9 Bir WAN da Dinamik Yönlendirme Güncellemeleri Yönlendirme tabloları şunları garanti eder: Universal communication (evrensel haberleşme) Her anahtardaki yönlendirme tabloları, her mümkün hedef adresi için uygun bir sonraki rotayı içerir Optimal routes (ideal rotaları) Bir anahtarda, verilen bir hedef için yönlendirme tablosunda ki bir sonraki hop değeri hedef için en kısa mesafeyi işaret etmek zorundadır. Network hataları Örnek; bir hedef için iki uygun yol mevcut ve bir yol donanım hatalarından dolayı uygun olmayan duruma geçtiyse, yönlendirme uygun olmayan yolu önlemek için değişmelidir. Bir network yöneticisi sadece sabit değerler içeren yönlendirme tablolarını konfigüre etmemelidir. Bunun yerine, paket anahtarlarında çalışan yazılım hatalar için devamı test edilmeli ve yönlendirme tablolarını otomatik olarak yeniden konfigüre etmelirir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.9 Dynamic Routing Updates In A WAN We use the term routing software to describe software that automatically reconfigures forwarding tables Route computation in a WAN is to think of a graph that models the network software uses the graph to compute the shortest path to all possible destinations Each node in the graph corresponds to a packet switch in the network (individual computers are not part of the graph) If the network contains a direct connection between a pair of packet switches the graph contains an edge or link between the corresponding nodes Figure 18.6 shows an example WAN and the corresponding graph © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.9 Bir WAN da Dinamik Yönlendirme Güncellemeleri Yönlendirme tablolarını otomatik olarak konfigüre eden yazılıma yönlendirme yazılımı denir bir WAN da yönlendirme hesaplanması networkü modelleyen bir graph olarak düşünülür Yazılım mümkün hedefler için en kısa mesafeyi graph kullanrak hesaplar Graph daki her düğüm netwrok de bir paket anahtarını ifade eder ( bireysel bilgisayarlar graph ın bir elemanı değildir) Eğer network bir paket anahtar çifti arasında direkt bağlantıya sahipse Graph bu düğümler arasında bir köşeye veya bağlantıya sahiptir Figure 18.6 shows an example WAN and the corresponding graph © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.9 Dynamic Routing Updates In A WAN © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.9 Dynamic Routing Updates In A WAN As the figure 18.6 shows, nodes in the graph are given a label that is the same as the number assigned to the corresponding packet switch A graph representation is useful in computing next-hop forwarding because graph theory has been studied and efficient algorithms have been developed a graph abstracts away details, allowing routing software to deal with the essence of the problem When it computes next-hop forwarding for a graph a routing algorithm must identify a link Our examples will used the notation (k, j) to denote a link from node k to node j When a routing algorithm runs on the graph in Figure 18.6b The algorithm produces output as shown in Figure 18.7 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.9 Bir WAN da Dinamik Yönlendirme Güncellemeleri figure 18.6 de, düğümler ilgili paket anahtarına atanmış aynı numara ile etiketlenmiştir bir graph belirtimi bir sonraki hop iletilmesinin hesaplanması için kullanışlıdır. because graph theory has been studied and efficient algorithms have been developed Bir graph detaylardan soyutlanmış, yönlendirme yazılımına problemin özü ile ilgilenmeye imkan sağlar Bir sonraki hop iletilmesi graph dan hesaplanıldığında Yönlendirme algoritması bir link tanımlar Bizim örneğimizde (k,j) notasyonu k dan j ye link tanımlamak için kullanılır Bir yönlendirme algoritması figür 18.6b da çalışırsa Figür 18.7 deki sonuç üretilir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.9 Dynamic Routing Updates In A WAN © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.10 Default Routes The forwarding table for node 1 in Figure 18.7 raises an important point: a forwarding table may contain many entries that point to the same next hop An examination of the WAN in Figure 18.6a reveals why all remote entries contain the same next hop: the packet switch has only one connection to the network Therefore, all outgoing traffic must be sent across the same connection Consequently, except for the entry that corresponds to the node itself, all entries in node1's forwarding table have a next hop that points to the link from node1 to node3 In our trivial example, the list of duplicate entries in the forwarding table is short © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.10 Varsayılan Rotalar Düğüm 1 e göre yönlendirme tablosu (figür 18.7 de) önemli bir noktayı gösterir: Bir yönlendirme tablosu aynı sonraki hop u işaret eden pek çok kayıt içerebilir Figure 18.6a da ki WAN incelemesi neden bütün uzak katırların aynı sonraki hop u içerdiğini ortaya koyar: Paket anahtarı network e sadece bir bağlantıya sahiptir Böylece, bütün dışarı giden trafik aynı bağlantıya gönderilir Bundan dolayı, kendisininin karşılığı olan kayıtlar haricinde, düğüm 1 in yönlendirme tablolarındaki bütün kayıtlar düğüm 1 den düğüm 3 ü işaret eden bir sonraki hop a sahiptir. yönlendirme tablosunda benzer kayıt listesi kısadır © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.10 Default Routes A large WAN may contains hundreds of duplicate entries Most WAN systems include a mechanism that can be used to eliminate the common case of duplicate entries Default route is a mechanism that allows a single entry in a forwarding table to replace a long list of entries that have the same next-hop value Only one default entry is allowed in a forwarding table and the entry has lower priority than other entries If the forwarding mechanism does not find an explicit entry for a given destination it uses the default Figure 18.8 shows the forwarding tables from Figure 18.7 revised to use a default route © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.10 Varsayılan Rotalar Büyük bir WAN da yüzlerce çift kayıt içerebilir Pek çok WAN sistemi çift kayıtları silmede kullanılan bir mekanizmaya sahiptir Default route aynı sonraki hop değerine sahip kayıtları tek bir kayıt ile değiştirmeye izin veren bir mekanizmadır Sadece bir varsayılan kayıta izin verir Ve kayıt diğerlerine göre daha düşük önceliklidir Eğer yönlendirme mekanizması verilen hedef için açık bir kayıt bulamazsa Varsayılanı kullanır Figure 18.8 varsayılan rotayı kullanarak Figure 18.7 den revize edilmiş yönlendirme tablolarını gösterir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.10 Default Routes © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.10 Default Routes Default routing is optional a default entry is present only if more than one destination has the same next-hop value For example, the forwarding table for node3 does not contain a default route because each entry has a unique next hop However, the forwarding table for node1 benefits from a default route because all remote destinations have the same next hop © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.10 Varsayılan Rotalar Varsayılan yönlendirme isteğe bağlıdır Sadece birden fazla hedef aynı sonraki hop değerine sahipse varsayılan kayıt ileri sürülür Örneğin, yönlendirme tablosundaki düğüm 3 varsayılan rota içermiyorsa Çünkü her kayıt tek ve eşsiz sonraki hop bilgisine sahiptir Bununla birlikte, düğüm 1 için yönlendirme tablosu bir varsayılan rotadan yarar sağlar Çünkü bütün uzak hedefler aynı sonraki hop a sahiptir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.11 Forwarding Table Computation Basic approaches to construct forwarding tables? Static routing A program computes and installs routes when a packet switch boots The routes do not change Dynamic routing A program builds an initial forwarding table when a switch boots Program then alters the table as conditions in the network change Each approach has advantages and disadvantages Advantages of static routing are simplicity and low overhead Disadvantage is inflexibility static routes cannot be changed when communication is disrupted Large networks are designed with redundant connections to handle occasional hardware failures most WANs use a form of dynamic routing © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.11 Yönlendirme Tablosu Hesabı Yönlendirme tablosu üretimi için basit yaklaşım? Static routing Bir program rotaları yükler ve hesaplar, bir paket anahtarı önyükleme yapınca Rotalar değişmez Dynamic routing Bir program ilk yönlendirme tablosunu oluşturur, bir anahtar önyükleme yapınca Sonrasında program ağdaki değişliklere göre tabloları günceller Her yaklaşımın avantajları ve dezavantajları vardır Static yönlendirmenin avantajı basitliği ve düşük işletim yükü Dez avantajı esnek olmayışı static routes cannot be changed when communication is disrupted Büyük netwrokler arasıra meydana gelen donanım hatalarını yakalamak için fazka bağlantılar ile dizayn edilmiştir most WANs use a form of dynamic routing © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.12 Distributed Route Computation Algorithm 18.2 shows how a forwarding table can be computed after information about a network is encoded in a graph In practice, WANs need to perform distributed route computation Instead of a centralized program computing all shortest paths each packet switch must compute its own forwarding table locally All packet switches must participate in distributed route computation There are two general forms: Link-State Routing (LSR), which uses Dijkstra's algorithm Distance-Vector Routing (DVR), which uses another approach The next sections describe each of the two approaches Chapter 27 explains how each approach is used to control routes in the Internet © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.12 Dağınık Rota Hesabı Algorithm 18.2 hesaplana bit yönlendirme tablosunu gösterir Ağ hakkında bilgiden sonra graph olarak kodlanır Uygulamada, WNA lar distributed route computation işlemine ihtiyaç duyar bütün kısa yolları hesaplayan merkezi program hesabının yerine each packet switch must compute its own forwarding table locally Bütün paket anahtarları dağınık rota hesabında anlaşmalıdır İki genel biçimi vardır: Link-State Routing (LSR), Dijkstra's algorithm kullanır Distance-Vector Routing (DVR), diğer yaklaşımı kullanır sonraki bölüm bu iki yaklaşımı anlatacaktır Chapter 27 explains how each approach is used to control routes in the Internet © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.12 Distributed Route Computation 18.12.1 Link-State Routing (LSR) Link-state routing or Link-status routing the approach also known as Shortest Path First (SPF) routing Dijkstra algorithm used it to characterize the way it works actually all routing algorithms find shortest paths To use LSR, packet switches periodically send messages across the network that carry the status of a link For example, packet switches 5 and 9 measure the link between them and send a status message such as ``the link between 5 and 9 is up'' Each status message is broadcast to all switches Every switch collects incoming status messages and uses them to build a graph of the network Each switch then uses Algorithm 18.2 to produce a forwarding table by choosing itself as the source © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.12 Dağınık Rota Hesabı 18.12.1 Link-State Routing (LSR) Link-state routing veya Link-status routing Bu yaklaşım Shortest Path First (SPF) routing olarakda bilinir Dijkstra algorithm kullanılır actually all routing algorithms find shortest paths LSR kullanmak için, paket anahtarları periyodik olarak bağlantının durumunu taşıyan mesajları ağa gönderir Örneğin, anahtar 5 ve 9 arasındaki bağlantıyı ölçer ve durum mesajı gönderir such as ``the link between 5 and 9 is up'' Her durum mesajı bütün anahtarlara yayın yapılır Her anahtar gelen durum mesajını toplar Ve ağın grafiğini oluşturmada kullanır Her anahtar kendini kaynak olarak seçerek algoritma 18.2 yi kullanır ve yönlendirme tablosunu oluşturur © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
Algorithm 18.2 A version of Dijkstra’s algorithm that computes R, a nexthop forwarding table, and D, the distance to each node from the specified source node © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.12 Distributed Route Computation 18.12.1 Link-State Routing (LSR) An LSR algorithm can adapt to hardware failures If a link between packet switches fails the attached packet switches will detect the failure and broadcast a status message that specifies the link is down All packet switches receive the broadcast change their copy of the graph to reflect the change in the link's status and re-compute shortest paths Similarly, when a link becomes available again the packet switches connected to the link detect that it is working and start sending status messages that report its availability © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.12 Dağınık Rota Hesabı 18.12.1 Link-State Routing (LSR) bir LSR algoritması donanım hatalarına adapte edilebilir Eğer paket anahtarları arasındaki bağlantı düşerse Paket anahtarları hatayı tespit eder Ve bağlantının düştüğüne dair durum mesajı yayını yapar Bütün paket anahtarları bu yayını alır Bağlantının durmrundaki değişikliği kendi grafik kopyalarında değiştirir Ve en kısa yolları tekrar hesaplar Benzer olarak, bir bağlantı tekrar uygun duruma geçerse Bağlantıyı oluşturan paket anahtarları çalıştıkları tespit eder Ve uygun duruma geçtiklerini belirten durum mesajı yollamaya başlar © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18. 12 Distributed Route Computation 18. 12 18.12 Distributed Route Computation 18.12.2 Distance Vector Routing (DVR) As with LSR, each link in the network is assigned a weight The distance to a destination between two packet switches is defined to be the sum of weights along the path between the two Like LSR, DVR arranges for packet switches to exchange messages periodically In DVR, a switch send a complete list of destinations and the current cost of reaching each When it sends a DVR message a switch is sending a series of individual statements, of the form: “I can reach destination X, and its current distance from me is Y” © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.12 Dağınık Rota Hesabı 18.12.2 Distance Vector Routing (DVR) LSR deki gibi, her bağlantıya bir ağırlık atanır İki paket anahtarı arasındaki uzaklık ikisi arasındaki yolun ağırlıklarını toplamı ile tanımlanır LSR deki gibi, DVR paket anahtarlarının periyodik olarak mesaj değiş tokuşunu ayarlar DVR de, bir anahtar hedeflerin bütün listesini ve hepsine erişimin mevcut maliyetini gönderir DVR mesajı gönderdiğinde Bir anahtar aşağıdaki biçimde bireysel ifadeler dizisi gönderir: “I can reach destination X, and its current distance from me is Y” © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18. 12 Distributed Route Computation 18. 12 18.12 Distributed Route Computation 18.12.2 Distance Vector Routing (DVR) DVR messages are not broadcast Each switch periodically sends a DVR message to its neighbors Each message contains pairs of (destination, distance) Each packet switch must keep a list of possible destinations along with the current distance to the destination and the next hop to use The list of destinations and the next hop for each can be found in the forwarding table DVR software can be considered as maintaining an extension to the forwarding table that stores a distance for each destination © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.12 Dağınık Rota Hesabı 18.12.2 Distance Vector Routing (DVR) DVR mesajları yayın yapılmaz Her anahtar kendi komşusuna bir DVR mesajı gönderir Her mesaj (hedef,uzaklık) ikilisini içerir Her paket anahtarı mümkün hedef listesini tutmak zorundadır Mevcut uzaklık ile bir sonraki kullanılacak hop arasındaki uzaklık Herbiri için hedef ve bir sonraki hop listesi yönlendirme tablosunda bulunabilir DVR yazılımı yönlendirme tablosunun kapsamlı hali olarak düşünülebilir Her hedef için uzaklıkları depolar © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18. 12 Distributed Route Computation 18. 12 18.12 Distributed Route Computation 18.12.2 Distance Vector Routing (DVR) When a message arrives at a switch from neighbor N the switch examines each item in the message and changes its forwarding table if the neighbor has a shorter path to some destination than the path currently being used Example: if neighbor N advertises a path to destination D as having cost 5 and the current path through neighbor K has cost 100 the current next hop for D will be replaced by N and the cost to reach D will be 5 plus the cost to reach N Algorithm 18.3 specifies how routes are updated when using the distance-vector approach © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.12 Dağınık Rota Hesabı 18.12.2 Distance Vector Routing (DVR) N komşusundan anahtara bir mesaj geldiğinde Anahtar mesajdaki her kaydı inceler Ve eğer kullanılan yoldan mevcut hedefe komşusu daha kısa bir yola sahipse yönlendirme tablosunu değiştirir Örnek: Eğer N komşusu K komşusuna D hedefi için maliyeti 100 olan bir yola 5 lik bir maliyetteki yolu önerirse D için mevcut bir sonraki hop N ile değiştirlir Ve D ye ulaşım maliyeti N ye ulaşım maliyeti artı 5 olur Algorithm 18.3 specifies how routes are updated when using the distance-vector approach © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
Algorithm 18.3 Distance-vector algorithm for route computation © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Shortest Path Computation In A Graph Once a graph has been created that corresponds to a network software uses a method known as Dijkstra's Algorithm To find the shortest path from a source node to each of the other nodes in the graph: a next-hop forwarding table is constructed during the computation of shortest paths The algorithm must be run once for each node in the graph That is, to compute the forwarding table for packet switch P the node that corresponds to P is designated as the source node and the algorithm is run © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Graph için En Kısa Yol Hesabı Önce bir ağ ile ilişkili bir graph oluşturulur Yazılım Dijkstra's Algorithm olarak bilinen algoritmayı kullanır Bir kaynak düğümden graph daki bütün düğümlere olan en kısa yol şöyle bulunur: En kısa yollar hesaplanırken bir sonraki yönlendirme tablosu oluşturulur Algoritma bütün düğümler için bir kere çalışır Bu, paket anahtarı P için yönlendirme tablosu hesabı içindir P ile ilişkili düğüm kaynak düğüm olarak belirnelir Ve algoritma çalıştırlır © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Shortest Path Computation In A Graph Dijkstra's algorithm is popular because it can be used with various definitions of shortest path In particular, the algorithm does not require edges in the graph to represent geographic distance. Instead, the algorithm allows each edge to be assigned a nonnegative value called a weight defines the distance between two nodes to be the sum of the weights along a path between the nodes Figure 18.9 illustrates the concept of weights by showing an example graph with an integer weight assigned to each edge and a least-weight path between two nodes in the graph © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Graph için En Kısa Yol Hesabı Dijkstra's algorithm popülerdir Çünkü pek çok farklı en kısa yol tanımları ile kullanılabilir Ayrıntılı olarak, graph daki coğrafi uzaklıkları ifade etmek için graph da algortima kenarlara ihtiyaç duymaz. Her kenara ağarlık adında negatif olmayan değer atar İki paket anahtarı arasındaki uzaklık ikisi arasındaki yolun ağırlıklarını toplamı ile tanımlanır Figure 18.9 ağırlık konseptini gösterir Her kenara bir tamsayı ağırlığı atayarak bir örnek gösterir Ve graph daki iki düğüm arasındaki en düşük ağırlık © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Shortest Path Computation In A Graph © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Shortest Path Computation In A Graph Dijkstra's algorithm maintains a set of nodes, S for which the minimum distance and next hop have not been computed The set is initialized to all nodes except the source The algorithm then iterates until set S is empty On each iteration the algorithm removes a node from S that has the least distance from the source As it deletes node u, the algorithm examines the current distance from the source to each of the neighbors of u that remains in the set If a path from the source through u to the neighbor has less weight than the current path, the algorithm updates the distance to the neighbor After all nodes have been removed from S the algorithm will have computed the minimum distance to each node and a correct next-hop forwarding table for all possible paths © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Graph için En Kısa Yol Hesabı Dijkstra's algorithm S olarak bir düğüm dizisi kullanır Minimum uzaklık ve bir sonraki hop hesaplanmamış Bu kümeda kaynak dışında bütün düğümlere ilk değer atanır Algoritma sonrasında S kümesi boş olana kadar tekrarlanarak çalışır Her iterasyonda Algoritma S den kaynağa en kısa mesafede olan düğümü çıkarır Düğüm u yu silerken, algoritma kaynaktan u nun S kümesinde kalan bütün elemanlara olan mevcut uzaklılarını inceler Eğer kaynaktan u üzerinden komşulara olan uzaklık mevcut uzaklıktan küçükse, algoritma komşuya olan uzaklığı değiştirir Sonra s deki bütün düğümler çıkarılır Algoritma bütün düğümlere minimum uzaklığı hesaplar ve bütün mümkün yollar için yönlendirme tablosu oluşturur © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Shortest Path Computation In A Graph Dijkstra's algorithm needs 3 data structures to store: the current distance to each node the next hop for the shortest path and information about the remaining set of nodes Nodes can be numbered from 1 to n as Figure 18.9 which makes the implementation efficient because a node number can be used as an index into a data structure The algorithm can use two arrays, D and R each indexed by the node number The ith entry in array D stores a current value of the minimum distance from the source to node i The ith entry in array R stores the next hop used to reach node i along the path being computed The set S can be maintained as a doubly linked list of node numbers which facilitates searching the entire set or deleting an entry © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Graph için En Kısa Yol Hesabı Dijkstra's algorithm depolama için 3 veri yapısına ihtiyaç duyar: Bütün düğümlere mevcut uzaklık En kısa yol için bir sonraki hop Ve kalan düğüm kümesi bilgisi Figure 18.9 de düğümler 1 den n ye kadar numarandırılır Bu implementasyonu daha etkili yapar because a node number can be used as an index into a data structure Algoritma D ve R olarak iki dizi (array) kullanır Her biri düğüm numarası ile indexl enir. D deki ith kayıt kaynak i den minimum uzaklık değerini tutar R deki ith kayıt hesaplana yol boyunca i düğümüne ulaşmada kullanılacak bir sonraki hop bilgisini tutar S kümesi düğüm numaraları içim çift yönlü linked list olarak işlenir which facilitates searching the entire set or deleting an entry © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Shortest Path Computation In A Graph Algorithm 18.2 uses weight (i, j) as a function that returns the weight of the edge from node i to node j Function weight is assumed to return a reserved value infinity if no edge exists from node i to node j In practice, any value can be used to represent infinity provided the value is larger than the sum of weights along any path in the graph One way to generate a value infinity consists of adding one to the sum of all weights on all edges Allowing arbitrary weights to be assigned to edges of a graph means that one algorithm can be used with different measures of distance For example, some WAN technologies measure distance by counting the number of packet switches along a path © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Graph için En Kısa Yol Hesabı Algorithm 18.2 weight (i, j) yi fonksiyon olarak kullanır Bu fonksiyon i ve j düğümleri arasındaki ağırlığı döndürür weight fonkiyonu i ve j isminde düğüm yoksa sonsuz değerini döndürür Uygulamada, herhangi yolun ağırlıklarının toplamında daha büyük bir değer sonsuzu ifade etmek için kullanılabilir Bir diğer yolda, bütün kenarları ağırlıklarının toplamına 1 eklenerek elde edilen sayıyı sonsuz değeri için kullanmaktır Allowing arbitrary weights to be assigned to edges of a graph means that one algorithm can be used with different measures of distance For example, some WAN technologies measure distance by counting the number of packet switches along a path © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Shortest Path Computation In A Graph To use the algorithm for such technologies each edge in the graph is assigned a weight of 1 In other WAN technologies, weights are assigned to reflect the capacity of the underlying connections. A network manager can assign weights to links to control routing For example, consider a case where two separate paths exist between a pair of packet switches with one path designated to be the primary path and the other designated to be a backup path To enforce such a policy a network manager can assign the primary link a low weight and the other link a high weight Routing software will configure forwarding tables to use the path with low weight unless the path is not available in which case routing software will select the alternative path © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.13 Graph için En Kısa Yol Hesabı Algoritmayı şu gibi teknolojilerde kullanılır Graph daki her kenara 1 ağırlığı atanır Diğer WAN teknolojilerinde, ağırlıklara temelinde olan bağlantıların kapasitesini yansıtan bilgiler atanır. Bir ağ yöneticisi bağlantılara yönlendirmeyi kontrol etmek için ağırlıklar atayabilir Örneğin, paket anahtar çifti arasında iki ayrı yol için şu durumları düşünün Bir yol birincil yol (primary path) olarak belirlenmiş Diğeri yedek yol (backup path) olarak To enforce such a policy Bir ağ yöneticisi birincil yol için düşük ağırlık diğer bağlantı için yüksek ağırlık atayabilir Yönlendirme yazılımı yönlendirme tablolarını ayarlarken düşük ağırlıklı yolları kullanacaktır Yol uygun olmasa bile Bu durumda yazılım alternatif yollar seçecektir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.14 Routing Problems In theory, either LSR or DVR routing will compute shortest paths Furthermore, each approach will eventually converge meaning that the forwarding tables in all packet switches agree However, problems do occur For example, if LSR messages are lost, two packet switches can disagree about the shortest path DVR problems can be more severe because a link failure can cause two or more packet switches to create a routing loop in which each packet switch thinks the next packet switch in the set is the shortest path to a particular destination As a result, a packet can circulate among the switches indefinitely © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.14 Routing Problems One of the primary reasons DVR protocols exhibit problems comes from backwash (i.e., a packet switch receives information that it sent) For example, suppose a switch tells its neighbors “I can reach destination D at cost 3'' If the connection leading to destination D fails the switch will remove the entry for D from its forwarding table (or mark the entry invalid) But the switch has told neighbors that a route exists Imagine that just after the link fails one of the neighbors sends a DVR message that specifies “I can reach destination D at cost 4” Unfortunately the message will be believed and a routing loop will be created © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18.14 Routing Problems Most practical routing mechanisms contain constraints and heuristics to prevent problems like routing loops For example, DVR schemes employ split horizon which specifies that a switch does not send information back to its origin Furthermore, most practical routing systems introduce hysteresis that prevents the software from making many changes in a short time However, in a large network where many links fail and recover frequently, routing problems can occur © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.