Vous êtes sur la page 1sur 1

Commandes de bases Redondance : STP encapsulation PPP – HDLC VPN (protocole GRE)

Mot de passe (non-crypté) : Configurer le cout de port : Configuration de l'authentification PAP Pour Routeur 1 :
Router(config)# enable password cisco1234 S1(config)# Interface f0/1 Configuration sur le routeur R1 R1(config)# interface Tunnel 0
Mot de passe (crypté) : S1(config-if)# Spanning-tree cost 25 Router#configure terminal R1(config-if)# tunnel mode gre ip
Router(config)# enable secret cisco1234 Activer le protocole pvst + Router(config)#hostname R1 R1(config-if)#ip address 192.168.2.1 255.255.255.0
Appliquer un cryptage simple à tous #spanning-tree mode pvst R1(config)#username R2 password cisco2 R1(config-if)# tunnel source 209.165.201.1
les mots de passe : Avtiver bpduguard au niv de tout les port access R1(config)#interface serial 0/0 R1(config-if)# tunnel destination 198.133.219.87
Router(config)# service password-encryption #spanning-tree bpduguard default R1(config-if)#encapsulation ppp R1(config-if)# router ospf 1
Activer le serveur http (service web) : Avtiver bpduguard au niv de tout les port access R1(config-if)#ppp authentication pap R1(config-if)# network 192.168.2.0 0.0.0.255 area 0
Router(config)# ip http server #spanning-tree portfast bpduguard default R1(config-if)#ppp pap sent-username R1 password Vérification de Tunnel GRE :
Configurer la vitesse de liaison WAN : Priority de port pour vlan 10 cisco1 R1# show ip interface brief | include Tunnel
Router(config-if)# clock rate 64000 # sp-tr vlan 10port-priority 64 Configuration sur le routeur R2 R1# show interface Tunnel 0
Interface Console : PVSTP+ : Configuration : Router#configure terminal Configuration du routage inter-VLAN de type router
R1(config)# line console 0 Methode 1 : Router(config)#hostname R2 on a stick
R1(config-line)# logging synchronous S1(config)# spanning-tree VLAN 1 root primary R2(config)#username R1 password cisco1 Routeur :
(désactiver messages de non solicitations) S2(config)#spanning-tree VLAN 1 root secondary R2(config)#interface serial 0/0 R1(config)# interface g0/0.10
R1(config-line)# password cisco1234 Methode 2 : R2(config-if)#encapsulation ppp R1(config-subif)# encapsulation dotlq/isl 10
R1(config-line)# login S3(config)#spanning-tree VLAN 1 priority 24576 R2(config-if)#ppp authentication pap R1(config-subif)# ip address 172.17.10.1
Interface VTY : Configuration de PortFast et de la protection BPDU : R2(config-if)#ppp pap sent-username R2 password 255.255.255.0
R1(config)# line vty 0 4 S3(config)# interface f0/11 cisco R1(config-subif)# interface g0/0.30
R1(config-line)# password cisco1234 S3(config-if)# spanning-tree portfast (default pour Configuration de l'authentification CHAP R1(config-subif)# encapsulation dotlq/isl 30
R1(config-line)# login tout les port ) Configuration sur le routeur R1 R1(config-subif)# ip address 172.17.30.1
Configurer une interface de bouclage : S3(config-if)# spanning-tree bpduguard enable Router(config)#hostname R1 255.255.255.0
Router(config)#interface loopback 0 RPVSTP+ : R1(config)#username R2 password cisco R1(config)# interface g0/0
Router(config-if)#ip address 192.168.1.2 S1(config)# spanning-tree mode rapid-pvst R1(config)#interface serial 0/0 R1(config-if)# no shut
255.255.255.0 S1(config)# interface f0/2 R1(config-if)#encapsulation ppp Vtp
Désactiver la recherche DNS : S1(config-if)# spanning-tree link-type point-to-point R1(config-if)#ppp authentication chap # no ip domain-lookup
Router (config)# no ip doman-lookup (typre de lien ) shared pour lien parteger Configuration sur le routeur R2 #vtp mode (srv clt tran)
Message de bannière de connexion : Redondance : HSRP,GLBP,VRRP Router(config)#hostname R2 #vtp version 2 (srv)
R1(config)# banner mtd #message de jour# Pour le temps hello et datt R2(config)#username R1 password cisco #vtp domain name (name.com)
Ajouter une description pour l'interface : #standby 1 timers 1 15 R2(config)#interface serial 0/0 #int range fa 0/1-2
R1(config-if)# description # votre Description# Configurez HSRP sur R1 : R2(config-if)#encapsulation ppp #swutcheport mode trunk
Configuration de l'interface de gestion : R1(config)# interface g0/1 R2(config-if)#ppp authentication chap #switchport trunk native vlan 99
S1(config)# interface vlan 99 R1(config-if)# standby 1 ip 192.168.1.254 Configuration de l'encapsulation HDLC
Récupération de Mot de passe / IOS :
S1(config-if)# ip address 172.17.99.11 255.255.0.0 R1(config-if)# standby 1 priority 150 Router(config)# interface S 0/0/0
Etape1 : Redémarrer le routeur :
S1(config-if)# no shutdown R1(config-if)# standby 1 preempt Router(config-if)# encapsulation hdlc
Lors du démarrage du routeur, il faut appuyer sur les
Configuration de SSH : Configurez le protocole GLBP sur R1. Frame-Relay (Point to Point) touches Ctrl + Pause pour passer en mode ROM
S1#configure terminal R1(config)# interface g0/1 Monitor.
S1(config)# username admin secret/password ccna R1(config-if)# glbp 1 ip 192.168.1.254 Etape 2 : Mode Monitor :
S1(config) # ip ssh version 2 R1(config-if)# glbp 1 preempt rommon> confreg 0x2142
S1(config) #ip ssh time-out 2 R1(config-if)# glbp 1 priority 150 rommon> reset
S1(config) #ip ssh authentication-retries 3 R1(config-if)# glbp 1 load-balancing round-robin Etape 3 : réinitialiser un nouveau mot de passe et la
S1(config)# crypto key generate rsa Configurez le protocole VRRP sur R1. valeur
S1(config)# ip domain-name cisco.com R1(config)# interface g0/1 initiale du registre
S1{config-line)# line vty 0 15 R1(config-if)# vrrp 1 ip 192.168.0.254 Router> enable
S1(config-line)# transport input ssh R1(config-if)# vrrp 1 priority 200 Router# copy startup-config running-config
S1(config-line)# login local R1(config-if)# vrrp 1 preempt Router# configure terminal
Configurer la surveillance DHCP :
Agrégation de liaisons : Etherchannel Router(config)# enable secret password (votre mot
Activation de service dhcp
Configuration d'Etherchannel : --Show frame-relay map (mappgae) de passe )
R(config)# service dhcp
S1(config)# interface range f0/1-2 Router(config)# config-register 0x2102 (valeur
Exclusion des adresses ipv4 :
S1(config-if-range)# channel-protocol { pagp|lacp } R1(config-if)# encapsulation frame-relay initiale )
R1(config)# ip dhcp excluded-address 192.168.10.1 (
S1(config-if-range)# channel-group 1 mode active R1(config-if)# frame-relay map ip 10.1.1.2 102 Router# copy running-config startup-config
une adresse )
S1(config-if-range)# interface port-channel 1 broadcast Router# reload
R1(config)# ip dhcp excluded-address 192.168.10.1
S1(config-if)# switchport mode trunk R1(config-if)# frame-relay map ipv6 NB : Noter la valeur de registre :
192.168.10.9
S1(config-if)# switchport trunk allowed vlan 1,2,20 2001:DB8:CAFE:1::2 102 R1> show version
Configuration d'un pool :
Pagp= desirable auto R1(config-if)# frame-relay map ipv6 FE80::2 102 Dans notre cas on trouve : 0x2102
R1(config)# ip dhcp pool pool-name
Lacp= active passive brodcast Création de sauvegarde d'image Cisco IOS
Configuration des taches spécifique :
Activer l'Equilibrage : Frame Relay avec sous interfaces R1# copy flash0 : tftp :
Définir le pool d'adresses :
S1(config)# port-channel load-balance R1(config)# interface serial 0/0/1 Source filename [] ? C1900-universalk9-mz.SPA.152-
R1(dhcp-config)#network 192.168.10.0
EIGRP R1(config-if)# encapsulation frame-relay 4.M3.bin
255.255.255.0
Activer le Routage EIGRP : R1(config-if)# no shut Addresse or name of remote host [] ? 172.168.1.100
Définir le routeur/ l'adresses de passerelle par
R1(config)# router eigrp 1 R1(config)# interface serial 0/0/1.102 point-to-point Destionation filename ?
defaut :
Afficher la table de voisinage : R1(config-subif)# ip address 10.1.1.1
R1(config-dhcp)#default -router 192.168.10.1 Récupération d'IOS sur un routeur
R1# show ip eigrp neighbors 255.255.255.252
Définir un serveur DNS : NB : Lors du démarrage du routeur, il faut appuyer
Affiche d'autres informations sur le routage : R1(config-subif)#frame -relay interface-dlci 102
R1(config-dhcp)# domain-name ServeurDNS sur les touches Ctrl + Pause
R1# show ip protocols Frame-Relay (Multipoint)
Définir une @ DNS : pour passer en mode rommon.
Afficher la table Topologique de EIGRP : Pour R1 :
# dns-server @ rommon> IP_ADDRESS=ip-address
R1# show ip eirgp topology R1(config)# int S0/0/0
Configurer NTP : rommon> IP_SUBNET_MASK=mask
Configurer la récapitulation automatique : R1(config-if)# encapsulation frame-relay dotq
R1(config)# ntp master 1 rommon> DEFAULT_GATEWAY=ip-address
R1(config)# router eigrp 2 R1(config)#frame-relay lmi-type q933a
R2(config)# ntp server 10.1.1.1 rommon> TFTP_SERVER=ip_address
R1(config-router)# auto-summary R1(config-if)# no shut
R2# show ntp associations rommon> TFTP_FILE=file_name
Configurer la métrique : R1(config-if)# exit
R2# show ntp status rommon> tftpdnld
R1(config-router)# metric weights tos k1 k2 k3 k4 k5 R1(config)# int S0/0/0.1 multipoint
rommon> reset
Routage Dynamique Configurer une route récapitulative manuel : R1(config-subif) # ip add 192.168.5.1
Désactiver la récapitulation automatique : 255.255.255.248 les classes dadresse
R1(config)# interface serial 0/0/0
R1(config-router)# no auto-summary- R1(config-subif) # frame-relay map ip 192.168.5.2 classe A = 1.0.0.0 => 126.255.255.255
R1(config-if)# ip summary-address eigrp 192.168.0.0
Propager une route par defaut : 102 broadcast ietf @prive 10.0.0.0 => 10.255.255.255
255.255.252.0
R1(config-router)# default-information originate R1(config-subif) # frame-relay map ip 192.168.5.3 classe B = 128.0.0.0 => 191.255.255.255
Configurer et propager une route statique par
Propager une route statique : 103 broadcast ietf @prive 172.16.0.0 => 172.31.255.255
défaut
R1(config-router)# redistribute static R1(config-subif) # frame-relay map ip 192.168.5.4 classe C = 192.0.0.0 => 223.255.255.255
R1(config)# ip route 0.0.0.0 0.0.0.0 s0/0/0
Ipv6 : 104 broadcast ietf @prive 192.168.0.0 => 192.168.255.255
R1(config)# router eigrp 1
Activer le Routage Rip V2 : R1(config-router) redistribute static R1(config-subif) # ip ospf priority 255 Les types @
R1(config)# interface gigabitethernet 0/0/0 Configurer le minuteurs Hello et mise en attente : R1(config-subif) # ip ospf network broadcast Ipv4 :
R1(config-if)# ipv6 rip process1 enable R1(config)# interface serial 0/0/0 R1(config-subif) # exit @par default : 0.0.0.0
Maximum Path (pour la repartions de la charge ) : R1(config-if) ip hello-interval eigrp 1 50 (50 s) R1(config)# router ospf 1 @prive : 172.16.0.0/12
R1(config-if)# ipv6 rip process1 enable R1(config-if) ip hold-time eigrp 1 150 (150 s) R1 ( config-router)# router-id 10.10.10.10 @de bouclage : 127.0.0.0/8
R1(config-router)# maximum-paths 1 Equilibrage de la charge : R1(config-router)# neighbor 192.168.5.2 @de diffusion : 255.255.255.255
Désactiver la récapitulation automatique : Router(config-router)# maximum-paths 4 ( 4 route R1(config-router)# neighbor 192.168.5.3 @multidifission: 224.0.0.0/14
R1(config-router)# no auto-summary Activation de routage ipv6 : R1(config-router)# neighbor 192.168.5.4 @apipa : 169.254.0.0/16
Configurer et vérifier passive interface : R1(config)# ipv6 unicast-routing R1(config-router)# network 192.168.1.0 0.0.0.255 Ipv6 :
R1(config-router)# passive-interface g0/0 Activer le Routage EIGRP : area 0 @non specifie = :://128
Propager une route par defaut : R1(config)# ipv6 router eigrp 2 R1(config-router)#network 192.168.5.0 0.0.0.7area 0 @bouclage = ::1//128
Router(config-if)# ipv6 rip process1 default- Configurer les adresses link-local : NAT-PAT @unnicast = 2000 ::/3
information originate R1(config)# interface s0/0/0 Configuration de la fonction NAT statique : @local uniques = fe00:/7
Propager une route static : R1(config-if)# ipv6 adresse fe80::1 link-local R2(config)# ip nat inside source static @local lien = fc80 ::/10*
Router(config)# ipv6 router rip tri Configurer et propager une route statique par 192.168.10.254 209.165.201.5 (de a) @multicast = ff00 ::/8
Router(config-rtr)# redistribute static défaut : R2(config)#interface Serial 0/0//0 telnet
R1(config)# ipv6 route ::/0 s0/0/0 R2(config_if)# ip nat inside Switch#conf terminal
OSPF
R1(config)# ipv6 router eigrp 2 R2(config)# interface Serial 0/1//0 Switch(config)#username admin secret bonjour
Configurer la métrique de la BP :
R1(config-rtr)# redistribute static R2(config_if)# ip nat outside Switch(config)#enable secret bonjour
R1(config-if)# bandwith 64 (en kilo)
Configurer l'utilisation de BP : Configuration de la fonction NAT Dynamique : Switch(config)#line vty 0 4
Réglage manuel de cout
R1(config)# interface serial 0/0/0 R2(config)# ip nat pool NAT-POOL1 209.165.200.226 Switch(config-line)#login local
R1(config-if)# ip ospf cost 15625
R1(config-if) ipv6 bandwith-percent eigrp 2 40 209.165.200.240 netmask 255.255.255.224 Switch(config-line)#password bonjour
Modifier de la priorité d'un interface :
Créer une chaine de clés et d'une clé : R2(config)# access-list 1 permit 192.168.0.0
R1(config-if)# ip ospf priority 255
R1(config) # key chain EIGRP_KEY 0.0.255.255
Propagation d'une route par défaut :
R1(config-keychain)# key 1 R2(config_if)# ip nat inside source list 1 pool NAT-
R1(config)# ip route 0.0.0.0 0.0.0.0 209.165.200.226
R1(config-keychain_key)# key-string cisco123 POOL1
R1(config)# router ospf 10
Configurer l'autentification EIGRRP : R2(config)# interface Serial 0/0//0
R1(config-router)# default-information originate
R1(config)# interface g0/0 R2(config_if)# ip nat inside
Affectation d'interface à une zone OSPF :
R1(config-if)# ip authentication mode eigrp as- R2(config)# interface Serial 0/1//0
R1(config)# interface g0/0
number md5 R2(config_if)# ip nat outside
R1(config-if)# ipv6 ospf 10 area 0
R1(config-if)# ip authentication mode eigrp as- Configuration de la fonction PAT
Activation de l'authentification MD5 OSFP
number EIGRP_KEY R2(config)# ip nat pool NAT-POOL2 209.165.200.226
globalement :
209.165.200.240 netmask 255.255.255.224
R1(config)#router ospf 10
R2(config)# acces-list 1 permit 192.168.0.0
R1(config-if)# area 0 authentication message-digest
0.0.255.255
R1(config)# interface G0/0
R2(config)# ip nat inside source list 1 pool NAT-
R1(confg-if)#ip ospf message-digest_key 1 md5
POOL2 overload
AZERTY1234
R2(config)# interface Serial 0/0/0
Modification des intervalles OSPF sur une interface
R2(config-if)# ip nat inside
R1(config)# interface serial 0/0/0
R2(config)# interface Serial 0/1/0
R1(config-if)# ip ospf hello-interval 5
R2(config-if)# ip nat outside
R1(config-if)# ip ospf dead-interval 20
PAT avec une seule adresse :
Configurer une interface de bouclage pour l'utiliser
R2(config)# ip nat source list 1 interface serial 0/1/0
comme ID :
overload
R1(config)# interface loopback 0
R2(config)# access-list 1 permit 192.168.0.0
R1(config-if)# ip address 1.1.1.1 255.255.255.255
0.0.255.255
R1(config-if)# end
R2(config)# interface serial 0/0/0
Activation de routage ipv6 :
R2(config-if)# ip nat inside
R1(config)# ipv6 unicast-routing
R2(config)# interface serial 0/1/0
R2(config-if)# ip nat outside

Vous aimerez peut-être aussi