Vous êtes sur la page 1sur 41

RÉDIGÉ PAR NOEL NICOLAS

GUIDE DE
CONFIGURATION
CISCO

VERSION 1

WWW.FINGERINTHENET.COM VERSION FRANÇAISE


INTRODUCTION
FONCTIONNEMENT DE L'EBOOK

Clique sur ce logo en début de chapitre afin de découvrir le cours


COMPLET et en FRANÇAIS disponible sur le site FingerInTheNet
Le logo

TABLE DES MATIÈRES

LES BASES
Le code binaire ........................................................................................... Page 1
Le protocole IPv4 ........................................................................................ Page 2
Le câblage .................................................................................................... Page 3
Configuration de base ................................................................................ Page 4

SWITCHING

Vlan / Trunk / VTP ........................................................................................ Page 5


N2
Spanning-Tree Mise en place ..................................................................... Page 6
Etherchannel ................................................................................................ Page 7

ROUTING

Routage statique ......................................................................................... Page 8


Routage inter-vlan ...................................................................................... Page 9
Le protocole RIP ......................................................................................... Page 10
Le protocole OSPF ...................................................................................... Page 11
Le protocole EIGRP ..................................................................................... Page 12
Le protocole BGP ........................................................................................ Page 13
Le Frame-Relay ............................................................................................ Page 14
PPP / HDLC / PPPoE .................................................................................... Page 15

SERVICES

Le protocole HSRP  .................................................................................... Page 16


Le protocole VRRP ..................................................................................... Page 17
Le protocole GLBP ..................................................................................... Page 18
NTP / DHCP ................................................................................................. Page 19
SPAN / RSPAN ............................................................................................. Page 20
SNMP / LOGS / NETFLOW .......................................................................... Page 21
Le protocole NAT ........................................................................................ Page 22

SECURITÉ

Tunnel GRE .................................................................................................. Page 23


Le protocole IPSec ...................................................................................... Page 24
Le protocole SSH ......................................................................................... Page 25
Les ACLs ....................................................................................................... Page 26
Sécurisation du spanning-tree .................................................................. Page 27
Sécurisation Vlan ........................................................................................ Page 28
Sécurisation DHCP ..................................................................................... Page 29
Authentification AAA ................................................................................. Page 30
Configuration sécurisée ............................................................................. Page 31

IPv6

Routage IPv6 ............................................................................................... Page 32


OSPF pour IPv6 ........................................................................................... Page 33
EIGRP pour IPv6 .......................................................................................... Page 34
Tunneling IPv6 over IPv4 ............................................................................ Page 35
NAT64 ........................................................................................................... Page 36

LES OUTILS

Installer un IOS CISCO ................................................................................ Page 37


Password Recovery ..................................................................................... Page 38

eBook signé numériquement Guide de configuration CISCO


LE CODE BINAIRE

0 0000 0000 64 0100 0000 128 1000 0000 192 1100 0000
1 0000 0001 65 0100 0001 129 1000 0001 193 1100 0001
2 0000 0010 66 0100 0010 130 1000 0010 194 1100 0010
3 0000 0011 67 0100 0011 131 1000 0011 195 1100 0011
4 0000 0100 68 0100 0100 132 1000 0100 196 1100 0100
5 0000 0101 69 0100 0101 133 1000 0101 197 1100 0101
6 0000 0110 70 0100 0110 134 1000 0110 198 1100 0110
7 0000 0111 71 0100 0111 135 1000 0111 199 1100 0111
8 0000 1000 72 0100 1000 136 1000 1000 200 1100 1000
9 0000 1001 73 0100 1001 137 1000 1001 201 1100 1001
10 0000 1010 74 0100 1010 138 1000 1010 202 1100 1010
11 0000 1011 75 0100 1011 139 1000 1011 203 1100 1011
12 0000 1100 76 0100 1100 140 1000 1100 204 1100 1100
13 0000 1101 77 0100 1101 141 1000 1101 205 1100 1101
14 0000 1110 78 0100 1110 142 1000 1110 206 1100 1110
15 0000 1111 79 0100 1111 143 1000 1111 207 1100 1111











16 0001 0000 80 0101 0000 144 1001 0000 208 1101 0000
17 0001 0001 81 0101 0001 145 1001 0001 209 1101 0001
18 0001 0010 82 0101 0010 146 1001 0010 210 1101 0010
19 0001 0011 83 0101 0011 147 1001 0011 211 1101 0011
20 0001 0100 84 0101 0100 148 1001 0100 212 1101 0100
21 0001 0101 85 0101 0101 149 1001 0101 213 1101 0101
22 0001 0110 86 0101 0110 150 1001 0110 214 1101 0110
23 0001 0111 87 0101 0111 151 1001 0111 215 1101 0111
24 0001 1000 88 0101 1000 152 1001 1000 216 1101 1000
25 0001 1001 89 0101 1001 153 1001 1001 217 1101 1001
26 0001 1010 90 0101 1010 154 1001 1010 218 1101 1010
27 0001 1011 91 0101 1011 155 1001 1011 219 1101 1011
28 0001 1100 92 0101 1100 156 1001 1100 220 1101 1100
29 0001 1101 93 0101 1101 157 1001 1101 221 1101 1101
30 0001 1110 94 0101 1110 158 1001 1110 222 1101 1110
31 0001 1111 95 0101 1111 159 1001 1111 223 1101 1111


32 0010 0000 96 0110 0000 160 1010 0000 224 1110 0000
33 0010 0001 97 0110 0001 161 1010 0001 225 1110 0001
34 0010 0010 98 0110 0010 162 1010 0010 226 1110 0010
35 0010 0011 99 0110 0011 163 1010 0011 227 1110 0011
36 0010 0100 100 0110 0100 164 1010 0100 228 1110 0100
37 0010 0101 101 0110 0101 165 1010 0101 229 1110 0101
38 0010 0110 102 0110 0110 166 1010 0110 230 1110 0110
39 0010 0111 103 0110 0111 167 1010 0111 231 1110 0111
40 0010 1000 104 0110 1000 168 1010 1000 232 1110 1000
41 0010 1001 105 0110 1001 169 1010 1001 233 1110 1001
42 0010 1010 106 0110 1010 170 1010 1010 234 1110 1010
43 0010 1011 107 0110 1011 171 1010 1011 235 1110 1011
44 0010 1100 108 0110 1100 172 1010 1100 236 1110 1100
45 0010 1101 109 0110 1101 173 1010 1101 237 1110 1101
46 0010 1110 110 0110 1110 174 1010 1110 238 1110 1110
47 0010 1111 111 0110 1111 175 1010 1111 239 1110 1111











48 0011 0000 112 0111 0000 176 1011 0000 240 1111 0000
49 0011 0001 113 0111 0001 177 1011 0001 241 1111 0001
50 0011 0010 114 0111 0010 178 1011 0010 242 1111 0010
51 0011 0011 115 0111 0011 179 1011 0011 243 1111 0011
52 0011 0100 116 0111 0100 180 1011 0100 244 1111 0100
53 0011 0101 117 0111 0101 181 1011 0101 245 1111 0101
54 0011 0110 118 0111 0110 182 1011 0110 246 1111 0110
55 0011 0111 119 0111 0111 183 1011 0111 247 1111 0111
56 0011 1000 120 0111 1000 184 1011 1000 248 1111 1000
57 0011 1001 121 0111 1001 185 1011 1001 249 1111 1001
58 0011 1010 122 0111 1010 186 1011 1010 250 1111 1010
59 0011 1011 123 0111 1011 187 1011 1011 251 1111 1011
60 0011 1100 124 0111 1100 188 1011 1100 252 1111 1100
61 0011 1101 125 0111 1101 189 1011 1101 253 1111 1101
62 0011 1110 126 0111 1110 190 1011 1110 254 1111 1110
63 0011 1111 127 0111 1111 191 1011 1111 255 1111 1111

eBook signé numériquement Guide de configuration CISCO Page 1 / 38


LE PROTOCOLE IPv4

LES RÉSEAUX PUBLICS
LES RÉSEAUX PRIVÉS
VALEUR DU
MASQUE IP
1er OCTET PREFIX PLAGE D'ADRESSE IP
DISPO
CLASSE A 0 à 127 255.0.0.0
10.0.0.0 /8 10.0.0.0 à 10.255.255.255 16 777 216
CLASSE B 128 à 191 255.255.0.0
CLASSE C 192 à 223 255.255.255.0 172.16.0.0 /12 172.16.0.0 à 172.31.255.255 1 048 576

CLASSE D* 224 à 239 N/A


192.168.0.0 /16 192.168.0.0 à 192.168.255.255 65 536
CLASSE E* 240 à 255 N/A

Classe D = Réservée pour le multicast


Classe E = Réservée pour le futur
LES MASQUES DE SOUS-RÉSEAU
CIDR Binaire Décimal

/0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0.0.0
/1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128.0.0.0
/2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 192.0.0.0
/3 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 224.0.0.0
/4 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 240.0.0.0

/5 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 248.0.0.0
/6 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 252.0.0.0
/7 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 254.0.0.0
/8 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255.0.0.0

/9 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255.128.0.0
/10 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255.192.0.0
/11 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255.224.0.0
/12 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255.240.0.0

/13 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255.248.0.0
/14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255.252.0.0
/15 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255.254.0.0
/16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255.255.0.0
-

/17 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255.255.128.0
/18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255.255.192.0
/19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 255.255.224.0
/20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 255.255.240.0

/21 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 255.255.248.0
/22 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 255.255.252.0
/23 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 255.255.254.0
/24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 255.255.255.0

/25 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 255.255.255.128
/26 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 255.255.255.192
/27 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 255.255.255.224
/28 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 255.255.255.240

/29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  1 0 0 0 255.255.255.248
/30 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 255.255.255.252
/31 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 255.255.255.254
/32 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 255.255.255.255

eBook signé numériquement Guide de configuration CISCO Pages 2 / 38


Le câblage

LE CÂBLAGE ETHERNET À PAIRES TORSADÉES


T568A T568B

Le blindage Les catégories

S / F TP Catégorie 5e (Classe D) :
– fréquence : jusqu’à 155 MHz
– débits théoriques : 1000 Mb/s.
Blindage Paire
externe Blindage torsadée

des paires Catégorie 6 (Classe E) :


– fréquence : jusqu’à 500 MHz
– TP = Paires torsadées (Twisted Pair). – débits théoriques : 1 Gb/s.
– U = Aucun blindage (Unshielded).
– F = Feuillard en aluminium (Foiled). Catégorie 7 (Classe F) :
– S = Tresse de cuivre (Shielded). – fréquences : jusqu’à 600 MHz
– débits théoriques : 10 Gb/s.
La connectique

– RJ45 (Registered Jack 45) Catégorie 7a (Classe FA) :


– RJ11 (Registered Jack 11) – fréquence : jusqu’à 1 GHz
– RJ12 (Registered Jack 12) – débits théoriques : 10 Gb/s.

LES FIBRES OPTIQUE


Dans l’univers des fibres optiques, il existe deux grandes familles de fibre :
– les monomodes (longue distance)
– les multimodes (courte distance)

MTRJ ST SC LC

eBook signé numériquement Guide de configuration CISCO Pages 3 / 38


CONFIGURATION
DE BASE
Le système d'exploitation de CISCO se nomme IOS. Ce dernier possède plusieurs modes
d'administration :
Mode de
configuration
Le mode User ne permet pas grand-chose ...
Le mode Enable permet de vérifier l’état du système. Router # write
Le mode Configure Terminal permet de configurer
Nom de Commande
notre équipement. l'équipement

USER MODE Router> enable


ENABLE MODE Router# configure terminal


CONFIG MODE Router(config)# interface fastethernet 1/1


SUB-CONFIG MODE Router(config-if)#

CONFIGURATION DE BASE
Revenir au mode exit
précédent
Mettre une description XXX
description
Permet de faire une
commande du mode do
enable

show running-configuration
show startup-configuration
Vérifier la
show running-configuration all
configuration
show running-configuration | include XXXX
show running-configuration interface FastEthernet 1/1

Sauvegarder copy running-configuration startup-configuration


write
Plusieurs solutions
Supprimer la delete startup-configuration
configuration write erase
Plusieurs solutions
show interfaces
Vérifier les états de
show interface status
nos interfaces
show ip interface brief

Lance un ping en
ping X.X.X.X source-interface vlan 100
spécifiant l'IP Source
Vérifie la version de
show version
l'IOS

eBook signé numériquement Guide de configuration CISCO Pages 4 / 38


Configuration VLAN N2

CONFIGURATION VLAN

Créer un vlan Switch(config)# vlan 10



Switch(config-vlan)# name SERVER

Mettre un port Switch(config)# interface FastEthernet 0/1


dans un vlan Switch(config-if)# switchport mode access

Switch(config-if)# switchport access vlan 10

Switch# show vlan Dépannage


Switch# show vlan brief
Switch# show vlan id XX
Switch# show interface switchport

CONFIGURATION TRUNK
Switch(config)# interface FastEthernet 0/24
Switch(config-if)# description VERS_SWITCH_001
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk encapsulation dot1q

 NB : La commande switchport trunk encapsulation dot1q est utile


uniquement sur les anciens switchs cisco.

CONFIGURATION VTP VTP = Vlan Trunk Protocol

Choix de la version VTP (1,2 ou 3) Switch(config)# vtp version X

Nommer le domaine VTP Switch(config)# vtp domain NOM


Définir le mode VTP
Switch(config)# vtp mode xxxx
( Client, Serveur, transparent ou OFF )

Sécuriser le protocole VTP Switch(config)# vtp password xxxx

Activer le VTP Prunning Switch(config)# vtp prunning

Vérifier le statut VTP Switch# show vtp status Dépannage

eBook signé numériquement Guide de configuration CISCO Pages 5 / 38


SPANNING-TREE N2

Mise en place
CONFIGURATION

Choisir le mode spanning-tree mode [ mst | pvst | rapid-pvst ]


spanning-tree Par défaut : PVST

Dire à notre Switch de devenir


Sw(config)# spanning-tree vlan 10 root primary
« Root-Bridge » pour le vlan 10

Changer la valeur de Sw(config)# spanning-tree vlan 10 priority XXXX


priorité pour le vlan 10

Changer le coût de la Sw(config)# interface FastEthernet 0/1


liaison pour le vlan 10 Sw(config-if)# spanning-tree vlan 10 cost X

Sw(config)# spanning-tree vlan 10 hello-time 2


Changer les timers Sw(config)# spanning-tree vlan 10 forward-time 15
Sw(config)# spanning-tree vlan 10 max-age 20

Sw(config)# spanning-tree mode mst


Sw(config)# spanning-tree mst configuration
Configuration Sw(config-mst)# name fingerinthenet
MST Sw(config-mst)# revision 1
Sw(config-mst)# instance 1 vlan 1-500
Sw(config-mst)# instance 2 vlan 501-1000

VÉRIFICATION
Vérifier la topologie Sw# show spanning-tree vlan 100
Spanning-tree du Vlan 100

Vérifier le rôle d'une interface Sw# show spanning-tree interface FastEthernet0/1


dans la topologie Spanning-tree

eBook signé numériquement Guide de configuration CISCO Pages 6 / 38


Etherchannel N2

DESCRIPTION
L’EtherChannel permet de regrouper (agréger) plusieurs ports pour n’en faire qu’un seul.

CONFIGURATION ETHERCHANNEL CHOIX DU MODE


ETHERCHANNEL

MANUEL
ON

ON

PAgP

AUTOMATIQUE
DESIRABLE AUTO

Etape 1 : Mettre nos interfaces dans un channel-group DESIRABLE

AUTO
interface range FastEthernet 0/1 -4
PAgP  channel-group 1 mode [ on | Desirable | Auto ]
AUTOMATIQUE LACP
interface range FastEthernet 0/1 -4 ACTIVE PASSIVE
LACP channel-group 1 mode [ on | Active | Passive ]
ACTIVE
channel-protocol lacp
PASSIVE

Etape 2 : Configurer notre channel-group


VÉRIFICATION
Niveau 2 interface port-channel 1
description ETHERCHANNEL
N2
no switchport show etherchannel summary
ip address 192.168.1.1 255.255.255.0
Niveau 3 interface port-channel 1
description ETHERCHANNEL
switchport mode trunk
switchport trunk encapsulation dot1q

Etape 3 : Choix du mode d'équilibrage

Switch(config)# port-channel load-balance src-dst-ip

LOAD-BALANCING
Afin de faire de l’équilibrage de charge sur les interfaces physiques
participant à l’EtherChannel, nos Switchs peuvent répartir les trames
à envoyer en fonction de plusieurs paramètres :

– src-mac — Adresse MAC source  — Bits


– dst-mac — Adresse MAC destination — Bits
– src-dst-mac — Adresse MAC source et destination — XOR
– src-ip —Adresse IP source — Bits
– dst-ip — Adresse IP destination — Bits
– src-dst-ip —Adresse IP source et destination (Default) — XOR
– src-port —Port source — Bits
– dst-port — Port destination — Bits
– src-dst-port —Port source et destination — XOR
XOR = PORTE LOGIQUE "OU EXCLUSIF"

eBook signé numériquement Guide de configuration CISCO Pages 7 / 38


PRINCIPE DE ROUTAGE

Type Distance
de route

administrative
connected 0
static 1
eBGP 20
EIGRP (interne) 90
IGRP 100
OSPF 110
IS-IS 115
RIP 120
EIGRP (externe) 170
iBGP 200
DHCP default route 254

ROUTAGE STATIQUE
ip route [NETWORK] [MASK] [NEXTHOP] name [DESCRIPTION]

[NETWORK] = Réseau de destination


[MASK] = Le masque de sous-réseau
[NEXTHOP] = L'adresse IP du routeur suivant
[DESCRIPTION] = Nom significatif

Exemple
ip route 192.168.10.0 255.255.255.0 1.1.1.2 name SITE_A_VLAN10
ip route 192.168.20.0 255.255.255.0 1.1.1.2 name SITE_A_VLAN20
ip route 192.168.30.0 255.255.255.0 1.1.1.2 name SITE_A_VLAN30

CRÉER UNE ROUTE PAR DÉFAUT

ip route 0.0.0.0 0.0.0.0 2.2.2.1 name DEFAULT_GATEWAY

VÉRIFICATION

Vérifier la table de routage R1# show ip route

eBook signé numériquement Guide de configuration CISCO Pages 8 / 38


ROUTAGE INTER-VLAN

ROUTER ON A STICK (ROAS)

Configuration du SWITCH Configuration du ROUTEUR


interface FastEthernet 0/24 interface FastEthernet 0/0
description TRUNK_VERS_RO_01  description VERS_SWE_01
 switchport mode trunk  no shutdown
 switchport trunk encapsulation dot1q
interface FastEthernet 0/0.10
 description VLAN_CLIENTS
 ip address 192.168.10.254 255.255.255.0
 encapsulation dot1q 10

interface FastEthernet 0/0.20


 description VLAN_SERVEUR
ip address 192.168.20.254 255.255.255.0
encapsulation dot1q 20

SWITCH VIRTUAL INTERFACE (SVI)

Configuration du SWITCH Configuration du SWITCH N3


interface FastEthernet 0/24 ip routing
description TRUNK_VERS_RO_01
 switchport mode trunk interface FastEthernet 0/1
 description VERS_SWITCH_SWE_01
 switchport trunk encapsulation dot1q  switchport mode trunk
 switchport trunk encapsulation dot1q
exit
interface VLAN 10
 description VLAN_CLIENTS
 ip address 192.168.10.254 255.255.255.0
N3  exit
interface VLAN 20
 description VLAN_SERVEUR
 ip address 192.168.20.254 255.255.255.0
 exit

eBook signé numériquement Guide de configuration CISCO Pages 9 / 38


LE PROTOCOLE RIP

CONFIGURATION DU PROTOCOLE RIP

Configurer le RIP R1(config)# router rip


Choisir la version R1(config-router)# version 2


Configurer les "network" R1(config-router)# network 10.0.0.0

Configuration des timers

R1(config-router)# timers basic [update] [Invalid] [Hold Down] [Flush]


! EXEMPLE
R1(config-router)# timers basic 30 180 180 240

DEBUG

Voir l'intégralité de la table de routage R1# show ip route


Voir une route précise R1# show ip route [subnet] [mask]
Afficher les interfaces qui participent au RIP R1# show ip protocols
Afficher les timers RIP R1# show ip protocols
Afficher la liste des sources d'information RIP R1# show ip protocols
Debug R1# debug ip rip

eBook signé numériquement Guide de configuration CISCO Pages 10 / 38


LE PROTOCOLE OSPF

CONFIGURATION DE BASE

R1(config)# router ospf X


Configurer OSPF
X = Numéro de processus OSPF. Ce numéro n’a aucune importance.

Définir le router-id R1(config-router)# router-id 10.10.10.1

R1(config-router)# network 192.168.1.0 0.0.0.255 area 0


Déclarer les réseaux R1(config-router)# network 192.168.1.0 0.0.0.255 area 0
R1(config-router)# network 192.168.1.0 0.0.0.255 area 0

Pour éviter d'envoyer des


paquets "hello" sur ces interfaces.
R1(config-router)# passive-interface FastEthernet 0/0

OSPF - VIRTUAL LINK


router ospf 1 router ospf 1
router-id 20.1.1.2 router-id 20.1.1.1
network 1.1.1.0 0.0.0.255 area 1  network 10.10.10.0 0.0.0.255 area 0
 network 10.10.20.0 0.0.0.255 area 2  network 1.1.1.0 0.0.0.255 area 1
 area 1 virtual-link 20.1.1.1 area 1 virtual-link 20.1.1.2

OSPF - AUTHENTIFICATION
RX(config)# interface FastEthernet0/0
RX(config-if)# ip ospf message-digest-key 1 md5 FINGER
RX(config-if)# ip ospf authentication message-digest

VÉRIFICATION DE LA NEIGHBOR TABLE

R1# show ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/DR 00:00:32 10.0.0.1 Ethernet1
1.1.1.2 1 FULL/DR 00:00:31 10.0.0.2 Ethernet2
1.1.1.3 1 FULL/DR 00:00:18 10.0.0.3 Ethernet3

VÉRIFICATION DE LA LSDB

Visualiser la LSDB R1# show ip ospf database

Visualiser une LSA de type 1 R1# show ip ospf database router 1.1.1.1

Visualiser une LSA de type 2 R1# show ip ospf database network 1.1.1.1

Visualiser une LSA de type 3 R1# show ip ospf database summary 1.1.1.1

eBook signé numériquement Guide de configuration CISCO Pages 11 / 38


LE PROTOCOLE EIGRP

CONFIGURATION DE BASE

Configurer EIGRP R1(config)# router eigrp X


X = Doit être identique !

Définir le router-id R1(config-router)# eigrp router-id 10.10.10.1

R1(config-rtr)# network 192.168.1.0 0.0.0.255


Déclarer les réseaux R1(config-rtr)# network 192.168.1.0 0.0.0.255
R1(config-rtr)# network 192.168.1.0 0.0.0.255

Pour éviter d'envoyer des paquets


R1(config-rtr)# passive-interface FastEthernet 0/0
"hello" sur ces interfaces.

Changer les timers R1(config)# interface FastEthernet 0/1


R1(config-if)# ip hello-interface eigrp 10 5
Premier chiffre = ASN
Deuxième chiffre = Time R1(config-if)# ip hold-time eigrp 10 15

Pour éviter de travailler en mode R1(config-rtr)# no auto-summary


CLASSFULL ( Classe A,B et C)

EIGRP - AUTHENTIFICATION

R1(config)# key chain Finger


R1(config-keychain)# key 100
R1(config-keychain-key)# key-string PASSWD-Finger

R1(config)# interface fastEthernet 0/0


R1(config-if)# ip authentication mode eigrp 10 md5
R1(config-if)# ip authentication key-chain eigrp 10 Finger

10 = ASN
100 = Numéro de la key

VÉRIFICATION DE LA NEIGHBOR TABLE

R1# show ip eigrp neighbors


IP-EIGRP neighbors for process 1
H   Address   Interface   Hold Uptime   SRTT   RTO     Q      Seq
(sec)      (ms)          Cnt     Num
0   2.2.2.2     Fa0/0      10   2:56:19      40    1000    27       1

eBook signé numériquement Guide de configuration CISCO Pages 12 / 38


LE PROTOCOLE BGP

ARCHITECTURE

AS 400 AS 500

.1 .1 .2
10.10.10.0 /24 INTERNET

192.168.10.0 /24
Entreprise FingerInTheNet Internet
Service Provider

CONFIGURATION eBGP

Ro-Finger(config)# router bgp 400


Ro-Finger(config-router)# neighbor 10.10.10.2 remote-as 500
Ro-Finger(config-router)# network 192.168.10.0 mask 255.255.255.0

router bgp 400 

Active le protocole BGP pour le numéro d’AS 400.

neighbor 10.10.10.2 remote-as 500 

Dans les protocoles IGP, nous avions l’habitude de mettre la commande « Network » afin de
rechercher des voisins (neighbors). Pour le protocole BGP, nous sommes obligés de rentrer nos voisins
ainsi que leurs numéros AS manuellement.

network 192.168.10.0 mask 255.255.255.0 

– Permet d’informer un réseau présent dans la table de routage


– Ne permet pas de chercher un neighbor sur cette liaison comme le fera OSPF ou EIGRP
– Ce réseau doit être obligatoirement dans la table de routage
– Prend en compte les masques et non les wildcard mask

eBook signé numériquement Guide de configuration CISCO Pages 13 / 38


FRAME RELAY
FRAME RELAY POINT TO POINT

interface serial 0/0 interface serial 0/0


encapsulation frame-relay encapsulation frame-relay

interface serial 0/0.1 point-to-point


interface serial 0/0.1 point-to-point ip address 192.168.1.2 255.255.255.0
ip address 192.168.1.1 255.255.255.0 frame-relay interface-dlci 102
frame-relay interface-dlci 101
interface serial 0/0
encapsulation frame-relay
interface serial 0/0.2 point-to-point
ip address 192.168.2.1 255.255.255.0 interface serial 0/0.1 point-to-point
ip address 192.168.2.2 255.255.255.0
frame-relay interface-dlci 201 frame-relay interface-dlci 202

FRAME RELAY POINT TO MULTIPOINT

interface Serial0/0 interface Serial0/0


encapsulation frame-relay  encapsulation frame-relay
interface serial 0/0.102 multipoint
interface Serial 0/0.10 multipoint  ip address 192.168.10.2 255.255.255.0
 ip address 192.168.10.1 255.255.255.0  frame-relay map ip 192.168.10.1 102 broadcast
 frame-relay map ip 192.168.10.3 102
 frame-relay map ip 192.168.10.2 101 broadcast
 frame-relay map ip 192.168.10.3 201 broadcast interface Serial0/0
 encapsulation frame-relay
interface serial 0/0.202 multipoint
 ip address 192.168.10.3 255.255.255.0
 frame-relay map ip 192.168.10.1 202 broadcast
 frame-relay map ip 192.168.10.2 202

eBook signé numériquement Guide de configuration CISCO Pages 14 / 38


PPP - HDLC - PPPoE
PROTOCOLE HDLC
interface serial 0/0
DTE ip address 192.168.1.1 255.255.255.0

interface serial 0/0


DCE ip address 192.168.1.2 255.255.255.0
clock-rate 64000

PROTOCOLE PPP
Configuration PPP PPP Mulitlink

.1 .2
R1 R2
R1 R2
Multilink 1
Multilink 1

interface serial 0/0


ip address 192.168.1.1 255.255.255.0
encapsulation ppp interface range serial 0/0/0 - 1
no ip address
encapsulation ppp
ppp multilink
interface serial 0/0 ppp multilink group 1
ip address 192.168.1.2 255.255.255.0
encapsulation ppp interface multilink 1
ip address 192.168.10.1 255.255.255.0
encapsulation ppp
Authentification PPP ppp multilink
ppp multilink group 1
PAP
interface range serial 0/0/0 - 1
username R2 password FINGER-2 R1 no ip address
interface serial 0/0/0 encapsulation ppp
ppp authentication pap ppp multilink
ppp pap sent-username R1 password FINGER-1 ppp multilink group 1
interface multilink 1
username R1 password FINGER-1 R2 ip address 192.168.10.2 255.255.255.0
encapsulation ppp
interface serial 0/0/0 ppp multilink
ppp authentication pap ppp multilink group 1
ppp pap sent-username R2 password FINGER-2

CHAP Protocole PPPoE


hostname R1 R1
interface dialer 2
username R2 password FINGER  ip address negotiated
 mtu 1492
interface serial 0/0/0  encapsulation ppp
ppp authentication chap
 ppp chap hostname Finger
 ppp chap password InTheNet
 dialer pool 1
hostname R2 R2
username R1 password FINGER interface FastEthernet 0/1
 no ip address
interface serial 0/0/0  pppoe-client dial-pool-number 1
ppp authentication chap  pppoe enable

eBook signé numériquement Guide de configuration CISCO Pages 15 / 38


LE PROTOCOLE HSRP

DESCRIPTION
HSRP v1 HSRP v2

Protocole IPv4 IPv4 / IPv6


Adresse MAC utilisée 0000.0C07.ACxx 0000.0C9F.Fxxx
HSRP = Hot Standby Router Protocol
Adresse multicast 224.0.0.2 224.0.0.102
Propriétaire CISCO
Basé sur un modèle Actif / Passif Groupe HSRP 0 à 255 0 à 4095

ARCHITECTURE EXEMPLE DE CONFIGURATION

CONFIGURATION DU ROUTEUR ACTIVE


interface vlan 10
 ip address 192.168.10.252 255.255.255.0
 standby version 2
 standby 1 ip 192.168.10.254
 standby 1 priority 110
 standby 1 name HSRP-VLAN10
 standby 1 preempt

CONFIGURATION DU ROUTEUR STANDBY

interface vlan 10
 ip address 192.168.10.253 255.255.255.0
 standby version 2
 standby 1 ip 192.168.10.254
 standby 1 name HSRP-VLAN10
 standby 1 preempt

CONFIGURATION
R1(config)# interface vlan 10
Définir la version HSRP à utiliser R1(config-if)# standby version 2

Définir la priorité HSRP R1(config-if)# standby 1 priority 110


Définir l’adresse IP virtuelle R1(config-if)# standby 1 ip 192.168.1.254


Mettre une description R1(config-if)# standby 1 name HSRP-VLAN10


Activer la préemption R1(config-if)# standby 1 preempt

VÉRIFICATION
R1# show standby
R1# show standby brief

eBook signé numériquement Guide de configuration CISCO Pages 16 / 38


LE PROTOCOLE VRRP

DESCRIPTION

VRRP = Virtual Router Redundancy Protocol

– Défini dans la RFC 2338 (Protocole normalisé)


– Adresse MAC utilisé : 0000.5e00.01xx ( xx = groupe VRRP)
– Utilise l’adresse multicast 224.0.0.18
– Groupe 0 au groupe 254

ARCHITECTURE EXEMPLE DE CONFIGURATION

CONFIGURATION DU ROUTEUR MASTER


interface vlan 10
 ip address 192.168.10.252 255.255.255.0
 vrrp 1 ip 192.168.10.254
 vrrp 1 priority 110

CONFIGURATION DU ROUTEUR BACKUP

interface vlan 10
 ip address 192.168.10.253 255.255.255.0
 vrrp 1 ip 192.168.10.254

CONFIGURATION

Définir la priorité VRRP R1(config-if)# vrrp 1 priority 110


Définir l’adresse IP virtuelle R1(config-if)# vrrp 1 ip 192.168.1.254


Mettre une description R1(config-if)# vrrp 1 name VRRP-VLAN10


Désactiver la préemption R1(config-if)# no vrrp 1 preempt

VÉRIFICATION
R1# show vrrp
R1# show vrrp brief

eBook signé numériquement Guide de configuration CISCO Pages 17 / 38


LE PROTOCOLE GLBP
DESCRIPTION ÉQUILIBRAGE DE CHARGE
ROUND ROBIN Méthode par défaut
GLBP = Gateway Load Balancing Protocol

– Propriétaire CISCO
– Numéro de groupe = 0 à 1023
– Priorité = 1 à 255 (défaut = 100)

ARCHITECTURE

Cette méthode distribue dans l’ordre les


adresses MAC Virtuelles. L’équilibrage de
charge se fait de façon équitable

WEIGHTED

CONFIGURATION
CONFIGURATION DU ROUTEUR AVG
interface vlan 10
 ip address 192.168.10.252 255.255.255.0
 glbp 1 ip 192.168.10.254
 glbp 1 priority 200
glbp 1 preempt

CONFIGURATION DU ROUTEUR Standby AVG


interface vlan 10 L’équilibrage de charge se fait en fonction
 ip address 192.168.10.253 255.255.255.0 du poids configuré sur chaque routeur.
 glbp 1 ip 192.168.10.254
glbp 1 priority 150 HOST DEPENDENT
glbp 1 preempt

CONFIGURATION DES AUTRES ROUTEURS


interface vlan 10
 ip address 192.168.10.X 255.255.255.0
 glbp 1 ip 192.168.10.254

LOAD BALANCING
glbp 1 load-balancing [round-
robin|weighted|host-dependent]

VÉRIFICATION
R1# show glbp
R1# show glbp brief Chaque client sortira toujours par le même routeur.
eBook signé numériquement Guide de configuration CISCO Pages 18 / 38
LES SERVICES

PROTOCOLE NTP

Heure d’hiver / heure d’été

clock summer-time FR recurring last Sun Mar 2:00 last Sun Oct 3:00

Configurer la source de temps

Configuration manuel Switch(config)# clock set hh:mm:ss


Décalage horaire Switch(config)# clock timezone FR 1
Définir un Switch(config)# ntp server X.X.X.X
serveur NTP Switch(config)# ntp server X.X.X.X prefer

CONFIGURATION DHCP

ip dhcp excluded-address 192.168.1.254             


ip dhcp excluded-address 192.168.1.1 192.168.1.2   
 
ip dhcp pool FINGER_POOL                           
 network 192.168.1.0 255.255.255.0                 
 default-router 192.168.1.254                      
 dns-server 192.168.1.1 192.168.1.2                
 lease 0 0 10
 
ip dhcp pool FINGER_POOL_FIXE_90        
           
 network 192.168.1.90 255.255.255.0
 hardware-address 000b.6b52.3268                   
 default-router 192.168.1.254
 dns-server 192.168.1.1 192.168.1.2
 lease 0 0 10

Dépannage

Voir la config du serveur DHCP R1# show ip dhcp pool


Voir les conflits DHCP R1# show ip dhcp conflict


Voir les baux DHCP distribués R1# show ip dhcp binding

eBook signé numériquement Guide de configuration CISCO Pages 19 / 36


LES SERVICES
DESCRIPTION
SPAN = Switched Port ANalyzer
Cette fonction permet de faire de l’analyse réseau sans se mettre en coupure.
Il en existe trois types :

– Local SPAN
– Remote SPAN (RSPAN)
– Encapsulated RSPAN (RSPAN – via GRE)

SPAN

BOB Fa0/1 Fa0/2 ALICE


1
SW
Fa0/24

Wireshark

monitor session 1 source interface fa 0/1 [ rx | tx | both ]


monitor session 1 destination interface fa 0/24

Remote SPAN

BOB Fa0/1 Fa0/1


1 2 3
SW SW SW Wireshark
Fa0/2

ALICE

vlan 500
remote-span
SW1
monitor session 1 source interface FastEthernet 0/1
monitor session 1 destination remote vlan 500

vlan 500
SW2 remote-span

vlan 500
remote-span
SW3
monitor session 1 source remote vlan 500
monitor session 1 destination interface FastEthernet 0/1

eBook signé numériquement Guide de configuration CISCO Pages 20 / 38


SUPERVISION
CONFIGURATION DU SNMP

R1(config)# access-list 2 permit 10.0.0.1


SNMP V1
R1(config)# snmp-server community Finger RO 2
R1(config)# snmp-server host 10.0.0.1 Finger

R1(config)# access-list 2 permit 10.0.0.1


SNMP V2
R1(config)# snmp-server community Finger RO 2
R1(config)# snmp-server host 10.0.0.1 version 2c Finger

R1(config)# snmp-server group Finger v3 auth write v1default


SNMP V3
R1(config)# snmp-server user EyesOfNetwork Finger v3 auth md5 P@ssw0rd
R1(config)# snmp-server host 10.0.0.1 version 3 auth EyesOfNetwork

CONFIGURATION DES LOGS

Augmente la taille alloué aux logs logging buffered 64000


Ajoute la date et l'heure service timestamps debug datetime msec localtime
aux logs service timestamps log datetime msec localtime
Affiche les logs en temps réel logging console
en mode console
Affiche les logs en temps réel logging monitor
en mode SSH / TELNET
Envoie les logs en temps réel logging 10.0.0.1
au serveur SYSLOG logging source-interface vlan 100
Affiche les logs présents show logging
sur le switch

LES NIVEAUX D'ALERTE LE PROTOCOLE NETFLOW

Code Gravité ip cef

0 Emergency flow exporter ipv4flowexport


 source X.X.X.X
1 Alert destination X.X.X.X
2 Critical dscp 8 (default=0)
3 Error transport udp 1333
4 Warning  
flow monitor ipv4flow
5 Notice description Monitors all IPv4 traffic
6 Informational record netflow ipv4 original-input
7 Debugging statistics packet protocol
exporter ipv4flowexport
interface FastEthernet0/0
ip flow monitor ipv4flow input

eBook signé numériquement Guide de configuration CISCO Pages 21 / 38


LE PROTOCOLE NAT

NAT STATIQUE

interface fa 0/1 
description LAN
 ip address 192.168.1.254 255.255.255.0
 ip nat inside
interface fa 0/2
 description WAN 
 ip address 200.1.1.254 255.255.255.0
 ip nat outside
ip nat inside source static 192.168.1.1 200.1.1.1
ip nat inside source static 192.168.1.2 200.1.1.2
ip nat inside source static 192.168.1.3 200.1.1.3
etc ...

NAT DYNAMIQUE
interface fa 0/1 
 description LAN
 ip address 192.168.1.254 255.255.255.0
 ip nat inside
interface fa 0/2
 description WAN 
 ip address 200.1.1.254 255.255.255.0
 ip nat outside
ip nat pool MAISON 200.1.1.1 200.1.1.3 netmask 255.255.255.0
ip nat inside source list 10 pool MAISON
access-list 10 permit 192.168.1.1
access-list 10 permit 192.168.1.2
etc ...

NAT OVERLAY

interface FastEthernet0/1 
 description LAN
 ip address 192.168.1.254 255.255.255.0
 ip nat inside
interface FastEthernet0/2
 description WAN 
 ip address 200.1.1.254 255.255.255.0
 ip nat outside
ip nat inside source list 10 interface FastEthernet0/2
overload
access-list 10 permit 192.168.1.0 0.0.0.255
etc ...

eBook signé numériquement Guide de configuration CISCO Pages 22 / 38


TUNNEL GRE
TUNNEL GRE

192.168.3.0 /24
192.168.1.0 /24

.1 .2 .1 .2
10.10.10.0 /24 10.10.20.0 /24
R1 R2 R3

R1 R3
interface fa 1/1 interface fa 1/1
description VERS R2 description VERS R2
ip address 10.10.10.1 255.255.255.0 ip address 10.10.20.2 255.255.255.0

interface tunnel10 interface tunnel10


description R1-R2 description R1-R2
ip address 1.1.10.2 255.255.255.248 ip address 1.1.10.1 255.255.255.248
tunnel source 10.10.10.1 tunnel source 10.10.20.2
tunnel destination 10.10.20.2 tunnel destination 10.10.10.1

ip route 10.10.20.0 255.255.255.0 10.10.10.2 ip route 10.10.10.0 255.255.255.0 10.10.10.2


ip route 192.168.3.0 255.255.255.0 tunnel10 ip route 192.168.1.0 255.255.255.0 tunnel10

TUNNEL mGRE
HUB

interface Tunnel 10
 ip address [IP-TUN-HUB] [MASQUE]
 tunnel source [IP-WAN-HUB]
 tunnel mode gre multipoint
ip nhrp network-id 1
 ip nhrp authentication [PASSWORD]
 ip nhrp map multicast dynamic

SPOKE
interface Tunnel 10
 ip address [IP-TUN-SPOKE] [MASQUE]
 tunnel source [IP-WAN-SPOKE]
 tunnel mode gre multipoint
ip nhrp network-id 1
 ip nhrp authentication [PASSWORD]
 ip nhrp map multicast [IP-WAN-HUB]
 ip nhrp map [IP-TUN-HUB] [IP-WAN-HUB]
ip nhrp map multicast [IP-WAN-HUB]   
ip nhrp nhs [IP-TUN-HUB]             

eBook signé numériquement Guide de configuration CISCO Pages 23 / 38


IPSec
ARCHITECTURE

192.168.3.0 /24
192.168.1.0 /24

.1 .2 .1 .2
10.10.10.0 /24 10.10.20.0 /24
R1 R2 R3

CONFIGURATION

ROUTEUR 1
--------- PHASE 1 ---------
crypto isakmp policy 10
encryption aes-256
authentication pre-share
group 7
hash sha
crypto isakmp key pre-share-key-finger address 10.10.20.2
--------- PHASE 2 ---------
crypto ipsec transform-set Finger esp-aes256 esp-sha-hmac
mode transport
--------- Créer une crypto-map ---------
crypto map mymap 10 ipsec-isakmp
set peer 10.10.20.2
set transform-set Finger
match address 100
access-list 100 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
--------- Appliquer la crypto-map ---------
interface FastEthernet 0/1
ip address 10.10.10.1 255.255.255.0
crypto map mymap

eBook signé numériquement Guide de configuration CISCO Pages 24 / 38


PROTOCOLE SSH
CRÉATION D'IDENTIFIANTS

Encrypte vos mots de passe R1(config)# service password-encryption


dans la configuration

Création d'identifiants R1(config)# username toto privilege 15 secret tata

Privilège : Option qui vous permet de définir le niveau de responsabilité de votre utilisateur (compris
entre zéro et quinze)
CONFIGURATION DU SSH

Mettre un hostname router(config)# hostname R1


Définir un nom de domaine R1(config)# ip domain-name FingerInTheNet


Générer une clef RSA R1(config)# crypto key generate rsa modulus 2048


R1(config)# ip ssh version 2
Configurer le SSH R1(config)# ip ssh time-out 60
R1(config)# ip ssh authentication-retries 3

NB : Afin de générer une clef RSA, notre équipement a besoin d'un hostname ainsi qu'un nom de domaine.

CRÉATION D'UNE BANNIÈRE

R1(config)# banner motd #


*********************************************************************
**** Vu l'article XXX, l'accès à cet équipement actif est réservé****
******* uniquement aux administrateurs du site FingerInTheNet *******
********************************************************************* #

MISE EN PLACE DU SSH

Concerne les connexions à distance R1(config)# line vty 0 4


Temps max de la connexion sans activité R1(config-line)# exec-timeout 3 0
Protocole autorisé venant de l'éxterieur R1(config-line)# transport input ssh
Protocole autorisé pour notre équipement R1(config-line)# transport output none
Quel comptes utilisateurs utiliser ? R1(config-line)# login local

eBook signé numériquement Guide de configuration CISCO Pages 25 / 38


ACCESS-LIST

CRÉATION DE L'ACCESS LIST


R1(config)# access-list <1-99> <1300-1999>
Standard Numbered ou
R1(config)# ip access-list standard <1-99> <1300-1999>

Standard Named R1(config)# ip access-list standard [WORD]

R1(config)# access-list <100-199> <2000-2699>


Extended Numbered ou
R1(config)# ip access-list extended <100-199> <2000-2699>

Extended Named R1(config)# ip access-list extended [WORD]

CRÉATION DE L'ACCESS LIST


ip access-list extended ACL_TEST
[Action] [Protocole] [@IP Src] [Port Source] [@IP Dest.] [Port Dest.] [Options]

[ACTION] [OPTIONS]
- Permit - LOG
- Deny

[IP SOURCE] +
[Protocole] [IP DEST]
Les plus courants
– ip (Tout protocole – pas de notion de port)

– tcp (protocole tcp)

– udp (protocole udp)
– icmp (ping, traceroute)

Routage dynamique
– ospf
– eigrp

Tunneling
– esp
– gre
– ipinip

Et plein d’autres …

[PORT SOURCE] + [PORT DEST.]


– eq (port égal à XXX ).
– gt (port supérieur à XXX).
– lt (port inférieur à XXX).
– neq (tous les ports sauf le port XXX).
– range X-Y (tous les ports compris entre X et Y).

eBook signé numériquement Guide de configuration CISCO Pages 26 / 38


SPANNING-TREE
Sécuristation
CONFIGURATION DU SPANNING-TREE PORTFAST

Activer le portfast port Sw(config)# interface range Gi 1/1 - 2


par port Sw(config-if)# spanning-tree portfast

Activer le Portfast pour tous Sw(config)# spanning-tree portfast default


les ports du Switch et le Sw(config)# interface range Gi 1/1 - 2
désactiver sur un port Sw(config-if)# spanning-tree portfast disable

CONFIGURATION DU SPANNING-TREE BPDUGUARD


Activer le BPDU Guard Sw(config)# interface range Fa 0/1 - 24
port par port Sw(config-if)# spanning-tree bpduguard enable

Activer le BPDU Guard pour Sw(config)# spanning-tree portfast default


tous les ports du Switch et le Sw(config)# spanning-tree portfast bpduguard default
désactiver sur un port Sw(config)# interface range Gi 1/1 - 2
Sw(config-if)# spanning-tree portfast disable

CONFIGURATION DU SPANNING-TREE BPDU FILTER


Activer le BPDU Filter Sw(config)# interface range Fa 0/1 - 24
port par port Sw(config-if)# spanning-tree bpdufilter enable

Sw(config)# spanning-tree portfast default


Activer le BPDU Filter pour
Sw(config)# spanning-tree portfast bpdufilter default
tous les ports du Switch et le
désactiver sur un port Sw(config)# interface range Gi 1/1 - 2
Sw(config-if)# spanning-tree portfast disable

CONFIGURATION DU SPANNING-TREE LOOP GUARD


Activer le loop guard par Sw(config)# interface range Fa 0/1 - 24
port Sw(config-if)# spanning-tree guard loop

Activer le loop guard pour


tous les ports du Switch et le Sw(config)# spanning-tree loopguard default
désactiver sur un port

CONFIGURATION DU SPANNING-TREE GUARD ROOT


Activer le guard root par Sw(config)# interface range Gi 0/1 - 2
port Sw(config-if)# spanning-tree guard root

eBook signé numériquement Guide de configuration CISCO Pages 27 / 38


Sécurisation DHCP
DHCP SNOOPING

D Fa0/1 Gi0/1 Fa0/1


H PC1
C SW1 Gi0/1 SW2
P

ip dhcp snooping ip dhcp snooping


ip dhcp snooping vlan 10 ip dhcp snooping vlan 10
interface GigaBitEthernet 0/1 interface GigaBitEthernet 0/1
 description VERS_SW02  description VERS_SW01
switchport mode trunk  switchport mode trunk
 ip dhcp snooping trust  ip dhcp snooping trust
interface FastEthernet 0/1 interface range FastEthernet 0/1 - 2
 description SERVEUR_DHCP  description CLIENTS
 switchport mode access  switchport mode access
 switchport access vlan 10  switchport access vlan 10
 ip dhcp snooping trust

Dépannage

Vérification de nos interfaces show ip dhcp snooping


TRUST et UNTRUST

Vérification de la database show ip dhcp snooping binding


DHCP Snooping

DYNAMIC ARP INSPECTION (DAI)

Étape 1 : Activer le DAI sur


ip arp inspection vlan 1-10,20,30
nos Vlans

Étape 2 : Spécifier nos


interface GigabitEthernet 0/1
équipements de confiance
ip arp inspection trust
Par interface

ip arp inspection vlan 100


arp access-list Finger
Par ACL permit ip host 1.1.1.1 mac host 1111.1111.1111
ip arp inspection filter Finger vlan 100

IP SOURCE GUARD
ip source binding [@MAC] vlan [Num.Vlan] [@IP] interface [Int.]
interface FastEthernet 0/1
ip verify source

eBook signé numériquement Guide de configuration CISCO Pages 28 / 38


Sécurisation vlan
VLAN ACL
ip access-list extended VLAN10
permit ip 192.168.10.0 0.0.0.255 any
 exit

vlan access-map MAP-VLAN10 10


 match ip address VLAN10
 action forward
 exit

vlan access-map MAP-VLAN10 20


 action drop
 exit

vlan filter MAP-VLAN10 vlan-list 10

PRIVATE VLAN

Créer les Vlans dans la Vlan-database


vlan 11
private-vlan isolated
vlan 12
private-vlan community

vlan 10
private-vlan primary
private-vlan association 11 , 12

Affecter un port dans un vlan privée


interface FastEthernet X/X
switchport mode private-vlan host
switchport private-vlan host-association 11 , 12

Configuration du lien trunk


interface fa0/1
description LIEN_TRUNK
switchport mode trunk private-vlan trunk promiscuous
switchport private-vlan mapping trunk 10 11,12
switchport private-vlan mapping trunk 20 21,22

eBook signé numériquement Guide de configuration CISCO Pages 29 / 38


authentification AAA

Présentation des protocoles

TACACS+

- Terminal Access Controller Access Control System +
- Protocole propriétaire CISCO.
- TCP port 49
- Mot de passe crypté
- Paquets cryptés

RADIUS

- Remote Authentication Dial-In User Service
- Protocole standardisé RFC 2865
- UDP port 1645 et 1812
- Mot de passe crypté
- Paquets non crypté

Configuration AAA

aaa new-model
username secours secret password

radius-server host 192.168.0.1 key AZERTYUIOP123456789


radius-server host 192.168.0.2 key AZERTYUIOP123456789

aaa group server radius FingerGroup


 server 192.168.0.1
 server 192.168.0.2

aaa authentication login default group FingerGroup local

line vty 0 4
 login authentication default

eBook signé numériquement Guide de configuration CISCO Pages 30 / 38


Configuration
sécurisé
SÉCURISATION GÉNÉRALE SÉCURISATION DES ACCÈS
service password-encryption access-list 1 remark ----- ADMIN RESEAU ----
 (option)dhcp snooping access-list 1 permit X.X.X.X 0.0.0.255
 (option)dhcp snooping vlan X access-list 1 deny any log
 no service dhcp
 no service finger line aux 0
 no service pad   login
 no ip source-route   no exec
 no service tcp-small-servers
 no service udp-small-servers  line con 0
 no ip bootp server   login local
 no ip http server   exec-timeout 3 0
 no ip http secure-server
 no cdp run  line vty 0 4
 no ip domain-lookup   login local
 no setup express   exec-timeout 3 0
  logging synchronous
  transport input ssh
  transport output ssh
LIAISON TRUNK   access-class 1 in
interface FastEthernet 0/1  line vty 5 15
 description TRUNK   login
 switchport mode trunk   transport output none
 switchport nonegotiate   transport input none
 switchport trunk native vlan XX   no exec
 switchport trunk allowed vlan XX
 spanning-tree guard root
 spanning-tree loop guard
 dhcp snooping trust LIAISON CLIENT
 duplex auto interface FastEthernet 0/1
 speed auto description PRISE XX-XX
 no shut  switchport mode access
 switchport access vlan XX
 switchport port-security
 switchport port-security violation restrict
LIAISON OFF  switchport port-security mac-address sticky
 spanning-tree portfast
interface FastEthernet 0/1  spanning-tree bpduguard enable
description OFF  no logging event link-status
switchport mode access  duplex auto
 switchport access vlan 1000  speed auto
 shutdown  no shut

INTERFACES VLAN SHUTDOWN


INTERFACE ROUTÉ + INTERFACE VLAN
interface Vlan XX interface Vlan1  interface Vlan1000
description VLAN_CLIENT description SHUTDOWN   description SHUTDOWN
  ip address X.X.X.X   no ip address   no ip address
  no ip redirects   no ip redirects   no ip redirects
  no ip unreachables   no ip unreachables   no ip unreachables
  no ip proxy-arp   no ip proxy-arp   no ip proxy-arp
  shutdown   shutdown

eBook signé numériquement Guide de configuration CISCO Pages 31 / 38


ROUTAGE IPV6

Activer le routage IPv6 sur notre routeur

ipv6 unicast-routing

Activer le CEF IPv6 sur notre routeur

ipv6 cef
CEF = Cisco Express Frowarding

Route statique IPv6

ipv6 unicast-routing
CONFIG DE
interface FastEthernet 0/0
R1 ipv6 address 2001:DB8:0:1::1/64
ipv6 route 2001:DB8:0:20::/64 2001:DB8:0:1::2

ipv6 unicast-routing
CONFIG DE interface FastEthernet 0/0
R2 ipv6 address 2001:DB8:0:1::2/64

ipv6 route 2001:DB8:0:10::/64 2001:DB8:0:1::1

Route par défaut IPv6


ipv6 route ::/0 2001:DB8:0:1::2

eBook signé numériquement Guide de configuration CISCO Pages 32 / 38


OSPFv3 pour IPV6

Présentation OSPFv3

Les grands changements pour OSPFv3 : Authentification :

- Création de deux nouvelles LSA (8 et 9) - IPSec


- Renommage des anciennes LSA
- Changement du code d'identification des LSA

Configuration OSPFv3

ipv6 unicast-routing ipv6 unicast-routing

ipv6 router ospf 1 ipv6 router ospf 1


router-id 1.1.1.1 router-id 2.2.2.2
passive-interface FastEthernet 0/1 passive-interface FastEthernet 0/1

interface FastEthernet 0/0 interface FastEthernet 0/0


description WAN description WAN
ipv6 address 2001:DB8:0:1::1/64 ipv6 address 2001:DB8:0:1::2/64
ipv6 ospf 1 area 0 ipv6 ospf 1 area 0

interface FastEthernet 1/0 interface FastEthernet 1/0


description LAN description LAN
ipv6 address 2001:DB8:0:10::1/64 ipv6 address 2001:DB8:0:20::1/64
ipv6 ospf 1 area 0 ipv6 ospf 1 area 0

Dépannage
show ipv6 route
show ipv6 ospf
show ipv6 ospf neighbor [detail]
show ipv6 ospf database
show ipv6 ospf [process-id] [area-id] interface [interface-name]
show ipv6 ospf [process-id] [area-id] neighbor
show ipv6 ospf [process-id] [area-id] database [link | prefix | database-summary]

eBook signé numériquement Guide de configuration CISCO Pages 33 / 38


EIGRP pour IPV6

Présentation EIGRP

Authentification :

- IPSec

Configuration EIGRP

ipv6 unicast-routing ipv6 unicast-routing


ipv6 router eigrp 1 ipv6 router eigrp 1
eigrp router-id 1.1.1.1 eigrp router-id 2.2.2.2
passive-interface FastEthernet 0/1 passive-interface FastEthernet 0/1
no shutdown no shutdown
interface FastEthernet 0/0 interface FastEthernet 0/0
description WAN description WAN
ipv6 address 2001:DB8:0:1::1/64 ipv6 address 2001:DB8:0:1::2/64
ipv6 eigrp 1 ipv6 eigrp 1
interface FastEthernet 0/1 interface FastEthernet 0/1
description LAN description LAN
ipv6 address 2001:DB8:0:10::1/64 ipv6 address 2001:DB8:0:20::1/64
ipv6 eigrp 1 ipv6 eigrp 1

Dépannage

show ipv6 route


show ipv6 eigrp interfaces [interface-name]

show ipv6 eigrp neighbors


show ipv6 eigrp neighbors [ASN]

show ipv6 eigrp topology


show ipv6 eigrp topology [ASN]
show ipv6 eigrp topology [IPv6-Prefix]
show ipv6 eigrp topology all-links

show ipv6 eigrp traffic


show ipv6 eigrp traffic [ASN]

eBook signé numériquement Guide de configuration CISCO Pages 34 / 38


Tunneling
IPv6 over IPv4
Configuration

R2 R3
ipv6 unicast-routing ipv6 unicast-routing
router ospf 1 router ospf 1
network 10.10.10.0 0.0.0.255 area 0 network 20.20.20.0 0.0.0.255 area 0
network 20.20.20.0 0.0.0.255 area 0 network 30.30.30.0 0.0.0.255 area 0
interface FastEthernet 0/0 interface FastEthernet 0/0
description VERS_R1 description VERS_R2
ip address 10.10.10.2 255.255.255.0 ip address 20.20.20.3 255.255.255.0
interface FastEthernet 0/1 interface FastEthernet 0/1
description VERS_R3 description VERS_R4
ip address 20.20.20.2 255.255.255.0 ip address 30.30.30.3 255.255.255.0

R1 R4
ipv6 unicast-routing ipv6 unicast-routing
ipv6 router eigrp 1 ipv6 router eigrp 1
eigrp router-id 1.1.1.1 eigrp router-id 4.4.4.4
no shutdown no shutdown
router ospf 1 router ospf 1
network 10.10.10.0 0.0.0.255 area 0 network 10.10.10.0 0.0.0.255 area 0
interface FastEthernet 0/0 interface FastEthernet 0/0
description VERS_R2 description VERS_R3
ip address 10.10.10.1 255.255.255.0 ip address 30.30.30.4 255.255.255.0
interface FastEthernet 0/1 interface FastEthernet 0/1
description VERS_LAN description VERS_LAN
ipv6 address 2001:DB8:0:10::1/64 ipv6 address 2001:DB8:0:20::1/64
ipv6 eigrp 1 ipv6 eigrp 1
interface tunnel 10 interface tunnel 10
tunnel source Fastethernet 0/1 tunnel source Fastethernet 0/1
tunnel destination 30.30.30.4 tunnel destination 10.10.10.1
tunnel mode ipv6ip tunnel mode ipv6ip

eBook signé numériquement Guide de configuration CISCO Pages 35 / 38


NAT 64
Configuration

ipv6 unicast-routing
interface FastEthernet 0/0
description VERS_LAN
ipv6 address 2001:DB8:0:10::F/64
nat64 enable
interface FastEthernet 1/0
description VERS_WAN
ip address 10.10.10.254 255.255.255.0
nat64 enable

--- IPv4 vers IPv6 ---


nat64 prefix stateful 64:FF9B::/96
--- IPv6 vers IPv4 ---
nat64 v6v4 static 2001:DB8:0:10::1 10.10.10.11
nat64 v6v4 static 2001:DB8:0:10::2 10.10.10.12
nat64 v6v4 static 2001:DB8:0:10::3 10.10.10.13
nat64 v6v4 static 2001:DB8:0:10::4 10.10.10.14

CONCLUSION

eBook signé numériquement Guide de configuration CISCO Pages 36 / 38


INSTALLER UN IOS CISCO

XMODEM via le mode ROMMON


Change la vitesse de travail de la liaison CONSOLE

ROMMON 1 > set baud 115200

Passe de 9600 a 115200 sur PUTTY

ROMMON 2 > copy xmodem: flash:c1841-adventerprisek9-mz.124-5.bin

Envoi ton fichier en XMODEM via PUTTY

TFTP via le mode ROMMON

ROMMON 1 > IP_ADDRESS = 192.168.1.1


ROMMON 2 > IP_SUBNET_MASK = 255.255.255.0
ROMMON 3 > DEFAULT_GATEWAY = 192.168.1.2
ROMMON 4 > TFTP_SERVER = 192.168.1.2
ROMMON 5 > TFTP_FILE = c1841-adventerprisek9-mz.124-5.bin
ROMMON 6 > tftpdnld

USB via le mode ROMMON

PROCÉDURE
- Copier l'IOS sur la clé USB,
- Connecter la clé USB a l'équipement.
FORMAT : - Redémarrer l'équipement et aller dans le mode ROMmon
FAT (et pas FAT32)

ROMMON 1 > boot usbflash0:c1841-adventerprisek9-mz.124-5.bin


ROMMON 1 > reset
Votre équipement redémarre sur le nouvel IOS, il ne vous reste plus qu'à copier l'IOS
sur la flash et dire à notre équipement de booter sur cette dernière

SW# copy usbflash0:c1841-adventerprisek9-mz.124-5.bin flash:


SW# boot system flash:c1841-adventerprisek9-mz.124-5.bin

eBook signé numériquement Guide de configuration CISCO Pages 37 / 38


PASSWORD RECOVERY

Mise en situation :

Vous avez retrouvé un ancien routeur au fond de l'entrepôt, mais ce dernier est protégé
par un mot de passe que vous ne connaissez pas. 

Lors du démarrage, notre équipement actif va charger la configuration "startup-


configuration" située dans la NVRAM dans notre RAM. Nous allons donc dire à ce dernier
de ne pas charger cette configuration afin d'avoir une configuration vierge. À la suite de ça,
nous allons nous créer un mot de passe dans la configuration préexistante.

Mise en pratique

Connecte toi en mode console sur


ton équipement CISCO

ETAPE 01 : Redémarre l'équipement


ETAPE 02 : Fais un CTRL+BREAK pour accéder au mode ROMmon
ETAPE 03 : Tape la commande suivante :

rommon1> confreg 0x2142

ETAPE 04 : Redémarre l'équipement, tu remarqueras que la


startup-configuration n'a pas été pris en compte.
ETAPE 05 : Mets-toi en mode CONFIGURE TERMINAL

router> enable
router# configure terminal

ETAPE 06 : Mets en place l'ancienne configuration

router(config)# copy startup-configuration running-configuration


R1(config)#

ETAPE 07 : Créez-vous un identifiant et sauvegardez la nouvelle configuration

router(config)# username FINGER privilege 15 secret toto

ETAPE 08 : Reconfigurez votre équipement pour qu'il prenne au prochain


démarrage la startup-configuration en compte puis sauvegardez.

router(config)# config-register 0x2102


router(config)# copy running-configuration startup-configuration

Et le tour est joué ;)

eBook signé numériquement Guide de configuration CISCO Pages 38 / 38


THE
END

Vous aimerez peut-être aussi