cis 82 routing protocols and concepts

Upload: jessica-nguyen

Post on 17-Oct-2015

36 views

Category:

Documents


1 download

DESCRIPTION

routing

TRANSCRIPT

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    1/82

    Chapter 1

    Introduction to Routing andPacket Forwarding

    CIS 82 Routing Protocols and Concepts

    Rick GrazianiCabrillo College

    [email protected]

    Last Updated: 2/16/2009

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    2/82

    2

    This Presentation

    For detai led inform ation see the notes sect ion w ithin thisPowerPoint.

    This presentation is based on the Exploration course/book, Routing

    Protocols and Concepts.

    For a copy of this presentation and access to my web site for other

    CCNA, CCNP, and Wireless resources please email me for ausername and password.

    Email: [email protected]

    Web Site: www.cabrillo.edu/~rgraziani

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    3/82

    3

    Note

    This chapter contains mostly introductory material.

    Most of not all of this information will be explained in more detailin later chapters or later courses.

    The bootup process and the IOS are examined in a later

    course.

    Do notworry or focus too much on the details for now.

    This will all be examined and explained in the following chapters.

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    4/82

    4

    For further information

    This presentation is an

    overview of what iscovered in thecurriculum/book.

    For further explanationand details, please readthe chapter/curriculum.

    Book:

    Routing Protocolsand Concepts

    By Rick Graziani andAllan Johnson

    ISBN: 1-58713-206-0

    ISBN-13: 978-58713-206-3

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    5/82

    5

    Topics

    Inside the Router

    Routers are computers

    Router CPU and Memory

    Internetwork OperatingSystem

    Router Bootup Process

    Router Ports and Interfaces Routers and the Network

    Layer

    Path Determination andSwitching Function

    Packet Fields and Frame

    Formats Best Path and Metrics

    Equal Cost Load Balancing

    Path Determination

    Switching Function

    CLI Configuration and

    Addressing

    Implementing BasicAddressing Schemes

    Basic Router

    Configuration

    Building the Routing Table

    Introducing the RoutingTable

    Directly Connected

    Networks

    Static Routing

    Dynamic Routing

    Routing Table Principles

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    6/82

    Inside the Router

    Routers are computers

    Router CPU and Memory

    Internetwork Operating System

    Router Bootup Process

    Router Ports and Interfaces

    Routers and the Network Layer

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    7/82

    7

    Routers are Computers

    A router is a computer:

    CPU, RAM, ROM, Operating System The first router: used for the Advanced Research Projects Agency

    Network (ARPANET):

    IMP (Interface Message Processor)

    Honeywell 516 minicomputer that brought the ARPANET to life

    on August 30, 1969.

    Leonard Kleinrock and the first IMP.

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    8/82

    8

    Routers forwarding packets (packet switching):

    From the original sourceto the final destination.

    Selects best pathbased on destination IP address

    A router connects multiple networks:

    Interfaces on different IP networks

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    9/82

    9

    Router interfaces:

    LAN

    WAN

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    10/82

    10

    Routers Determine the Best Path

    The routers primary responsibility:

    Determining the best path

    Forwarding packetstoward their destination

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    11/82

    11

    Routers Determine the Best Path

    Routing table

    Determines best path.

    Best match between destination IP addressand networkaddress in routing table

    IP Packet enters routers Ethernet interface.

    Router examines the packets destination IP address.

    Router searches for a best match between packets destination IP address and

    network address in routing table.

    Using the exit-interface in the route, the packet is forwarded to the next router orthe final destination.

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    12/82

    12

    Router

    CPU and

    Memory

    CPU- Executes operating system instructions

    Random access memory (RAM)

    running copy of configuration file

    routing table ARP cache

    Read-only memory (ROM)

    Diagnostic software used when router is powered up.

    Routers bootstrap program

    Scaled down version of operating system IOS

    Non-volatile RAM (NVRAM) Stores startup configuration. (including IP addresses, Routing protocol)

    Flash memory- Contains the operating system (Cisco IOS)

    Interfaces- There exist multiple physical interfaces that are used to connectnetwork. Examples of interface types:

    Ethernet / fast Ethernet interfaces

    Serial interfaces Mana ement interfaces

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    13/82

    13

    Router physical characteristics

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    14/82

    14

    Cisco IOS - Internetwork

    Operating System

    Responsible for managing the hardware and softwareresources: Allocating memory

    Managing processes

    Security

    Managing file systems

    Manydifferent IOS images. An IOS image is a file that contains the entire IOS for that router.

    Routermodel

    IOS features

    Example IPv6or a routing protocol such as Intermediate System

    toIntermediate System (IS-IS).

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    15/82

    15

    Router Bootup Process (more in later course)

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    16/82

    16

    Bootup Process

    running-config

    IOS (running)

    startup-config IOS

    ios (partial)

    Bootup program

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    17/82

    17

    running-config

    IOS (running)

    startup-config IOS

    ios (partial)

    Bootup program

    Where is the permanent configuration file stored used during boot-up? NVRAM

    Where is the diagnostics software stored executed by hardware modules? ROM

    Where is the backup (partial) copy of the IOS stored? ROM

    Where is IOS permanently stored before it is copied into RAM? FLASH

    Where are the bootsystem commands stored which are used to locate

    the IOS?NVRAM

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    18/82

    18

    running-config

    IOS (running)

    startup-config IOS

    ios (partial)

    Bootup program

    ?

    ?

    ?

    ?

    ?

    ?

    ?

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    19/82

    19

    running-config

    IOS (running)

    startup-config IOS

    ios (partial)

    Bootup program

    startup-config

    IOS

    Bootup program

    ios (partial)

    running-config

    IOS (running)

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    20/82

    20

    1. ROM1. POST

    2. Bootstrap code executed

    3. Check Configuration Register value (NVRAM)

    0 = ROM Monitor mode

    1 = ROM IOS

    2 - 15 = startup-config in NVRAM

    2. Check for IOS boot system commandsin startup-config file (NVRAM)If boot system commands in startup-config

    a. Run boot system commands in order they appear in startup-config to locate the IOS

    b If boot system commands fail, use default fallback sequence to locate the IOS (Flash, TFTP, ROM)

    3. Locate and load IOS, Default fallback sequence: No IOS boot system commands in startup-config

    a. Flash (sequential)

    b. TFTP server (netboot) - The router uses the configuration register value to form a filename from

    which to boot a default system image stored on a network server.c. ROM (partial IOS) or keep retrying TFTP depending upon router model

    - If no IOS located, get partial IOS version from ROM

    4. Locate and load startup-configconfiguration

    a. If startup-config found, copy to running-config

    b. If startup-config not found, prompt for setup-mode

    c. If setup-mode bypassed, create a skeleton default running-config (no startup-config)

    Router Boot Process

    Details (later)

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    21/82

    21

    Verify the router boot-up process show versioncommand is used to view information about the

    router during the bootup process (later).

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    22/82

    22

    Ports and Interfaces

    Port- normally means one of the management ports used foradministrative access

    Interfacenormally refers to interfaces that are capable of sendingand receiving user traffic.

    Note: However, these terms are often used interchangeably in theindustry and even with IOS output.

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    23/82

    23

    Management

    Ports

    Console port

    Terminal

    PC running terminal emulator software

    No need for network access

    Used for initial configuration

    Auxiliary (AUX) port

    Not all routers have auxiliary ports.

    At times, can be used similarly to a console port

    Can also be used to attach a modem.

    Note:Auxiliary ports will not be used in this curriculum.

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    24/82

    24

    Router Interfaces

    Interfaces- Receive and forward packets.

    Various types of networks

    Different types of media and connectors.

    Different types of interfaces.

    Fast Ethernetinterfaces - LANs

    Serial interfaces- WANconnections including T1, DSL, and ISDN

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    25/82

    25

    Router Interfaces

    Router Interface:

    Different network

    IP address and subnet maskof thatnetwork

    Cisco IOS wil l not al low tw o act ive interfaces on the same

    router to belong to the same network .

    FastEthernet 0/0

    MAC: 0c00-3a44-190a

    192.168.1.1/24

    FastEthernet 0/0

    MAC: 0c00-41cc-ae12

    10.1.0.1/16

    Serial 0/0

    172.16.1.1/24

    Serial 0/1

    172.16.1.2/24

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    26/82

    26

    LAN Interfaces

    Ethernet and Fast Ethernet interfaces

    Connects the router to the LAN

    Layer 2MAC address Participates in the Ethernet

    Address Resolution Protocol (ARP):

    Maintains ARP cache for that interface

    Sends ARP requests when needed

    Responds with ARP replies when required

    Typically an RJ-45 jack (UTP).

    Router to switch: straight-through cable

    Router to router: crossover cable

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    27/82

    27

    WAN Interfaces

    Point-to-Point, ISDN, and Frame Relay interfaces

    Connects routers to external networks. The Layer 2 encapsulation can be different types including:

    PPP

    Frame Relay

    HDLC (High-Level Data Link Control).

    Note: MAC addresses are used only on Ethernet interfaces and are

    not on WAN interfaces.

    Layer 2 WAN encapsulation types and addresses are covered in a

    later course.

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    28/82

    28

    Routers at

    theNetwork

    Layer

    Layer 3 devicebecause its primary forwardingdecision is based on the information in the Layer 3 IP

    packet (destination IP address).

    This is known as rout ing.

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    29/82

    29

    Routers Operate at Layers 1, 2, and 3

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    30/82

    Path Determination and

    Switching Functions

    Packet Fields and Frame Formats

    Best Path and Metrics

    Equal Cost Load BalancingPath Determination

    Switching Function

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    31/82

    31

    Path Determination and Switching Functions

    The following sections focus on exactly what happens to data as it

    moves from source to destination.

    Review the packet and frame field specifications

    Discuss in detail how the frame fields change from hop to hop,

    whereas the packet fields remain unchanged

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    32/82

    32

    Ethernet Frame

    Layer 2 addresses:

    Interface-to-Interface on the same network.

    Changes as packet is decapsulated and encapsulated from

    network to network Layer 3 addresses:

    Original source layer 3 address (IP)

    Final destination layer 3 address (IP)

    Does not change (except with NAT, but this is not a concern of

    IP but an internal network process)

    IPv4 (Internet

    Protocol)

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    33/82

    33

    Best Path

    Routers best-path to a network:

    optimum or shortest path

    Routing protocol dependent

    Dynamic routing protocolsuse their own rulesand metr ics.

    A metricis the quantitative value used to measure the distance to agiven route.

    The best pathto a network is the path with the lowest metric.

    Example, a router will prefer a path that is one hop away over a path

    that is two hops away.

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    34/82

    34

    Best Path

    1.5 Mbps

    1.5 Mbps

    Comparing Dynamic Routing Protocols: RIP and OSPF

    RIPuses hop coun t

    R1 to R3

    Fewer links but much slower

    OSPFuses bandwidth

    R1 to R2 to R3

    More routers but much faster links

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    35/82

    35

    What happens if a routing table has two or

    more paths with the same metric to the samedestination network? (equal-cost metric)

    Router will perform equal-cost load balancing.

    Equal CostLoad

    Balancing

    ?

    ?

    To reach the 192.168.1.0/24

    network it is 2 hops via R2 and 2

    hops via R4.

    192.168.1.0/24

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    36/82

    36

    Equal-Cost Paths

    Versus Unequal-

    Cost Paths

    T1

    T3

    Can a router use multiple paths if the paths

    (cost, metric) to reach the destination

    network are not equal?

    Yes, if the routers are using the EIGRProuting

    protocol which supports unequal cost load

    balancing.

    192.168.1.0/24

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    37/82

    37

    Path Forwarding

    Packet forwarding involves two functions:

    Path determination function

    Switching function

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    38/82

    38

    Path Forwarding

    Path determinationfunction is the process of how the router determines

    which path to use when forwarding a packet. To determine the best path, the router searches its routing table for a

    network address that matches the packets destination IP address.

    One of three path determinations results from this search:

    Directly connected network

    Remote network

    No route determined

    Directly connected

    network

    Router receives packet.

    Destination IP address matches a network on one

    of its directly connected networks.

    Packet is forwarded outthat network.

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    39/82

    39

    Path Forwarding

    Path determinationfunction is the process of how the router determines

    which path to use when forwarding a packet. To determine the best path, the router searches its routing table for a

    network address that matches the packets destination IP address.

    One of three path determinations results from this search:

    Directly connected network

    Remote network

    No route determined

    Remote

    network

    Router receives packet.

    Destination IP address matches a remote network

    which can only be reached via another router.

    Packet is forwarded out thatnetwork to the next-hop router.

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    40/82

    40

    Path Forwarding

    Path determinationfunction is the process of how the router determines

    which path to use when forwarding a packet. To determine the best path, the router searches its routing table for a

    network address that matches the packets destination IP address.

    One of three path determinations results from this search:

    Directly connected network

    Remote network

    No route determined

    Router receives packet.

    Destination IP address does NOT match any

    network in the routers routing table.

    Packet is dropped.

    No route

    determined

    Does this mean the network does not

    exist?No, only that the router does not know

    about that network. (later)

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    41/82

    41

    Path Forwarding

    Switching functionis the process used by a router to:

    Accept a packet on one interface and

    Forward it out another interface

    A key responsibility of the switching function is to encapsulatepackets in the appropriate data-link frame type for the outgoing data

    link.

    192 168 4 10

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    42/82

    42

    What does a router do with a packet received from one network and destined for anothernetwork?

    1. Decapsulates the Layer 3 packet by removing the Layer 2 frame header and trailer

    2. Examines the destination IP address of the IP packet to find the best path in therouting table

    3. Encapsulates the Layer 3 packet into a new Layer 2 frame and forwards the frame

    out the exit interface

    Dest. MAC

    0B-31

    Source MAC

    00-20

    Type

    800

    Trailer

    Layer 2 Data Link Frame

    Dest. IP

    192.168.4.10

    Source IP

    192.168.1.10

    IP

    fields

    Data

    Layer 3 IP Packet

    Dest. MAC

    00-10

    Source MAC

    0A-10

    Type

    800

    Trailer

    Path

    Forwarding192.168.1.10

    192.168.4.10

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    43/82

    43

    Remember: Encapsulation

    Now, lets do an example

    Destination IP

    Address

    Source IP

    Address

    Other IP

    fields

    Data

    Destination

    Address

    Source

    Address

    Type Data Trailer

    Layer 3 IP Packet

    Layer 2 Data Link Frame

    CurrentData Link

    Address of Host or

    Routers exit interfaceNext hopData

    Link Address ofHost or Routers

    interface

    These change from

    host to router, router to

    router, and router to

    host.

    These addresses

    do notchange!

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    44/82

    44

    This is just a summary.

    Thedetails will be shown next! Now for the details

    Dest. MAC00-10

    Source MAC0A-10

    Type800

    Trailer

    Layer 2 Data Link Frame

    Dest. IP192.168.4.10

    Source IP192.168.1.10

    IPfields

    Data

    Layer 3 IP Packet

    Dest. MAC0B-31

    Source MAC00-20

    Type800

    TrailerDest. IP192.168.4.10

    Source IP192.168.1.10

    IPfields

    DataDest. AddFF-FF

    Source Add Type800

    Trailer

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    45/82

    45

    From Host X to Router RTA

    Host X begins by encapsulating the IP packet into a data link frame (in thiscase Ethernet) with RTAs Ethernet 0 interfaces MAC address as the datalink destination address.

    How does Host X know to forward to packet to RTA and not directly to HostY?

    IP Source and IP Destination Addresses are on different networks

    How does Host X know or get RTAs Ethernet address? Checks ARP Table for Default Gateway IP Address and associated

    MAC Address.

    What if it there is not an entry in the ARP Table?

    Host X sends an ARP Request and RTA sends an ARP Reply

    Dest. MAC

    00-10

    Source MAC

    0A-10

    Type

    800

    Trailer

    Layer 2 Data Link Frame

    Dest. IP

    192.168.4.10

    Source IP

    192.168.1.10

    IP

    fields

    Data

    Layer 3 IP Packet

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    46/82

    46

    RTA

    1. RTA examines Destination MAC address, which matches the E0 MAC address, so it copies in theframe.

    2. RTA sees the Type field is 0x800, IP packet in the data field, a packet which needs to be routed.

    3. RTA strips off the Ethernet frame.

    RTA looks up the Destination IP Addressin its routing table.

    192.168.4.0/24 has next-hop-ip address of 192.168.2.2 and an exit-interface of e1. Since the exit interface is on an Ethernet network, RTA must resolve the next-hop-ip address with a

    destination MAC address.

    4. RTA looks up the next-hop-ip address of 192.168.2.2 in its ARP cache.

    If the entry was not in the ARP cache, the RTA would need to send an ARP request out e1. RTBwould send back an ARP reply, so RTA can update its ARP cache with an entry for 192.168.2.2. 5.Packet is encapsulated into a new data link (Ethernet) frame.

    Dest. MAC0B-31

    Source MAC00-20

    Type800

    Trailer

    Layer 2 Data Link Frame

    Dest. IP192.168.4.10

    Source IP192.168.1.10

    IPfields

    Data

    Layer 3 IP Packet

    RTA Routing Table

    Network Hops Next-hop-ip Exit-interface

    192.168.1.0/24 0 Dir.Conn. e0

    192.168.2.0/24 0 Dir.Conn e1

    192.168.3.0/24 1 192.168.2.2 e1192.168.4.0/24 2 192.168.2.2 e1

    RTA ARP Cache

    IP Address MAC Address

    192.168.2.2 0B-31

    Dest. MAC00-10

    Source MAC0A-10

    Type800

    Trailer

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    47/82

    47

    RTB

    1. RTB examines Destination MAC address, which matches the E0 MAC address, and copies in the frame.

    2. RTB sees Type field, 0x800, IP packet in the data field, a packet which needs to be routed.

    3. RTB strips off the Ethernet frame.

    RTB looks up the Destination IP Addressin its routing table.

    192.168.4.0/24 has next-hop-ip address of 192.168.3.2 and an exit-interface of Serial0.

    Since the exit interface is notan Ethernet network, RTB does nothave to resolve the next-hop-ip addresswith a destination MAC address.

    When the interface is a point-to-point serial connection, (like a pipe), RTB encapsulates the IP packet intothe proper data link frame, using the proper serial encapsulation (HDLC, PPP, etc.).

    The data link destination address is set to a broadcast(theres only one other end of the pipe).

    5. Packet is encapsulated into a new data link (serial, PPP) frame and sent out the link.

    Dest. AddFF-FF

    Source Add Type800

    Trailer

    Layer 2 Data Link Frame

    Dest. IP192.168.4.10

    Source IP192.168.1.10

    IPfields

    Data

    Layer 3 IP Packet

    RTB Routing Table

    Network Hops Next-hop-ip Exit-interface

    192.168.1.0/24 1 192.168.2.1 e0

    192.168.2.0/24 0 Dir.Conn e0

    192.168.3.0/24 0 Dir.Conn s0

    192.168.4.0/24 1 192.168.3.2 s0

    Dest. MAC0B-31

    Source MAC00-20

    Type800

    Trailer

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    48/82

    48

    RTC

    1. RTC copies in the data link (serial, PPP) frame.

    2. RTC sees the Type field is 0x800, IP packet in the data field, a packet which needs to be routed.

    3. RTC strips off the data link, serial, frame.

    RTC looks up the Destination IP Addressin its routing table. RTC realizes that this Destination IP Address is on the same network as one of its interfaces and it can sent the packet

    directly to the destination and not another router. Since the exit interface is on an directly connected Ethernet network, RTC must resolve the destination ip address with

    a destination MAC address.

    2. RTC looks up the destination ip address of 192.168.4.10 in its ARP cache.

    If the entry was not in the ARP cache, the RTC would need to send an ARP request out e0. Host Y would send backan ARP reply, so RTC can update its ARP cache with an entry for 192.168.4.10.

    5. Packet is encapsulated into a new data link (Ethernet) frame and sent out the interface.

    Dest. MAC0B-20

    Source MAC0C-22

    Type800

    Trailer

    Layer 2 Data Link Frame

    Dest. IP192.168.4.10

    Source IP192.168.1.10

    IPfields

    Data

    Layer 3 IP Packet

    RTC ARP Cache

    IP Address MAC Address

    192.168.4.10 0B-20

    RTC Routing Table

    Network Hops Next-hop-ip Exit-interface

    192.168.1.0/24 2 192.168.3.1 s0

    192.168.2.0/24 1 192.168.3.1 s0

    192.168.3.0/24 0 Dir.Conn s0192.168.4.0/24 0 Dir.Conn e0

    Dest. AddFF-FF

    Source Add Type800

    Trailer

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    49/82

    49

    Host Y

    Layer 2: Data Link Frame1. Host Y examines Destination MAC address, which matches its Ethernet interface MAC address, and

    copies in the frame.

    2. Host Y sees the Type field is 0x800, IP packet in the data field, which needs to be sent to its IP process.

    3. Host Y strips off the data link, Ethernet, frame and sends it to its IP process.

    Layer 3: IP Packet

    4. Host Ys IP process examines the Destination IP Addressto make sure it matches its own IP

    Address.. If it does not, the packet will be dropped.

    5. The packets protocol field is examined to see where to send the data portion of this IP packet: TCP,UDP or other?

    Layer 4: TCP, UDP or other?

    Layer 2 Data Link Frame

    Dest. IP192.168.4.10

    Source IP192.168.1.10

    IPfields

    Data

    Layer 3 IP Packet

    Dest. MAC0B-20

    Source MAC0C-22

    Type800

    Trailer

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    50/82

    50

    The summary once again!

    Dest. MAC00-10

    Source MAC0A-10

    Type800

    Trailer

    Layer 2 Data Link Frame

    Dest. IP192.168.4.10

    Source IP192.168.1.10

    IPfields

    Data

    Layer 3 IP Packet

    Dest. MAC0B-31

    Source MAC00-20

    Type800

    TrailerDest. IP192.168.4.10

    Source IP192.168.1.10

    IPfields

    DataDest. AddFF-FF

    Source Add Type800

    Trailer

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    51/82

    CLI Configuration and

    Addressing

    Implementing Basic Addressing Schemes

    Basic Router Configuration

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    52/82

    52

    Learning IOS: Lab 1.5.2 (Cabrillo College Version)

    Networking Lab NetLab Packet Tracer

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    53/82

    53

    Establishing a HyperTerminal session (next week)

    Take the following steps to connect a terminal to the console port on the router:

    Connect the terminal using the RJ-45 to RJ-45 rollover cable and an RJ-45 to DB-9or RJ-45 to DB-25 adapter.

    Configure the terminal or PC terminal emulation software for 9600 baud, 8 data bits,no parity, 1 stop bit, and no flow control.

    Rollover cable

    Console port

    Com1 or Com2 serial port

    Terminal or a

    PC with

    terminalemulation

    software

    Router

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    54/82

    54

    Establishing a Terminal session

    Important: A console connection is not the same as a network

    connection!

    =

    Tera Term

    HyperTerminal (comes with Windows)

    Putty

    When do you need to use a console connection to the router?

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    55/82

    55

    Terminal Connection

    No network connection needed ConsolePort

    y

    What software do you need?

    What cable and ports do you use?

    When there is not a network connection to the router (cant use telnet).

    Tera Term, HyperTerminal, Putty, etc.

    PC: Serial port & Router: Console PortRollover or Console Cable

    Serial

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    56/82

    56

    C:\> telnet

    C:\> ping

    Ethernet Connection

    Network connection needed

    When can you use a network connection to

    the router?

    What software/command do you need?

    What cable and ports do you use?

    When should you not use a network

    connection to configure the router?

    When there is a network connection to the

    router (telnet).TCP/IP, Terminal prompt (DOS),

    Tera Term, etc.

    PC & Router: Ethernet NIC

    Ethernet straight-through cable

    When the change maydisconnect the telnet connection.

    NIC

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    57/82

    57

    Terminal Connection

    No network connection needed ConsolePort

    C:\> telnet

    C:\> ping

    Ethernet Connection

    Network connection needed

    Serial

    NIC

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    58/82

    58

    NetLab

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    59/82

    59

    NetLab

    Basic Router

    Pod

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    60/82

    60

    Your Interfaces may differ

    R1# show ip interface brief

    Interface IP-Address OK? Method Status ProtocolFastEthernet0/0 192.168.1.1 YES manual up up

    FastEthernet0/1 192.168.1.2 YES manual up up

    Serial0/0 192.168.2.1 YES manual up up

    Serial0/1 unassigned YES manual up up

    FastEthernet 0 = FastEthernet 0/0

    FastEthernet 1 = FastEthernet 0/1 = FastEthernet 1/0

    Serial 0 = Serial 0/0 = Serial 0/0/0

    Serial 1 = Serial 0/1 = Serial 0/0/1

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    61/82

    61

    Learning IOS: Lab 1.5.2 (Cabrillo College Version)

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    62/82

    62

    Command Overview (partial list from lab)Router> user mode

    Router> enable

    Router# privilege mode

    Router# configure terminal

    Router(config)# exit

    Router# config t

    Router(config)# hostname name

    Router(config)# enable secretpassword privilege passwordRouter(config)# line console 0 console password

    Router(config-line)#passwordpassword

    Router(config-line)# login

    Router(config)# line vty 0 4 telnet password

    Router(config-line)#passwordpassword

    Router(config-line)# login

    Router(config)#banner motd # message# banner

    Router(config)# interfacetype number configure interface

    Router(config-if)# ip addressaddress mask

    Router(config-if)# descriptiondescription

    Router(config-if)# no shutdown

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    63/82

    63

    Other Commands

    Router# copy running-config startup-config

    Router# show running-config

    Router# show ip route

    Router# show ip interface brief

    Router# show interfaces

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    64/82

    64

    Different Modes

    IOS commands must be entered in the correct mode.

    Router#hostname R1

    ^% Invalid input detected at '^' marker.

    Router# configure terminal

    Router(config)# hostname R1

    R1(config)#

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    65/82

    65

    Serial Connectors

    2500 have the older, larger serial interfaces

    Later Cisco routers use the smart serial interfaces which allowsmore data to be forwarded across fewer cable pins.

    Smart

    Serial

    Older

    Serial

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    66/82

    66

    Serial Connectors

    Router is typically a DTE device.

    The DTE cable is connected to the serial interface on the router to a

    CSU/DSU device (DCE).

    DTE Cable

    DCE Cable

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    67/82

    67

    WAN Interface Configuration

    R1(config)# interface Serial0/0

    R1(config-if)# ip address 192.168.2.1 255.255.255.0R1(config-if)#description Link to R2

    R1(config-if)#clock rate 64000 DCE Only

    R1(config-if)#no shutdown

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    68/82

    68

    Unsolicited Messages from IOS

    The IOS often sends unsolicited messages

    Does not affect the command Can cause you to lose your place when typing.

    R1(config)# interface fastethernet0/0

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

    R1(config-if)# descri

    *Mar 1 01:16:08.212: %LINK-3-UPDOWN: Interface

    FastEthernet0/0, changed state to up

    *Mar 1 01:16:09.214: %LINEPROTO-5-UPDOWN: Line protocol onInterface

    FastEthernet0/0, changed state to upption

    R1(config-if)#

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    69/82

    69

    Unsolicited Messages from IOS

    To keep the unsolicited output separate from your input, enter lineconfiguration mode for the console port and add the loggingsynchronous

    R1(config)# line console 0

    R1(config-line)# logging synchronous

    R1(config-if)# descri

    *Mar 1 01:28:04.242: %LINK-3-UPDOWN: Interface

    FastEthernet0/0, changed state to up

    *Mar 1 01:28:05.243: %LINEPROTO-5-UPDOWN: Line protocol onInterface

    FastEthernet0/0, changed state to up

    R1(config-if)# description

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    70/82

    70

    LAN Interface Configuration

    R1(config)# interface FastEthernet0/0

    R1(config-if)# ip address 192.168.1.1 255.255.255.0R1(config-if)# description R1 LAN

    R1(config-if)# no shutdown

    Fa0/1

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    71/82

    71

    Each Interface Belongs to a Different Network

    R1(config)# interface FastEthernet0/1

    R1(config-if)# ip address 192.168.1.2 255.255.255.0192.168.1.0 overlaps with FastEthernet0/0

    R1(config-if)# no shutdown

    192.168.1.0 overlaps with FastEthernet0/0

    FastEthernet0/1: incorrect IP address assignment

    Fa0/1192.168.1.1/24

    192.168.1.2/24

    Same Network!

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    72/82

    72

    Each Interface Belongs to a Different Network

    R1# show ip interface brief

    Interface IP-Address OK? Method Status Protocol

    FastEthernet0/0 192.168.1.1 YES manual up up

    Serial0/0 192.168.2.1 YES manual up up

    FastEthernet0/1 192.168.1.2 YES manual administratively

    down down

    Serial0/1 unassigned YES unset administratively

    down down

    Fa0/1

    V if i I f

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    73/82

    73

    Verifying Interfaces

    R1# show interfaces

    FastEthernet0/0is up, line protocol is up(connected)Hardware is Lance, address is 0007.eca7.1511(bia 00e0.f7e4.e47e)

    Description: R1 LAN

    Internet address is 192.168.1.1/24

    MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255

    Encapsulation ARPA, loopback not set

    ARP type: ARPA,ARP Timeout 04:00:00,

    Last input 00:00:08, output 00:00:05, output hang never

    Last clearing of show interface counters neverQueueing strategy: fifo

    Output queue :0/40 (size/max)

    5 minute input rate 0 bits/sec, 0 packets/sec

    5 minute output rate 0 bits/sec, 0 packets/sec

    0 packets input, 0 bytes, 0 no buffer

    Received 0 broadcasts, 0 runts, 0 giants, 0 throttles

    Serial0/0is up, line protocol is up(connected)

    Hardware is HD64570

    Description: Link to R2

    Internet address is 192.168.2.1/24

    MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255

    Encapsulation HDLC, loopback not set, keepalive set (10 sec)

    Last input never, output never, output hang never

    V if R t C fi ti

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    74/82

    74

    Verify Router Configuration

    R1# show running-config

    !

    version 12.3

    !

    hostname R1

    !

    interface FastEthernet0/0

    description R1 LAN

    ip address 192.168.1.1 255.255.255.0

    !

    interface Serial0/0

    description Link to R2

    ip address 192.168.2.1 255.255.255.0

    clock rate 64000

    !

    banner motd ^C

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

    WARNING!! Unauthorized Access Prohibited!!

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

    ^C

    !line con 0

    password cisco

    login

    line vty 0 4

    password cisco

    login

    !

    end

    Note: shutdownis the

    default. no shutdowndoes

    not show in the configuration.

    S C fi ti

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    75/82

    75

    Save Configuration

    R1# copy running-config startup-config

    R1#show startup-config

    Using 728 bytes

    !

    version 12.3

    !

    hostname R1

    !

    interface FastEthernet0/0

    description R1 LAN

    ip address 192.168.1.1 255.255.255.0

    !

    interface Serial0/0

    description Link to R2

    ip address 192.168.2.1 255.255.255.0

    clock rate 64000

    !

    banner motd ^C

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

    WARNING!! Unauthorized Access Prohibited!!

    ******************************************^C

    line con 0

    password cisco

    login

    line vty 0 4

    password cisco

    login

    !

    end

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    76/82

    Building the Routing Table

    Introducing the Routing Table

    Directly Connected Networks

    Sh R ti T bl

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    77/82

    77

    Show Routing Table

    R1# show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

    * - candidate default, U - per-user static route, o - ODR

    P - periodic downloaded static route

    Gateway of last resort is not set

    C 192.168.1.0/24 is directly connected, FastEthernet0/0

    C 192.168.2.0/24 is directly connected, Serial0/0

    I t d i th R ti T bl

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    78/82

    78

    Introducing the Routing Table

    Routing tableis a data file in RAM that is used to store route

    information about: Directly connected networks

    Remote networks

    R1# show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

    * - candidate default, U - per-user static route, o - ODR

    P - periodic downloaded static route

    Gateway of last resort is not set

    C 192.168.1.0/24 is directly connected, FastEthernet0/0

    C 192.168.2.0/24 is directly connected, Serial0/0

    I t d i th R ti T bl

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    79/82

    79

    Introducing the Routing Table

    Directly connected interfaces contain the exit interface (more later)

    R1# show ip route

    C 192.168.1.0/24 is directly connected, FastEthernet0/0

    C 192.168.2.0/24 is directly connected, Serial0/0

    Exit Interfaces

    Introducing the Routing Table

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    80/82

    80

    Introducing the Routing Table

    directly connected networkis a network that is directly attached to one of

    the router interfaces.

    When a routers interface is configured with an IP address and subnet

    mask, the interface becomes a host on that attached network.

    Active directly connected networks are added to the routing table.

    R1# show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    C 192.168.1.0/24 is directly connected, FastEthernet0/0

    C 192.168.2.0/24 is directly connected, Serial0/0

    Directly ConnectedNetworks

    Introducing the Routing Table

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    81/82

    81

    Introducing the Routing Table

    A remote networkis a network that is notdirectly connected to the

    router.

    A remote network is a network that can only be reached by sendingthe packet to another router.

    Remote networks are added to the routing table using: (later)

    Dynamic routing protocol

    Static routes

    R1# show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    C 192.168.1.0/24 is directly connected, FastEthernet0/0

    C 192.168.2.0/24 is directly connected, Serial0/0

    Remote Network

  • 5/27/2018 CIS 82 Routing Protocols and Concepts

    82/82

    Chapter 1

    Introduction to Routing and

    Packet Forwarding

    CIS 82 Routing Protocols and Concepts

    Rick Graziani

    Cabrillo College

    [email protected]