itacademy routing

Upload: ahmed-suliman

Post on 05-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 ITAcademy Routing

    1/41

  • 7/31/2019 ITAcademy Routing

    2/41

    ITE PC v4.0

    Chapter 1 2 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Routing

    A Router connects one network two another network

    A router is responsible for delivery of packet across different networks

    Ensure 24/7 availability

    Router use alternate paths in case the primary path fails

    Router use Qos prioritization if IP packet to ensure real-time traffic such as

    voice and video

  • 7/31/2019 ITAcademy Routing

    3/41

    ITE PC v4.0

    Chapter 1 3 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    A router connects multiple networks , this means that it has multiple

    interfaces that each belong to a different IP network

    The interface that the router uses to forward the packet may be thenetwork of the final destination of the packet or it may be a network

    connected to another router that used to reach the destination network

    LANs are commonly Ethernet networks that contain devices such as PCs ,

    Printers, Servers WANs are used to connect networks over a large

    geographical area

    Routers at the network center

  • 7/31/2019 ITAcademy Routing

    4/41

    ITE PC v4.0

    Chapter 1 4 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    The primary responsibility of a router is to direct packets destined for local

    and remote networks by :

    - Determining the best path to send packets- Forwarding packets toward their destination

    The router use its routing table to determine the best path to forward the

    packet

    When the router receives a packet it examine its destination IP address and

    searches for the best match with a network address in the routers routing

    table

    Static Routes and dynamic routing protocols are used by routers to learn

    a bout remote networks and build their routing tables

    Routers determine the best path

  • 7/31/2019 ITAcademy Routing

    5/41

    ITE PC v4.0

    Chapter 1 5 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Like a PC a router also includes :

    - Central processing unit

    - Random access memory- Read only memory

    CPU :CPU executes operating system instructions

    RAM :RAMs stores the instructions and data needed to be executed by the CPU

    Router CPU and Memory

  • 7/31/2019 ITAcademy Routing

    6/41

    ITE PC v4.0

    Chapter 1 6 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Operating system :

    The Cisco IOS (internetwork operating system) is copied into ram duringbootup

    Running configuration file :

    This is the configuration file that stores the configuration commands that

    the router IOS is Currently using

    All commands configured on the router are stored in the running

    configuration file known as running-config

    RAM is used to store these components

  • 7/31/2019 ITAcademy Routing

    7/41ITE PC v4.0

    Chapter 1 7 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    IP Routing Table

    This file stores information a bout directly connected and remote networks , it

    is used to the best path to forward the packet

    ARP cache : this cache contains the IPv4 address to MAC address mapping

    Packet Buffer : packets are temporarily stored in a buffer when received onan inter face or before they exit an interface

    RAM is volatile memory and loses its content when the router is powered

    down or restarted

  • 7/31/2019 ITAcademy Routing

    8/41ITE PC v4.0

    Chapter 1 8 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    ROM :

    Is a form of permanent storage cisco devices

    ROM Store :1 bootstrab instructions

    2- Basic diagnostic software

    3- Version of IOS

    ROM includes the software that does not normally need to be modified orupgraded such as bootup instructions

    ROM does not lose its contents when a router loses power or is restarted

  • 7/31/2019 ITAcademy Routing

    9/41ITE PC v4.0

    Chapter 1 9 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Flash Memory :

    Flash memory is nonvolatile computer memory that can be electrically stored

    and erased

    Flash is used as permanent storage for the operating system cisco IOS

    The IOS is permanently stored in flash memory and copied into RAM during

    the boot process , where it is then executed by the CPU

    Flash memory does not loses its contents when the router loses power or isrestarted

  • 7/31/2019 ITAcademy Routing

    10/41ITE PC v4.0

    Chapter 1 10 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    NVRAM (Nonvolatile RAM ) :

    Nonvolatile RAM does not lose its information when power is turned off

    NVRAM is used by the cisco IOS as permanent storage of the startupconfiguration file

    All configuration changes are stored in the running - config file in RAM , soIOS save those changes is case the router is restarted or loses power the

    running-config must be copied to NVRAM where it is stored as the start up

    config file

  • 7/31/2019 ITAcademy Routing

    11/41ITE PC v4.0

    Chapter 1 11 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Internetwork Operating System (IOS)

    Cisco IOS has its own user Interface , the common line interface (CLI) is the

    much more common method of configuring cisco routers

    Upon boot up the startup-config file in NVRAM is copied into RAM and

    stored as the running config file

    IOS executes the configuration commands in the running-config , and changes

    entered by the network administrator are stored in the running-config and areimmediately implemented by the IOS

  • 7/31/2019 ITAcademy Routing

    12/41ITE PC v4.0

    Chapter 1 12 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Router bootup Process

    1- performing the post :

    The Power on self test (post) , the post process is used to test the router

    hardware

    After the post has been completed the router executes the bootstrap program

    Loading the bootstrap program :

    After the POST the bootstrap program is copied from ROM into the RAM once

    in RAM the CPU executes the instructions in the bootstrap program

    The main task of the bootstrap program is to locate the cisco IOS and load it

    into RAM

  • 7/31/2019 ITAcademy Routing

    13/41

    ITE PC v4.0

    Chapter 1 13 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Loading and locating cisco IOS

    The cisco IOS stored in Flash Memory

    Cisco router copy the IOS into RAM for execution by the CPU

    Once the IOS begins to load you may see a string of pounds signs (#) while theimage decompresses

    Locating and loading the configuration file

    After the IOS is loaded the bootstrap program searches for the startupconfiguration file known as start-config in NVRAM

    This file has the previously saved configuration command and parameters

    Including ( addresses ,routing information , passwords and other configuration

    saved by the network admin

  • 7/31/2019 ITAcademy Routing

    14/41

    ITE PC v4.0

    Chapter 1 14 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    If the startup configuration file is found in NVRAM the IOS loads it into RAM

    The default running config does not contain any interface address, routing

    information , passwords or other specific configuration information

    Management ports

    Routers have physical connectors that are used to manage the router

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

    packet forwarding

    The most common management port is the console port , the console port is

    used to configure the router without the need for network access to that

    router

    Another management port is the auxiliary port , but not all routers have

    auxiliary port

  • 7/31/2019 ITAcademy Routing

    15/41

    ITE PC v4.0

    Chapter 1 15 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Router interfaces

    Refer to physical connectors on the router , who main purpose to receive and

    forward packets

    For example : a Router usually has fast Ethernet interfaces for connection todifferent LANs and various types of WANs interfaces to connect varity of serial

    links including T1, DSL , ISDN

    Basic router Configuration

    The first prompt the user mode promptRouter>

    The second prompt the privileged mode prompt

    Router>enable

    Router#

  • 7/31/2019 ITAcademy Routing

    16/41

    ITE PC v4.0

    Chapter 1 16 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Global configuration mode prompt

    Router# conf t

    Router(config)#

    Router RenameRouter>enable

    Router# conf tRouter(config)# hostname r1

    R1(config)#

  • 7/31/2019 ITAcademy Routing

    17/41

    ITE PC v4.0

    Chapter 1 17 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Examining Router interfaces

    Physically connecting a WAN interface

    The WAN physical layer describes the interface between the data terminal

    equipment (DTE) and the data circuit-terminating equipment (DCE)

    The DCE is the service provider and the DTE is the attached device

    The router is the DTE device and is connected to a CSU/DSU which is the DCE

    device

    The DCE device (CSU/DSU) is used to convert the data from the router (DTE

    device ) into a form acceptable to the WAN service provider

  • 7/31/2019 ITAcademy Routing

    18/41

    ITE PC v4.0

    Chapter 1 18 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    The (CSU/DSU) DCE device is also responsible for converting the data from theWAN service provider into a form acceptable by the router (DTE)device

    Router is usually connected to the (CSU/DSU) using a serial DTE cable

    Serial interfaces require a clock signal to control the timing of the

    communication

    In most environments the service provider (DCE) device such as (CSU/DSU) will

    provide the clock by default

    However in a lab environment we are not using any (CSU/DSU) and we don

    not have ISP

    Configure the clock signal on the serial interface using the clock rate command

    You can distinguish DTE from DCE by looking at the connector between the

    two cables , the DTE cable has a male connectors and DCE has a femaleconnectors

  • 7/31/2019 ITAcademy Routing

    19/41

    ITE PC v4.0

    Chapter 1 19 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    You can use the show controllers command to determine which end of thecable is attached to the interface

    Example :

    R1#show controllers serial0/0/0

    The available clock rate in bit per second

    1200, 2400, 9600, 19200, 38400, 56000, 64000, 72000, 125000, 148000,

    500000, 800000, 1000000, 1300000, 2000000, and 4000000. Some bit rates

    might not be available on certain serial interfaces.

    Because Serial 0/0/0 interface on R1 has the DCE cable attached, we will

    configure that interface with a clock rate.

    R1(config)#interface serial 0/0/0

    R1(config-if)#clock rate 64000

  • 7/31/2019 ITAcademy Routing

    20/41

    ITE PC v4.0

    Chapter 1 20 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Router Interface Configuration

    R1>enable

    R1# conf t

    R1(config)#interface serial 0/0/0R1(config-if)# ip address 192.168.2.1 255.255.255.0

    R1(config-if)# no shutdown

    R1(config-if)#exit

    Verifying basic router configuration

    R1#show ip interface brief

  • 7/31/2019 ITAcademy Routing

    21/41

    ITE PC v4.0

    Chapter 1 21 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Configuring an Ethernet Interface

    R1>enable

    R1# conf t

    R1(config)#interface fastethernet 0/0

    R1(config-if)#ip address 172.16.3.1 255.255.255.0R1(config-if)#no shutdown

    Changing IP Address

    R1>enable

    R1# conf t

    R1(config)#interface serial 0/0/0

    R1(config-if)# shutdown

    R1(config-if)# no ip address

  • 7/31/2019 ITAcademy Routing

    22/41

    ITE PC v4.0

    Chapter 1 22 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Introducing the Routing Table

    The primary function of a router is to forward a packet toward its destination

    network, which is the destination IP address of the packet. To do this, a router

    needs to search the routing information stored in its routing table.

    A routing table is a data file in RAM that is used to store route information

    about directly connected and remote networks.

    The routing table contains network/next hop associations.

    These associations tell a router that a particular destination can be optimallyreached by sending the packet to a specific router that represents the "next

    hop" on the way to the final destination.

    The next hop association can also be the outgoing or exit interface to the final

    destination.

  • 7/31/2019 ITAcademy Routing

    23/41

    ITE PC v4.0

    Chapter 1 23 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Routing table Principals

    1- every router makes its decision alone , based on the information it has in its

    own routing table

    2- the fact that one router has certain information in its routing table does not

    mean that other routers have the same information

    3- routing information a bout a path from one network to another does not

    provide routing information about the reverse or return path

  • 7/31/2019 ITAcademy Routing

    24/41

    ITE PC v4.0

    Chapter 1 24 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

  • 7/31/2019 ITAcademy Routing

    25/41

    ITE PC v4.0

    Chapter 1 25 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    The command for configuring a static route is ip route

    Router(config)#ip route network-address subnet-mask

    {ip-address (Next Hop)| exit-interface }

    Configuring a static route with the next hop :

    R1(config)#ip route 192.168.1.0 255.255.255.0 172.16.2.2

    R1(config)#ip route 192.168.2.0 255.255.255.0 172.16.2.2

    Configuring a static route with the exit interface :

    R1(config)#ip route 192.168.1.0 255.255.255.0 serial0/0/0

    R1(config)#ip route 192.168.2.0 255.255.255.0 serial0/0/0

  • 7/31/2019 ITAcademy Routing

    26/41

    ITE PC v4.0

    Chapter 1 26 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Modifying static routes

    R1(config)#no ip route 192.168.2.0 255.255.255.0 172.16.2.2

    Examining Routing Table

    R1#Show ip rout

    Is used to display the routing table

    R1#ping 192.168.2.4

  • 7/31/2019 ITAcademy Routing

    27/41

    ITE PC v4.0

    Chapter 1 27 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Dynamic routing Protocols

    Routing protocols are used to facilitate the exchange of routing

    information between routers

    Routing protocols allow routers to dynamically share information about

    remote networks and automatically add this information to their own

    routing tables

    Routing protocols determine the best path to each network which is

    then added to the routing table

    One of the primary benefits to using a dynamic routing protocols is that

    routers exchange routing information whenever there is a topology

    change

  • 7/31/2019 ITAcademy Routing

    28/41

    ITE PC v4.0

    Chapter 1 28 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Compared to static routing , dynamic routing protocols require less

    administrative overhead .

    However the expense of using dynamic routing protocols is dedicating

    part of routers resources for protocol operation including CPU and

    network link bandwidth

    The purpose of dynamic routing protocols :

    - Discovery of remote networks

    - Maintaining up to data routing information

    - Choosing the best path to destination networks

    - Ability to find a new best path if the current path is no longer a available

  • 7/31/2019 ITAcademy Routing

    29/41

    ITE PC v4.0

    Chapter 1 29 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Autonomous system (AS) otherwise known as a routing domain

    AS : Is a collection of routers under a common administration

    Ex. : companys internal network and an ISPs Network , So we need interior

    and exterior routing protocols

    Interior gateway protocols (IGP) : are used for intra Autonomous system

    routing - routing inside an Autonomous system

    Exterior gateway protocols (EGP) : are used for inter- Autonomous system

    routing routing between Autonomous systems

  • 7/31/2019 ITAcademy Routing

    30/41

    ITE PC v4.0

    Chapter 1 30 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Characteristics ofIGP and EGP routing protocols

    IGP s : are used for routing within a routing domain , those networks within the

    control of a single organization

    An autonomous system is commonly comprised of many individual networksbelonging to companies

    An IGP is used to route within the autonomous system and also used to route

    with the individual networks themselves

    IGPs Include ( RIP , IGRP , EIGRP , OSPF , IS-IS )

    Routing protocols uses a metric to determine the best path to a network the

    metric used by the routing protocol RIP is a hop count , which is the number of

    routers that a packet must traverse in reaching another network

  • 7/31/2019 ITAcademy Routing

    31/41

    ITE PC v4.0

    Chapter 1 31 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    OSPFProtocol uses a bandwidth to determine the shortest path

    EGP : are designed for use between different autonomous systems that are

    under the control of different administrations

    BGP : is the only currently viable EGP and is the routing protocol used by the

    internet

    BGP is typically used between ISPs and between a company and ISP

  • 7/31/2019 ITAcademy Routing

    32/41

    ITE PC v4.0

    Chapter 1 32 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Interior Gateway Protocols (IGPs) can be Classified as two types :

    1- Distance Victor

    2- Link state

    Distance Victor : means that the routes are advertised as vectors of distance

    and direction

    - Distance is defined in terms of a metric such as hop count and direction is

    simply the next hop router or exit interface

    Link state protocol domain :

    - Using a link state routing protocol is like having a complete map of the

    network topology

    - Usually occurring in large networks

  • 7/31/2019 ITAcademy Routing

    33/41

    ITE PC v4.0

    Chapter 1 33 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Metric

    Purpose of metric :

    There are cases when routing protocol learns of more than one route to the

    same destination

    To select the best path , the routing protocol must be able to evaluate and

    differentiate between available paths

    For this reason a metric is used

    A metric is used to determine which path is most preferable when there are

    multiple paths to the same remote networks

    Ex.: RIP uses hop count, EIGRP uses a compilation of bandwidth and delay,

    OSPF uses bandwidth

  • 7/31/2019 ITAcademy Routing

    34/41

    ITE PC v4.0

    Chapter 1 34 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    R1(config)#router ?

    R1(config)#router rip

    R1(config-router)#network 192.168.1.0

    R1(config-router)#network 192.168.2.0

  • 7/31/2019 ITAcademy Routing

    35/41

    ITE PC v4.0

    Chapter 1 35 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Telnet Command

    Router (config)#enable password 123 Enable mode Password

    Router(config)#line vty 0-15 Connections

    Router(config-line)#password hossam Telnet passwordRouter(config-line)#login

    Router(config-line)#do wr

    >telnet IP Address in pc command prompt

  • 7/31/2019 ITAcademy Routing

    36/41

    ITE PC v4.0

    Chapter 1 36 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    RIP v1 RIP v2

    Broadcast Multicast

    Classful classless

    No authentication authentication

    Default Route

    R1(config)#ip route 0.0.0.0 0.0.0.0 next hop

    RIP Protocol Passive InterfaceR1(config)#router rip

    R1(config-router)#network 192.168.1.0

    R1(config-router)#network 173.100.100.0

  • 7/31/2019 ITAcademy Routing

    37/41

    ITE PC v4.0

    Chapter 1 37 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    OSPF

    - Link state (Bandwidth)

    - Link state updates- Neighbors table

    - Topology table

    - Routing table

    - Router ID- Physical port

    - Loopback interface

  • 7/31/2019 ITAcademy Routing

    38/41

    ITE PC v4.0

    Chapter 1 38 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    Area 0

    Area 1 Area 2

    Topology Table

    Internal Router

    ABR area border

    router

    ABR area border

    router

    Backbone router

    Internal Router

    Topology Table

  • 7/31/2019 ITAcademy Routing

    39/41

    ITE PC v4.0

    Chapter 1 39 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    OSPF metric (cost) = 10^8/bandwidth

    OSPF Topology

    - Point to point hello message 10 s. dead message 40 s

    - Broadcast multi-access hello message 10 s. dead message 40 s

    - Nonbroadcast multi-access hello message 30 s. dead message 120 s

    DR Router and BDR Router

  • 7/31/2019 ITAcademy Routing

    40/41

    ITE PC v4.0

    Chapter 1 40 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

    DR Router and BDR Router (interface number from 0 to 255)

    The highest interface number DR and the second BDR

    OSPF Multicast protocol

    Router(config)#router ospf 1 process number(1-65535)#network 192.168.2.2 0.0.0.255 area 1 c. network wild card area

  • 7/31/2019 ITAcademy Routing

    41/41

    Password recovery

    1- Reboot Router

    2- press ctrl+break

    3- change confreg to 0x2142 default= 0x2102

    4-reset

    DHCP

    #Ip dhcp pool hossam

    #network 192.168.2.0 255.255.255.0

    #default-router 192.168.2.1#do wr