© 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.

Slides:



Advertisements
Podobné prezentace
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 5 Managing Cisco IOS Software.
Advertisements

Seminář 8 VLAN routing Srovnání směrování tradičního a VLAN routingu
Introduction to Routing and Packet Forwarding
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Network Addressing Networking for Home and Small Businesses – Chapter.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Operating Systems Networking for Home and Small Businesses – Chapter.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco PublicITE I Chapter 6 1 Inter-VLAN Routing LAN Switching and Wireless – Chapter 6.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 6 Routing and Routing Protocols.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 2 Introduction to Routers.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Ethernet Network Fundamentals – Chapter 9.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Services in a Converged WAN Accessing the WAN – Chapter 1 síť, která přenáší.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 7 Distance Vector Routing Protocols.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 1 WANs and Routers.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 4 Learning About Other Devices.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 3 Configuring a Router.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Physical Layer Network Fundamentals – Chapter 8.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Network Layer Network Fundamentals – Chapter 5.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco PublicITE I Chapter 6 1 LAN Design LAN Switching and Wireless – Chapter 1.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 8 TCP/IP Suite Error and Control Messages.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 3 v3.1 Module 6 Switch Configuration.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Application Layer Functionality and Protocols Network Fundamentals – Chapter 3.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.1 ISP Services Working at a Small-to-Medium Business or ISP – Chapter 7.
1 © 2004 Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 11 Access Control Lists (ACLs)
Číslo projektu CZ.1.07/1.5.00/ Číslo materiálu VY_32_INOVACE_ 007 Název školy Gymnázium, Tachov, Pionýrská 1370 Autor Mgr.Stanislava Antropiusová.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Communicating over the Network Network Fundamentals – Chapter 2.
Successor The neighboring router that is the least-cost route to the destination network. The IP address of a successor is in a routing table after the.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 9 Basic Router Troubleshooting.
Seminář
Statický vs. dynamický routing
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Access Control Lists Accessing the WAN – Chapter 5.
Seminář - routing Směrování Pojmy IP adresa
1 Seminář 7 Aplikační vrstva Transportní vrstva IP vrstva NIC Aplikační vrstva Transportní vrstva IP vrstva NIC IP vrstva NIC eth0 Fa0/0 Fa0/1 Cisco Router.
Tutorial: Obchodní akademie Topic: Logical Functions Prepared by: Mgr. Zdeněk Hrdina Projekt Anglicky v odborných předmětech, CZ.1.07/1.3.09/ je.
Tutorial: Mechanic - electrician Topic: Basics of electrical engineering the 2nd. year Measuring the capacity Prepared by: Ing. Jiří Smílek Projekt Anglicky.
Název a adresa školy: Střední odborné učiliště stavební, Opava, příspěvková organizace, Boženy Němcové 22/2309, Opava Název operačního programu:OP.
1 Seminář 6 Routing – směrování –Směrování přímé – v rámci jedné IP sítě/subsítě (dále je „sítě“) – na známou MAC adresu. –Směrování nepřímé – mezi sítěmi.
S MĚROVÁNÍ Ing. Jiří Šilhán. Přímé doručování není směrování. (stejná síť) Směrování – volba směru – hledá se next hop Hledání optimální cesty. Vytváření.
Chapter 7: DHCP Switched Networks. Chapter Introduction 7.1 Dynamic Host Configuration Protocol v4 7.2 Dynamic Host Configuration Protocol v6 7.3.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 4: LAN Redundancy Switched Networks.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Services in a Converged WAN Accessing the WAN – Chapter 1 síť, která přenáší.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 1: Introduction to Switched Networks Switched Networks.
1 Technické specifikace sítí Ethernet 10Mbps Ethernet (dožívá) – IEEE –10BASE-T – dva UTP (cat-3/cat-5), propojovací zařízení – HUB nebo přepínač.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 6: Inter-VLAN Routing Switched Networks.
B AT SOUBORY Jednoduché skripty ve Windows. O PAKOVÁNÍ PŘÍKAZU OPAKUJ. off for /L %i in ( ) do ( echo *** echo %i echo *** ) Zápis: Opakuj.
EU peníze středním školám Název vzdělávacího materiálu: B2 – Verbs – Computers Číslo vzdělávacího materiálu: ICT12-19 Šablona: III/2 Inovace a zkvalitnění.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco PublicITE I Chapter 6 1 LAN Design LAN Switching and Wireless – Chapter 1.
RF Ethernet komunikační interface LAN Komunikace po ethernetu
Accessing the WAN – Chapter 5
Seminář 7 Statický vs. dynamický routing
Seminář - routing Směrování Pojmy IP adresa
Statický vs. dynamický routing
Před touto látkou zopakovat OSPF
Routing Protocols and Concepts – Chapter 6
Planning the Addressing Structure
Seminář - routing Směrování Pojmy IP adresa
Seminář 8 VLAN routing Srovnání směrování tradičního a VLAN routingu
LAN Switching and Wireless – Chapter 6
Accessing the WAN – Chapter 5
Successor The neighboring router that is the least-cost route to the destination network. The IP address of a successor is in a routing table after the.
The Routing Table: A Closer Look
Planning and Cabling Networks
Příklad topologie sítě Adresace v internetu MAC adresa – fyzická adresa interface (rozhraní) Je zapsána v síťové kartě. Je identifikátor uzlu.
Network Fundamentals – Chapter 5
Application Layer Functionality and Protocols
Routing Protocols and Concepts – Chapter 5
DIGITÁLNÍ UČEBNÍ MATERIÁL
Network Fundamentals – Chapter 5
Network Fundamentals – Chapter 7
Introduction to Dynamic Routing Protocols
LAN Switching and Wireless – Chapter 6
Routing Protocols and Concepts – Chapter 6
Transkript prezentace:

© 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

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

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čů)

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

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

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.  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

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  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

ITE PC v4.0 Chapter 1 8 © 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

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

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

ITE PC v4.0 Chapter 1 11 © 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

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

ITE PC v4.0 Chapter 1 13 © 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

ITE PC v4.0 Chapter 1 14 © 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é.

ITE PC v4.0 Chapter 1 15 © 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.

ITE PC v4.0 Chapter 1 16 © 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

ITE PC v4.0 Chapter 1 17 © 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.

ITE PC v4.0 Chapter 1 18 © 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.

ITE PC v4.0 Chapter 1 19 © 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ů

ITE PC v4.0 Chapter 1 20 © 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í.

ITE PC v4.0 Chapter 1 21 © 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é.

ITE PC v4.0 Chapter 1 22 © 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

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

ITE PC v4.0 Chapter 1 24 © 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

ITE PC v4.0 Chapter 1 25 © 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

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

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

ITE PC v4.0 Chapter 1 28 © 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

ITE PC v4.0 Chapter 1 29 © 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

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 -Router interfaces  Each router interface is a member of a different network  Activated using the no shutdown command  You must have directly connected networks

ITE PC v4.0 Chapter 1 31 © 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

ITE PC v4.0 Chapter 1 32 © 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

ITE PC v4.0 Chapter 1 33 © 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

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

ITE PC v4.0 Chapter 1 35 © 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

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

ITE PC v4.0 Chapter 1 37 © 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 table 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

ITE PC v4.0 Chapter 1 38 © 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í).

ITE PC v4.0 Chapter 1 39 © 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

ITE PC v4.0 Chapter 1 40 © 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

ITE PC v4.0 Chapter 1 41 © 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

ITE PC v4.0 Chapter 1 42 © 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

ITE PC v4.0 Chapter 1 43 © 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.

ITE PC v4.0 Chapter 1 44 © 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 Directly connected network Remote network No route determined

ITE PC v4.0 Chapter 1 45 © 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:  Strips off layer 2 headers.  Examines destination IP address located in Layer 3 header to find best route to destination.  Re-encapsulates layer 3 packet into layer 2 frame.  Forwards frame out exit interface.

ITE PC v4.0 Chapter 1 46 © 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 decrement by one until a value of zero is reached at which point router discards packet (prevents packets from endlessly traversing the network)

ITE PC v4.0 Chapter 1 47 © 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 here is part of what happens Step 1 - PC1 encapsulates packet into a frame. Frame contains R1’s destination MAC address

ITE PC v4.0 Chapter 1 48 © 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 then 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.

ITE PC v4.0 Chapter 1 49 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Router Paths and Packet Switching

ITE PC v4.0 Chapter 1 50 © 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 here is part of what happens 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

ITE PC v4.0 Chapter 1 51 © 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 here is part of what happens 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 Step 5 - IP packet arrives at PC2. Frame is decapsulated & processed by upper layer protocols.

ITE PC v4.0 Chapter 1 52 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Summary  Routers are computers that specialize in sending 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  Routers need to be configured. Basic configuration consists of: -Router name -Router banner -Password(s) -Interface configurations i.e. IP address and subnet mask  Routing tables contain the following information -Directly connected networks -Remotely connected networks -Network addresses and subnet masks -IP address of next hop address

ITE PC v4.0 Chapter 1 53 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Summary  Routers determine a packets 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.

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