Vous êtes sur la page 1sur 6

7.

1) Configurez les paramètres de 8. S1(config-if)#switchport port-security mac-address


000B.BE25.5A0C ( ou sticky)
base
Configurer le nom et mot de passe d un routeur
S(config)# hostname S1
S1(config)# service password-encryption
S1(config)# enable secret class
Désactiver recherché dns
S1(config)# no ip domain-lookup.
Banière de connexion
S1(config)# banner motd #message#.
4) Configuration des Vlans
Configurer @ip switch
S1(config)# interface vlan99
S1(config-if)# ip address 192.168.1.2 255.255.255.0
S1(config-if)#description
S1(config-if)# no shutdown
Configuration de la passerelle d un switch
S1(config)# ip default-gateway 192.168.1.1 Créer vlan :
Active telnet avec password 1. S1(config)# vlan 10
S1(config)# line vty 0 4 2. S1(config-vlan)# name Student
S1(config-line)# password cisco
S1(config-line)# login Affecter un port à un vlan :
S1(config-line)# logging synchronous
Active telnet avec login + password 3. S1(config)# interface f0/2
#usernam adam password adam 4. S1(config-if)# switchport access vlan 10 //pour
S1(config)# line vty 0 4 pc
S1(config-line)# login local 5. S1(config-if)# switchport voice vlan 10 //pour
telephone
Activez le service DNS
(config)# ip dns server //activ service // sur routeur real Configure interface l Agrégation/ trunk
(config)# ip name-server 8.8.8.8 17.10.246.1 //@ip de serveur 6. S1(config)# interface range f0/1,f0/3
2) Configuration de SSH 7. S1(config-if)# switchport mode trunk
8. switchport trunk allowed vlan 10,50// all
9. switchport trunk allowed vlan remove 5-11,12
switchport trunk allowed vlan add 50
0.hostname sw1
1. S1(config)# ip domain-name cisco.com Désactiver la négociation DTP
SW(config-if)# switchport nonegotiate
2. S1(config)# crypto key generate rsa
3.
4. S1(config)# username userssh secret passssh un trunk dynamique. Avec DTP
5. S1(config)#line vty 0 4 W(config-if)#switchport mode dynamic ?
S1(config-line)# transport input ssh Auto
S1(config-line)# login local Desirable
6. S1(config)# ip ssh version 2 // key>=1024
7. Pc>ssh -l userssh 192.168.1.1 (pour le client)

3) Configuration de la Sécurité des


ports d’un Switch

1. S1(config)#interface f0/1
2. S1(config-if)#switchport mode access
3. S1(config-if)# switchport port-security
4. S1(config-if)#switchport port-security maximum 2
5. S1(config-if)#switchport port-security violation
SHUTDOWN
6. show port-security interface fastEhernet x/x
Crée sous interface pour un vlan dans le R2(config-if)# glbp 1 load-balancing round-robin

routeur EtherChannel(PAgP)
10. R1(config)#interface g0/1.10 S1(config)# interface range f0/3-4
S1(config-if-range)#channel-protocol PAGP
11. R1(config-if)# encapsulation dot1Q 10// en 1ere
S1(config-if-range)# channel-group 2 mode
lieu desirable(auto)
12. R1(config-if)# ip address 192.168.10.1 S1(config-if-range)# no shutdown
255.255.255.0 Accede a l interface :
S1(config)# interface port-channel 2
13. Configuration vtp : S1(config-if)#
Sw(conf)#vtp mode server /clien/transparent EtherChannel(LACP)
S1(config)# interface range f0/3-4
Sw(conf)#vtp domain ista.ma S1(config-if-range)#channel-protocol LACP
Sw(conf)#vtp password 123 S1(config-if-range)# channel-group 2 mode
active/passive
S1(config-if-range)# no shutdown
Sauvegarder la configuration dans un
serveur TFTP EtherChannel mode OIN
S2(config)# interface range f0/1-2
S2(config-if-range)# channel-group 2 mode ON
R# copy runnin tftp S2(config-if-range)# no shutdown

?@ip serveur Sur un routeur


? le nom de fichier Router(config)#interface port-channel 2
Ip add 10.0.0.1 255.0.0.0
5) PVST et Etherchanel
Interface f0/0
PVST et Rapide PVST g-if)# channel-group 2
S1(config)# spanning-tree vlan 1 root primary interface f0/1
g-if)# channel-group 2
S1(config)# spanning-tree vlan 1 root secondary
6) Routage static
S1(config)# spanning-tree vlan 1 priority 24576 1. R3(config)# ip route 192.168.10.0 255.255.255.0 se2/0
S1(config)# spanning-tree mode rapid-pvst 2. e(config)# ipv6 route ::/0 serial 2/0
S1(config)# interface f0/0 3.
S1(config-if)# spanning-tree portfast
S1(config-if)# spanning-tree bpduguard enable
Pour la verification 4. Routage RIP
S1(config)# Show spanning-tree
5. R1(config)# router rip
6. R1(config-router)# version 2
7. R1(config-router)#network 192.168.1.0
HSRP 8. R2(config-router)# default-information originate
R1(config)# interface g0/1 9. R1(config-router)# passive-interface g0/0
R1(config-if)# standby 1 ip 192.168.1.254 //OBLIGATOIR
R1(config-if)# standby 1 priority 150
R1(config-if)# standby 1 preempt 10. R2(config)# ipv6 unicast-routing
standby 6 track serial 0/0 60 11. R2(config)#ipv6 router rip ripv6
12. R2(config-if)#ipv6 rip ripv6 enable
VRRP SUR ROUTEUR REAL 13. R2(config-rtr)# ipv6 rip ripv6 default-information
R1(config)# interface g0/1
originate
R1(config-if)# vrrp 1 ip 192.168.1.254
R1(config-if)# vrrp 1 priority 150
R1(config-if)# vrrp 1 preempt 7) Configuration OSPF
R1(config)# router ospf 1
GLBP SUR ROUTEUR REAL R1(config-router)# router-id 11.11.11.11
R2(config)# interface g0/1 R1(config-router)# network 192.168.1.0 0.0.0.255 area 0
R2(config-if)# glbp 1 ip 192.168.1.254 R1(config-router)# passive-interface g0/0
R2(config-if)# glbp 1 preempt R1(config-router)# auto-cost reference-bandwidth 100
R2(config-if)# glbp 1 priority 150 Pour resume des route
R1(config-rtr)# area 1 range 192.168.0.0 255.255.252.0
 Compléter EIGRP et configurer les réseaux
R2(config)# ipv6 router ospf 1 directement connectés (pensez à bien utiliser le résumé
R2(config-rtr)# router-id 1.1.1.1
R2(config-rtr)# passive-interface g0/0
de route pour les réseaux 192.168.0.0/23 et
R2(config-rtr)# area 1 range 2001:DB8:ACAD::/62 192.168.2.0/26).
R2(config)# interface g0/0 TUTOS(config)#router eigrp 1
R2(config-if)# ipv6 ospf 1 area 0 TUTOS(config-router)#network 192.168.0.0
0.0.3.255
virtual-link TUTOS(config-router)#network 10.0.0.0 0.0.0.3
TUTOS(config-router)#end
R1(config)#router ospf 1
R1(config-router)#area 1 virtual-link 192.168.23.2 // ip
router distant sur autre zone 9) Configuration des ACLs
R3(config)# access-list 1 remark Allow R1 LANs Access
R3(config)# access-list 1 permit 192.168.10.0 0.0.0.255
R3(config)# access-list 121 permit tcp 192.168.0.0 .0.0.255
Dans un reseau frame relais any eq 80
A) Topologie hub an spock R3(config)# interface g0/1
R3(config-if)# ip access-group 1 out
1-Sur Routeur central
Router ospf 1 R1(config)# ip access-list standard BRANCH-OFFICE-
Neighbors 10.0.0.2 POLICY
Neighbors 10.0.0.3 //ajouter les routeurs d extremite R1(config-std-nacl)# permit host 192.168.30.3
R1(config)# ip access-list extended BRANCH-1
2-Sur les routeur extremite R1(config-std-nacl)# permit tcp any host 192.168.30.3 eq 80
Interface se0/0
R1(config)# interface g0/1
Ip ospf priority 0 // pour que le central seulement sera le
R1(config-if)# ip access-group BRANCH-OFFICE-POLICY
DR
out
B) Topologie maille R1(config)# line vty 0 4
Sur l ensemble des routeur
R1(config-line)# access-class ADMIN-MGT in
Interface s0/0
if)#ip ospf network broadcast R1(config)# ipv6 access-list RESTRICT-VTY
R1(config-ipv6-acl)# permit tcp 2001:db8:acad:a::/64 any
C) ospf avec ipv6 sous frame relay R1(config-ipv6-acl)# int g0/1
R1(config-if)# ipv6 traffic-filter RESTRICTED-LAN out
utiliser mappage statique pas inver-arp pour R1(config-ipv6-acl)# line vty 0 4
ipv6 R1(config-line)# ipv6 access-class RESTRICT-VTY in

Interface s0/0 10) Configuration DHCP


if)# no frame-relay inverse-arp R2(config)# ip dhcp pool R1G1
if)# frame-relay map ipv6 2000::1 19 broadcast R2(dhcp-config)# network 192.168.1.0
255.255.255.0
8) Configuration EIGRP R2(dhcp-config)# default-router 192.168.1.1
R1(config)# router eigrp 10 R2(dhcp-config)# dns-server 209.165.200.225
R1(config-router)# network 10.1.1.0 0.0.0.3 R2(dhcp-config)# domain-name ccna-lab.com
R1(config-router)# passive-interface g0/0 R2(dhcp-config)# lease 2
R1(config- router)# redistribute static R2(dhcp-config)# exit
R2(config)# ip dhcp excluded-address 192.168.0.1 192.168.0.9
R1(config)# ipv6 router eigrp 1
R1(config-rtr)# eigrp router-id 1.1.1.1 11) Configuration Agent de relais
R1(config-rtr)#NO SH
R1(config-rtr)# redistribute static DHCP
No sh
R1(config)# interface g0/0 R1(config)# interface g0/0
R1(config-if)# ipv6 eigrp 1 R1(config-if)# ip helper-address 192.168.2.254
R1(config-if)# ipv6 summary-adress eigrp 1 200:100::/48 sans état
R3(config)# ipv6 dhcp pool IPV6POOL-A
R1(config-dhcpv6)# dns-server 2001:db8:acad:a::abcd
 Configurer l'interface qui va annoncer les mises à R1(config)# interface g0/1
jours aux autres routeurs (ici : se 0/0/0). R1(config-if)# ipv6 dhcp server IPV6POOL-A
TUTOS(config)#interface serial 0/0/0 R1(config-if)# ipv6 nd o
TUTOS(config-if)#ip summary-address eigrp 1
192.168.0.0 255.255.252.0 Avec état
TUTOS(config-if)#exit R1(config)# ipv6 dhcp pool IPV6POOL-A
R1(config-dhcpv6)# address prefix 2001:db8:acad:a::/64
R1(config)# interface g0/1 R1(config)# interface s0/0/0
R1(config-if)# ipv6 nd m R1(config-if)# encapsulation frame-relay (cisco|ietf)
12) Configuration NAT et PAT R1(config-if)# frame-relay lmi-type (cisco|ansi|q933a)
R1(config-if)# no frame-relay inverse-arp
Statique R1(config-if)# frame-relay map ip 10.1.1.2 103 broadcast
R1(config)# ip nat inside source static 192.168.1.20 R1(config-if)# frame-relay map ipv6 2001:db8:acad:b::3 103
209.165.200.225 b
R1(config)# interface g0/1 Sous interface Frame Relay
R1(config-if)# ip nat inside // outside R3(config)# interface s0/0/0.113 point-to-point
R3(config-subif)# frame-relay interface-dlci 113

Dynamique Client PPPoE pour la connectivité


R2(config)# access-list 1 permit 192.168.1.0 0.0.0.255 DSL
R2(config)# ip nat pool public_access 209.165.200.242 Client(config)# interface g0/1
209.165.200.254 netmask 255.255.255.224 Client(config-if)# pppoe enable
R2(config)# access-list 1 permit 192.168.1.0 0.0.0.255 Client(config-if)# pppoe-client dial-pool-number 1
R2(config)# ip nat inside source list 1 pool public_access Client(config-if)# exit
R2(config)# interface g0/1 Client(config)# interface dialer 1
R2(config-if)# ip nat outside Client(config-if)# mtu 1492
Client(config-if)# ip address negotiated
PAT Client(config-if)# encapsulationn ppp
(Nat dynamique + overload) Client(config-if)# dialer pool 1
Gateway(config)# ip nat inside source list 1 interface s2/ Client(config-if)# ppp authentication chap callin
overload Client(config-if)# ppp chap hostname Client
Redirection Client(config-if)# ppp chap password ciscopppoe
R3(config)# ip nat inside source static tcp 192.168.1.0 Client(config-if)# exit
80 209.165.200.255 8080 Client(config)# ip route 0.0.0.0 0.0.0.0 dialer 1
Tunnel VPN GRE
13) PPP et FrameRelay WEST(config)# interface tunnel 0
R2(config-if)# encapsulation hdlc WEST(config)# tunnel mode gre ip
WEST(config-if)# ip address 172.16.12.1 255.255.255.252
WEST(config-if)# tunnel source s0/0/0 (209.165.201.1)
PPP chap WEST(config-if)# tunnel destination 10.2.2.1
R1(config-)# username R2 password 123
R1(config-if)# encapsulation ppp
R1(config-if)# compres predictor
14) Surveillance
R1(config-if)# ppp quality 50 NTP
R1(config-if)# ppp authentication chap R1# clock set 9:39:00 05 july 2013 // conf man
PPP PAP R1(config)# ntp master 5 // pour un serveur
R2(config)# ntp server 10.1.1.1 // pour un client
R2(config-)# username R1 password 123 R2(config)# ntp update-calendar
R2(config-if)# encapsulation ppp
R2(config-if)# ppp authentication pap Configure NTP authentication on R1, R2, and R3 using key 1
R2(config-if)# ppp pap sent-username R2 password 123 and password NTPpa55.
PPP Multilink R1(config)# ntp authenticate
R3(config)# interface multilink 1 R1(config)# ntp trusted-key 1
R3(config-if)# ppp multilink R1(config)# ntp authentication-key 1 md5 NTPpa55
R3(config-if)# ppp multilink group 1 Syslog
R3(config)# interface s0/0/0 R2(config)# service timestamps log datetime msec
R3(config-if)# ppp multilink R2(config)# logging host 172.16.2.3
R3(config-if)# ppp multilink group 1 R2(config)# logging trap 7
Syslog local dans le routeur :
R2(config)# Loggine buffered 4096 /taill memoire loger
commutateur Frame Relay kbyte
FR(config)# frame-relay switching R2#show logging
FR(config-if)# ipv6 ospf network broadcast//ou bien ip Syslog UDP port 514
FR(config)# interface s0/0/0 Agent SNMP
FR(config-if)# encapsulation frame-relay Port 161 162
FR(config-if)# frame-relay intf-type dce (pour interface DTE) R1(config)# snmp-server community ciscolab ro SNMP_ACL
FR(config-if)# frame-relay route 103 interface s0/0/1 301 R1(config)# snmp-server location snmp_manager
FR(config-if)# no shutdown R1(config)# snmp-server contact ciscolab_admin
Routeur Frame Relay
R1(config)# snmp-server host 192.168.1.3 version 2c 1- Configuration de l’authentification MD5 sur le routeur
ciscolab
1
R1(config)# snmp-server enable traps
R1(config)# ip access-list standard SNMP_ACL
R1(config-std-nacl)# permit 192.168.1.3 Sans cryptage

interface Serial0
NetFlow
R2(config)# ip flow-export destination 192.168.2.3 9996 ip ospf authentication-key c1$c0
R2(config)# ip flow-export version (1,5,7,8,9)
R2(config)# interface s0/0/0 router ospf 10
R2(config-if)# ip flow ingress
R2(config-if)# ip flow egress area 0 authentication

2-Avec md5 comme hash :


Bien que le résultat de la commande show ip
cache flow Routeur1(config)#interface fastethernet 1/0

show ip flow interface Routeur1(config-if)#ip ospf message-digest-key 1 md5 aqw

Routeur1(config)#router ospf 1
Pour contrôler la configuration des paramètres
d'exportation, utilisez la commande show ip flow Routeur1(config-router)#area 0 authentication message-
export, digest

Authentification Eigrp
Voix ip
Protocole h323 SIP IAX SCCP R1(config)#key chain EIGRP-SECRET
dhcp
R1(config-keychain)# key 1
ip dhcp pool voip
network 10.0.0.0 255.0.0.0 R1(config-keychain-key)# key-string 1234
default-router 10.0.0.1
option 150 ip 10.0.0.1 R1(config)#interface Ethernet 0/0

R1(config-if)# ip authentication mode eigrp 13 md5


call manager R1(config-if)# ip authentication key-chain eigrp 13 EIGRP-
telephony-service SECRET
max-ephones 4
max-dn 3 1- Désactiver le service de réinitialisation des mots de passe
ip source-address 10.0.0.1 port 2000
auto assign 1 to 4 HDans certains cas, il peut être nécessaire de désactiver le
service qui permet de réinitialiser les mots de
passe sur un routeur. Il est important de noter ici que cette
ephone-dn 1 désactivation peut avoir des conséquences
number 100
! graves, par exemple, l'obligation de revenir à la configuration
ephone-dn 2 par défaut de base (usine) du routeur.
number 101 R1(config)# no service passwords-recovery

Routeur_du_site_1(config)#dial-peer voice 1 voip 2- Configurer la longueur minimale d’un mot de passe


Routeur_du_site_1(config-dial-peer)#destination-pattern 2… R1(config)# security passwords min-length 10
#Destination commence par le n.o.2# Le routeur n'acceptera pas les mots de passe de moins de 10
Routeur_du_site_1(config-dial-peer)#session target
caractères.
ipv4:3.0.0.2 #Passerelle Routeur_du_site_2#
3- Limiter le nombre de tentatives de connexions échouées

R1(config)# security authentication failure rate 4 log


Au bout de 4 tentatives de connexion sans succès en moins
Authentification ospf d'une minute, les informations seront

Vous aimerez peut-être aussi