ccna static routing

65
7/29/2019 CCNA STATIC ROUTING http://slidepdf.com/reader/full/ccna-static-routing 1/65 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public ITE PC v4.0 Chapter 1 1 Static Routing Routing Protocols and Concepts – Chapter 2 Modified by Tony Chen 10/28/2008

Upload: faizansajid63

Post on 04-Apr-2018

257 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 1/65

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

ITE PC v4.0

Chapter 1 1

Static Routing

Routing Protocols and Concepts – Chapter 2Modified by Tony Chen

10/28/2008

Page 2: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 2/65

ITE PC v4.0

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

Notes:

If you see any mistake on my PowerPoint slides or if you have any questions about the materials, pleasefeel free to email me at [email protected].

Thanks! 

Tony Chen 

College of DuPage 

Cisco Networking Academy 

Page 3: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 3/65

ITE PC v4.0

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

Objectives

Define the general role a router plays in networks.

Describe the directly connected networks, differentrouter interfaces

Examine directly connected networks in the routingtable and use the CDP protocol

Describe static routes with exit interfaces

Describe summary and default route

Examine how packets get forwarded when usingstatic routes

Identify how to manage and troubleshoot static routes

Page 4: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 4/65

ITE PC v4.0

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

General Role of the Router

Functions of a Router Best Path Selections

Forwarding packets to destination

Routers perform packet forwarding by learning about

remote networks and maintaining routing information. – The routers primary forwarding decision is based on Layer 3information, the destination IP address.

 – The router's routing table is used to find the best matchbetween the destination IP of a packet and a network addressin the routing table.

 – The routing table will ultimately determine the exit interface toforward the packet and the router will encapsulate that packet inthe appropriated data link frame for that outgoing interface.

Page 5: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 5/65

ITE PC v4.0

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

General Role of the Router

Introducing the Topology – The figure shows the topology used in this chapter.

 – 3 1800 series routers connected via WAN links

 – Each router connected to a LAN represented by a switch and a PC

Page 6: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 6/65

ITE PC v4.0

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

General Role of the Router Connections of a Router for WAN

-A router has a DB-60 port that can support 5different cabling standards

 –Newer routers support the smart serialinterface that allows for more data to beforwarded across fewer cable pins.

Connections of a Router for Ethernet

-2 types of connectors can be used: Straightthrough and Cross-over 

Straight through used to connect:

-Switch-to-Router, Switch-to-PC, Hub-to-

PC, Hub-to-Server Cross-over used to connect (pin 1 connectedto pin 3, and pin 2 connected to pin 6):

-Switch-to-Switch, PC-to-PC, Switch-to-Hub, Hub-to-Hub, Router-to-Router, PC-Router 

Page 7: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 7/65ITE PC v4.0

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

General Role of the Router in COD

Smart Serial cables: DCE and DTE-Use straight cable to connect betweenthe DTE and DCE..

Ethernet cables:

Cross-over cable: RED cable

Roll-over cable: flat cables  

Straight cable: all other cables

DCE and DTE Adapter 

http://www.csdata.com/csdonline/customer/home.php

Page 8: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 8/65ITE PC v4.0

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

Serial Connectors

DTEDCE

DTE DTE

In our labs we will use serial DTE/DCE cables (noCSU/DSU) with a DTE cable connected to one router anda DCE cable connected to the other router.

DCEDCE

Page 9: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 9/65ITE PC v4.0

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

Interfaces

Examining Router Interfaces-Show IP router command – used to view routing table

-Show Interfaces command – used to show status of an interface

-Show IP Interface brief command – used to show a portion of 

the interface information on a condensed format-Show running-config command – used to show configuration

file in RAM

Page 10: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 10/65ITE PC v4.0

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

Interfaces

Configuring an Ethernet interface-By default all serial and Ethernet interfaces are down 

-To enable an interface use the No Shutdown command

•The show ip route 

command is used todisplay the routing table.•Initially, the routing table isempty if no interfaces havebeen configured. •Static routes and dynamicroutes will not be added tothe routing table until theappropriate local interfaceshave been configured onthe router.

Page 11: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 11/65ITE PC v4.0

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

Verifying Ethernet interface- Show interfaces - command shows the status and gives a detailed

description for all interfaces on the router  – Show interfaces fastEthernet 0/0  – command used to show status of fast Ethernet port

•R1#show interfaces fastethernet 0/0

•FastEthernet0/0 is administratively down, line protocol is down

•  Administratively down means that the interface is currently in the shutdown mode, or turned off.•Line protocol is down means, in this case, that the interface is not receiving a carrier signal froma switch or the hub. This condition may also be due to the fact that the interface is in shutdownmode 

• You will notice that the show interfaces command does not show any IP addresses on R1'sinterfaces. The reason for this is because we have not yet configured IP addresses on any of theinterfaces.

Page 12: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 12/65ITE PC v4.0

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

Interfaces Verifying Ethernet interface

 – Show run  – • command displays the current configuration file thatthe router is using. Configuration commands aretemporarily stored in the running configuration fileand implemented immediately by the router.

•However, using show running-config is notnecessarily the best way to verify interface

configurations.

-Show ip interface brief  – 

-can be used to see a portion of the interfaceinformation in a condensed format.

Page 13: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 13/65

ITE PC v4.0

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

Configuring an Ethernet interfaceBy default, all router interfaces are shutdown. To enable thisinterface, use the no shutdown command, which changes the

interface from administratively down to up.

R1(config)#interface fastethernet 0/0

R1(config-if)#ip address 172.16.3.1 255.255.255.0

R1(config-if)#no shutdown

The following message is returned from the IOS:

*Mar 1 01:16:08.212: %LINK-3-UPDOWN: InterfaceFastEthernet0/0, changed state to up

*Mar 1 01:16:09.214: %LINEPROTO-5-UPDOWN: Lineprotocol on Interface FastEthernet0/0, changed state to up

 –The first changed state to up message indicates that,

physically, the connection is good. If you do not get this firstmessage, be sure that the interface is properly connected toa carrier signal from switch or a hub.

 –The second changed state to up message indicates that theData Link layer is operational.

• However, WAN interfaces in a lab environment requireclocking on one side of the link. If you do correctly set the

clock rate, then line protocol will not change to up.

Page 14: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 14/65

ITE PC v4.0

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

Configuring an Ethernet interface

Unsolicited Messages from IOS The IOS often sends unsolicited messages.

As you can see in the figure, sometimes thesemessages will occur when you are in the middleof typing a command, such as configuring adescription for the interface.

 –The IOS message does not affect the command,but it can cause you to lose your place when typing.

In order to keep the unsolicited output separatefrom your input, enter line configuration modefor the consoled port and add the logging synchronous command, as shown. You will seethat messages returned by IOS no longerinterfere with your typing.

Page 15: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 15/65

ITE PC v4.0

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

Interfaces Verifying Ethernet interface

-Show interfaces fastEthernet 0/0

Reading the Routing Table

 –Now look at routing table shown in the figure.Notice R1 now has a "directly connected"FastEthernet 0/0 interface a new network.

 –The interface was configured with the172.16.3.1/24 IP address which makes it amember of the 172.16.3.0/24 network.

172.16.0.0/24 is subnetted, 1 subnets

C 172.16.3.0 is directly connected, FastEthernet0/0

 –The C at the beginning of the route indicates

that this is a directly connected network. In other words, R1 has an interface that belongs to thisnetwork.

 –The /24 subnet mask for this route is displayedin the line above the actual route.

Page 16: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 16/65

ITE PC v4.0

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

Interfaces Reading the Routing Table

172.16.0.0/24 is subnetted, 1 subnets

 –Having a single route represent an entirenetwork of host IP addresses makes therouting table smaller, with fewer routes,which results in faster routing table

lookups.•It means that this route matches allpackets with a destination addressbelonging to this network.

 –The routing table could contain all 254individual host IP addresses for the172.16.3.0/24 network, but that is an

inefficient way of storing addresses.

Page 17: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 17/65

ITE PC v4.0

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

Interfaces Verifying Ethernet interface

show interfaces fastethernet 0/0show ip interface brief 

The show interfaces fastethernet 0/0 commandin the figure now shows

 –The interface is up, and the line protocol is up.The no shutdown command changed the

interface from administratively down to up. –Notice that the IP address is now displayed.

The command show ip interface brief in thefigure shows that the interface is up, and theline protocol is up. (in a condensed format)

Typically, the router's Ethernet or FastEthernetinterface will be the default gateway IP addressfor any devices on that LAN. 

 –For example, PC1 would be configured with aIP address belonging to the 172.16.3.0/24network, with the default gateway IP address172.16.3.1.

 –172.16.3.1 is router R1's FastEthernet IPaddress.

Page 18: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 18/65

ITE PC v4.0

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

Ethernet Interfaces Participate in ARP A router's Ethernet interface participates

in a LAN network just like any otherdevice on that network. 

 –This means that these interfaces have aLayer 2 MAC address, as shown in the figure.The show interfaces command displays theMAC address for the Ethernet interfaces.

 –If a router has a packet destined for adevice on a directly connected Ethernetnetwork, it checks the ARP table for an entrywith that destination IP address in order tomap it to the MAC address.

Page 19: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 19/65

ITE PC v4.0

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

Interfaces

Configuring a Serial interface-Enter interface configuration mode

-Enter in the ip address and subnet mask

-Enter in the no shutdown command

Example:

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

-R1(config-if)#ip address 172.16.2.1 255.255.255.0

-R1(config-if)#no shutdown

Page 20: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 20/65

ITE PC v4.0

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

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

R1(config-if)#ip address 172.16.2.1 255.255.255.0

R1(config-if)#no shutdown

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

R2(config-if)#ip address 172.16.2.2 255.255.255.0

R2(config-if)#no shutdown –There is no requirement that both ends of the serial link use the same interface, (0/0/0, 0/0/1,0/1/0, 0/1/1, ….) 

 –in this case, Serial 0/0/0. However, because both interfaces are members of the samenetwork, they both must have IP addresses that belong to the 172.16.2.0/24 network.

 –If we now issue the show interfaces serial 0/0/0 command on either router, we still see thatthe link is up/down.

R2#show interfaces serial 0/0/0

Serial0/0/0 is up, line protocol is down

 – The physical link between R1 and R2 is up because both ends of the serial link have beenconfigured correctly with an IP address/mask and enabled with the no shutdown command.

 – However, the line protocol is still down. This is because the interface is not receiving a clocksignal.

 – There is still one more command that we need to enter, the clock rate command, on therouter with the DCE cable. The clock rate command will set the clock signal for the link.

Page 21: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 21/65

ITE PC v4.0

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

Interfaces

Nothing is configured

Setup IP but not “no shut” 

Setup “no shut” 

Configured the clock rate

Step 1

Step 2

Step 3

Step 4

Page 22: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 22/65

ITE PC v4.0

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

Examining Router Interfaces

-Physically connecting a WAN Interface.

-A WAN Physical Layer connection has sides:

Data Circuit-terminating Equipment (DCE)  – This is the serviceprovider. CSU/DSU is a DCE device.

The CSU/DSU (DCE device) is used to convert the data from the router (DTEdevice) into a form acceptable to the WAN service provider.

a DCE device such as a CSU/DSU will provide the clock.

Data Terminal Equipment (DTE)  – Typically the router is the DTEdevice.

Up-to-date technology

Cisco 1-Port T1/Fractional T1

DSU/CSU WAN Interface Card

(WIC-1DSU-T1-V2=)

Wh t i th i ifi t f th i f ti 1?

Page 23: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 23/65

ITE PC v4.0

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

Interfaces

For serial links that are directly interconnected, as in alab environment, one side of a connection must beconsidered a DCE and provide a clocking signal.

You can also distinguish DTE from DCE

 –1) by looking at the connector between the two cables.The DTE cable has a male connector, whereas the DCEcable has a female connector .

 –2) If a cable is connected between the two routers, youcan use the show controllers command to determinewhich end of the cable is attached to that interface.

R1#show controllers serial 0/0/0

Interface Serial0/0/0

Hardware is PowerQUICC MPC860

DCE V.35, no clock

<output omitted>

- What is the significant of the information 1?

Page 24: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 24/65

ITE PC v4.0

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

Interfaces Once the cable is attached, the clock can now be set with

the clock rate command.

 –The available clock rates, in bits per second, are1200, 2400, 9600, 19200, 38400, 56000, 64000,72000, 125000, 148000, 500000, 800000,1000000, 1300000, 2000000, and 4000000.

 –Some bit rates might not be available on certainserial interfaces.

R1(config)#interface serial 0/0

R1(config-if)#clock rate 64000

01:10:28: %LINEPROTO-5-UPDOWN: Line protocol onInterface Serial0/0, changed state to up

Note: If a router's interface with a DTE cable is configuredwith the clock rate command, the IOS will disregard thecommand and there will be no ill effects.

 –Use the “show controllers serial 0/0/0” tofind out whether it is a DTE or DCE cable.

Page 25: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 25/65

ITE PC v4.0

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

TestingVerifying the Serial Interface Configuration R1#show interfaces

R1#show ip interface brief R1#ping 172.16.2.2R1#show ip route

Page 26: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 26/65

ITE PC v4.0

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

Routing Table Concepts The show ip route command reveals the content of the routing table. 

 –The main purpose of a routing table is to provide the router with paths todifferent destination networks.

The routing table consists of a list of "known" network addresses

 –directly connected,

 –configured statically,

 –learned dynamically. POP Quiz:

 – Can R1 ping R2?

 – Can PC1 ping PC2?

Page 27: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 27/65

ITE PC v4.0

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

Routing Table Concepts Purpose of the debug ip routing command 

 Allows you to view changes that the router performs when adding or removing routes in real time 

1

2

3

4

5

enable debugging with the debug ip routing command

Check the routing table

Configuring the IP address and Subnet Mask

Disable debug iprouting by usingeither the “undebugip routing” command

or the “undebug all”command.

disable interfaces with the shutdown command.

Check the routing table

Never use the debug all command on the production router.

Page 28: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 28/65

ITE PC v4.0

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

Routing Table and CDP Protocol

When a router only has its interfaces configured & no other routing protocols are configured then:

-The routing table contains only the directly connectednetworks

-Only devices on the directly connected networks arereachable

POP Quiz:Whypings

failed?

The output in this figure verifies that allconfigured interfaces are "up" and "up".

Page 29: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 29/65

ITE PC v4.0

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

Routing Table and CDP Protocol

When a router only has its interfaces configured, and therouting table contains the directly connected networks butno other routes, only devices on those directly connectednetworks are reachable.

 –R1 can communicate with any device on the 172.16.3.0/24and 172.16.2.0/24 networks.

 –R2 can communicate with any device on the 172.16.1.0/24,

172.16.2.0/24, and 192.168.1.0/24 networks. –R3 can communicate with any device on the 192.168.1.0/24and 192.168.2.0/24 networks.

Page 30: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 30/65

ITE PC v4.0

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

Routing Table and CDP Protocol

Checking each route in turn

 –The ping command is used tocheck end to end connectivity

 –Ping 172.16.3.1 failed

•Route does not match anyroute in the routing table

 –Ping 192.168.1.1 succeed•192.168.1.0/24, matches thefirst 24 bits of the destination IPaddress

Page 31: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 31/65

ITE PC v4.0

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

Routing Table and CDP Protocol

Purpose of CDP –Cisco Discovery Protocol (CDP) is a powerfulnetwork monitoring and troubleshooting tool.

•CDP runs at the Data Link layer connecting the physicalmedia to the upper-layer protocols (ULPs).

•Because CDP operates at the Data Link layer, two or moreCisco network devices, such as routers that support differentNetwork layer protocols (for example, IP and Novell IPX), canlearn about each other.

 – A layer 2 cisco proprietary tool used to gather informationabout other directly connected Cisco devices.

•enables you to access a summary of protocol and addressinformation about Cisco devices that are directly connected.

 –the types of devices that are connected,

 –the interfaces they are connected to,

 –the interfaces used to make the connections,

 –the model numbers of the devices.

 –…….. 

Page 32: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 32/65

ITE PC v4.0

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

Routing Table and CDP Protocol Concept of neighbors

-2 types of neighbors

Layer 3 neighbors

At Layer 3, routing protocols consider neighbors to bedevices that share the same network address space.

 R1 and R2 are neighbors. Both are members of the172.16.1.0/24 network.

R2 and R3 are also neighbors because they both sharethe 192.168.1.0/24 network.

 But R1 and R3 are not neighbors because they do notshare any network address space.

Layer 2 neighbors

CDP operates at Layer 2 only. Therefore, CDP

neighbors are Cisco devices that are directlyconnected physically and share the same data link.

»R1 and S1 are CDP neighbors.

»R1 and R2 are CDP neighbors.

»R2 and S2 are CDP neighbors.

»R2 and R3 are CDP neighbors.

»R3 and S3 are CDP neighbors.

Notice the difference between Layer 2 andLayer 3 neighbors. The switches are notneighbors to the routers at Layer 3, becausethe switches are operating at Layer 2 only.However, the switches are Layer 2 neighbors

to their directly connected routers.

Page 33: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 33/65

ITE PC v4.0

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

Routing Table and CDP Protocol CDP is on by default. 

 –CDP exchanges hardware and softwaredevice information with its directly connectedCDP neighbors.

CDP show commands

Show cdp neighbors command

-Displays the following information:

Neighbor device IDLocal interface

Holdtime value, in seconds

Neighbor device capability code

Neighbor hardware platform

Neighbor remote port ID

Show cdp neighbors detail command

-It can also reveals the IP address of aneighboring device –knowing the IP address of the CDP neighbor isoften allows you to telnet into that device.

• and a lot more

 – IOS version

 – Platform

 – ………… 

Page 34: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 34/65

ITE PC v4.0

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

Routing Table and CDP Protocol

Disabling CDP – CDP be a security risk

• Because some IOS versions send out CDP advertisementsby default, it is important to know how to disable CDP.

 –If you need to disable CDP globally, for the entire device, usethis command:

• Router(config)#no cdp run

 –If you want to use CDP but need to stop CDP advertisements

on a particular interface, use this command:

• Router(config-if)#no cdp enable

Page 35: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 35/65

ITE PC v4.0

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

Static Routes

A router can learn about remote networks in one of two ways: –Manually, from configured static routes

 –Automatically, from a dynamic routing protocol 

•Dynamic routing protocols are introduced in the next chapter.

Purpose of a static route

 – A manually configured route used when routing from a network to a stubnetwork

• A stub network is a network accessed by a single route.

•For an example, here we see that anynetwork attached to R1 would only have

one way to reach other destinations,whether to networks attached to R2 or to destinations beyond R2.•Therefore, network 172.16.3.0 is astub network and R1 is a stub router.•Running a routing protocol between R1and R2 is a waste of resources

Page 36: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 36/65

ITE PC v4.0

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

Static Routes

IP route commandTo configure a static route use the following command: ip route

Example:

-Router(config)# ip route network-address subnet-mask {ip-address | exit-interface }

Page 37: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 37/65

ITE PC v4.0

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

Static route operation Example: Fly from Chicago to LA

Chicago

Los

Angeles

Chicago O’Hare Airport Los Angeles

RTR(config)# ip route prefix mask {address | interface}

O’Hare 

O’Hare 

Los

Angeles

Page 38: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 38/65

ITE PC v4.0

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

Static Routes

Remember R1 knows about its directlyconnected networks.

 –These are the routes currently in itsrouting table.

The remote networks that R1 does notknow about are:

 –172.16.1.0/124 - The LAN on R2 –192.168.1.0/24 - The serial networkbetween R2 and R3

 –192.168.2.0/24 - The LAN on R3

Page 39: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 39/65

ITE PC v4.0

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

Static Routes

Dissecting static route syntax

ip route - Static route command

172.16.1.0 – Destination network address

255.255.255.0 - Subnet mask of destinationnetwork

172.16.2.2 - Serial 0/0/0 interface IP addresson R2, which is the "next-hop" to this network

show ip route output 

 –S - Routing table code for static route

 –172.16.1.0 - Network address for the route

 –/24 - Subnet mask for this route; this isdisplayed in the line above, known as the parentroute, and discussed in Chapter 8

 –[1/0] - Administrative distance and metric for the static route (explained in a later chapter)

 –via 172.16.2.2 - IP address of the next-hoprouter, the IP address of R2's Serial 0/0/0interface

R1(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.2

Page 40: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 40/65

ITE PC v4.0

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

Static Routes

show ip route output 

 –S - Routing table code for static route

 –172.16.1.0 - Network address for the route

 –/24 - Subnet mask for this route; this isdisplayed in the line above, known as the parent

route, and discussed in Chapter 8 –[1/0] - Administrative distance and metric for the static route (explained in a later chapter)

 –via 172.16.2.2 - IP address of the next-hoprouter, the IP address of R2's Serial 0/0/0interface

R1(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.2

Page 41: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 41/65

ITE PC v4.0

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

Static Routes

Configuring routes to 2 or more remote networksUse the following commands for R1

-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

Page 42: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 42/65

ITE PC v4.0

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

Static Routes Zinin’s 3 routing principles 

Principle 1: "Every router makes its decision alone, based on the information it hasin its own routing table.“ 

R1 has three static routes in its routing table and makes forwarding decisionsbased solely upon the information in the routing table.

R1 does not consult the routing tables in any other routers.

Making each router aware of remote networks is the responsibility of thenetwork administrator.

Principle 2: "The fact that one router has certain information in its routing table doesnot mean that other routers have the same information.“ 

The network administrator would be responsible for ensuring that the next-hoprouter also has a route to this network

Using Principle 2, we still need to configure the proper routing on the other routers (R2 and R3) to make sure that they have routes to these three networks.

Principle 3: "Routing information about a path from one network to another does notprovide routing information about the reverse, or return path.“ 

Most of the communication over networks is bidirectional. This means thatpackets must travel in both directions between the end devices involved.

Using Principle 3 as guidance, we will configure proper static routes on the other routers to make sure they have routes back to the 172.16.3.0/24 network.

Page 43: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 43/65

ITE PC v4.0

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

Static Routes

Page 44: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 44/65

ITE PC v4.0

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

Static Routes with next-hop IP address

Resolving to an Exit Interface-Recursive route lookup - Occurs when the router has to perform multiplelookups in the routing table before forwarding a packet.  A static route thatforwards all packets to the next-hop IP address goes through the followingprocess (reclusive route lookup)

 (Step 1) The router first must match static route’s destination IP

address with the Next hop address The packet's destination IP address is matched to the static route192.168.2.0/24 with the next-hop IP address 172.16.2.2.

(Step 2) The next hop address is then matched to an exit interface

The next-hop IP address of the static route, 172.16.2.2, is matched to thedirectly connected network 172.16.2.0/24 with the exit interface of Serial 0/0/0.

Page 45: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 45/65

ITE PC v4.0

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

Static Routes with Exit Interfaces Configuring a Static route with an Exit

Interface

-Static routes configured with an exit interface are more efficient because the routing

 –The routing table can resolve the exit interfacein a single search instead of 2 searches

 If the static route cannot be resolved to an

exit interface, the static route is removed fromthe routing table

 –Notice from the debug output that all threestatic routes were deleted when the Serial 0/0/0interface was shut down.

 –They were deleted because all three static

routes were resolved to Serial 0/0/0. –However, the static routes are still in the R1'srunning configuration. If the interface comesback up (is enabled again with no shutdown),the IOS routing table process will reinstall thesestatic routes back into the routing table.

Page 46: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 46/65

ITE PC v4.0

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

Static Routes with Exit Interfaces Modifying Static routes

Existing static routes cannot be modified. The old static routemust be deleted by placing no in front of the ip route 

Example:

-no ip route 192.168.2.0 255.255.255.0 172.16.2.2

 A new static route must be rewritten in the configuration

R1(config)# no ip route 192.168.2.0 255.255.255.0 172.16.2.2R1(config)#ip route 192.168.2.0 255.255.255.0 serial 0/0/0

Page 47: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 47/65

ITE PC v4.0

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

Static Routes with Exit Interfaces Verifying the Static Route Configuration

-Use the following commands

Step 1 show running-config

Step 2 verify static route has been entered correctly

Step 3 show ip route

Step 4 verify route was configured in routing table

Step 5 issue ping command to verify packets canreach destination and that Return path is working

Page 48: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 48/65

ITE PC v4.0

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

Static route operation

Both types of the routesall have distance of 1

and metric of 0.

Page 49: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 49/65

ITE PC v4.0

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

Static Routes with Exit Interfaces Ethernet interfaces and ARP.

 – If a static route is configured on an Ethernet link•If the packet is sent to the next-hop router then… 

 –the destination MAC address will be the address of the nexthop’s Ethernet interface 

 –This is found by the router consulting the ARP table.»If an entry isn’t found then an ARP request will be sent out

R1(config)#ip route 192.168.2.0 255.255.255.0 fa 0/1

Page 50: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 50/65

ITE PC v4.0

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

Static Routes with Exit Interfaces

Best not to use only an exit interface with Ethernet interfaces.

Router will have difficulty determining the destination MAC address.

With Ethernet networks, many different devices can be sharing thesame multiaccess network, including hosts and even multiple routers.

Router will not have sufficient information to determine which deviceis the next-hop device.

Use both the next-hop interface and the exit interface for Ethernet exit interfaces.

Only a single route lookup now needed.

R1(config)#ip route 192.168.2.0 255.255.255.0 fastethernet 0/1

R1(config)#ip route 192.168.2.0 255.255.255.0 fastethernet 0/1 172.16.2.2

The routing table entry for this route would be:

S 192.168.2.0/24 [1/0] via 172.16.2.2 FastEthernet0/1

Page 51: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 51/65

ITE PC v4.0

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

Summary and Default Route

Summarizing routes reduces the size of the routingtable.

Route summarization is the process of combining anumber of static routes into a single static route. 

 –For example, the networks 10.0.0.0/16, 10.1.0.0/16,

10.2.0.0/16, 10.3.0.0/16, 10.4.0.0/16, 10.5.0.0/16, all the waythrough 10.255.0.0/16 can be represented by a single networkaddress: 10.0.0.0/8.

Multiple static routes can be summarized into a singlestatic route if:

 –The destination networks can be summarized into a singlenetwork address, and

 –The multiple static routes all use the same exit-interface or next-hop IP address

Page 52: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 52/65

ITE PC v4.0

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

Calculating a summary route Here's the process of creating the summary route

172.16.1.0/22, as shown in the figure:1. Write out the networks that you want to summarize in

binary.

2. To find the subnet mask for summarization, start withthe left-most bit.

3. Work your way to the right, finding all the bits thatmatch consecutively.

4. When you find a column of bits that do not match,stop. You are at the summary boundary.

5. Now, count the number of left-most matching bits,which in our example is 22. This number becomesyour subnet mask for the summarized route, /22 or 255.255.252.0

6. To find the network address for summarization, copythe matching 22 bits and add all 0 bits to the end tomake 32 bits.

By following these steps, we can discover that the 3static routes on R3 can be summarized into a singlestatic route, using the summary network address of 172.16.0.0 255.255.252.0:

ip route 172.16.0.0 255.255.252.0 Serial0/0/1

Page 53: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 53/65

ITE PC v4.0

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

Example: Calculating a summary route

Which address can be used tosummarize networks 172.168.0.0 /24through 172.168.7.0 /24? 

10101100 10101000 00000000 00000000

10101100 10101000 00000001 00000000 10101100 10101000 00000010 00000000 

10101100 10101000 00000011 00000000 

10101100 10101000 00000100 00000000 

10101100 10101000 00000101 00000000 

10101100 10101000 00000110 00000000 

10101100 10101000 00000111 00000000 

 Answer:

Page 54: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 54/65

ITE PC v4.0

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

Example: Calculating a summary route

Which address can beused to summarizenetworks• 192.1.1.0/27

• 192.1.1.32/27 

• 192.1.1.64/28 

• 192.1.1.80/28 

• 192.1.1.96/29 

• 192.1.1.104/29 

• 192.1.1.112/29 

• 192.1.1.120/29 

11000000 00000001 00000001 00000000

11000000 00000001 00000001 00100000

11000000 00000001 00000001 01000000 11000000 00000001 00000001 01010000

11000000 00000001 00000001 01100000

11000000 00000001 00000001 01101000

11000000 00000001 00000001 01110000

11000000 00000001 00000001 01111000

 Answer:

Page 55: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 55/65

ITE PC v4.0

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

Summary Route Configuring a summary route

 –Step 1: Delete the current static routeR3(config)#no ip route 172.16.1.0 255.255.255.0 serial0/0/1

R3(config)#no ip route 172.16.2.0 255.255.255.0 serial0/0/1

R3(config)#no ip route 172.16.3.0 255.255.255.0 serial0/0/1

 –Step 2: Configure the summary static route•R3(config)#ip route 172.16.0.0 255.255.252.0 serial0/0/1

 –Step 3: Verify the new static route

•show ip route ping

Page 56: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 56/65

ITE PC v4.0

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

Summary Route

Static routes and subnet masks –The routing table lookup process will use the most specific match when comparing destination IP address and subnet mask

 –For example, what if we had the following two static routes in therouting table

•172.16.0.0/24 is subnetted, 3 subnets

•S 172.16.1.0 is directly connected, Serial0/0/0 and

•S 172.16.0.0/16 is directly connected, Serial0/0/1

 –Consider a packet with the destination IP address 172.16.1.10. ThisIP address matches both routes.

•The routing table lookup process will use the most-specific match.

•Because 24 bits match the 172.16.1.0/24 route, and only 16 bits of the 172.16.0.0/16 route match, the static route with the 24 bit matchwill be used.

•This is the longest match.

Page 57: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 57/65

ITE PC v4.0

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

Default Route Default Static Route

This is a route that will match all packets.

Like route summarization this will help reducethe size of the routing table

Default static routes are used: –When no other routes in the routing table match thepacket's destination IP address. A common use iswhen connecting a company's edge router to the ISPnetwork.

 –When a router has only one other router to which itis connected. This condition is known as a stubrouter.

Configuring a default static route

Similar to configuring a static route. Exceptthat destination IP address and subnet maskare all zeros

Example:

-Router(config)#ip route 0.0.0.0 0.0.0.0[exit-interface | ip-address ]

Page 58: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 58/65

ITE PC v4.0

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

Summary and Default Route R1 is a stub router.

 –It is only connected to R2.

 –Currently R1 has three static routes,which are used to reach all of the remotenetworks in our topology.

 – All three static routes have the exit

interface Serial 0/0/0, forwarding packetsto the next-hop router R2.

R1 is an ideal candidate to have allof its static routes replaced by asingle default route.

 –First, delete the three static routes

 –Next, configure the single default staticroute using the same Serial 0/0/0 exitinterface

R1(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0/0

Page 59: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 59/65

ITE PC v4.0

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

Static Routes and Packet Forwarding

Verify the change to the routing tablewith the show ip route command

S* 0.0.0.0/0 is directly connected, Serial0/0/0

 –Note the * or asterisk next to the S.

• As you can see from the Codes table inthe figure, the asterisk indicates that this

static route is a candidate default route.

 –The key to this configuration is the /0mask.

•We previously said that it is the subnetmask in the routing table that determineshow many bits must match between the

destination IP address of the packet andthe route in the routing table.

• A /0 mask indicates that zero or no bitsare needed to match.

Page 60: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 60/65

ITE PC v4.0

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

Self test: Static and static default route

Can you use both static andstatic default route toconfigure the communicationbetween both LANS and thecommunication to the

Internet.-Only 3 statement of static routeneeded to setup the network.

-1 static route

-2 default static route

WinterPark(config)# ip route 0.0.0.0 0.0.0.0 192.168.146.1  Altamonte(config)# ip route 10.0.234.0 255.255.255.0 192.168.146.2  Altamonte(config)# ip route 0.0.0.0 0.0.0.0 s0/1

Page 61: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 61/65

ITE PC v4.0

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

Static Routes and Packet Forwarding

Troubleshooting a Missing Route Tools that can be used to isolate routing problems

include:

-Ping – tests end to end connectivity

-Traceroute – used to discover all of the hops (routers) along thepath between 2 points

-Show IP route – used to display routing table & ascertainforwarding process

-Show ip interface brief- used to show status of router interfaces

-Show cdp neighbors detail – used to gather configurationinformation about directly connected neighbors

Layer 3

Layer 2

Page 62: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 62/65

ITE PC v4.0

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

Static Routes and Packet Forwarding

Solving a Missing Route Finding a missing or mis-configured route requires

methodically using the correct tools

-Start with PING. If ping fails then use traceroute to determine

where packets are failing to arrive- Than trace route

Issue: show ip route to examine routing table.

-If there is a problem with a mis-configured static route remove

the static route then reconfigure the new static route

Page 63: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 63/65

ITE PC v4.0

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

Summary Routers

-Operate at layer 3-Functions include best path selection & forwarding packets

Connecting Networks

WANs

Serial cables are connected to router serial ports.

In the lab environment clock rates must be configured for DCELANs

Straight through cables or cross over cables are used toconnect to fastethernet port. (The type of cable used dependson what devices are being connected)

Cisco Discovery Protocol

 A layer 2 proprietary protocol

Used to discover information about directly connected Ciscodevices

Page 64: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 64/65

ITE PC v4.0

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

Summary Static Routes

-This is a manually configured path that specifies how the router will get to a certain point using a certain path.

Summary static routes

-This is several static routes that have been condensed into asingle static route.

Default route

-It is the route packets use if there is no other possible match for their destination in the routing table.

Forwarding of packets when static route is used

-Zinin’s 3 routing principles describe how packets are forwarded 

Troubleshooting static routes may require some of the following

commands:-Ping

-Traceroute

-Show IP route

-Show ip interface brief 

-Show cdp neighbors detail

Page 65: CCNA STATIC ROUTING

7/29/2019 CCNA STATIC ROUTING

http://slidepdf.com/reader/full/ccna-static-routing 65/65