Вы находитесь на странице: 1из 23

2002, Cisco Systems, Inc. All rights reserved.

Chapitre 14
Routage statique

2002, Cisco Systems, Inc. All rights reserved.

Routage
 mcanisme que les routeurs utilisent
pour faire vhiculer les informations
sur un rseau


Dcisions prises en fonction des adresses IP

de destination
 Comparaison des informations avec la table
de routage pour savoir vers quelle interface ils
doivent commuter les paquets

2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-3

Les types de routage

On retrouve 2 types de routage

Le routage statique
Ladministrateur configure manuellement les routes
pour chaque destination

Le routage dynamique
Utilise des protocoles de routage.
Apprendre automatiquement la topologie dun rseau
et sadapter aux modifications

2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-4

Le Routage statique
 Mise jour manuelle de tous les
quipements du rseau
 Si perte de lien la route existe
toujours (pas de retour)
 Le routage statique nest pas
adapt pour les grands rseaux.

2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-5

La table de routage
oType de protocole
oSaut suivant vers la destination finale
oLa mtrique
oLinterface de sortie
oCommande pour visualiser la table de routage :
show ip route
router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
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, * - candidate default
U - per-user static route
Gateway of last resort is 0.0.0.0 to network 0.0.0.0

C
S*

10.0.0.0/8 is subnetted, 1 subnets


10.1.1.0 is directly connected, Serial0
0.0.0.0/0 is directly connected, Serial0

2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-6

Routage
Mcanisme de la couche 3
regrouper les adresses individuelles
en adresse de rseau
Gestion des tables de routage
-Le routeur dtermine linterface vers
laquelle il doit faire transiter les
paquets
-meilleur chemin.
Utilisation de mtriques

2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-7

La mtrique ?
La mtrique est utilise dans la dtermination du
meilleur chemin
Les metriques gnralement utilises :
Nombre de sauts
Dlai
Bande passante
Charge
Fiabilit
Cot : valeur arbitraire
dfinie en gnral par les
administrateurs

2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-8

Configuration des routes statiques

Router(config)#ip route network [mask]


{address | interface}[distance] [permanent]

Permet dajouter une route vers un rseau ou un hte

2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-9

Static Routing For Multiple


Routers - Network Diagram

Routage statique pour plusieurs routeurs


10.0.0.1/8
S0

DKR

11.0.0.1/8
S0

S1
10.0.0.2/8

E0
192.168.1.150/24

LAN - 192.168.1.0/24

TH

S1
11.0.0.2/8

E0
192.168.2.150/24

LAN - 192.168.2.0/24

SL
E0
192.168.3.150/24

LAN - 192.168.3.0/24

10
2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-10

Microsoft Windows 2000 [Version 5.00.2195]


(C) Copyright 19851985-2000 Microsoft Corp.
C:\
C:\> telnet 192.168.1.150
Connecting .....
================================
Welcome to DKR Router
================================
Rseaux directement connects au
User Access Verification
Routeur DKR
password : ****
192.168.1.0
Hyderabad> enable
password : ****
10.0.0.0
Hyderabad# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Les rseaux
:
DKR(config)# interface
serial distants
0
DKR(config10.0.0.1 255.0.0.0
DKR(config-if)# ip address
192.168.2.0
DKR(configDKR(config-if)# no shut
192.168.3.0
DKR(configDKR(config-if)# clockrate 64000
11.0.0.0
DKR(confighdlc
DKR(config-if)# encapsulation
DKR(configDKR(config-if)# exit
DKR(config)#
11
2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-11

DKR(config)# no
DKR(config)# ip
DKR(config)# ip
DKR(config)# ip
DKR(config)# ip
DKR(config)#

ip routing
routing
route 192.168.2.0 255.255.255.0 10.0.0.2
route 192.168.3.0 255.255.255.0 10.0.0.2
route 11.0.0.0 255.0.0.0 10.0.0.2

12
2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-12

DKR(config)# no ip routing
DKR(config)# ip routing
DKR(config)# ip route 192.168.2.0 255.255.255.0 10.0.0.2
DKR(config)# ip route 192.168.3.0 255.255.255.0 10.0.0.2
DKR(config)# ip route 11.0.0.0 255.0.0.0 10.0.0.2
DKR(config)# ^Z
DKR# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - 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- ISIS-IS, L1L1-ISIS-IS levellevel-1, L2L2-ISIS-IS levellevel-2,*2,*- candidate default
U - perper-user static route, o - ODR

Gateway of last resort is not set


C
S
C
S
S
DKR#

10.0.0.0/8 is directly connected, Serial0


11.0.0.0/8 [1/0] via 10.0.0.2
192.168.1.0/24 is directly connected, Ethernet0
192.168.2.0/24 [1/0] via 10.0.0.2
192.168.3.0/24 [1/0] via 10.0.0.2
13

2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-13

Microsoft Windows 2000 [Version 5.00.2195]


(C) Copyright 19851985-2000 Microsoft Corp.
C:\
C:\> telnet 192.168.2.150
Connecting .....
================================
Welcome to TH Router
Les rseaux directement connects
================================
au routeur TH :
User Access Verification
192.168.2.0
password : ****
10.0.0.0
Chennai> enable
password : ****
11.0.0.0
Chennai# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Les rseaux
:
serialdistants
1
TH(config)# interface
192.168.1.0
TH(config10.0.0.2 255.0.0.0
TH(config-if)# ip address
TH(configTH(config-if)# no shut
192.168.3.0
TH(configTH(config-if)# encapsulation hdlc
TH(configTH(config-if)# interface serial 0
TH(configTH(config-if)# ip address 11.0.0.1 255.0.0.0
TH(configTH(config-if)# no shut
TH(configTH(config-if)# encapsulation hdlc
14
2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-14

TH(configTH(config-if)# exit
TH(config)# no ip routing
TH(config)# ip routing
TH(config)# ip route 192.168.1.0 255.255.255.0 10.0.0.1
TH(config)# ip route 192.168.3.0 255.255.255.0 11.0.0.2
TH(config)#

15
2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-15

TH(configTH(config-if)# exit
TH(config)# no ip routing
TH(config)# ip routing
TH(config)# ip route 192.168.1.0 255.255.255.0 10.0.0.1
TH(config)# ip route 192.168.3.0 255.255.255.0 11.0.0.2
TH(config)# ^Z
TH# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - 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- ISIS-IS, L1L1-ISIS-IS levellevel-1, L2L2-ISIS-IS levellevel-2,*2,*- candidate default
U - perper-user static route, o - ODR

Gateway of last resort is not set


C
C
S
C
S
TH#

10.0.0.0/8 is directly connected, Serial1


11.0.0.0/8 is directly connected, Serial0
192.168.1.0/24 [1/0] via 10.0.0.1
192.168.2.0/24 is directly connected, Ethernet0
192.168.3.0/24 [1/0] via 11.0.0.2

2002, Cisco Systems, Inc. All rights reserved.

16
ICND 2.00-16

Microsoft Windows 2000 [Version 5.00.2195]


(C) Copyright 19851985-2000 Microsoft Corp.
C:\
C:\> telnet 192.168.3.150
Connecting .....
================================
Welcome to SL Router
================================
Les rseaux directement connects
User Access Verification au routeur SL
password : ****
192.168.3.0
Banglore> enable
11.0.0.0
password : ****
SL# configure terminal
rseaux
: End with CNTL/Z.
Enter configuration Les
commands,
onedistants
per line.
serial 1
SL(config)# interface
192.168.1.0
SL(configSL(config-if)# ip address 11.0.0.2 255.0.0.0
192.168.2.0
SL(configSL(config-if)# no shut
10.0.0.0
SL(config64000
SL(config-if)# clockrate
SL(configSL(config-if)# encapsulation hdlc
SL(configSL(config-if)# exit
SL(config)#
17
2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-17

SL(config)# no
SL(config)# ip
SL(config)# ip
SL(config)# ip
SL(config)# ip
SL(config)#

ip routing
routing
route 192.168.2.0 255.255.255.0 11.0.0.1
route 192.168.1.0 255.255.255.0 11.0.0.1
route 10.0.0.0 255.0.0.0 11.0.0.1

18
2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-18

SL(config)# no ip routing
SL(config)# ip routing
SL(config)# ip route 192.168.2.0 255.255.255.0 11.0.0.1
SL(config)# ip route 192.168.1.0 255.255.255.0 11.0.0.1
SL(config)# ip route 10.0.0.0 255.0.0.0 11.0.0.1
SL(config)# ^Z
SL# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - 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- ISIS-IS, L1L1-ISIS-IS levellevel-1, L2L2-ISIS-IS levellevel-2,*2,*- candidate default
U - perper-user static route, o - ODR

Gateway of last resort is not set


S
C
S
S
C
SL#

10.0.0.0/8 [1/0] via 11.0.0.1


11.0.0.0/8 is directly connected, Serial1
192.168.1.0/24 [1/0] via 11.0.0.1
192.168.2.0/24 [1/0] via 11.0.0.1
192.168.3.0/24 is directly connected, Ethernet0
19

2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-19

Route par dfaut

La route par dfaut va permettre aux rseaux stub de


pouvoir atteindre les rseaux externes inconnus
2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-20

DKR(config)# no ip routing
DKR(config)# ip routing
DKR(config)# ip route 0.0.0.0 0.0.0.0 s0
DKR(config)#

Configuration de la route par dfaut


Router(config)# ip route <Destination Network ID>
<Destination Subnet Mask>
<Next-hop IP address >
ou
Router(config)# ip route <Destination Network ID>
<Destination Subnet Mask>
<Exit interface type><interface number>

21
2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-21

DKR(config)# no ip routing
DKR(config)# ip routing
DKR(config)# ip route 0.0.0.0 0.0.0.0 s0
DKR(config)# ^Z
DKR# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - 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- ISIS-IS, L1L1-ISIS-IS levellevel-1, L2L2-ISIS-IS levellevel-2,*2,*- candidate default
U - perper-user static route, o - ODR

Gateway of last resort is not set


C
10.0.0.0/8 is directly connected, Serial0
C
192.168.1.0/24 is directly connected, Ethernet0
S*
0.0.0.0/0 is directly connected, Serial0
DKR#
* indique une route par
dfaut
22
2002, Cisco Systems, Inc. All rights reserved.

ICND 2.00-22

Вам также может понравиться