Tải bản đầy đủ (.pdf) (64 trang)

Routing Protocols and Concepts – Chapter 2 ppt

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (3.37 MB, 64 trang )

Static Routing
Routing Protocols and Concepts – Chapter 2
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
ITE PC v4.0
Chapter 1
1
Objectives
 D
e
fin
e
th
e

ge
n
e
r
a
l r
o
l
e

a
r
ou
t
e
r
p


l
ays
in n
e
tw
o
rk
s
.
e e e ge e a o e a ou e p ays e o s
 Describe the directly connected networks, different
router interfaces
router

interfaces

 Examine directly connected networks in the routing
table and use the CDP protocol
table

and

use

the

CDP

protocol
 Describe static routes with exit interfaces

 Describe summary and default route
 Examine how packets get forwarded when using
static routes
 Identify how to manage and troubleshoot static routes
ITE PC v4.0
Chapter 1
2
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
General Role of the Router
 F
u
n
c
ti
o
n
s

o
f
a
R
ou
t
er
ucosoa oue
Best Path Selections
Forwarding packets to destination
 Routers perform packet forwarding by learning about
remote networks and maintainin

g
routin
g
information.
gg
– The routers primary forwarding decision is based on Layer 3
information, the destination IP address.

The router's routing table is used to find the best match
between the destination IP of a packet and a network address
in the routing table.
– The routing table will ultimately determine the exit interface to
forward the packet and the router will encapsulate that packet in
the appropriated data link frame for that outgoing interface
ITE PC v4.0
Chapter 1
3
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
the

appropriated

data

link

frame

for


that

outgoing

interface
.
General Role of the Router
 Intr
oduc
in
g
th
e
T
opo
l
ogy
oduc g e opo ogy
– 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
ITE PC v4.0
Chapter 1
4
© 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 5
different cabling standards


Newer routers su
pp
ort the smart serial
pp
interface that allows for more data to be
forwarded across fewer cable pins.
 Connections of a Router for Ethernet
-2 types of connectors can be used: Straight
through and Cross-over

Straight through used to connect:
Straight

through

used

to

connect:
-Switch-to-Router, Switch-to-PC, Hub-to-
PC, Hub-to-Server

Cross
-
over used to connect (pin 1 connected
Cross
-
over


used

to

connect

(pin

1

connected

to pin 3, and pin 2 connected to pin 6):
-Switch-to-Switch, PC-to-PC, Switch-to-
Hub
,
Hub-to-Hub
,
Route
r
-to-Router
,
PC-
ITE PC v4.0
Chapter 1
5
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
,
,
,

Router
General Role of the Router in COD

S
m
a
rt
Se
ri
a
l
cab
l
es
: D
C
E
a
n
d
DTE
S a Se a cab es C a d
-Use straight cable to connect between
the DTE and DCE
DCE and DTE Adapter
 Ethernet cables:
 Cross-over cable: RED cable
 Roll-over cable:
flat cables
 Straight cable: all other cables

/>ITE PC v4.0
Chapter 1
6
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Serial Connectors
DTE
DCE
DCE
DTE
DTE
DCE
DTE
DTE
DCE
 In our labs we will use serial DTE/DCE cables (no
CSU/DSU) with a DTE cable connected to one router and
DCE bl t d t th th t
ITE PC v4.0
Chapter 1
7
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
a
DCE
ca
bl
e connec
t
e
d


t
o
th
e o
th
er rou
t
er.
Interfaces
 Ex
a
minin
g
R
oute
r In
te
rf
aces
a g oute te aces
-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
Sh i
fi
d
dt h fi ti
-
Sh

ow runn
i
ng-con
fi
g comman
d


use
d

t
o s
h
ow con
fi
gura
ti
on
file in RAM
ITE PC v4.0
Chapter 1
8
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Interfaces

Co
nfi
gu
rin

g

a
n E
t
h
e
rn
et
in
te
rf
ace
Co gu g a t e et te ace
-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 to
display the routing table.
•Initially, the routing table is
empty if no interfaces have
bfid
b
een con
fi
gure
d
.
•Static routes and dynamic
routes will not be added to

th ti t bl til th
th
e rou
ti
ng
t
a
bl
e un
til

th
e
appropriate local interfaces
have been configured on
the router
ITE PC v4.0
Chapter 1
9
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
the

router
.
Verifying Ethernet interface
Verifying

Ethernet

interface

- Show interfaces - command shows the status and gives a detailed
descri
p
tion for all interfaces on the route
r
p
– Show interfaces fastEthernet 0/0 – command used to show status of
fast Ethernet port
R1#show interfaces fastethernet 0/0

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 from

Line

protocol

is

down

means
,
in

this

case
,
that

the

interface

is

not

receiving

a

carrier

signal

from

a switch or the hub. This condition may also be due to the fact that the interface is in shutdown
mode

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

reason

for

this

is

because

we

have

not

yet

configured

IP

addresses


on

any

of

the

interfaces.
ITE PC v4.0
Chapter 1
10
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Interfaces
Interfaces
 Verifying Ethernet interface

Show run

Show

run
• command displays the current configuration file that
the router is using. Configuration commands are
temporarily stored in the running configuration file
and implemented immediately by the router
and

implemented


immediately

by

the

router
.
•However, using show running-config is not
necessarily the best way to verify interface
configurations.
-Show ip interface brief –
-can be used to see a portion of the interface
information in a condensed format.
ITE PC v4.0
Chapter 1
11
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Configuring an Ethernet interface
Configuring

an

Ethernet

interface
By default, all router interfaces are shutdown. To enable this
interface, use the no shutdown command, which changes the
interface from administratively down to up
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: Interface
FastEthernet0/0, changed state to up
*Mar 1 01:16:09.214: %LINEPROTO-5-UPDOWN: Line
p
rotocol on Interface FastEthernet0/0
,
chan
g
ed state to u
p
p,
gp
–The first changed state to up message indicates that,
physically, the connection is good. If you do not get this first
messa

g
e
,
be sure that the interface is
p
ro
p
erl
y
connected to
g, p p y
a carrier signal from switch or a hub.
–The second changed state to up message indicates that the
Data Link layer is operational.

However WAN interfaces in a lab environment require
ITE PC v4.0
Chapter 1
12
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

However
,
WAN

interfaces

in

a


lab

environment

require

clocking on one side of the link. If you do correctly set the
clock rate, then line protocol will not change to up.
Configuring an Ethernet interface
Configuring

an

Ethernet

interface
 Unsolicited Messa
g
es from IOS
g
 The IOS often sends unsolicited messages.
 As you can see in the figure, sometimes these
messages will occur when you are in the middle
messages

will

occur


when

you

are

in

the

middle

of typing a command, such as configuring a
description 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 separate
In

order

to

keep

the

unsolicited


output

separate

from your input, enter line configuration mode
for the consoled port and add the logging
synchronous command, as shown. You will see
that messages returned by IOS no longer
that

messages

returned

by

IOS

no

longer

interfere with your typing.
ITE PC v4.0
Chapter 1
13
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Interfaces
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 the
172.16.3.1/24 IP address which makes it a
member 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 this
network
network
.
–The /24 subnet mask for this route is displayed
in the line above the actual route.
ITE PC v4.0
Chapter 1
14
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Interfaces
Interfaces
 Reading the Routing Table

172.16.0.0/24 is subnetted, 1 subnets
172.16.0.0/24

is


subnetted,

1

subnets
–Having a single route represent an entire
network of host IP addresses makes the
network

of

host

IP

addresses

makes

the

routing table smaller, with fewer routes,
which results in faster routing table
lookups.

It means that this route matches all

It


means

that

this

route

matches

all

packets with a destination address
belonging to this network.
–The routing table could contain all 254
idiid lh tIP dd f th
i
n
di
v
id
ua
l

h
os
t

IP
a

dd
resses
f
or
th
e
172.16.3.0/24 network, but that is an
inefficient way of storing addresses.
ITE PC v4.0
Chapter 1
15
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Interfaces
Interfaces
 Verifying Ethernet interface
show interfaces fastethernet 0/0
show ip interface brief
 The show interfaces fastethernet 0/0 command
in the figure now shows
in

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 the
figure shows that the interface is up, and the
li t l i (
iddft
)
li
ne pro
t
oco
l

i
s up.
(
i
n a con
d
ense
d

f
orma
t
)
 Typically, the router's Ethernet or FastEthernet
interface will be the default gateway IP address

for any devices on that LAN
for

any

devices

on

that

LAN
.
–For example, PC1 would be configured with a
IP address belonging to the 172.16.3.0/24
network, with the default
g
atewa
y
IP address
ITE PC v4.0
Chapter 1
16
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
gy
172.16.3.1.
–172.16.3.1 is router R1's FastEthernet IP
address.
Ethernet Interfaces Participate in ARP
Ethernet


Interfaces

Participate

in

ARP
 A router's Ethernet interface participates
in a LAN network just like any other
device on that network
device

on

that

network
.
–This means that these interfaces have a
Layer 2 MAC address, as shown in the figure.
The show interfaces command displays the
MAC dd f th Eth t i t f
MAC
a
dd
ress
f
or
th

e
Eth
erne
t

i
n
t
er
f
aces.
–If a router has a packet destined for a
device on a directly connected Ethernet
network
,
it checks the ARP table for an entr
y

,y
with that destination IP address in order to
map it to the MAC address.
ITE PC v4.0
Chapter 1
17
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Interfaces

Configuring a Serial interface

Configuring


a

Serial

interface
-Enter interface configuration mode
-
Enter in the ip address and subnet mask
Enter

in

the

ip

address

and

subnet

mask
-Enter in the no shutdown command

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

(
confi
g
-if
)
#i
p
address 172.16.2.1 255.255.255.0
(g
)p
-R1(config-if)#no shutdown
ITE PC v4.0
Chapter 1
18
© 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)#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 same
network, 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 that

If

we

now

issue


the

show

interfaces

serial

0/0/0

command

on

either

router
,
we

still

see

that

the link is up/down.
 R2#show interfaces serial 0/0/0
 Serial0/0/0 is u

p,
line
p
rotocol is down
p, p
– The physical link between R1 and R2 is up because both ends of the serial link have been
configured 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 clock
signal.
ITE PC v4.0
Chapter 1
19
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

There is still one more command that we need to enter, the clock rate command, on the
router with the DCE cable. The clock rate command will set the clock signal for the link.
Interfaces
Step 1
Step 3
Nothing is configured
Setup “no shut”
Step 2
Step 4
Setup IP but not “no shut”
Configured the clock rate
ITE PC v4.0
Chapter 1
20
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public


Examining Router Interfaces

Examining

Router

Interfaces
-Physically connecting a WAN Interface.
A WAN Physical Layer connection has sides:
-
A

WAN

Physical

Layer

connection

has

sides:
Data Circuit-terminating Equipment (DCE) – This is the service
provider. CSU/DSU is a DCE device.
 The CSU/DSU (DCE device) is used to convert the data from the router (DTE
device) 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 DTE
device.

Up-to-date technology
Cisco 1
-
Port T1/Fractional T1
ITE PC v4.0
Chapter 1
21
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Cisco

1
Port

T1/Fractional

T1

DSU/CSU WAN Interface Card
(WIC-1DSU-T1-V2=)
- What is the significant of the information 1?
Interfaces
 For serial links that are directly interconnected, as in a
lab environment, one side of a connection must be
considered 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 DCE
The


DTE

cable

has

a

male

connector
,
whereas

the

DCE

cable has a female connector.
–2) If a cable is connected between the two routers, you
can use the
show controllers
command to determine
can

use

the

show


controllers
command

to

determine

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

clock

rate

command
.
–The available clock rates, in bits per second, are

1200, 2400, 9600, 19200, 38400, 56000, 64000,
72000, 125000, 148000, 500000, 800000,
1000000 1300000 2000000 and 4000000
1000000
,
1300000
,
2000000
,
and

4000000
.
–Some bit rates might not be available on certain
serial interfaces.
 R1(config)#interface serial 0/0
 R1(config-if)#clock rate 64000
01 10 28 %LINEPROTO
5
UPDOWN Li t l

01
:
10
:
28
:
%LINEPROTO
-
5

-
UPDOWN
:
Li
ne pro
t
oco
l
on
Interface Serial0/0, changed state to up

Note: If a router
'
s interface with a DTE cable is configured

Note:

If

a

router s

interface

with

a

DTE


cable

is

configured

with the clock rate command, the IOS will disregard the
command and there will be no ill effects.
–Use the “show controllers serial 0/0/0” to
find out whether it is a DTE or DCE cable
ITE PC v4.0
Chapter 1
23
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
find

out

whether

it

is

a

DTE

or


DCE

cable
.
Testing
Verifying the Serial Interface Configuration
R1#show interfaces
R1#show ip interface brie
f
R1#ping 172.16.2.2
R1#show ip route
ITE PC v4.0
Chapter 1
24
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Rti TblC t
R
ou
ti
ng
T
a
bl
e
C
oncep
t
s
 The show ip route command reveals the content of the routing table.

Th i f ti t bl i t id th t ith th t

Th
e ma
i
n purpose o
f
a rou
ti
ng
t
a
bl
e
i
s
t
o prov
id
e
th
e rou
t
er w
ith
pa
th
s
t
o

different destination networks.
 The routing table consists of a list of "known" network addresses
di tl t d

di
rec
tl
y connec
t
e
d
,
–configured statically,
–learned dynamically.
 POP Quiz:
– Can R1 ping R2?

Can PC1
p
in
g
PC2?
pg
ITE PC v4.0
Chapter 1
25
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

×