Prezentace se nahrává, počkejte prosím

Prezentace se nahrává, počkejte prosím

© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Introduction to Routing and Packet Forwarding Routing Protocols and.

Podobné prezentace


Prezentace na téma: "© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Introduction to Routing and Packet Forwarding Routing Protocols and."— Transkript prezentace:

1 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Introduction to Routing and Packet Forwarding Routing Protocols and Concepts – Chapter 1

2 ITE PC v4.0 Chapter 1 2 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Objectives  Router = computer with an OS and hardware designed for the routing  Configuring devices and applying addresses  Structure of a routing table  How a router determines a path and routes packets

3 ITE PC v4.0 Chapter 1 3 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer  Basic purpose of a router –Computers specialized in sending packets over the network –Responsible for selecting the best path for a packet  Routers generally have 2 connections: –WAN connection (Connection to ISP) –LAN connection Hlavní účel Specializované počítače Vybírají nejlepší cestu pro pakety Mají obvykle dva druhy připojení WAN (např. připojení k ISP) LAN (připojení našich počítačů)

4 ITE PC v4.0 Chapter 1 4 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer  Data is sent in form of packets between 2 end devices  Routers are used to direct packet to its destination Data posíláme v paketech mezi dvěma koncovými zařízeními Routery směrují pakety k jejich cíli

5 ITE PC v4.0 Chapter 1 5 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer  Routers examine a packet’s destination IP address and determine the best path by the aid of a routing table Router zjistí cílovou IP adresu paketu a ve směrovací tabulce nalistuje nejlepší cestu. Směrovací tabulku používá jako mapu

6 ITE PC v4.0 Chapter 1 6 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer  Router components and their functions  CPU - Executes operating system instructions  Random access memory (RAM) - Contains the running copy of configuration file. Stores routing table. RAM contents lost when power is off  Read-only memory (ROM) - Holds diagnostic software used when router is powered up. Stores the router’s bootstrap program.  CPU provádí instrukce operačního systému  RAM se vymaže při vypnutí. Obsahuje  současnou kopii konfigurace (tu, ve které se právě hrabeme)  směrovací tabulku  ROM obsahuje  diagnostický SW potřebný pro zapnutí  bootstrap program potřebný pro natažení operačního systému

7 ITE PC v4.0 Chapter 1 7 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer  Router components and their functions  Non-volatile RAM (NVRAM) - Stores startup configuration. This may include IP addresses (Routing protocol, Hostname of router)  Flash memory - Contains the operating system (Cisco IOS)  Interfaces - There exist multiple physical interfaces that are used to connect network. Examples of interface types: -Ethernet / fast Ethernet interfaces -Serial interfaces -Management interfaces  NVRAM = nezapomínající RAM, obsahuje startovní konfiguraci, tj. tu, která se použije po zapnutí nebo restartu. Ta obsahuje např. IP adresy, směrovací protokol, jméno routeru  Flash paměť obsahuje operační systém (Cisco OS)  Rozhraní, především Ethernet – pro připojení místní LAN Sériové – pro dálkové spoje s ostatními routery Řídicí – pro ovládání routeru a pro změny jeho konfigurace, např. konzola

8 ITE PC v4.0 Chapter 1 8 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer  Router components

9 ITE PC v4.0 Chapter 1 9 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer

10 ITE PC v4.0 Chapter 1 10 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Steps in Router Initialization Kde najde co a udělá co OBDOBA V PC: Spustí BIOS, udělá základní kontroly Vyhledá DOS, spustí ho Vyhledá konfigurační soubory (config, autoexec) a zařídí se podle nich Router as a Computer

11 ITE PC v4.0 Chapter 1 11 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer

12 ITE PC v4.0 Chapter 1 12 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer  Router Interface is a physical connector that enables a router to send or receive packets  Each interface connects to a separate network  Consist of socket or jack found on the outside of a router  Types of router interfaces: -Ethernet -Fastethernet -Serial -DSL -ISDN -Cable

13 ITE PC v4.0 Chapter 1 13 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer  Router Interfaces  Na začátku jsme rozdělili interfaces na Ethernet Sériové Management = ovládací  V dalším budeme pod „Router Interfaces“ rozumět především ty konektory, po kterých chodí pakety, tj. ethernet a sériové.

14 ITE PC v4.0 Chapter 1 14 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer Two major groups of Router Interfaces Slouží k připojení místních počítačů např. přes přepínač. Slouží k propojení mezi sítěmi, např. přes ADSL, modem, sériovou linku.

15 ITE PC v4.0 Chapter 1 15 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer  LAN Interfaces  Připojují počítače k sítím LAN  Mají MAC adresy  Mohou mít IP adresy  Obyčejně se připojují přes RJ-45 jack  WAN Interfaces  Umožňují směrovačům propojovat sítě LAN mezi sebou  Používají IP adresy  Někdy užívají MAC adresy Two major groups of Router Interfaces

16 ITE PC v4.0 Chapter 1 16 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer  Routers and the Network Layer Směrovače posílají pakety podle cílových IP adres:  Směrovač určí cestu, kterou má paket poslat, po prostudování směrovací tabulky.  Když směrovač určí nejlepší cestu, zabalí paket do framu.  Pak vyšle frame na síťové médium jako jednotlivé bity.

17 ITE PC v4.0 Chapter 1 17 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer Každý směrovač zkoumá především cílovou IP adresu.

18 ITE PC v4.0 Chapter 1 18 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer  Routers Operate at Layers 1, 2 & 3 Směrovač přijímá tok zakódovaných bitů – vrstva 1, fyzická Přečte bity z média a předá je dále na vrstvu 2, datovou Strhne vnější obal = frame, aby se dostal k paketu a IP adresám Přesune paket na vrstvu 3, síťovou Ve vrstvě 3, síťové, rozhodne podle IP adresy, kam paket poslat Znovu zabalí paket do framu, na něj napíše MAC adresu dalšího zařízení (např. směrovač nebo počítač) a vyšle frame jako tok zakódovaných bitů

19 ITE PC v4.0 Chapter 1 19 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer Na koncových počítačích se ve vrstvách 7, 6, 5, 4 data zpracují, poskládají, zobrazí.

20 ITE PC v4.0 Chapter 1 20 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router as a Computer Na směrovačích po trase se pracuje s bity na vrstvě 1 – fyzické, s framy a MAC adresami na vrstvě 2 - datové, s pakety a IP adresami na vrstvě 3 – síťové.

21 ITE PC v4.0 Chapter 1 21 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Configure Devices and Apply Addresses Basic Addressing Schemes Při návrhu nové nebo kontrole staré sítě je potřebná tato dokumentace:  Výkres topologie, ze kterého je jasné fyzické propojení  Tabulka adres s těmito informacemi:  Device name  Interfaces used  IP addresses  Default gateway

22 ITE PC v4.0 Chapter 1 22 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Configure Devices and Apply Addresses

23 ITE PC v4.0 Chapter 1 23 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Configure Devices and Apply Addresses  Basic Router Configuration  Základní konfigurace směrovače má obsahovat: Router name Passwords Interface configurations Interface type IP address and subnet mask Odvypnout: no shutdown Na sériovém DCE rozhraní nastavit hodiny: clock rate....  Po dokončení konfigurace: Verify Save

24 ITE PC v4.0 Chapter 1 24 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Configure Devices and Apply Addresses „Uživatelský“ mód, ve kterém skoro nic nemůžeme dělat Po zadání příkazu „enable“ a hesla se dostaneme do privilegovaného módu, ve kterém můžeme router ovládat

25 ITE PC v4.0 Chapter 1 25 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Configure Devices and Apply Addresses

26 ITE PC v4.0 Chapter 1 26 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Configure Devices and Apply Addresses

27 ITE PC v4.0 Chapter 1 27 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Configure Devices and Apply Addresses  Verify Basic Router Configuration Save the router configuration:copy running-config startup-config Zkrácené verze příkazů: copy run start Verify router configuration:  Show running-config – configuration in RAM  sh run  Show startup-config - configuration file NVRAM  sh start  Show IP route - routing table  Show interfaces - all interface configurations  Show IP int brief - abbreviated interface configuration

28 ITE PC v4.0 Chapter 1 28 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Routing Table = směrovací tabulka je uložena v RAM a obsahuje informace:  Directly connected networks  Remotely connected networks  Detailed information about the networks  source of information  network address & subnet mask  IP address of next-hop router  Zobrazení obsahu tabulky: show ip route

29 ITE PC v4.0 Chapter 1 29 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Adding a connected network to the routing table -Router interfaces  Each router interface is a member of a different network  Activated using the no shutdown command  You must have directly connected networks

30 ITE PC v4.0 Chapter 1 30 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Adding a connected network to the routing table  Každé rozhraní směrovače musí patřit do jiné sítě  Každé rozhraní se musí aktivovat příkazem no shutdown  Musí být definovány přímo připojené sítě, jinak nic nebude fungovat

31 ITE PC v4.0 Chapter 1 31 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Static routes Include: network address and subnet mask IP address of next hop router or exit interface  When to use static routes When network only consists of a few routers Network is connected to internet only through one ISP Hub & spoke topology is used on a large network

32 ITE PC v4.0 Chapter 1 32 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Static routes Obsahují: adresu vzdálené sítě a její masku cestu do té sítě, tj. IP adresu následujícího směrovače nebo jméno našeho rozhraní, přes které se tam dostaneme  Kdy použít statické cesty Když je síť jednoduchá a má jen pár směrovačů Síť je připojena k internetu přes jediného ISP Používá se topologie Hub & spoke, tj. čep a loukotě neboli hvězda se středem a paprsky

33 ITE PC v4.0 Chapter 1 33 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Connected and Static routes

34 ITE PC v4.0 Chapter 1 34 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Dynamic routing protocols are used to add remote networks to a routing table discover networks update and maintain routing tables  Dynamické směrovací protokoly se používají k přidání vzdálených sítí do směrovací tabulky objevování nových sítí aktualizaci a údržbě směrovacích tabulek

35 ITE PC v4.0 Chapter 1 35 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  IP routing protocols RIP IGRP EIGRP OSPF

36 ITE PC v4.0 Chapter 1 36 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  3 Routing Table Principles  Every router makes its decisions alone, based on the information it has in its routing table.  Different routing tables may contain different information  A routing table can tell how to get to a destination but not how to get back  3 hlavní zásady pro směrování  Každý směrovač činí svoje rozhodnutí sám na základě informací ve své směrovací tabulce.  Směrovací tabulky různých směrovačů obsahují rozdílné informace  Směrovací tabulka umí říci cestu tam, ale ne cestu zpátky

37 ITE PC v4.0 Chapter 1 37 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Effects of the 3 Routing Table Principles Packets are forwarded from one router to another, on a hop by hop basis. Packets can take path “X” to a destination but return via path “Y” (Asymmetric routing).  Důsledky tří hlavních zásad Pakety jsou směrovány od jednoho směrovače ke druhému, skok za skokem. Pakety mohou jít „tam“ jednou cestou, zpátky jinou (asymetrické směrování).

38 ITE PC v4.0 Chapter 1 38 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching  Internet Protocol (IP) packet contains information about the packet and the sending and receiving hosts  Importent fields of a packet: Destination IP address Source IP address Version & TTL IP header length Packet length

39 ITE PC v4.0 Chapter 1 39 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching  Internet Protocol (IP) paket nese informaci o sobě a o vysílací a cílové straně.  Důležitá pole paketu: Cílová IP adresa Zdrojová IP adresa Verze, TTL Délka hlavičky Délka paketu

40 ITE PC v4.0 Chapter 1 40 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching  MAC Layer Frame Format  MAC Frames are also divided into fields. They include: -Preamble -Start of frame delimiter -Destination MAC address -Source MAC address -Type/length -Data and pad -Frame check sequence

41 ITE PC v4.0 Chapter 1 41 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching  A Metric is a numerical value used by routing protocols help determine the best path to a destination –The smaller the metric value the better the path  2 types of metrics used by routing protocols are: -Hop count - this is the number of routers a packet must travel through to get to its destination -Bandwidth - this is the “speed” of a link also known as the data capacity of a link

42 ITE PC v4.0 Chapter 1 42 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching  Equal cost metric is a condition where a router has multiple paths to the same destination that all have the same metric  To solve this dilemma, a router will use Equal Cost Load Balancing. This means the router sends packets over the multiple exit interfaces listed in the routing table. Do cíle existují dvě rovnocenné cesty. Co s tím? Router vyvažuje (balancuje) provoz tak, aby obě cesty byly stejně zatížené.

43 ITE PC v4.0 Chapter 1 43 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching  Path determination is a process used by a router to pick the best path to a destination  One of 3 path determinations results from searching for the best path 1.Directly connected network 2.Remote network 3.No route determined Hledání nejlepší cesty má tři možné výsledky: 1.Přímo připojená síť 2.Vzdálená síť 3.Žádná cesta nenalezena

44 ITE PC v4.0 Chapter 1 44 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching  Switching Function of Router is the process used by a router to switch a packet from an incoming interface to an outgoing interface on the same router. -A packet received by a router will do the following: 1.Strips off layer 2 headers. 2.Examines destination IP address located in Layer 3 header to find best route to destination. 3.Re-encapsulates layer 3 packet into layer 2 frame. 4.Forwards frame out exit interface. Dostane frame na jeden interface, a co s ním udělá? 1.Strhne vrchní obal vrstvy 2 s MAC adresami a zahodí ho. 2.Podívá se na IP adresu na paketu a najde k ní nejlepší cestu. 3.Zabalí paket do nového framu s novými MAC adresami. 4.Pošle frame na správný interface.

45 ITE PC v4.0 Chapter 1 45 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching  As a packet travels from one networking device to another The Source and Destination IP addresses NEVER change The Source & Destination MAC addresses CHANGE as packet is forwarded from one router to the next. TTL field decrements by one until a value of zero is reached at which point router discards packet (prevents packets from endlessly traversing the network) Při cestě paketu po síti Zdrojová a cílová IP adresa se nikdy nemění Zdrojová a cílová MAC adresa se přepisuje na každém routeru Hodnota TTL se na každém routeru snižuje o 1. Když dosáhne nuly, paket se zahodí, aby nekoloval donekonečna.

46 ITE PC v4.0 Chapter 1 46 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching  Path determination and switching function details PC1 Wants to send something to PC 2. Step 1 - PC1 encapsulates packet into a frame. Frame contains R1’s destination MAC address

47 ITE PC v4.0 Chapter 1 47 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching Step 2 - R1 receives Ethernet frame.  R1 sees that destination MAC address matches its own MAC.  R1 strips off Ethernet frame.  R1 Examines destination IP.  R1 consults routing table looking for destination IP.  After finding destination IP in routing table, R1 now looks up next hop IP address.  R1 re-encapsulates IP packet with a new Ethernet frame.  R1 forwards Ethernet packet out Fa0/1 interface.

48 ITE PC v4.0 Chapter 1 48 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching Step 3 - Packet arrives at R2  R2 receives Ethernet frame  R2 sees that destination MAC address matches its own MAC  R2 then strips off Ethernet frame  R2 Examines destination IP  R2 consults routing table looking for destination IP  After finding destination IP in routing table, R2 now looks up next hop IP address  R2 re-encapsulates IP packet with a new data link frame  R2 forwards Ethernet packet out S0/0 interface

49 ITE PC v4.0 Chapter 1 49 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching Step 4 - Packet arrives at R3  R3 receives PPP frame  R3 then strips off PPP frame  R3 Examines destination IP  R3 consults routing table looking for destination IP  After finding destination IP in routing table, R3 is directly connected to destination via its fast Ethernet interface  R3 re-encapsulates IP packet with a new Ethernet frame  R3 forwards Ethernet packet out Fa0/0 interface

50 ITE PC v4.0 Chapter 1 50 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching Step 5 - IP packet arrives at PC2. Frame is decapsulated & processed by upper layer protocols.

51 ITE PC v4.0 Chapter 1 51 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Summary  Routers are computers that specialize in routing data over a network.  Routers are composed of: -Hardware i.e. CPU, Memory, System bus, Interfaces -Software used to direct the routing process  IOS  Configuration file  Diagnostic and bootstrap SW in ROM  Routers need to be configured. Basic configuration consists of: Router name Password(s) Interface configurations i.e. IP address and subnet mask  Routing tables contain Directly connected networks Remotely connected networks Network addresses and subnet masks IP address of next hop address

52 ITE PC v4.0 Chapter 1 52 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Summary  Routers determine a packet‘s path to its destination by doing the following  Receiving an encapsulated frame & examining destination MAC address.  If the MAC address matches then Frame is de-encapsulated so that router can examine the destination IP address.  If destination IP address is in routing table or there is a static route then Router determines next hop IP address. Router will re-encapsulate packet with appropriate layer 2 frame and send it out to next destination.  Process continues until packet reaches destination.  Note - only the MAC addresses will change the source and destination. IP addresses do not change.

53 ITE PC v4.0 Chapter 1 53 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public


Stáhnout ppt "© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Introduction to Routing and Packet Forwarding Routing Protocols and."

Podobné prezentace


Reklamy Google