Routing Working at a SmalltoMedium Business or ISP
Routing Working at a Small-to-Medium Business or ISP – Chapter 6 ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1
Objectives § Purpose and function of dynamic routing and the protocols § RIPv 2 dynamic routing using the Cisco IOS § Use of exterior routing protocols across the Internet § BGP on a customer site router Border Gateway Protocol ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 2
Dynamic Routing and Protocols § Purpose and function of routing and the protocols ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 3
Dynamic Routing and Protocols § Purpose and function of routing and the protocols Cedule nad dálnicí: Pro cestu sem. . . . je to takto daleko. . . . a jeď směrem na R 2 ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 4
How Routers use Routes § Destination, mask, gateway, and metric in a routing table route Hledá cestu k adrese 172. 16. 236. 101 Cílovou adresu 172. 16. 236. 101 násobí každou maskou, kterou má v tabulce, tj. 255. 0 a 255. 0. 0. Co mu vyjde, to hledá v tabulce. Najde 172. 16. 236. 0 a 172. 16. 0. 0. Delší je 172. 16. 236. 0, proto ji použije. Cesta k ní vede přes 172. 16. 3. 1. ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 5
Static and Default Routes § Syntax and function of manually-configured routes. Přímo připojená síť (vyťukáno ručně) Naučil se sám přes protokol RIP Ručně vyťukaná cesta S čímkoliv si nevíš rady, hoď sem (vyťukáno ručně) ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 6
Dynamic Routing and Protocols Interior Routing Protocols § Distance vector and Link state protocols Distance Vector Protocol: Router má ponětí, jak daleko je určitá síť (distance) a kterým směrem (vector). Link State Protocol: Router si postupně vytvoří mapu celé sítě. Ví, které routery jsou v síti a jak jsou mezi sebou propojeny. Vypočítá si nejlepší cestu do každého místa v celé síti. Těmito obrázky se moc netrápit, jsou to jen ilustrace. ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 7
Dynamic Routing and Protocols Interior Routing Protocols § RIP - Routing Information Protocol RIP: • Is a distance vector routing protocol • Uses hop count as the metric for path selection • Defines a hop count greater than 15 as an unreachable route • Sends routing table contents every 30 seconds ITE PC v 4. 0 Chapter 1 • Založený na vektoru vzdálenosti • Pro vyjádření vzdálenosti používá počet skoků = počet směrovačů, přes které paket bude muset projít. • Co je dál než 15 skoků, považuje za nedosažitelné. Brání se tím nekonečnému kolování zbloudilých paketů. • Obsah celé své směrovací tabulky odesílá každých 30 s na všechny strany. © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 8
Dynamic Routing and Protocols Interior Routing Protocols § RIP - Routing Information Protocol RIP disadvantages: Maximum of 15 hops => maximum of 16 routers in a series Periodically sends complete copies of the entire routing table. This can cause a lot of traffic. Converges slowly on larger networks when the network changes. RIPv 1 does not send subnet mask information in the updates. It must rely on the classful default subnet masks. ITE PC v 4. 0 Chapter 1 V síti nemůže být za sebou víc než 16 směrovačů. Periodické rozesílání celých směrovacích tabulek na všechny strany zatěžuje síť. K cílovému stavu, kdy všichni vědí všechno, konverguje (= přibližuje se) pomalu. RIPv 1 nerozesílá masky podsítí. Proto se musí spokojit s default maskou, vyplývající z třídy sítě. Např. když síť 192. 168. 1. 0 rozdělíme na 8 podsítí, odpovídající maska je 255. 224. On ale masku nepošle a všichni předpokládají masku 255. 0 odpovídající třídě C původní sítě. © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 9
Dynamic Routing and Protocols Interior Routing Protocols > Vazeni panove, > na obou routerech (obr. v priloze) bezi RIPv 1. > RIPv 1 ve svych updatech nesiri informaci o maskach a predpoklada masky > odpovidajici tridam siti. > Presto oba routery maji ve svych routing tables (priklad R 1) > > 172. 16. 0. 0/24 is subnetted, 4 subnets >R 172. 16. 1. 0 [120/1] via 172. 16. 3. 1, 00: 09, Serial 2/0 >R 172. 16. 2. 0 [120/1] via 172. 16. 3. 1, 00: 09, Serial 2/0 >C 172. 16. 3. 0 is directly connected, Serial 2/0 >C 172. 16. 4. 0 is directly connected, Fast. Ethernet 0/0 > > spravnou informaci o vzdalenych sitich a jejich maskach. ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 10
Dynamic Routing and Protocols Interior Routing Protocols Je to klasicky pripad (jedineho korektniho) podsitovani pro RIP - cela major networj 172. 16 ma masku /24. Pokud router propaguje nejakou podsit 172. 16 na inteface, ktere samo do te site patri, neorezava dalsi bytes za /16 na 0. 0. A naopak, prijimajici router, ktery slysi info o podsiti major site, kam interface sam patri, jako masku pouzije masku z prijimajiciho interface. Je to srozumitelne ? P. G. ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 11
Dynamic Routing and Protocols Interior Routing Protocols EIGRP = Enhanced Interior Gateway Routing Protocol EIGRP = Cisco-proprietary protocol. It combines distance vector and link-state routing. It has a maximum hop count of 224 hops. EIGRP pochází od Cisca. Kombinuje směrování podle vektoru vzdálenosti a podle stavu linky. Maximální počet skoků je 224 (RIP jen 15). EIGRP uses several metrics: • Delay • Bandwidth • Reliability • Load Pro posouzení cesty se spíše než pojem vzdálenost (distance) používá cena (cost). Cena je vyjádřena kombinací čtyř vlastností: • Zpoždění • Propustnost • Spolehlivost • Zatížení Čím menší cena, tím lépe je cesta hodnocena. ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 12
Dynamic Routing and Protocols Interior Routing Protocols EIGRP = Enhanced Interior Gateway Routing Protocol EIGRP builds • Neighbor table • Topology table • Routing table EIGRP buduje: • Tabulku sousedů • Tabulku topologie • Směrovací tabulku Neighbor table stores data about the neighboring routers: • interface IP addresses • interface type • bandwidth Tabulka sousedů uchovává data o sousedních směrovačích: • IP adresy jejich rozhraní • Typ rozhraní • Propustnost ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 13
Dynamic Routing and Protocols Interior Routing Protocols EIGRP = Enhanced Interior Gateway Routing Protocol Topology table contains all the routes advertised by the neighbor routers. EIGRP uses a routing algorithm called Diffused Update Algorithm (DUAL) to calculate the shortest path to a destination and to install this route into the routing table. ITE PC v 4. 0 Chapter 1 Tabulka topologie obsahuje všechny cesty, které jsme se dozvěděli od sousedních směrovačů, a to bez ohledu na jejich kvalitu a jestli je nakonec zařadíme do směrovací tabulky nebo ne. EIGRP používá směrovací algoritmus DUAL, pomocí kterého vypočítá nejlepší cestu do cíle. Tuto cestu potom zařadí do směrovací tabulky. © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 14
Dynamic Routing and Protocols Interior Routing Protocols EIGRP = Enhanced Interior Gateway Routing Protocol R 1 zjistil novou cestu od sebe napravo. Pošle po ní Hello. R 2 dostal Hello, pošle informaci o sobě. R 1 potvrdí příjem a zařadí cestu do své topologické tabulky. R 1 pošle informaci o sobě. R 2 potvrdí příjem. Je konvergováno, všichni vědí všechno, může se směrovat. ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 15
Dynamic Routing and Protocols Interior Routing Protocols Link-state Protocols = Protokoly směrující podle stavu linek The link-state routing maintains a full database of distant routers and how they interconnect. Link-state routing uses the following features: • Routing table • Link-state advertisement (LSA) • Topological database Směrování podle stavu linek udržuje úplnou databázi vzdálených směrovačů a jejich vzájemného propojení. • • Užívá tyto pojmy: Směrovací tabulka Oznámení o stavu linky Topologická databáze Algoritmus „Nejkratší cesta nejdřív“ • SPF (Shortest Path First) algorithm ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 16
Dynamic Routing and Protocols Interior Routing Protocols Link-state Protocols • Link-state advertisement (LSA) Small packet of routing information that is sent between routers. LSAs describe the state of the interfaces (links) of a router and other information, such as the IP address of each link. • Topological database - Collection of information gathered from all the LSAs received by the router. • SPF (Shortest Path First) algorithm Calculation performed on the database that results in the SPF tree. The SPF tree is a map of the network as seen from the point of view of the router. The information in this tree is used to build the routing table. ITE PC v 4. 0 Chapter 1 Oznámení o stavu linek. Malé pakety se směrovacími informacemi, posílané mezi směrovači. Popisují stavy rozhraní (linek) směrovače a např. také IP adresy každého rozhraní. Topologická databáze je sbírka informací ze všech LSA, které směrovač dostal. Algoritmus „Nejkratší cesta nejdřív“ provádí výpočty s údaji v databázi a výsledkem je strom SPF. To je mapa sítě viděná z místa našeho směrovače. Informace z tohoto stromu jsou základem pro tvorbu směrovací tabulky. © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 17
Dynamic Routing and Protocols Interior Routing Protocols Link-state Protocols: OSPF = Open Shortest Path First = Nejkratší cestu otevři jako první Shromáždí si databázi informací o stavu linek, . . . ITE PC v 4. 0 Chapter 1 . . . na ni pustí algoritmus SPF = Shortest Path First = Nejkratší cestu nejdřív, . . . a vypočítá nejlepší cesty ke každému cíli v síti. Cesty k cílům vidí od sebe jako strom, . . . © 2007 Cisco Systems, Inc. All rights reserved. . ze kterého poskládá směrovací tabulku. Z ní pak vybírá cesty, když směruje pakety. Cisco Public 18
Dynamic Routing and Protocols Interior Routing Protocols Link-state Protocols: OSPF = Open Shortest Path First = Nejkratší cestu otevři jako první Characteristics of OSPF: Charakteristika OSPF: • Uses the SPF algorithm to calculate the lowest cost to a destination • K výpočtu nejvýhodnější cesty s nejmenší cenou používá algoritmus SPF • Sends routing updates only when the topology changes; does not send periodic updates of the entire routing table • Aktualizace posílá jen při změně topologie, a ne periodicky • Provides fast convergence • Supports Variable Length Subnet Mask (VLSM) and discontiguous subnets • Rychle konverguje • Podporuje VLSM – Podsíťovou masku proměnné délky • Umožňuje ověřování cesty • Provides route authentication ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 19
Dynamic Routing and Protocols Metrics used in IP routing protocols: Metriky používané ve směrovacích IP protokolech: • Hop count - Number of routers a packet must traverse • Počet skoků – počet směrovačů, přes které paket musí přejít • Bandwidth - Bandwidth of a specific link • Zatížení – jak linka využita • Load - Traffic utilization of a specific link • Delay - Time a packet takes to traverse a path • Reliability - Probability of a link failure • Propustnost – propustnost linky • Zpoždění – čas, který paket potřebuje, aby prošel cestu • Spolehlivost – pravděpodobnost poruchy na lince • Cena – vyjadřuje, jak cestě dáváme přednost před ostatními • Cost - indicates preference for a route Metrika = způsob hodnocení, měření, výběru ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 20
Dynamic Routing and Protocols Administrative distance (AD) represents the "trustworthiness" of the route. The lower the AD, the better, the more the trustworthy the route. From two routes to the same destination, the router chooses the route with the lowest AD. ITE PC v 4. 0 Chapter 1 Administrativní vzdálenost vyjadřuje „důvěryhodnost“ cesty. Čím nižší, tím lepší, tím je trasa důvěryhodnější. Ze dvou cest do jednoho místa si směrovač vybere tu, která má menší administrativní vzdálenost. © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 21
Dynamic Routing and Protocols Cesty dostávají svoji důvěryhodnost (Administrative distance) podle protokolů, od kterých se o nich směrovač dozvěděl: Route Source Default Distance Values Connected interface 0 Static route 1 External Border Gateway Protocol (BGP) 20 Internal EIGRP 90 IGRP 100 OSPF 110 Routing Information Protocol (RIP) 120 Exterior Gateway Protocol (EGP) 140 Internal BGP 200 Unknown* 255 ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Největší důvěryhodnost mají přímo připojená rozhraní a statické cesty, vyťukané správcem. Cisco Public 22
Routing within an Organization Úplně malé organizace nepotřebují směrování vůbec. Jediné směrování pro ně je připojení k internetu. ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 23
Routing within an Organization Větší než úplně malé podniky použijí statické cesty. V tomto příkladu jsou použité dva ISR 1841 a mezi nimi staticky konfigurovaná cesta. ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 24
Routing within an Organization Střední podniky mohou použít protokol RIPv 2 s nějakými statickými cestami. ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 25
Routing within an Organization Velké podniky mohou použít protokol EIGRP (pokud používají jen Cisco zařízení) nebo OSPF. ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 26
Routing within an Organization Obrovské podniky, které mají zařízení od různých výrobců, použijí OSPF (protože EIGRP neběží na jiných zařízeních než Cisco). ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 27
Routing within an Organization Celosvětové podniky budou muset použít podobné řešení, jaké používají ISP. ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 28
Dynamic Routing and Protocols RIP routing on a router 1. Nastav rozhraní a jejich adresy Router(config)# interface fastethernet 0/1 Budeme nastavovat rozhraní fastethernet na modulu č. 0, konektoru č. 1 Router (config-if)# ip address 192. 168. 1. 1 255. 0 Adresa rozhraní a jeho maska Router(config-if)# no shutdown Aktivuj rozhraní ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 29
Dynamic Routing and Protocols RIP routing on a router 2. Nastav protokol Router(config)# router rip Budeme používat protokol RIP, . . . Router (config-router)# version 2. . . verzi 2 Router(config-router)# network 192. 168. 1. 0 Ke směrovači je přímo připojená tato síť ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 30
Dynamic Routing and Protocols RIP routing on a router ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 31
Exterior Routing Protocols Across the Internet § Internet is divided up into sets of networks called Autonomous Systems (AS). § An AS is a set of networks controlled by a single administrative authority. Each AS has a unique AS number (ASN). ASNs are controlled and registered on the Internet. § Example of an AS: ISP. Anybody connected to the Internet through an ISP becomes part of the routing domain of that ISP. ITE PC v 4. 0 Chapter 1 • Internet je rozdělený na soustavy sítí zvané Autonomní Systémy (AS). • AS je soustava sítí spravovaná jedním správcem. Každý AS má jedinečné číslo (ASN). Tato čísla jsou centrálně přidělována a registrována. • Příklad AS: ISP. Kdokoliv připojený k ISP se stává součástí směrovací domény toho ISP. © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 32
Exterior Routing Protocols Across the Internet The difference between interior and exterior routing protocols ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 33
Exterior Routing Protocols Across the Internet How a packet is routed across the Internet Uvnitř AS si ho podávají Interior (vnitřní) Gateway Protocols. ITE PC v 4. 0 Chapter 1 Mezi AS si ho podávají Exterior (vnější) Gateway Protocols. Ty musí mít ponětí o propojení mezi jednotlivými AS. © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 34
Exterior Routing Protocols Across the Internet How ISPs use exterior routing protocols to forward traffic ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 35
Exterior Routing Protocols Across the Internet Implementing BGP ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 36
Summary § All routers make routing decisions by looking up information stored in their routing tables. § Routes can be statically assigned by an administrator, or dynamically learned by the router via a routing protocol. § Routing protocols use either distance-vector or link-state algorithms to calculate the best routes to each destination. § Criteria such as ease of management, ease of configuration, and efficiency must be considered when selecting a routing protocol for use within an organization. § Organizations are also called Autonomous Systems. § Between Autonomous Systems, Exterior Gateway routing protocols control the flow of traffic. § ISPs handle Internet traffic through the use of routing policies. ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 37
ITE PC v 4. 0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 38
- Slides: 38