2.1_Intro to Routing

download 2.1_Intro to Routing

of 42

Transcript of 2.1_Intro to Routing

  • 8/7/2019 2.1_Intro to Routing

    1/42

    1Internetworking

    Introduction to Routing and Packet ForwardingRouting Protocols

    and Concepts

  • 8/7/2019 2.1_Intro to Routing

    2/42

    Routing Protocolsand Concepts

    CISCO CCNA BOOTCAMP

  • 8/7/2019 2.1_Intro to Routing

    3/42

    3Internetworking

    Router as a Computer

    Describe the basic purpose of a routerComputers that specialize in sending packets over thedata network.They are responsible for interconnecting networks byselecting the best path for a packet to travel andforwarding packets to their destination

    Routers have many of the same hardware and softwarecomponents that are found in other computers including:

    CPURAMROMOperating System

  • 8/7/2019 2.1_Intro to Routing

    4/42

    4Internetworking

    Router as a Computer

    Router components and their functions

    CPU - Executes operating system instructions

    such as system initialization, routing functions, and switchingfunctions.

    Random access memory (RAM) -RAM stores the instructions and dataneeded to be executed by the CPU.

    Read-only memory (ROM) - Holds diagnostic software used when routeris powered up. Stores the routers bootstrap program.

    Non-volatile RAM (NVRAM) - Stores startup configuration. This mayinclude IP addresses (Routing protocol, Hostname of router)

    Flash memory - Contains the operating system (Cisco IOS)

  • 8/7/2019 2.1_Intro to Routing

    5/42

    5Internetworking

    Router as a Computer

    Router components

  • 8/7/2019 2.1_Intro to Routing

    6/42

    6Internetworking

    Internetwork Operating System

    The operating system software used in Ciscorouters is known as Cisco Internetwork OperatingSystem (IOS).

    Cisco IOS is a multitasking operating systemthat is integrated with routing, switching,

    internetworking, and telecommunicationsfunctions.

    Although the Cisco IOS may appear to be the sameon many routers, there are many different IOSimages.

    An IOS image is a file that contains the entireIOS for that router. Cisco creates many differenttypes of IOS images, depending upon the modelof the router and the features within the IOS.

    Typically the more features in the IOS, thelarger the IOS image, and therefore, the more

    flash and RAM that is required to store and loadthe IOS.

  • 8/7/2019 2.1_Intro to Routing

    7/42

    7Internetworking

    Router as a Computer

    Major phases to therouter boot-upprocess

    Test router hardware

    Power-On Self Test (POST) Execute bootstrap loader

    Locate & load Cisco IOSsoftware

    Locate IOS

    Load IOS

    Locate & load startup

    configuration file or enter setupmode

  • 8/7/2019 2.1_Intro to Routing

    8/42

    8Internetworking

    Stages of the router power-on boot sequence

  • 8/7/2019 2.1_Intro to Routing

    9/42

    9Internetworking

    Router as a Computer

    Verify the router boot-up process:

    -The show version command is used to viewinformation about the router during the bootupprocess. Information includes:

    Image name & IOS version

    IOS (tm) C2600 Software (C2600-I-M),Version 12.2(28), RELEASE SOFTWARE(fc5).

    Bootstrap version stored in ROM

    ROM: System Bootstrap, Version12.1(3r)T2, RELEASE SOFTWARE (fc1)

    Image file name & where it was loaded from

    System image file is "flash:c2600-i-mz.122-28.bin"

    show version

  • 8/7/2019 2.1_Intro to Routing

    10/42

    10Internetworking

    Management Ports

    Routers have physical connectors that areused to manage the router. Theseconnectors are known as managementports.

    Unlike Ethernet and serial interfaces,management ports are not used for packetforwarding.

    The most common management port is theconsole port.

    The console port is used to connect aterminal, or most often a PC running terminalemulator software, to configure the routerwithout the need for network access to thatrouter.

    The console port must be used during initialconfiguration of the router.

    .

  • 8/7/2019 2.1_Intro to Routing

    11/42

    11Internetworking

    Routers determine the best path

    Router Interface is a physical connector that enables arouter to send or receive packets

    Each interface connects to a separate network

    different IP network

    Typically, the interfaces connect to various types ofnetworks, which means that different types of media andconnectors are required. Types of router interfaces:

    -Ethernet-Fastethernet

    -Serial

    -DSL

    -ISDN

    -Cable

  • 8/7/2019 2.1_Intro to Routing

    12/42

    12Internetworking

    Two major groups of Router Interfaces:LAN & WAN

    LAN Interfaces: such as Ethernet andFastEthernet

    Are used to connect router to LAN network

    Has a layer 2 MAC address

    a router Ethernet interface participatesin the ARP process for that LAN.

    Can be assigned a Layer 3 IP address

    Usually consist of an RJ-45 jack

    When a router is connected to aswitch, a straight-through cable isused.

    When two routers are connecteddirectly through the Ethernet

    interfaces, or when a PC NIC isconnected directly to a router Ethernetinterface, a crossover cable is used.

  • 8/7/2019 2.1_Intro to Routing

    13/42

    13Internetworking

    Two major groups of Router Interfaces: LAN & WAN

    WAN Interfaces- such as serial, ISDN,and Frame Relay

    Are used to connect routers toexternal networks thatinterconnect LANs, usually over alarger geographical distance..

    Depending on the WAN

    technology, a layer 2 address maybe used.

    Uses a layer 3 IP addressSimilar to LAN interfaces,each WAN interface has its ownIP address and subnet mask,which identifies it as a memberof a specific network.

    TheL

    ayer 2 encapsulation can beof different types,PPP, Frame Relay, and HDLC(High-Level Data Link Control).

  • 8/7/2019 2.1_Intro to Routing

    14/42

    14Internetworking

    Routers determine the best path

    Routers examine a packets destination IP address anddetermine the best path by enlisting the aid of a routing table

  • 8/7/2019 2.1_Intro to Routing

    15/42

    15Internetworking

    Routers determine the best path

    The primary responsibility of a router is to direct packets destined forlocal and remote networks by:

    Determining the best path to send packets

    Forwarding packets toward their destination

    The router uses its routing table to determine the best path to forwardthe packet.

    When the router receives a packet, it examines its destination IP addressand searches for the best match with a network address in the router'srouting table.

    The routing table also includes the interface to be used to forward thepacket. Once a match is found, the router encapsulates the IP packet intothe data link frame of the outgoing or exit interface, and the packet is thenforwarded toward its destination.

  • 8/7/2019 2.1_Intro to Routing

    16/42

    16Internetworking

    Configure Devices and Apply

    Addresses Implementing Basic Addressing Schemes

    When designing a new network or mapping an existing network youmust provide the following information in the form of a document:

    -Topology drawing that Illustrates physical connectivity

    Address table that provides the following information: Device name

    Interfaces used

    IP addresses

    Default gateway

  • 8/7/2019 2.1_Intro to Routing

    17/42

    17Internetworking

    Configure Devices and Apply

    Addresses Basic Router Configuration A basic router configuration should contain the following:

    -Router name - Host name should be unique

    -Banner- At a minimum, banner should warn against unauthorized use

    -Passwords - Use strong passwords

    -Interface configurations

    Specify interface type,

    IP address and subnet mask.

    Describe purpose of interface.

    Issue no shutdown command.

    If DCE serial interface issue clock rate command.

    After entering in the basic configuration the following tasks should be completed

    -Verify basic configuration and router operations.

    -Save the changes on a router

  • 8/7/2019 2.1_Intro to Routing

    18/42

    18Internetworking

    Configure Devices and Apply

    AddressesRouter>

    Router>enable

    Router#

    Router#config t

    Router(config)#enable secret class

    Router(config)#enable password cisco

    Router(config)#hostname R1

    R1(config)#

    R1(config)#line console 0

    R1(config-line)#password ciscoR1(config-line)#login

    R1(config-line)#exit

    R1(config)#line vty 0 4

    R1(config-line)#password cisco

    R1(config-line)#login

    R1(config-line)#exit

  • 8/7/2019 2.1_Intro to Routing

    19/42

    19Internetworking

    Configure Devices and ApplyAddresses

    Configuring a Banner

    From the global configuration mode, configure themessage-of-the-day (motd) banner. A delimitingcharacter, such as a "#" is used at the beginning andat the end of the message. The delimiter allows you toconfigure a multiline banner, as shown here.

    R1(config)#banner motd #

    Enter TEXT message. End with the character '#'.

    ******************************************

    WARNING!! Unauthorized Access Prohibited!!

    ******************************************

  • 8/7/2019 2.1_Intro to Routing

    20/42

    20Internetworking

    Limiting Device Access Enable and Enable Secret Passwords

    To provide additional security, use enable password orenable secret command to establish authentication beforeaccessing privileged EXEC (enable) mode.

    Always use the enable secret command, not the olderenable password command, if possible.

    The following commands are used to set the passwords:

    Router(config)#enable password password

    Router(config)#enable secret password

    If no enable password or enable secret password is set,the IOS prevents privileged EXEC access from a Telnetsession.

    Without an enable password having been set, aTelnet session would appear this way:

    Switch>enable

    % No password set Switch>

  • 8/7/2019 2.1_Intro to Routing

    21/42

    21Internetworking

    Limiting Device Access VTY Password

    The vty lines allow access to a router via Telnet.

    By default, many Cisco devices support 5 VTY linesthat are numbered 0 to 4.

    A password needs to be set for all available vty lines.

    The same password can be set for all connections.

    However, it is often desirable that a unique passwordbe set for one line to provide a fall-back for

    administrative entry to the device if the otherconnections are in use.

    The following commands are used to set a password:

    Router(config)#line vty 0 4

    Router(config-line)#password password

    Router(config-line)#login

    By default, the IOS includes the login command on the

    VTY lines. This prevents Telnet access to the devicewithout first requiring authentication.If, by mistake, the no login command is set, whichremoves the requirement for authentication,unauthorized persons could connect to the line usingTelnet. This would be a major security risk.

  • 8/7/2019 2.1_Intro to Routing

    22/42

    22Internetworking

    Encrypting Password Display

    Another useful command prevents passwords fromshowing up as plain text when viewing theconfiguration files.

    This is the service password-encryptioncommand.

    This command causes the encryption ofpasswords to occur when a password isconfigured.

    The service password-encryption commandapplies weak encryption to all unencryptedpasswords.

    This encryption does not apply to passwordsas they are sent over media only in theconfiguration.

    The purpose of this command is to keepunauthorized individuals from viewingpasswords in the configuration file.

    Once the encryption has been applied, removingthe encryption service does not reverse theencryption.

  • 8/7/2019 2.1_Intro to Routing

    23/42

    23Internetworking

    Configuring router passwords (cont.)

    WARNING

    service password-encryption uses a Cisco Level 7 encryption which is very

    easy to decrypt.

    For the GetPass! software www.boson.com

    However, the enable secret uses a stronger encryption method

    and cannot be easily hacked.

    and !

  • 8/7/2019 2.1_Intro to Routing

    24/42

    24Internetworking

    Doesnt work for enable secret!

  • 8/7/2019 2.1_Intro to Routing

    25/42

    25Internetworking

    Configure Devices and ApplyAddresses

    R1(config)#interface Serial0/0/0

    R1(config-if)#ip address 192.168.2.1 255.255.255.0

    R1(config-if)#description Ciruit#VBN32696-123 (help desk:1-800-555-1234)

    R1(config-if)#no shutdown

    R1(config-if)#clock rate 64000

    Note: When cabling a point-to-point serial link in our lab environment, oneend of the cable is marked DTE and the other end is marked DCE.

    The router that has the DCE end of the cable connected to its serial interfacewill need the additional clock rate command configured on that serialinterface.

    This step is only necessary in a lab environment

  • 8/7/2019 2.1_Intro to Routing

    26/42

    26Internetworking

    Configure Devices and ApplyAddresses

    The FastEthernet interface needs to beconfiguredR1(config)#interface FastEthernet0/0R1(config-if)#ip address 192.168.1.1

    255.255.255.0R1(config-if)#description R1 LANR1(config-if)#no shutdown

  • 8/7/2019 2.1_Intro to Routing

    27/42

    27Internetworking

    Configure Devices and ApplyAddresses

    Verify Basic Router Configuration

    -Issue the show running-configcommand

    displays the current running configuration that is stored in RAM.

    -Issuing the copy running-config startup-configcommand

    Save the basic router configuration

    -Additional commands that will enable you to further verify routerconfiguration are:

    Show startup-config - Displays configuration file NVRAM

    Show IP route - Displays routing table

    Show interfaces - Displays all interface configurations

    Show IP int brief- Displays abbreviated interface configurationinformation

  • 8/7/2019 2.1_Intro to Routing

    28/42

    28Internetworking

    Configure Devices and ApplyAddresses

  • 8/7/2019 2.1_Intro to Routing

    29/42

    29Internetworking

    Configure Devices and ApplyAddresses

  • 8/7/2019 2.1_Intro to Routing

    30/42

    30Internetworking

    Routing Table Structure

    The primary function of a router is to forward a packet toward itsdestination network, which is the destination IP address of thepacket.

    To do this, a router needs to search the routing information stored in its routingtable.

    Routing Table is stored in ram and contains information:

    Directly connected networks - this occurs when a device is connected toanother router interface

    Remotely connected networks - this is a network that is not directlyconnected to a particular router

    network/next hop associations - about the networks include source ofinformation, network address & subnet mask, and Ip address of next-hoprouter

    Show ip route command is used to view a routing table

  • 8/7/2019 2.1_Intro to Routing

    31/42

    31Internetworking

    Routing Table Structure

    The following analogies may help clarifythe concept of connected, static, anddynamic routes:

    Directly Connected Routes - To visit aneighbor, you only have to go down thestreet on which you already live. This path

    is similar to a directly-connected routebecause the "destination" is availabledirectly through your "connectedinterface," the street.

    Static Routes - A train uses the samerailroad tracks every time for a specifiedroute. This path is similar to a static routebecause the path to the destination isalways the same.

    Dynamic Routes - When driving a car, youcan "dynamically" choose a different pathbased on traffic, weather, or otherconditions. This path is similar to adynamic route because you can choose anew path at many different points on yourway to the destination.

  • 8/7/2019 2.1_Intro to Routing

    32/42

    32Internetworking

    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

    In order for static and dynamic routes to exist in routing table you must

    have directly connected networks

  • 8/7/2019 2.1_Intro to Routing

    33/42

    33Internetworking

    Routing Table Structure

    Remote networks are added to therouting table either by configuringstatic routes or enabling a dynamicrouting protocol.

    Static routes in the routing table-Includes: network address andsubnet mask and IP address ofnext hop router or exit interface-Denoted with the code S in therouting table-Routing tables must containdirectly connected networksused to connect remotenetworks before static ordynamic routing can be used

  • 8/7/2019 2.1_Intro to Routing

    34/42

    34Internetworking

    Routing Table Structure

    When to use static routes

    -When network only consists of a few routers

    Using a dynamic routing protocol in such acase does not present any substantialbenefit.

    -Network is connected to internet only through

    one ISP There is no need to use a dynamic routing

    protocol across this link because the ISPrepresents the only exit point to theInternet.

    -Hub & spoke topology is used on a largenetwork

    A hub-and-spoke topology consists of acentral location (the hub) and multiplebranch locations (spokes), with each spokehaving only one connection to the hub.

    Using dynamic routing would beunnecessary because each branch has onlyone path to a given destination-through thecentral location.

  • 8/7/2019 2.1_Intro to Routing

    35/42

    35Internetworking

    Routing Table Structure

    Dynamic routing protocols

    -Are used to add remote networks to a routing table

    -Are used to discover networks

    -Are used to update and maintain routing tables

    Automatic network discovery

    -Network discovery is the ability of a routing protocol to share informationabout the networks that it knows about with other routers that are alsousing the same routing protocol.

    Instead of configuring static routes to remote networks on every router, adynamic routing protocol allows the routers to automatically learn aboutthese networks from other routers.

    These networks - and the best path to each network - are added to therouter's routing table and denoted as a network learned by a specific

    dynamic routing protocol.

    Maintaining routing tables

    -Dynamic routing protocols are used to share routing information withother router & to maintain and up date their own routing table.

    Dynamic routing protocols not only make a best path determination tovarious networks, they will also determine a new best path if the initial pathbecomes unusable (or if the topology changes)

  • 8/7/2019 2.1_Intro to Routing

    36/42

    36Internetworking

    Router Paths: Best Path

    Whenever multiple paths to reach the same network exist, eachpath uses a different exit interface on the router to reach thatnetwork.

    The best path is selected by a routing protocol based onthe value or metric it uses to determine the distance to reacha network.

    Metrics can be based on either a single characteristic orseveral characteristics of a path.

    Some routing protocols can base route selection onmultiple metrics, combining them into a single metric.

    The smaller the value of the metric, the better the path.

    Routing protocols, such as RIP, use simple hop-count,which the number of routers between a router and thedestination network.

    For example, a router will prefer a path that is 5 hopsaway over a path that is 10 hops away.

    Other routing protocols, such as OSPF, determine theshortest path by examining the bandwidth of the links, andusing the links with the fastest bandwidth from a router tothe destination network.

  • 8/7/2019 2.1_Intro to Routing

    37/42

    37Internetworking

    Router Paths and Packet Switching

    A Metric is a numerical value used by routing protocols help determine the bestpath to a destination

    The smallerthe metric value the betterthe path

    2 types of metrics used by routing protocols are:

    -Hop count - this is the number of routers a packet must travel through to getto its destination

    Hop count of four indicates that a packet must pass through four routers toreach its destination.

    If multiple paths are available to a destination, the routing protocol, suchas RIP, picks the path with the least number of hops.

    -Bandwidth - this is the speed of a link also known as the data capacity of alink

    OSPF routing protocol uses bandwidth as its metric. The best path to a

    network is determined by the path with an accumulation of links that havethe highest bandwidth values, or the fastest links.

  • 8/7/2019 2.1_Intro to Routing

    38/42

    38Internetworking

    Router Paths: Equal Cost LoadBalancing

    You may be wondering what happens if a routing table has twoor more paths with the same metric to the same destinationnetwork.

    When a router has multiple paths to a destination network and the value ofthat metric (hop count, bandwidth, etc.) is the same, this is known as anequal cost metric, and the router will perform equal cost load balancing.

    Equal cost metric is a condition where a router has multiplepaths to the same destination that all have the same metric

    The router will forward

    packets using the multiple

    exit interfaces listed in the

    routing table.

  • 8/7/2019 2.1_Intro to Routing

    39/42

  • 8/7/2019 2.1_Intro to Routing

    40/42

    40Internetworking

    Router Paths and Packet Switching

    Packet forwarding involves two functions:

    Path determination function

    Switching function

    Path determination is a process used by a router to pickthe best path to a destination

    One of 3 path determinations results from searching forthe best path

    Directly connected network

    The destination IP address of the packet is a hostaddress on the same network as this router'sinterface

    Remote network

    If the destination IP address of the packetbelongs to a remote network, then the packet isforwarded to another router.

    No route determined

    the packet is discarded

  • 8/7/2019 2.1_Intro to Routing

    41/42

    41Internetworking

    Router Paths and PacketSwitching

    Switching Function of Router is the process used by arouter to switch a packet from an incoming interface toan outgoing interface on the same router.

    What does a router do with a packet received from onenetwork and destined for another network?

    -A packet received by a router will do the following:Strips offlayer 2 headers.Examines destination IP address located inLayer 3 header to find best route to destination.Re-encapsulates layer 3 packet into layer 2frame.Forwards frame out exit interface.

  • 8/7/2019 2.1_Intro to Routing

    42/42

    42Internetworking

    ---- End of presentationEnd of presentation ----