Fin de la semaine 3
This commit is contained in:
79
Semaine_02/Jour_01.md
Normal file
79
Semaine_02/Jour_01.md
Normal file
@@ -0,0 +1,79 @@
|
||||
# CEPH : Architecture générale
|
||||
|
||||
## Programme
|
||||
|
||||
- CEPH
|
||||
- VLAN
|
||||
- Trunking
|
||||
- Routage Inter-VLAN
|
||||
|
||||
## Objectifs
|
||||
|
||||
Nécessité du CEPH, son architecture, le rôle de CRUSH, des Pools, des PG. Distinguer les 3 services de stockage possibles. Connaître les bonnes pratiques.
|
||||
|
||||
### Pourquoi CEPH
|
||||
|
||||
Il peut continuer le stockage en cas de panne de disque/noeud/switch. Plus évolué que le RAID, il trouvera d'autres stockages en :
|
||||
- scalant en ajoutant des machines
|
||||
- ne se concentrant pas sur un SPOF
|
||||
- utilisant du stockage bloc, fichier, ou l'objet
|
||||
- équilibrant le stockage avec ce qu'il a à disposition
|
||||
|
||||
CEPH repose sur une couche logicielle nommée RADOS, composée de 3 daemons :
|
||||
- MON (ceph-mon) : Moniteur, gère la carte du cluster (qui est en vie, où sont les données, quelles règles de placement)
|
||||
- OSD (ceph-osd) : Stocke les données
|
||||
- MGR (ceph-mgr) : Manager, surveille, fournit de la métrique, met de l'orchestration supplémentaire
|
||||
|
||||
Il existe des démons supplémentaires :
|
||||
- MDS (ceph-mds) : Uniquement si on stocke en mode système de fichiers, avec CephFS
|
||||
- RGW (radosgw) : Passerelle (Gateway) pour stockage S3
|
||||
- RBD (radosblocks) : Stockage en mode blocs
|
||||
|
||||
### Où se trouvent les données
|
||||
|
||||
Ceph utilise l'algorithme CRUSH. Il décide où mettre les données en fonction d'une carte décrivant une topologie.
|
||||
- Le placement est déterministe : tout le monde obtient le même résultat chacun de son côté.
|
||||
- Pas de BDD.
|
||||
|
||||
### Nomenclature
|
||||
|
||||
- POOL : zone virtuelle
|
||||
- PG : *Placement Group*, Groupes de placement
|
||||
- OSD : Disque de stockage
|
||||
|
||||
Un Pool est découpé en PGs avec chacun ses OSDs (vous m'suivez ?)
|
||||
|
||||
## Mise en place
|
||||
|
||||
Commande centrale :
|
||||
`cephadm`
|
||||
|
||||
Générer le premier noaud :
|
||||
`cephadm bootstrap --mon-node Noeud1`
|
||||
|
||||
Cela installe :
|
||||
- 1 MON
|
||||
- 1 MGR
|
||||
- 1 shell CEPH
|
||||
|
||||
Vérifier la santé :
|
||||
`ceph status`
|
||||
|
||||
Vérifier la topologie :
|
||||
`ceph osd tree`
|
||||
|
||||
Vérifier l'espace :
|
||||
`ceph df`
|
||||
|
||||
Activer la Web UI (pour un cluster déjà mis en service) :
|
||||
`ceph mgr module enable dashboard`
|
||||
|
||||
## Exercice 1
|
||||
|
||||
1. Quel protocole utilisent les MON et MGR pour communiquer entre eux ?
|
||||
2. Quelle(s) sont le(s) bonne(s) pratique(s) auxquelles cet exercice ne se plie pas ?
|
||||
3. À quoi sert le SSH dans une infrastructure Ceph ?
|
||||
4. La WebUI semble t-elle protéger les communications via un chiffrement SSL/TLS ?
|
||||
5. Quelle est la différence entre le Backfill et le Recovery ?
|
||||
|
||||
## Exercice 2
|
||||
Binary file not shown.
274
Semaine_02/Jour_02.md
Normal file
274
Semaine_02/Jour_02.md
Normal file
@@ -0,0 +1,274 @@
|
||||
#
|
||||
|
||||
## Exercice 1
|
||||
|
||||
```
|
||||
SW1#
|
||||
SW1#configure terminal
|
||||
SW1(config)#vlan 10
|
||||
SW1(config-vlan)#name VLAN0010
|
||||
SW1(config-vlan)#interface Fa0/1
|
||||
SW1(config-if)#switchport mode access
|
||||
SW1(config-if)#switchport access vlan 10
|
||||
SW1(config-if)#no shutdown
|
||||
SW1(config-if)#end
|
||||
SW1#write memory
|
||||
```
|
||||
|
||||
```
|
||||
SW1#
|
||||
SW1#configure terminal
|
||||
SW1(config)#interface Fa0/3
|
||||
SW1(config-if)#switchport mode trunk
|
||||
SW1(config-if)#switchport trunk native vlan 10
|
||||
SW1(config-if)#switchport nonegotiate
|
||||
SW1(config-if)#end
|
||||
SW1#write memory
|
||||
```
|
||||
|
||||
```
|
||||
SW1#
|
||||
SW1#configure terminal
|
||||
SW1(config)#interface Fa0/3
|
||||
SW1(config-if)#switchport mode trunk
|
||||
SW1(config-if)#switchport trunk native vlan 1
|
||||
SW1(config-if)#switchport trunk allowed vlan 1,10,20
|
||||
SW1(config-if)#end
|
||||
SW1#write memory
|
||||
```
|
||||
|
||||
## Cours
|
||||
|
||||
### Port-Channelling
|
||||
|
||||
Agrégation de liens entre plusieurs switchs : augmenter la bande passante à l'infini.
|
||||
|
||||
- Câble virtuel : nommé LAG (*Link Agregation Group*)
|
||||
Une fois créé, le LAG doit être administré comme une interface physique.
|
||||
|
||||
#### Les standards
|
||||
|
||||
- Le Port-Channel : standard ouvert de l'IEEE
|
||||
- Etherchannel : protocole propriétaire de Cisco
|
||||
|
||||
De 2 à 8 interfaces physiques max par LAG. Uniquement de même type et de débit. Avec un seul destinataire.
|
||||
Maximum 6 LAGs par Switch. (donc 6 LAGs x 8 ports, ça fait un switch de 48 ports).
|
||||
|
||||
Implémentations :
|
||||
- Statiques : l'existence du LAG est décidée par l'admin
|
||||
- Dynamiques : les appareils négocient entre eux l'établissement d'un LAG si besoin, via un protocole.
|
||||
|
||||
Les protocoles d'auto-établissement de LAG :
|
||||
- PAgP : Propriétaire Cisco
|
||||
- LACP : Standard IEEE 803.2ad
|
||||
|
||||
Il suffit pour activer de dire `desirable` en console :
|
||||
- Desirable : *J'initie la négociation du LAG*
|
||||
- Auto : *J'attends qu'on vienne négocier*
|
||||
|
||||
## Exercice 3
|
||||
|
||||
### Liaison entre SW1 et SW2
|
||||
|
||||
```
|
||||
Switch1>enable
|
||||
Switch1#configure terminal
|
||||
Switch1(config)#interface range Fa0/1 - 3
|
||||
Switch1(config-if-range)#channel-group 1 mode active
|
||||
Switch1(config-if-range)#exit
|
||||
Switch1(config)#interface port-channel 1
|
||||
Switch1(config-if)#description LACP-SW1-SW2
|
||||
Switch1(config-if)#switchport mode trunk
|
||||
Switch1(config-if)#exit
|
||||
```
|
||||
|
||||
```
|
||||
Switch2>enable
|
||||
Switch2#configure terminal
|
||||
Switch2(config)#interface range Fa0/4 - 6
|
||||
Switch2(config-if-range)#channel-group 1 mode active
|
||||
Switch2(config-if-range)#exit
|
||||
Switch2(config)#interface port-channel 1
|
||||
Switch2(config-if)#description LACP-SW1-SW2
|
||||
Switch2(config-if)#switchport mode trunk
|
||||
Switch2(config-if)#exit
|
||||
```
|
||||
|
||||
### Liaison entre SW2 et SW3
|
||||
|
||||
```
|
||||
Switch2>enable
|
||||
Switch2#configure terminal
|
||||
Switch2(config)#interface range Fa0/1 - 3
|
||||
Switch2(config-if-range)#channel-group 2 mode active
|
||||
Switch2(config-if-range)#exit
|
||||
Switch2(config)#interface port-channel 2
|
||||
Switch2(config-if)#description LACP-SW2-SW3
|
||||
Switch2(config-if)#switchport mode trunk
|
||||
Switch2(config-if)#exit
|
||||
```
|
||||
|
||||
```
|
||||
Switch3>enable
|
||||
Switch3#configure terminal
|
||||
Switch3(config)#interface range Fa0/4 - 6
|
||||
Switch3(config-if-range)#channel-group 2 mode active
|
||||
Switch3(config-if-range)#exit
|
||||
Switch3(config)#interface port-channel 2
|
||||
Switch3(config-if)#description LACP-SW2-SW3
|
||||
Switch3(config-if)#switchport mode trunk
|
||||
Switch3(config-if)#exit
|
||||
```
|
||||
|
||||
### Liaison entre SW3 et SW1
|
||||
|
||||
```
|
||||
Switch3>enable
|
||||
Switch3#configure terminal
|
||||
Switch3(config)#interface range Fa0/1 - 3
|
||||
Switch3(config-if-range)#channel-group 3 mode active
|
||||
Switch3(config-if-range)#exit
|
||||
Switch3(config)#interface port-channel 3
|
||||
Switch3(config-if)#description LACP-SW3-SW1
|
||||
Switch3(config-if)#switchport mode trunk
|
||||
Switch3(config-if)#exit
|
||||
```
|
||||
|
||||
```
|
||||
Switch1>enable
|
||||
Switch1#configure terminal
|
||||
Switch1(config)#interface range Fa0/4 - 6
|
||||
Switch1(config-if-range)#channel-group 3 mode active
|
||||
Switch1(config-if-range)#exit
|
||||
Switch1(config)#interface port-channel 3
|
||||
Switch1(config-if)#description LACP-SW3-SW1
|
||||
Switch1(config-if)#switchport mode trunk
|
||||
Switch1(config-if)#exit
|
||||
```
|
||||
|
||||
## Exercice 4
|
||||
|
||||
**TP : Mise en œuvre du protocole HSRP dans un réseau redondant**
|
||||
|
||||
*Objectif*
|
||||
Mettre en place une **redondance de passerelle** à l’aide du protocole **HSRP (Hot Standby Router Protocol)**, afin d’assurer la **continuité de service** en cas de défaillance d’un routeur.
|
||||
|
||||
---
|
||||
|
||||
**Réseau partagé** : 192.168.1.0/24
|
||||
**Passerelle virtuelle HSRP** : 192.168.1.1
|
||||
|
||||
### 1 & 2
|
||||
|
||||
```
|
||||
Router1>enable
|
||||
Router1#configure terminal
|
||||
Router1(config)#interface Gig0/0/0
|
||||
Router1(config-if)#ip address 192.168.1.200 255.255.255.0
|
||||
Router1(config-if)#standby 1 ip 192.168.1.1
|
||||
Router1(config-if)#standby 1 priority 150
|
||||
Router1(config-if)#standby 1 preempt
|
||||
Router1(config-if)#no shutdown
|
||||
```
|
||||
|
||||
```
|
||||
Router2>enable
|
||||
Router2#configure terminal
|
||||
Router2(config)#interface Gig0/0/0
|
||||
Router2(config-if)#ip address 192.168.1.201 255.255.255.0
|
||||
Router2(config-if)#standby 1 ip 192.168.1.1
|
||||
Router2(config-if)#standby 1 priority 100
|
||||
Router2(config-if)#standby 1 preempt
|
||||
Router2(config-if)#no shutdown
|
||||
```
|
||||
|
||||
### 3
|
||||
|
||||
```
|
||||
Router1#show standby brief
|
||||
P indicates configured to preempt.
|
||||
|
|
||||
Interface Grp Pri P State Active Standby Virtual IP
|
||||
Gig0/0/0 1 150 P Active local 192.168.1.201 192.168.1.1
|
||||
```
|
||||
|
||||
```
|
||||
Router2#show standby brief
|
||||
P indicates configured to preempt.
|
||||
|
|
||||
Interface Grp Pri P State Active Standby Virtual IP
|
||||
Gig0/0/0 1 100 P Standby 192.168.1.200 local 192.168.1.1
|
||||
```
|
||||
|
||||
### 4
|
||||
|
||||
### 5
|
||||
|
||||
1. HSRP est fermé par Cisco, VRRP est ouvert.
|
||||
2.
|
||||
3. L'adresse IP la plus haute remporterait le rôle Actif.
|
||||
4. HSRP est une passerelle virtuelle avec du matériel en série pour éviter les SPOF. L'agrégation de liens est autre chose
|
||||
|
||||
## Exercice 5
|
||||
|
||||
### Liaison entre SW1 et SW2
|
||||
|
||||
```
|
||||
SW1>enable
|
||||
SW1#configure terminal
|
||||
SW1(config)#interface range Fa0/3 - 4
|
||||
SW1(config-if-range)#channel-group 1 mode active
|
||||
SW1(config-if-range)#exit
|
||||
SW1(config)#interface port-channel 1
|
||||
SW1(config-if)#description LACP-SW1-SW2
|
||||
SW1(config-if)#switchport mode trunk
|
||||
SW1(config-if)#exit
|
||||
```
|
||||
|
||||
```
|
||||
SW2>enable
|
||||
SW2#configure terminal
|
||||
SW2(config)#interface range Fa0/3 - 4
|
||||
SW2(config-if-range)#channel-group 1 mode active
|
||||
SW2(config-if-range)#exit
|
||||
SW2(config)#interface port-channel 1
|
||||
SW2(config-if)#description LACP-SW1-SW2
|
||||
SW2(config-if)#switchport mode trunk
|
||||
SW2(config-if)#exit
|
||||
```
|
||||
|
||||
### HSRP entre MLSW1 et MLSW2
|
||||
|
||||
```
|
||||
MLSW1>enable
|
||||
MLSW1#configure terminal
|
||||
MLSW1(config)#interface vlan 10
|
||||
MLSW1(config-if)#ip address 89.76.0.200 255.255.255.0
|
||||
MLSW1(config-if)#standby 1 ip 89.76.0.1
|
||||
MLSW1(config-if)#standby 1 priority 150
|
||||
MLSW1(config-if)#standby 1 preempt
|
||||
MLSW1(config-if)#no shutdown
|
||||
```
|
||||
|
||||
```
|
||||
MLSW2>enable
|
||||
MLSW2#configure terminal
|
||||
MLSW2(config)#interface vlan 10
|
||||
MLSW2(config-if)#ip address 89.76.0.201 255.255.255.0
|
||||
MLSW2(config-if)#standby 1 ip 89.76.0.1
|
||||
MLSW2(config-if)#standby 1 priority 100
|
||||
MLSW2(config-if)#standby 1 preempt
|
||||
MLSW2(config-if)#no shutdown
|
||||
```
|
||||
|
||||
```
|
||||
Router0>enable
|
||||
Router0#configure terminal
|
||||
Router0(config)#ip routing
|
||||
Router0(config)#interface Gig0/0/0
|
||||
Router0(config-if)#ip address 89.76.0.254 255.255.255.0
|
||||
Router0(config-if)#exit
|
||||
Router0(config)#interface Gig0/0/1
|
||||
Router0(config-if)#ip address 89.76.0.254 255.255.255.0
|
||||
Router0(config-if)#exit
|
||||
```
|
||||
Binary file not shown.
BIN
Semaine_02/Jour_02/Exercice_2.pkt
Normal file
BIN
Semaine_02/Jour_02/Exercice_2.pkt
Normal file
Binary file not shown.
BIN
Semaine_02/Jour_02/Exercice_4.pkt
Normal file
BIN
Semaine_02/Jour_02/Exercice_4.pkt
Normal file
Binary file not shown.
BIN
Semaine_02/Jour_02/Exercice_5_debut.pkt
Normal file
BIN
Semaine_02/Jour_02/Exercice_5_debut.pkt
Normal file
Binary file not shown.
Binary file not shown.
52
Semaine_02/Jour_02/TP_HSRP_LAN.md
Normal file
52
Semaine_02/Jour_02/TP_HSRP_LAN.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# TP : Mise en œuvre du protocole HSRP dans un réseau redondant
|
||||
|
||||
## 🎯 Objectif
|
||||
Mettre en place une **redondance de passerelle** à l’aide du protocole **HSRP (Hot Standby Router Protocol)**, afin d’assurer la **continuité de service** en cas de défaillance d’un routeur.
|
||||
|
||||
---
|
||||
|
||||
🧱 **Réseau partagé** : 192.168.1.0/24
|
||||
🎯 **Passerelle virtuelle HSRP** : 192.168.1.1
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ Étapes du TP
|
||||
|
||||
### 1️⃣ Configuration IP de base
|
||||
Configurer les adresses IP sur les deux routeurs et le PC selon le schéma ci-dessus.
|
||||
Vérifier la connectivité entre les équipements avec la commande `ping`.
|
||||
|
||||
---
|
||||
|
||||
### 2️⃣ Configuration HSRP
|
||||
Configurer HSRP sur les deux routeurs afin de partager une adresse IP virtuelle (192.168.1.1).
|
||||
Le **Router1** doit être prioritaire.
|
||||
|
||||
---
|
||||
|
||||
### 3️⃣ Vérification
|
||||
Utiliser les commandes de vérification pour observer :
|
||||
- Le routeur **actif**
|
||||
- Le routeur **standby**
|
||||
- L’adresse IP virtuelle et l’adresse MAC virtuelle associée
|
||||
|
||||
---
|
||||
|
||||
### 4️⃣ Test de bascule
|
||||
1. Vérifier le rôle initial de chaque routeur.
|
||||
2. Désactiver l’interface G0/0 de Router1 pour simuler une panne.
|
||||
3. Vérifier le basculement automatique du rôle actif vers Router2.
|
||||
4. Réactiver Router1 et observer le retour automatique à l’état initial.
|
||||
|
||||
---
|
||||
|
||||
### 5️⃣ Questions de réflexion
|
||||
|
||||
1. Quelle est la différence entre HSRP et VRRP ?
|
||||
2. Pourquoi configure-t-on la commande `preempt` ?
|
||||
3. Que se passerait-il si les deux routeurs avaient la même priorité ?
|
||||
4. Quelle est la différence entre HSRP et une agrégation de liens (EtherChannel) ?
|
||||
|
||||
---
|
||||
|
||||
**Fin du TP.**
|
||||
BIN
Semaine_02/Jour_03/Exercice_5_suite.pkt
Normal file
BIN
Semaine_02/Jour_03/Exercice_5_suite.pkt
Normal file
Binary file not shown.
207
Semaine_02/Jour_04.md
Normal file
207
Semaine_02/Jour_04.md
Normal file
@@ -0,0 +1,207 @@
|
||||
# Sécurité en réseau
|
||||
|
||||
## Cours
|
||||
|
||||
### Travail dirigé
|
||||
|
||||
- Sécuriser le port console
|
||||
- Sécuriser le passage au niveau 2 (*enable*)
|
||||
- Sécuriser les ports réseau (*port-security*)
|
||||
- Metter en place le SSH (*sur VLAN dédié*)
|
||||
|
||||
- BDPU Guard (*protéger le port d'un branchement à un autre switch*)
|
||||
- ACLs (*standard et étendue*)
|
||||
- Théorie des pare-feux
|
||||
|
||||
## Exercices
|
||||
|
||||
### Exercice 1
|
||||
|
||||
### Exercice 2
|
||||
|
||||
#### Partie 1
|
||||
|
||||
**Routeur**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface Gig0/1
|
||||
ip address 192.168.0.1 255.255.255.0
|
||||
no shutdown
|
||||
ip default-gateway 192.168.0.1
|
||||
interface Gig0/1
|
||||
ip address 192.168.1.1 255.255.255.0
|
||||
no shutdown
|
||||
ip default-gateway 192.168.1.1
|
||||
no ip domain-lookup
|
||||
enable secret class
|
||||
line console 0
|
||||
password cisco
|
||||
login
|
||||
line vty 0 4
|
||||
password cisco
|
||||
login
|
||||
transport input all
|
||||
service password-encryption
|
||||
banner motd # You shan't access this very device without permission #
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
**Switch**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
vlan 10
|
||||
name VLAN10
|
||||
exit
|
||||
interface FastEthernet0/5
|
||||
switchport mode access
|
||||
switchport access vlan 99
|
||||
spanning-tree portfast
|
||||
interface FastEthernet0/6
|
||||
switchport mode access
|
||||
switchport access vlan 99
|
||||
spanning-tree portfast
|
||||
interface vlan 10
|
||||
ip address 192.168.1.2 255.255.255.0
|
||||
no shutdown
|
||||
ip default-gateway 192.168.1.1
|
||||
no ip domain-lookup
|
||||
enable secret class
|
||||
line console 0
|
||||
password cisco
|
||||
login
|
||||
line vty 0 4
|
||||
password cisco
|
||||
login
|
||||
transport input all
|
||||
service password-encryption
|
||||
banner motd # You shan't access this very device without permission #
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
### Exercice 3
|
||||
|
||||
#### Liste des commandes utiles
|
||||
|
||||
| Commandes | Descriptions |
|
||||
|---------------------------------------------------------|------------------------------------------------------------------|
|
||||
| conf t | Activate configuration from terminal |
|
||||
| interface *interface* | Go in interface to configure it properly |
|
||||
| ip access-group *ACL_name* **{in\|out}** | Activate and apply ACL to interface |
|
||||
| **ip access-list extended** *ACL_name* | Define ACL and go into conf mode |
|
||||
| **{permit\|deny}** {test conditions} | Defined apply policy for said ACL |
|
||||
| **show access-lists** *ACL_name* | Display all ACLs content |
|
||||
| **show ip interface** *interface-type interface number* | Display IP infos from specific interface, including applied ACLs |
|
||||
|
||||
####
|
||||
|
||||
```
|
||||
router> enable
|
||||
router# configure terminal
|
||||
router(config)# access-list 10 deny 10.1.1.101 0.0.0.0
|
||||
router(config)# access-list 10 permit any
|
||||
router(config)# line vty 0 4
|
||||
router(config-line)# access-class 10 in
|
||||
router(config-line)# exit
|
||||
router(config)# interface GigabitEthernet0/0
|
||||
router(config-if)# ip access-group 10 in
|
||||
router(config)# exit
|
||||
router# write memory
|
||||
```
|
||||
|
||||
### Exercice 4
|
||||
|
||||
#### Tâche 1
|
||||
|
||||
```
|
||||
ping 172.16.1.100
|
||||
traceroute 172.16.1.100
|
||||
```
|
||||
|
||||
```
|
||||
show interfaces Gig0/1
|
||||
conf t
|
||||
ip route 0.0.0.0 0.0.0.0 209.165.201.2
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
#### Tâche 2
|
||||
|
||||
```
|
||||
telnet 172.16.1.100 23
|
||||
telnet 172.16.1.100 80
|
||||
```
|
||||
|
||||
### Exercice 5
|
||||
|
||||
**R1**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface Gig0/0
|
||||
ip address 192.168.0.5 255.255.255.252
|
||||
no shutdown
|
||||
interface Gig0/1
|
||||
ip address 192.168.0.2 255.255.255.252
|
||||
no shutdown
|
||||
router ospf 21
|
||||
network 192.168.0.0 0.0.0.3 area 0
|
||||
router ospf 13
|
||||
network 192.168.0.4 0.0.0.3 area 0
|
||||
no ip domain-lookup
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
**R2**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface Gig0/0
|
||||
ip address 192.168.0.10 255.255.255.252
|
||||
no shutdown
|
||||
interface Gig0/1
|
||||
ip address 192.168.0.6 255.255.255.252
|
||||
no shutdown
|
||||
interface Gig0/2
|
||||
ip address 192.168.100.254 255.255.255.0
|
||||
no shutdown
|
||||
router ospf 32
|
||||
network 192.168.0.8 0.0.0.3 area 0
|
||||
router ospf 21
|
||||
network 192.168.0.0 0.0.0.3 area 0
|
||||
no ip domain-lookup
|
||||
ip routing
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
**R3**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface Gig0/0
|
||||
ip address 192.168.0.1 255.255.255.252
|
||||
no shutdown
|
||||
interface Gig0/1
|
||||
ip address 192.168.0.9 255.255.255.252
|
||||
no shutdown
|
||||
interface Gig0/2
|
||||
ip address 192.168.200.254 255.255.255.0
|
||||
no shutdown
|
||||
router ospf 13
|
||||
network 192.168.0.4 0.0.0.3 area 0
|
||||
router ospf 32
|
||||
network 192.168.0.8 0.0.0.3 area 0
|
||||
no ip domain-lookup
|
||||
ip routing
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
|
||||
### Exercice 6
|
||||
Binary file not shown.
Binary file not shown.
BIN
Semaine_02/Jour_04/Jour_04.pkt
Normal file
BIN
Semaine_02/Jour_04/Jour_04.pkt
Normal file
Binary file not shown.
BIN
Semaine_02/Jour_04/Jour_04_exercice_2.pkt
Normal file
BIN
Semaine_02/Jour_04/Jour_04_exercice_2.pkt
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Semaine_02/Jour_04/TP5 - 2 Établir une ACL standard.pdf
Normal file
BIN
Semaine_02/Jour_04/TP5 - 2 Établir une ACL standard.pdf
Normal file
Binary file not shown.
BIN
Semaine_02/Jour_04/TP5 - 2 Établir une ACL standard.pkt
Normal file
BIN
Semaine_02/Jour_04/TP5 - 2 Établir une ACL standard.pkt
Normal file
Binary file not shown.
BIN
Semaine_02/Jour_04/TP6 - 3 Établir une ACL étendue.pdf
Normal file
BIN
Semaine_02/Jour_04/TP6 - 3 Établir une ACL étendue.pdf
Normal file
Binary file not shown.
BIN
Semaine_02/Jour_04/drive-download-20251120T130418Z-1-001.zip
Normal file
BIN
Semaine_02/Jour_04/drive-download-20251120T130418Z-1-001.zip
Normal file
Binary file not shown.
BIN
Semaine_02/Jour_05_evaluation.pdf
Normal file
BIN
Semaine_02/Jour_05_evaluation.pdf
Normal file
Binary file not shown.
609
Semaine_02/Jour_05_examen.md
Normal file
609
Semaine_02/Jour_05_examen.md
Normal file
@@ -0,0 +1,609 @@
|
||||
Emmanuel-Joyce NTSIA, Gauvain BOICHÉ, Joris STAVROULAKIS, Léo JARRY,
|
||||
|
||||
**Nous jurons sur l'honneur que les commandes entre `` sont tapées à la main à partir de nos notes de cours. (Elles sont réfléchies par nous en notre âme et conscience, on boycott openAI)**
|
||||
|
||||
*Pour rigoler on a passé une instruction "Génère moi une capture d'écran de Cisco Packet Tracer en pleine configuration d'un VLAN par la CLI" et voilà le résultat :*
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/54/546a8aa9001c2159072a7baec8264e1a2021d0150b46e9f3" data-crypto-key="cryptpad:SE/opt2PYh11RFDrv+FIqztrWEM8Tbs38Ym2vLUS/0c="></media-tag>
|
||||
|
||||
**Pour ne pas rigoler, ça devrait être illégal de nous mettre du 176 quand on est habitué au 172 en adresse**
|
||||
|
||||
# Mise en place de la Topologie physique:
|
||||
|
||||
Le client a présenté une topologie précise avec des modèles précis, nous avons décidé de garder la topologie d'origine pour des questions de négociations facilitées.
|
||||
|
||||
- Commutateurs 2960-24TT
|
||||
- Routeur ISR4331
|
||||
- Câbles droits pour liaisons routeurs & PC <-> commutateurs
|
||||
- Câbles croisés pour liaisons inter-commutateurs
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/f7/f78a72e3028ac51e664d595fc353f4f55ddd750a13a2ec12" data-crypto-key="cryptpad:cK6ON14fjHlmFIpvwrE4lflB2C0J66a8h0P8XgEm94A="></media-tag>
|
||||
|
||||
## Mise en place des adresses IP pour les pc
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/75/7531c9b9ffcad96cc9698387b13ff1f00d0d515bde067fbe" data-crypto-key="cryptpad:rAHhYAVWjTh1wLOLV7hRBJSv2uPOVEwGSZlNCnVpE2c="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/e1/e167b987d500078f41d11dff37d706b87c83612d2e958640" data-crypto-key="cryptpad:BetJlmk4OBDHo6UKp7/MHjt3tw99MFo749gOOwRJyIU="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/2c/2c25e98d1f3fffd017c272cf71007eb3c86f6b794fad4faf" data-crypto-key="cryptpad:fQDX194rYklfps2SuGWY14GjlB2MGoQO0xkoLmc1mYQ="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/d5/d505baf4fab37899b026d171930b5720a7ce1ed3f13ce0dd" data-crypto-key="cryptpad:AUYlTQAfIQpLCTdjRIxH0JCBBkUb90YUDOwiPUatu24="></media-tag>
|
||||
|
||||
## Mise en place des VLAN
|
||||
|
||||
**À noter qu'à partir de maintenant, des write memory sont fait après chaque étape pour s'assurer que la configuration soit bien sauvegardée**
|
||||
|
||||
### Création des VLANS dans les switch
|
||||
|
||||
**À faire sur tous les Switchs**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
vlan 10
|
||||
name OSD
|
||||
exit
|
||||
vlan 20
|
||||
name MON-MGR
|
||||
exit
|
||||
vlan 30
|
||||
name Supervision
|
||||
exit
|
||||
vlan 40
|
||||
name Tests
|
||||
exit
|
||||
interface vlan 1
|
||||
no shutdown
|
||||
exit
|
||||
interface vlan 10
|
||||
no shutdown
|
||||
exit
|
||||
interface vlan 20
|
||||
no shutdown
|
||||
exit
|
||||
interface vlan 30
|
||||
no shutdown
|
||||
exit
|
||||
interface vlan 40
|
||||
no shutdown
|
||||
end
|
||||
write memory
|
||||
```
|
||||
<media-tag src="https://files.cryptpad.fr/blob/88/8894ff9fe3ee3c5d596f6b3d90115e31d75026fdc3edc85f" data-crypto-key="cryptpad:LcR3E2Cba1LW3U2/hybbdCFO1gpBFGD+mMu8kfCXvsw="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/6f/6f263259f02dfff0a5a5d47f4fcd7a3f37e583c1b4e4420b" data-crypto-key="cryptpad:Uqj9/FdG1R6mDppsvM6krb+gwiXu57KVirU9lBH2WRQ="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/e6/e6ba75ea5f3203723da30ffa7d449c34a51efae5d8bff21c" data-crypto-key="cryptpad:Ke+JwlWqjOk5hlwUKTIWXALWjuDre5OGi2uTLSd3MBM="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/d1/d1d9973764a3dd22af9c23af7c8357851f1af75bc6b23a55" data-crypto-key="cryptpad:aPx4p+sK7AleLZVdHL0TfgJ61nwTE+d37GcKwraWS30="></media-tag>
|
||||
|
||||
### Mise en place des ports access Switch - PC
|
||||
|
||||
|
||||
**À faire sur tous les Switchs sauf S5 en adaptant le port et la vlan**
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/cb/cbb784c08055c1e65fa452a12a845285dd6f8873beb6b372" data-crypto-key="cryptpad:HUFx2xYyrtDhpblKPxBE1TlM00Mjegg4Jrv+45c8L24="></media-tag>
|
||||
|
||||
|
||||
### Mise en place du port trunk entre S5 et R1 (le routeur)
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/6f/6f4e5d053334f8f74dfec7ea9f2c3ec8d1dbcf3faa8bdf1e" data-crypto-key="cryptpad:FQo7teQskt8L2x2LTcWdnLjpcNArdymgQ44CGhKZ5Q4="></media-tag>
|
||||
|
||||
(Petit oubli) On rajoute le nonegotiate :
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/41/417fe4f0a146622e5f782c9ed0ed2282550eb56a4b83c559" data-crypto-key="cryptpad:azRX27aolDPvYJSSELsl01CgAzLIA5nyX4rNJMS82wA="></media-tag>
|
||||
|
||||
## Mise en place des LAGs
|
||||
|
||||
**Switch 1**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range Fa0/2 - 4
|
||||
channel-group 1 mode active
|
||||
exit
|
||||
interface range Fa0/5 - 7
|
||||
channel-group 2 mode active
|
||||
exit
|
||||
interface port-channel 1
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10,20,30,40
|
||||
no shutdown
|
||||
exit
|
||||
interface port-channel 2
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10,20,30,40
|
||||
no shutdown
|
||||
exit
|
||||
show interfaces Port-channel [1,2] ! Pour contrôler
|
||||
show interfaces trunk ! Pour contrôler
|
||||
show etherchannel summary ! Pour contrôler
|
||||
end
|
||||
write memory
|
||||
```
|
||||
### Création du LAG en LACP actif
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/81/81fb3e3b3a439b4bbba857d0a30ae130b278c412992fbaeb" data-crypto-key="cryptpad:o+CVdqOL3L0sV9KH/XeY2SfvrUNtxgWbc4Cx5XSwNTo="></media-tag>
|
||||
|
||||
**Il faut faire pareil sur S4 (le switch de l'autre côté des ports concernés) du coup aussi pour que ça fonctionne**
|
||||
|
||||
### Configuration du trunk sur les LAGs
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/e8/e84f77050b2aab28cbd4688052976acaa3f9368178018315" data-crypto-key="cryptpad:d5Vhb8Hi1yXvjcvb0RDdLJKHU9UmgUCsyeAeNdGj12M="></media-tag>
|
||||
|
||||
(Petit oubli) On rajoute le nonegotiate :
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/68/6803b7c93fa4174b7cb1cc9a91ac48b4e310b1c57243b4e2" data-crypto-key="cryptpad:/QHmma0a0HXXtpgsUCRBS7d+NFZgZAGSW8SwW0moXr0="></media-tag>
|
||||
|
||||
**Ensuite il faut recommencer ces deux étapes (création du LAG et mise en place du trunk), sur tous les switchs en adaptant bien sûr les ports et en faisant bien attention de respecter les numéros de channel-group**
|
||||
|
||||
### Vérification du LAG et du trunk dessus
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/a9/a9b0ae6851b909314e12df72105c652d76a27705699b4225" data-crypto-key="cryptpad:ET7sByM10fWyoxFk9wMfpVnDoQ06ziOJjP6kOMvshG4="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/ad/ad485ff672e41bf34ad62b220e3f10b5306130a6efa55152" data-crypto-key="cryptpad:ipjEjM4dhGrcPVI9NzaT08IOrVvkazgkpM5/KsPOR2k="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/34/343a182e5e800bfa3fc53089ff7aa9303e1129dab85f0c72" data-crypto-key="cryptpad:6m1j7C0M3A89PwQ7cUY9SoOe5mrvUYkMJ0bFewG+cuE="></media-tag>
|
||||
|
||||
**Switch 2**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range Fa0/2 - 4
|
||||
channel-group 3 mode active
|
||||
exit
|
||||
interface range Fa0/5 - 7
|
||||
channel-group 2 mode active
|
||||
exit
|
||||
interface range Fa0/8 - 10
|
||||
channel-group 1 mode active
|
||||
exit
|
||||
interface port-channel 1
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10,20,30,40
|
||||
no shutdown
|
||||
exit
|
||||
interface port-channel 2
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10,20,30,40
|
||||
no shutdown
|
||||
exit
|
||||
interface port-channel 3
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10,20,30,40
|
||||
no shutdown
|
||||
exit
|
||||
show interfaces Port-channel [1,2,3]
|
||||
show interfaces trunk
|
||||
show etherchannel summary
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
**Switch 3**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range Fa0/5 - 7
|
||||
channel-group 2 mode active
|
||||
exit
|
||||
interface range Fa0/8 - 10
|
||||
channel-group 1 mode active
|
||||
exit
|
||||
interface range Fa0/11 - 13
|
||||
channel-group 4 mode active
|
||||
exit
|
||||
interface port-channel 1
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10,20,30,40
|
||||
no shutdown
|
||||
exit
|
||||
interface port-channel 2
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10,20,30,40
|
||||
no shutdown
|
||||
exit
|
||||
interface port-channel 3
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10,20,30,40
|
||||
no shutdown
|
||||
exit
|
||||
show interfaces Port-channel [1,2,3]
|
||||
show interfaces trunk
|
||||
show etherchannel summary
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
|
||||
**Switch 4**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range Fa0/2 - 4
|
||||
channel-group 1 mode active
|
||||
exit
|
||||
interface range Fa0/5 - 7
|
||||
channel-group 2 mode active
|
||||
exit
|
||||
interface port-channel 1
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10,20,30,40
|
||||
no shutdown
|
||||
exit
|
||||
interface port-channel 2
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10,20,30,40
|
||||
no shutdown
|
||||
exit
|
||||
show interfaces Port-channel [1,2,3]
|
||||
show interfaces trunk
|
||||
show etherchannel summary
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
|
||||
**Switch 5**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range Fa0/2 - 4
|
||||
channel-group 3 mode active
|
||||
exit
|
||||
interface range Fa0/11 - 13
|
||||
channel-group 4 mode active
|
||||
exit
|
||||
interface port-channel 1
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10,20,30,40
|
||||
no shutdown
|
||||
exit
|
||||
interface port-channel 2
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10,20,30,40
|
||||
no shutdown
|
||||
exit
|
||||
show interfaces Port-channel [1,2,3]
|
||||
show interfaces trunk
|
||||
show etherchannel summary
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
## Mise en place du routage inter-vlan
|
||||
|
||||
**Routeur**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface Gig0/0/0
|
||||
no shutdown
|
||||
exit
|
||||
interface Gig0/0/0.1
|
||||
encapsulation dot1Q 1 native
|
||||
ip address 176.16.1.254 255.255.255.0
|
||||
no shutdown
|
||||
exit
|
||||
interface Gig0/0/0.10
|
||||
encapsulation dot1Q 10
|
||||
ip address 176.16.10.254 255.255.255.0
|
||||
no shutdown
|
||||
exit
|
||||
interface Gig0/0/0.20
|
||||
encapsulation dot1Q 20
|
||||
ip address 176.16.20.254 255.255.255.0
|
||||
no shutdown
|
||||
exit
|
||||
interface Gig0/0/0.30
|
||||
encapsulation dot1Q 30
|
||||
ip address 176.16.30.254 255.255.255.0
|
||||
no shutdown
|
||||
exit
|
||||
interface Gig0/0/0.40
|
||||
encapsulation dot1Q 40
|
||||
ip address 176.16.40.254 255.255.255.0
|
||||
no shutdown
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
### Interface physique
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/5a/5a56ebdd262aef1b824aa1f532992ad4ede02ff02782d095" data-crypto-key="cryptpad:+0CpOO5cDw/nD8JoR8h8yB3DK0Jqoq1NQ1/jSWsa48w="></media-tag>
|
||||
|
||||
### Interfaces virtuelles
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/2e/2ed9dd7897dfef103aa5155365dfb4a25f68390a89f82afc" data-crypto-key="cryptpad:B8ZapZI+2wsuGkC6Hb2lv4SdolP37dVIuObOI1d45dk="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/f6/f67b5e8972e8b1b11d0a084cdd6205b063292b689dfba9b6" data-crypto-key="cryptpad:fEakil02wX68FSgqtANnNP8BGGl8UCEhuNkzHnKAqMk="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/c3/c30a3872e9cae5ff921a4e421a4b0a11e27b70ccd3616f9b" data-crypto-key="cryptpad:Qf4olHJBX0N1803FkidN3ybBnCijMd5tDHQRqsdeIyc="></media-tag>
|
||||
|
||||
Depuis PC_OSD (vlan 10) :
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/f8/f8a6fc0c6e154b5278a57c42df58f0cfb79038c9ec5400be" data-crypto-key="cryptpad:E6XBGelcO8z3F852KVa0YLmeYejQS4j3s5XVM5czwOo="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/aa/aa081b9b255deb0cfabc6dd3502fb22ad39c23f74bd16e69" data-crypto-key="cryptpad:wcBCg8DG9YCkcZ7OGkSqRWEky3hpDAN6LBu/1UQnmjM="></media-tag>
|
||||
|
||||
**Puis on fait ça pour toutes les autres VLAN**
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/d0/d0a7c14956fc49c021310f8d5e376ea25d4f23c6c33cb8a7" data-crypto-key="cryptpad:0ZsNXijRJTj2oTUcL7nQMxlSVeolDTxzL4+6DRljSdo="></media-tag>
|
||||
|
||||
|
||||
## Sécurisation et accès à distance sur chaque appareil
|
||||
|
||||
### BPDU Guard
|
||||
|
||||
Sur les ports des switchs qui sont connectés aux pc/routeur on active le BPDU guard
|
||||
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface Fa0/1
|
||||
spanning-tree bpduguard enable
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/de/de4ce762dbe97acecd2f35d72f7a5bbc9db533bc10126508" data-crypto-key="cryptpad:2bWPavKJoydJarCrup+BQCOoZ3caCFnsR0usDVf1QU8="></media-tag>
|
||||
|
||||
### Sécurisation du port console
|
||||
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
line console 0
|
||||
password root
|
||||
login
|
||||
exit
|
||||
service password-encryption
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/af/afcbc673150c0d18c2a9361230ae530f81380d3792748969" data-crypto-key="cryptpad:4u4DjkTPkeVx4kUA6V05WVjECdeIXdeWHeRVIL96AD4="></media-tag>
|
||||
|
||||
Parce que c'est un exercice on va mettre le même mot de passe partout pour se simplifier la vie, bien sûr en vrai on mettrait des mots de passes forts et différents
|
||||
|
||||
Le service password-encryption servira à empêcher que le mot de passe soit accessible en clair dans la configuration
|
||||
|
||||
**On fait la même chose sur tous les switch et routeur**
|
||||
|
||||
### Activation à distance (ssh)
|
||||
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
ip domain-name fuckssh.com
|
||||
username ssh secret root
|
||||
crypto key generate rsa general-keys modulus 2048
|
||||
line vty 0 15
|
||||
transport input ssh
|
||||
login local
|
||||
exit
|
||||
ip ssh version 2
|
||||
interface vlan 1
|
||||
ip address 176.16.1.1 255.255.255.0
|
||||
exit
|
||||
ip default-gateway 176.16.1.254
|
||||
end
|
||||
write memory
|
||||
```
|
||||
*Le code est adapté pour chaque Switch, donc l'adresse IP sera 176.16.1.[1-5]*
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/e4/e4516c5b4e9d29e5c4eb646975508b04daac845db822c6e8" data-crypto-key="cryptpad:Wqn1O46/ucU/r9fia/XjFGzaCR3rzkIgBt6QUqceGgc="></media-tag>
|
||||
|
||||
**On oublie bien sûr pas d'ajouter une ip au switch dans le vlan 1 pour pouvoir s'y connecter ainsi que l'ip default-gateway**
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/41/416d332606f7a8857995f8037326ab857bffa5870fb7d502" data-crypto-key="cryptpad:loN+qfyLhMjcx4IwoJOlNAB6IHma22mmSzFO6AyRvXs="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/65/656b037fabf64be0b4925ec26bed04c41c4d027dc2233e0b" data-crypto-key="cryptpad:VRLakDpWCSPcpZaO8Ahc+C0YXYCAPYJyezTwSRH5BSs="></media-tag>
|
||||
|
||||
**On fait la même chose sur tous les switch et routeur**
|
||||
|
||||
### Sécurisation du mode enable
|
||||
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
enable secret root
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/b1/b173291a2c5ad33f30b31ce7f278026490136416a640d883" data-crypto-key="cryptpad:WiOgi91Teu6fQkllF6/leGxRuczUvHGAb+nVV1SOuZU="></media-tag>
|
||||
|
||||
<br/>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/05/05a498fafcb76da3fb3d828e58d1dfa04627f08198877cb3" data-crypto-key="cryptpad:RtiXPcHtE1MQY7HjX/0esiHl4p3AD59e0KxByzHe2h4="></media-tag>
|
||||
|
||||
### Vérification accès à distance
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/d4/d4c17ecee3644837f8517197d9f68b92c6224eb6098447e0" data-crypto-key="cryptpad:aAZO8A4u++FP6txk9i1Hd22MtU2jTT6g1txDXcVPkiQ="></media-tag>
|
||||
|
||||
### MOTD + Sécurisation des interfaces inactives
|
||||
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
banner motd # Personnel autorise seulement #
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
**On fait la même chose sur tous les switch et routeur**
|
||||
|
||||
Puis on fait la sécurisation des interfaces inactives en les éteignant et en les mettant sur un vlan 44 créé exprès pour ça
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/e5/e55c4ac8b9b677643da4364ce42aa0b0171d0acb447f8277" data-crypto-key="cryptpad:frkBBUIeRECZOr20nA24micUz2GqLZrWQuOLDfiygGM="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/9d/9d16630905283efe0d88bf62c29f420c9e0c2341316afeff" data-crypto-key="cryptpad:Hkd7WDLqcDkk5cKW2oTdC2AOeJnDQ/Lr+OGh8PjTtWo="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/d0/d08063a58ed877328789e741f6178d8bbebced047aaaadd7" data-crypto-key="cryptpad:x4lZdy9RmK3iMm1GNN+xynMB6xr0L+2Y5qUKbXVZxBE="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/e3/e3b0fc80e8dce3c0bccd883b9012851641f5db7f8f096920" data-crypto-key="cryptpad:SPuLms2t/YNIB7JHpLda0QFlfvB4I4OO2DL0RqywI+k="></media-tag>
|
||||
|
||||
**Switch 1**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range Gig0/1 - 2
|
||||
switchport mode access
|
||||
switchport access vlan 44
|
||||
shutdown
|
||||
exit
|
||||
interface range Fa0/8 - 24
|
||||
switchport mode access
|
||||
switchport access vlan 44
|
||||
shutdown
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
**Switch 2**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range Gig0/1 - 2
|
||||
switchport mode access
|
||||
switchport access vlan 44
|
||||
shutdown
|
||||
exit
|
||||
interface range Fa0/11 - 24
|
||||
switchport mode access
|
||||
switchport access vlan 44
|
||||
shutdown
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
**Switch 3**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range Gig0/1 - 2
|
||||
switchport mode access
|
||||
switchport access vlan 44
|
||||
shutdown
|
||||
exit
|
||||
interface range Fa0/2 - 4
|
||||
switchport mode access
|
||||
switchport access vlan 44
|
||||
shutdown
|
||||
exit
|
||||
interface range Fa0/14 - 24
|
||||
switchport mode access
|
||||
switchport access vlan 44
|
||||
shutdown
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
**Switch 4**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range Gig0/1 - 2
|
||||
switchport mode access
|
||||
switchport access vlan 44
|
||||
shutdown
|
||||
exit
|
||||
interface range Fa0/8 - 24
|
||||
switchport mode access
|
||||
switchport access vlan 44
|
||||
shutdown
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
**Switch 5**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range Gig0/1 - 2
|
||||
switchport mode access
|
||||
switchport access vlan 44
|
||||
shutdown
|
||||
exit
|
||||
interface range Fa0/5 - 10
|
||||
switchport mode access
|
||||
switchport access vlan 44
|
||||
shutdown
|
||||
exit
|
||||
interface range Fa0/14 - 24
|
||||
switchport mode access
|
||||
switchport access vlan 44
|
||||
shutdown
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
**Router**
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range Gig0/0/1 - 2
|
||||
shutdown
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
## Mise en place des ACLs
|
||||
|
||||
Pour les ACLs on a décidé deux faire deux listes, une spécifiquement à l'entrée de la gateway du vlan 10 sur le routeur qui bloque uniquement les ports utilisés par les OSD avec les protocoles CEPH
|
||||
|
||||
Et une deuxième à l'entrée de la gateway du vlan 20 sur le routeur pour bloquer les ports utilisés par le monitor / manager de la même façon
|
||||
|
||||
On bloque donc les paquets qui viennent de ces deux vlan sur les ports utilisés par CEPH et qui sont en destination du réseau Tests (vlan 40)
|
||||
|
||||
Tout le reste du traffic est permis entre tous les vlans définis (icmp / ip, etc...)
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/20/20873674c55dab869fec0335d89010ae778864abc2a200ef" data-crypto-key="cryptpad:94ovIdglwHGQdU2B5869FcUHBKJndQi2F7zAUPwll6o="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/e8/e816dec28d2acdfb0a4e5f95cf0b1606fdecd36c852b65b7" data-crypto-key="cryptpad:coqWs73UmRyv58pKl61d0EISuiBP5O4RP9/XI18TFWA="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/93/93d92019644a11a4adb44f0a7c3a1ec32309d7e946999ed5" data-crypto-key="cryptpad:6q3YGerOUSknC5cTG1mfEdh26yLagA6n+HH2/iMZ1ik="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/e2/e2b4da356ab75c565ad72e8cfc5537de129be51743cd008f" data-crypto-key="cryptpad:yhhFgwZqTHny2kjQATW4ajxtH8bwzFhJA3vaGbtB2R4="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/74/7456997263b569403b96c9624909567ff3216edf1c63514f" data-crypto-key="cryptpad:3ltGaqtgUXSzoNbYbzb/NlRBiH6w/CS9yZ6/gO0cXBk="></media-tag>
|
||||
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
ip access-list extended CEPH_EXCLUDE_TESTS_VLAN10
|
||||
deny tcp 176.16.10.0 0.0.0.255 176.16.40.0 0.0.0.255 range 6800 7300
|
||||
permit icmp any any
|
||||
permit ip any any
|
||||
exit
|
||||
ip access-list extended CEPH_EXCLUDE_TESTS_VLAN20
|
||||
deny tcp 176.16.20.0 0.0.0.255 176.16.40.0 0.0.0.255 range 6800 7300
|
||||
deny tcp 176.16.20.0 0.0.0.255 176.16.40.0 0.0.0.255 eq 3300
|
||||
deny tcp 176.16.20.0 0.0.0.255 176.16.40.0 0.0.0.255 eq 6789
|
||||
permit icmp any any
|
||||
permit ip any any
|
||||
exit
|
||||
interface Gig0/0/0.10
|
||||
ip access-group CEPH_EXCLUDE_TESTS_VLAN10 in
|
||||
exit
|
||||
interface Gig0/0/0.20
|
||||
ip access-group CEPH_EXCLUDE_TESTS_VLAN20 in
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
# FIN
|
||||
|
||||
Ps : moins de 20/20 on débarque chez toi Cédric (dans minecraft)
|
||||
BIN
Semaine_02/Supports_de_cours/01. Introduction à Ceph/CEPH.pdf
Normal file
BIN
Semaine_02/Supports_de_cours/01. Introduction à Ceph/CEPH.pdf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,117 @@
|
||||
# Mettre en place des VLANs et du trunk
|
||||
|
||||
### Step 2
|
||||
|
||||
- Accédez à Switch 2 en CLI
|
||||
|
||||
### Step 3
|
||||
|
||||
- Configurez le VLAN 1 et affectez lui l'interface 10.1.1.12/24
|
||||
|
||||
```
|
||||
SW1(config)#interface vlan 1
|
||||
SW1(config-if)#ip address 10.1.1.12 255.255.255.0
|
||||
SW1(config-if)#exit
|
||||
```
|
||||
- Créons les VLANs supplémentaire, à faire sur Switch 1 ET Switch 2 !!
|
||||
|
||||
```
|
||||
SW1(config)# vlan 10
|
||||
SW1(config-vlan)#exit
|
||||
SW1(config)# vlan 20
|
||||
SW1(config-vlan)#exit
|
||||
```
|
||||
Attribuez l'interface fa 0/1 de CHAQUE SWITCH à son VLAN :
|
||||
|
||||
SW1#conf t
|
||||
SW1(config-vlan)#int fa0/1
|
||||
SW1(config-if)#switchport mode access
|
||||
SW1(config-if)#switchport access vlan 10
|
||||
|
||||
SW2#conf t
|
||||
SW2(config-vlan)#int fa0/1
|
||||
SW2(config-if)#switchport mode access
|
||||
SW2(config-if)#switchport access vlan 20
|
||||
|
||||
- Configurez l'interface FA 0/3 comme trunk sur **CHAQUE SWITCH**
|
||||
|
||||
|
||||
```
|
||||
SW1(config) interface fastethernet 0/3
|
||||
SW1(config-if)# switchport mode trunk
|
||||
SW1(config-if)#switchport nonegotiate
|
||||
SW1(config-if)# switchport trunk allowed vlan 1,10,20
|
||||
SW1(config-if)# no shutdown
|
||||
|
||||
```
|
||||
- Configurez l'interface FA0/13 comme trunk sur Switch 1 uniquement, puisqu'il
|
||||
fait face au routeur :
|
||||
|
||||
|
||||
```
|
||||
SW1(config-if)#int fa0/13
|
||||
SW1(config-if)#switchport mode trunk
|
||||
SW(config-if)#switchport nonegotiate
|
||||
SW1(config-if)#switchport trunk allowed vlan 1,10,20
|
||||
|
||||
```
|
||||
### Step 7
|
||||
|
||||
- Faites un ping vers l'autre VLAN depuis PC1. Le ping doit échouer, pourquoi ?
|
||||
|
||||
*Parce qu'il n'y a pas de routage entre les VLANs, il faudrait configurer le
|
||||
routeur*
|
||||
|
||||
## TASK 2 : Configurez un Trunk sur le routeur
|
||||
|
||||
### Step 1
|
||||
|
||||
- Accédez au Routeur en CLI
|
||||
|
||||
### Step 2
|
||||
|
||||
- Allez dans l'interface gi 0/0
|
||||
|
||||
|
||||
```
|
||||
R(config)#enable
|
||||
R(config)#conf t
|
||||
R(config)#int gi0/0
|
||||
|
||||
```
|
||||
### Step 3
|
||||
|
||||
- Éteignez l'interface
|
||||
|
||||
|
||||
R(config)#shutdown
|
||||
|
||||
### Step 4
|
||||
|
||||
- Supprimez toutes les adresses IP existantes sur cette interface
|
||||
|
||||
|
||||
R(config-if)#no ip address
|
||||
|
||||
- Créez 3 sous-interfaces sur Gigabit 0/0, chacun avec les IP spécifiées dans
|
||||
l'énoncé, en déclarant ces interfaces comme devant décoder les paquets tagués
|
||||
à la norme 802.1q
|
||||
|
||||
|
||||
R(config)#interface gi 0/0.1
|
||||
R(config)#encapsulation dot1q 1 native
|
||||
R(config)#ip address 10.1.1.1 255.255.255.0
|
||||
R(config)#no shutdown
|
||||
R(config)#interface gi 0/0.10
|
||||
R(config)#encapsulation dot1q 10
|
||||
R(config)#ip address 10.1.10.1 255.255.255.0
|
||||
R(config)#no shutdown
|
||||
R(config)#interface gi 0/0.20
|
||||
R(config)#encapsulation dot1q 20
|
||||
R(config)#ip address 10.1.20.1 255.255.255.0
|
||||
R(config)#no shutdown
|
||||
R(config)#interface giga 0/0
|
||||
R(config)#no shutdown
|
||||
|
||||
**TOUT devrait être fonctionnel à ce stade.**
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,61 @@
|
||||
# Troubleshooting VLAN
|
||||
|
||||
## TASK 1 : Dépannez la connectivité des VLANs
|
||||
|
||||
### Step 5
|
||||
|
||||
- L'interface se trouve dans le VLAN 10, or, elle est inactive, ce qui veut dire qu'on a oublié de créer le VLAN 10 !
|
||||
|
||||
Sur le switch ou ce vlan est absent, simplement taper "vlan 10" en mode conf terminal
|
||||
|
||||
### Step 7
|
||||
|
||||
- Entrez ces commandes sur le Switch 2 :
|
||||
|
||||
SW2(config)#interface FastEthernet0/3
|
||||
SW2(config-if)#switchport mode trunk
|
||||
SW2(config-if)#switchport nonegociate
|
||||
|
||||
### Step 9
|
||||
|
||||
- Entrez ces commandes sur le Switch 1 :
|
||||
|
||||
SW1(config)#interface FastEthernet0/3
|
||||
SW1(config-if)#switchport mode trunk
|
||||
SW1(config-if)#switchport nonegociate
|
||||
|
||||
### Step 13
|
||||
|
||||
- Entrez ces commandes sur le Switch 1 pour rétablir le bon vlan natif :
|
||||
|
||||
SW1(config)#interface FastEthernet0/3
|
||||
SW1(config-if)#switchport trunk native vlan 1
|
||||
|
||||
### Step 14
|
||||
|
||||
- Entrez ces commandes sur le Switch 2 :
|
||||
|
||||
SW2(config)#interface FastEthernet0/3
|
||||
SW2(config-if)#switchport trunk native vlan 1
|
||||
|
||||
### Step 16
|
||||
|
||||
- Entrez ces commandes sur le Switch 1 :
|
||||
|
||||
SW1(config)#copy running-config startup-config
|
||||
|
||||
- Entrez ces commandes sur le Switch 2 :
|
||||
|
||||
SW2(config)#copy running-config startup-config
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,52 @@
|
||||
# TP : Mise en œuvre du protocole HSRP dans un réseau redondant
|
||||
|
||||
## 🎯 Objectif
|
||||
Mettre en place une **redondance de passerelle** à l’aide du protocole **HSRP (Hot Standby Router Protocol)**, afin d’assurer la **continuité de service** en cas de défaillance d’un routeur.
|
||||
|
||||
---
|
||||
|
||||
🧱 **Réseau partagé** : 192.168.1.0/24
|
||||
🎯 **Passerelle virtuelle HSRP** : 192.168.1.1
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ Étapes du TP
|
||||
|
||||
### 1️⃣ Configuration IP de base
|
||||
Configurer les adresses IP sur les deux routeurs et le PC selon le schéma ci-dessus.
|
||||
Vérifier la connectivité entre les équipements avec la commande `ping`.
|
||||
|
||||
---
|
||||
|
||||
### 2️⃣ Configuration HSRP
|
||||
Configurer HSRP sur les deux routeurs afin de partager une adresse IP virtuelle (192.168.1.1).
|
||||
Le **Router1** doit être prioritaire.
|
||||
|
||||
---
|
||||
|
||||
### 3️⃣ Vérification
|
||||
Utiliser les commandes de vérification pour observer :
|
||||
- Le routeur **actif**
|
||||
- Le routeur **standby**
|
||||
- L’adresse IP virtuelle et l’adresse MAC virtuelle associée
|
||||
|
||||
---
|
||||
|
||||
### 4️⃣ Test de bascule
|
||||
1. Vérifier le rôle initial de chaque routeur.
|
||||
2. Désactiver l’interface G0/0 de Router1 pour simuler une panne.
|
||||
3. Vérifier le basculement automatique du rôle actif vers Router2.
|
||||
4. Réactiver Router1 et observer le retour automatique à l’état initial.
|
||||
|
||||
---
|
||||
|
||||
### 5️⃣ Questions de réflexion
|
||||
|
||||
1. Quelle est la différence entre HSRP et VRRP ?
|
||||
2. Pourquoi configure-t-on la commande `preempt` ?
|
||||
3. Que se passerait-il si les deux routeurs avaient la même priorité ?
|
||||
4. Quelle est la différence entre HSRP et une agrégation de liens (EtherChannel) ?
|
||||
|
||||
---
|
||||
|
||||
**Fin du TP.**
|
||||
@@ -0,0 +1,172 @@
|
||||
# Correction du TP : Mise en œuvre du protocole HSRP dans un réseau redondant
|
||||
|
||||
## 🎯 Objectif
|
||||
Mettre en œuvre une **redondance de passerelle IP** avec **HSRP**, afin d'assurer une continuité de service réseau en cas de panne d'un routeur.
|
||||
|
||||
---
|
||||
|
||||
## 🧩 Topologie mise en place
|
||||
|
||||
```
|
||||
+-------------------+
|
||||
| Router1 |
|
||||
| G0/0 : 192.168.1.2|
|
||||
+-------------------+
|
||||
|
|
||||
|
|
||||
+-------------+
|
||||
| SW1 |
|
||||
+-------------+
|
||||
|
|
||||
+-------------------+
|
||||
| Router2 |
|
||||
| G0/0 : 192.168.1.3|
|
||||
+-------------------+
|
||||
|
|
||||
+------+
|
||||
| PC1 |
|
||||
|192.168.1.10|
|
||||
+------+
|
||||
```
|
||||
|
||||
🧱 **Réseau partagé** : 192.168.1.0/24
|
||||
🎯 **Passerelle virtuelle HSRP** : 192.168.1.1
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ Étapes de configuration
|
||||
|
||||
### 1️⃣ Configuration IP de base
|
||||
|
||||
#### Router1
|
||||
```bash
|
||||
enable
|
||||
conf t
|
||||
interface g0/0
|
||||
ip address 192.168.1.2 255.255.255.0
|
||||
no shutdown
|
||||
exit
|
||||
```
|
||||
|
||||
#### Router2
|
||||
```bash
|
||||
enable
|
||||
conf t
|
||||
interface g0/0
|
||||
ip address 192.168.1.3 255.255.255.0
|
||||
no shutdown
|
||||
exit
|
||||
```
|
||||
|
||||
#### PC1
|
||||
```
|
||||
Adresse IP : 192.168.1.10
|
||||
Masque : 255.255.255.0
|
||||
Passerelle : 192.168.1.1
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2️⃣ Configuration HSRP
|
||||
|
||||
#### Sur Router1 (routeur prioritaire)
|
||||
```bash
|
||||
interface g0/0
|
||||
standby 1 ip 192.168.1.1
|
||||
standby 1 priority 110
|
||||
standby 1 preempt
|
||||
no shutdown
|
||||
```
|
||||
|
||||
#### Sur Router2
|
||||
```bash
|
||||
interface g0/0
|
||||
standby 1 ip 192.168.1.1
|
||||
standby 1 priority 90
|
||||
standby 1 preempt
|
||||
no shutdown
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3️⃣ Vérification
|
||||
|
||||
Commande :
|
||||
```bash
|
||||
show standby
|
||||
```
|
||||
|
||||
**Router1 (actif) :**
|
||||
```
|
||||
GigabitEthernet0/0 - Group 1
|
||||
State is Active
|
||||
Virtual IP address is 192.168.1.1
|
||||
Active router is local
|
||||
Standby router is 192.168.1.3
|
||||
Priority 110 (configured 110)
|
||||
```
|
||||
|
||||
**Router2 (standby) :**
|
||||
```
|
||||
GigabitEthernet0/0 - Group 1
|
||||
State is Standby
|
||||
Virtual IP address is 192.168.1.1
|
||||
Active router is 192.168.1.2
|
||||
Priority 90 (configured 90)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 4️⃣ Test de bascule (failover)
|
||||
|
||||
1. Depuis le PC, tester la connectivité :
|
||||
```bash
|
||||
PC1> ping 192.168.1.1
|
||||
```
|
||||
|
||||
2. Simuler la panne du routeur actif :
|
||||
```bash
|
||||
Router1(config)# interface g0/0
|
||||
Router1(config-if)# shutdown
|
||||
```
|
||||
|
||||
3. Vérifier que Router2 devient actif :
|
||||
```bash
|
||||
Router2# show standby
|
||||
```
|
||||
|
||||
4. Rétablir Router1 :
|
||||
```bash
|
||||
Router1(config-if)# no shutdown
|
||||
```
|
||||
|
||||
Grâce à la commande `preempt`, Router1 reprend automatiquement le rôle d'actif.
|
||||
|
||||
---
|
||||
|
||||
## 🧭 Réponses aux questions de réflexion
|
||||
|
||||
1. **Différence HSRP / VRRP :**
|
||||
HSRP est propriétaire Cisco, VRRP est standard (RFC 3768). Les deux assurent une redondance de passerelle.
|
||||
|
||||
2. **Commande `preempt` :**
|
||||
Permet à un routeur prioritaire de redevenir actif après un retour en service.
|
||||
|
||||
3. **Même priorité sur les deux routeurs :**
|
||||
En cas d’égalité, le routeur ayant l’adresse IP la plus élevée devient actif.
|
||||
|
||||
4. **HSRP vs EtherChannel :**
|
||||
HSRP redonde des routeurs (couche 3), EtherChannel agrège des liens physiques (couche 2).
|
||||
|
||||
---
|
||||
|
||||
## ✅ Bilan
|
||||
|
||||
- HSRP assure une **redondance de passerelle** sans intervention du poste client.
|
||||
- Une **IP et MAC virtuelles** sont partagées entre deux routeurs.
|
||||
- La **bascule** est transparente pour le réseau local.
|
||||
- **Packet Tracer** supporte parfaitement HSRP (contrairement à VRRP).
|
||||
|
||||
---
|
||||
|
||||
**Fin de la correction.**
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,78 @@
|
||||
# CORRECTION TP 3 - Filtrage par ACLs
|
||||
|
||||
## Task 1
|
||||
|
||||
### Step 2 :
|
||||
|
||||
Avant toute chose, le 1er réflexe est de vérifier la présence d'ACL sur l'appareil, `show ip access list`.
|
||||
|
||||
Sur le routeur branch, on remarque justement une ACL déjà présente avec cette commande, de type standard, qui permet tout le traffic depuis le réseau 10.1.1.0. Rajouter une règle interdisant l'hôte 10.1.1.101 sera inefficace puisque la règle précédente laissera tout passer !
|
||||
|
||||
Il faut donc l'annuler :
|
||||
|
||||
enable
|
||||
conf t
|
||||
no ip access-list standard 1
|
||||
|
||||
Puis créez l'ACL demandée :
|
||||
|
||||
#### Créer l'ACL :
|
||||
|
||||
enable
|
||||
conf t
|
||||
ip access-list extended Telnet
|
||||
deny tcp host 10.1.1.101 host 172.16.1.100 eq telnet
|
||||
permit ip any any
|
||||
exit
|
||||
|
||||
**Notez l'importance ici du "permit ip any any" en fin d'ACL en tant que dernière règle, il stipule que tout ce qui ne concorde pas avec la 1ère règle peut passer, autrement la politique par défaut sur Cisco, implicite, est de refuser tout ce qui ne matche pas avec les règles précédentes !!! Il est en effet plus logique et rapide de dire ce qu'on autorise, et interdire tout le reste que l'inverse, d'ou le choix par Cisco du "deny ip any any" implicite.**
|
||||
|
||||
#### Attribuer cet ACL à une interface :
|
||||
|
||||
enable
|
||||
conf t
|
||||
interface gi0/0
|
||||
ip access-group Telnet in
|
||||
exit
|
||||
|
||||
## Task 2
|
||||
|
||||
### Step 7
|
||||
|
||||
enable
|
||||
conf t
|
||||
interface gi0/0
|
||||
no ip access-group Telnet out
|
||||
ip access-group Telnet in
|
||||
exit
|
||||
|
||||
### Step 9
|
||||
|
||||
enable
|
||||
conf t
|
||||
no ip access-list extended Telnet
|
||||
ip access-list extended Telnet
|
||||
deny tcp host 10.1.1.101 host 172.16.1.100 eq telnet
|
||||
permit ip any any
|
||||
exit
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,25 @@
|
||||
# CORRECTION TP 4 - Troubleshoot de connectivité IP ayant pour cause les ACL
|
||||
|
||||
|
||||
## Task 1 – Réparer la route par défaut :
|
||||
|
||||
sur le routeur Branch :
|
||||
|
||||
Branch(config) #ip route 0.0.0.0 0.0.0.0 209.165.201.2
|
||||
|
||||
Ici, toute IP d'un réseau de n'importe quelle taille sera joignable par le biais de l'adresse `209.165.201.2`
|
||||
|
||||
## Task 2 – Réparer une ACL :
|
||||
|
||||
entrer ces commandes (ou équivalent) sur le routeur branch :
|
||||
|
||||
Branch(config) #ip access-list extended Outbound-ACL
|
||||
Branch(config-ext-nacl)#permit tcp any any eq Telnet
|
||||
Branch(config-ext-nacl)#permit tcp any any eq www
|
||||
|
||||
Si vous souhaitez réessayer la commande traceroute, il faut aussi penser à autoriser le trafic UDP
|
||||
|
||||
## Task 3 – Réparer la passerelle par défaut et la résolution de noms :
|
||||
|
||||
Il suffit d’aller dans la configuration de PC1 pour lui passer la bonne passerelle par défaut.
|
||||
Packet Tracer n’émulant pas un système d’exploitation Windows complet, il n’y a pas de fichier Host à rectifier. Il faut simplement rectifier la passerelle par défaut le PC, et refaire un ping test, mais avec l'adresse IP du serveur cette fois, pas le choix !
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user