1. CAHIER DE CHARGE DU PROJET MPLS
I- Topologie :
II- Besoins des Clients:
Les sociétés BH, Monoprix et OneTech décident d’interconnecter leurs sites à travers la technologie
MPLS VPN
La société BH veut avoir une architecture ‘’Hub and spoke’’, les agences communiquent avec le site
central mais n’ont pas une connexion entre eux.
Les sites de la société OneTech de même que les sites Monoprix appartiennent au même VPN.
Tous les sites des différentes sociétés veulent se connecter à internet.
III- Travail Réalisé:
1) Configuration d’un BackBone MPLS:
Nous allons tout d’abord adresser les interfaces (physique et logicielle) des routeurs de notre Backbone.
Pour le routeur PE1
PE1(config)#int fa0/0
PE1(config-if)# ip address 192.168.102.1 255.255.255.0
PE1(config)#int fa0/1
2. PE1(config-if)# ip address 192.168.92.1 255.255.255.0
PE1(config)#int fa1/0
PE1(config-if)# ip address 192.168.12.1 255.255.255.0
PE1(config)#int fa2/0
PE1(config-if)# ip address 192.168.23.1 255.255.255.0
PE1 (config)#int loopback 0
PE1(config)# ip address 2.2.2.2 255.255.255.0
PE1(config)#ip ospf network point-to-point //MAJ OSPF envoyé point par point
Pour le routeur PE2
PE2(config)#int fa0/0
PE2(config-if)# ip address 192.168.34.2 255.255.255.0
PE2(config)#int fa0/1
PE2(config-if)# ip address 192.168.84.1 255.255.255.0
PE2(config)#int fa1/0
PE2(config-if)# ip address 192.168.74.1 255.255.255.0
PE2(config)#int fa2/0
PE2(config-if)# ip address 192.168.64.1 255.255.255.0
PE2(config)#int fa3/0
PE2(config-if)# ip address 192.168.114.1 255.255.255.0
PE2(config)#int fa4/0
PE2(config-if)# ip address 192.168.54.1 255.255.255.0
PE2 (config)#int loopback 0
PE2(config)# ip address 4.4.4.4 255.255.255.0
PE2(config)#ip ospf network point-to-point //MAJ OSPF envoyé point par point
Pour le routeur P
P(config)#int fa0/0
P(config-if)# ip address 192.168.23.2 255.255.255.0
P(config)#int fa0/1
P(config-if)# ip address 192.168.34.1 255.255.255.0
P (config)#int loopback 0
P(config)# ip address 3.3.3.3 255.255.255.0
P(config)#ip ospf network point-to-point //MAJ OSPF envoyé point par point
3. //Activation le protocole de routage OSPF (IGP) au niveau des routeurs du Backbone
Pour le routeur PE1
PE1(config)#router ospf 1
PE1(config-router)#network 192.168.23.0 0.0.0.255 area 0
PE1(config-router)#network 2.2.2.0 0.0.0.255 AREA 0
Pour le routeur PE2
PE2(config)#router ospf 1
PE2(config-router)#network 192.168.34.0 0.0.0.255 area 0
PE2(config-router)#network 4.4.4.0 0.0.0.255 AREA 0
Pour le routeur P
P(config)#router ospf 1
P(config-router)#network 192.168.23.0 0.0.0.255 area 0
P(config-router)#network 192.168.34.0 0.0.0.255 area 0
P(config-router)#network 3.3.3.0 0.0.0.255 AREA 0
//Activation de MPLS sur les routeurs Provider Edge
Pour le routeur PE1
PE1(config)#ip cef //on l’acitve seulement au niveau des routeurs cisco
PE1(config)#mpls label protocol ldp //activation du MPLS avec le label et son protocol
PE1(config)#mpls ldp router-id loopback 0 //activation du protocol sur l’interface logicielle
PE1(config)#int fa2/0 //activation du mpls dans l’interface physique
PE1(config-if)#mpls ip
Pour le routeur PE2
PE2(config)#ip cef //on l’active seulement au niveau des routeurs cisco
PE2(config)#mpls label protocol ldp //activation du MPLS avec le label et son protocol
PE2(config)#mpls ldp router-id loopback 0 //activation du protocol sur l’interface logicielle
PE2(config)#int fa0/0 //activation du mpls dans l’interface physique
PE2(config-if)#mpls ip
// Affichage de la table LIB
4. // Affichage de la table LFIB
// Affichage des informations des voisins LDP
// Afficher les labels d’un chemin «Commande traceroute »
2) Connection des différents sites des societies à travers la technologie
MPLS-VPN selon les besoins :
// Création des VRF sur les routeurs PE1 et PE2
// configuration de la VRF « MONOPRIX_HQ » sur le routeur PE1
PE1(CONFIG)#IP VRF MONOPRIX_HQ
PE1(CONFIG-VRF)#RD 1:10
PE1(CONFIG-VRF)#ROUTE-TARGET EXPORT 1:1
5. PE1(CONFIG-VRF)#ROUTE-TARGET IMPORT 11:11
PE1(CONFIG-VRF)#ROUTE-TARGET IMPORT 9:9
PE1(CONFIG-VRF)#ROUTE-TARGET IMPORT 6:6
PE1(CONFIG-VRF)#ROUTE-TARGET IMPORT 5:5
PE1(CONFIG-VRF)#EXIT
// configuration de la VRF « BH_HQ » sur le routeur PE1
PE1(CONFIG)#IP VRF BH_HQ
PE1(CONFIG-VRF)#RD 10:1
PE1(CONFIG-VRF)#ROUTE-TARGET EXPORT 10:10
PE1(CONFIG-VRF)#ROUTE-TARGET IMPORT 11:11
PE1(CONFIG-VRF)#ROUTE-TARGET IMPORT 8:8
PE1(CONFIG-VRF)#ROUTE-TARGET IMPORT 7:7
PE1(CONFIG-VRF)#EXIT
// configuration de la VRF « ONETECH_BRANCH » sur le routeur PE1
PE1(CONFIG)#IP VRF ONETECH_BRANCH
PE1(CONFIG-VRF)#RD 9:1
PE1(CONFIG-VRF)#ROUTE-TARGET EXPORT 9:9
PE1(CONFIG-VRF)#ROUTE-TARGET IMPORT 11:11
PE1(CONFIG-VRF)#ROUTE-TARGET IMPORT 1:1
PE1(CONFIG-VRF)#ROUTE-TARGET IMPORT 6:6
PE1(CONFIG-VRF)#ROUTE-TARGET IMPORT 5:5
PE1(CONFIG-VRF)#EXIT
// configuration de la VRF « ONETECH_HQ » sur le routeur PE2
PE2(CONFIG)#IP VRF ONETECH_HQ
PE2(CONFIG-VRF)#RD 6:1
PE2(CONFIG-VRF)#ROUTE-TARGET EXPORT 6:6
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 11:11
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 9:9
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 1:1
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 5:5
PE2(CONFIG-VRF)#EXIT
// configuration de la VRF « MONOPRIX_BRANCH » sur le routeur PE2
PE2(CONFIG)#IP VRF MONOPRIX_BRANCH
PE2(CONFIG-VRF)#RD 5:1
PE2(CONFIG-VRF)#ROUTE-TARGET EXPORT 5:5
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 11:11
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 9:9
6. PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 1:1
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 6:6
PE2(CONFIG-VRF)#EXIT
// configuration de la VRF « ONETECH_HQ » sur le routeur PE2
PE2(CONFIG)#IP VRF ONETECH_HQ
PE2(CONFIG-VRF)#RD 6:1
PE2(CONFIG-VRF)#ROUTE-TARGET EXPORT 6:6
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 11:11
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 9:9
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 1:1
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 5:5
PE2(CONFIG-VRF)#EXIT
// configuration de la VRF « BH_BRANCH_SFAX1 » sur le routeur PE2
PE2(CONFIG)#IP VRF BH_BRANCH_SFAX1
PE2(CONFIG-VRF)#RD 8:1
PE2(CONFIG-VRF)#ROUTE-TARGET EXPORT 8:8
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 11:11
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 10:10
PE2(CONFIG-VRF)#EXIT
// configuration de la VRF « BH_BRANCH_SFAX2 » sur le routeur PE2
PE2(CONFIG)#IP VRF BH_BRANCH_SFAX2
PE2(CONFIG-VRF)#RD 7:1
PE2(CONFIG-VRF)#ROUTE-TARGET EXPORT 7:7
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 11:11
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 10:10
PE2(CONFIG-VRF)#EXIT
// configuration de la VRF « INTERNET » sur le routeur PE2
PE2(CONFIG)#IP VRF INTERNET
PE2(CONFIG-VRF)#RD 11:1
PE2(CONFIG-VRF)#ROUTE-TARGET EXPORT 11:11
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 10:10
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 9:9
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 8:8
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 7:7
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 6:6
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 1:1
PE2(CONFIG-VRF)#ROUTE-TARGET IMPORT 5:5
8. PE2(config-if)#ip address 192.168.54.1 255.255.255.0
PE2(config-if)#no shutdown
// Verification du ping pour chaque vrf
// Activation des différents protocoles dans chaque Costumer Edge (CE)
- Protocole EIGRP
MONOPRIXHQ(config)#router eigrp 100
MONOPRIXHQ (config-router)#network 192.168.12.0 0.0.0.255
MONOPRIXHQ (config-router)#network 1.1.1.0 0.0.0.255
MONOPRIXHQ (config-router)#no auto-summary
MONOPRIXBRANCH(config)#router eigrp 100
MONOPRIXBRANCH (config-router)#network 192.168.54.0 0.0.0.255
MONOPRIXBRANCH (config-router)#network 5.5.5.0 0.0.0.255
MONOPRIXBRANCH (config-router)#no auto-summary
- Protocole OSPF
BHHQ(config)#router ospf 4
BHHQ (config-router)#network 192.168.102.0 0.0.0.255 area 0
BHHQ (config-router)#network 10.10.10.0 0.0.0.255 area 0
BHBRANCHSFAX1(config)#router ospf 5
BHBRANCHSFAX1 (config-router)#network 192.168.84.0 0.0.0.255 area 0
BHBRANCHSFAX1 (config-router)#network 8.8.8.0 0.0.0.255 area 0
BHBRANCHSFAX2(config)#router ospf 55
BHBRANCHSFAX2 (config-router)#network 192.168.74.0 0.0.0.255 area 0
BHBRANCHSFAX2 (config-router)#network 7.7.7.0 0.0.0.255 area 0
INTERNET(config)#router ospf 3
9. INTERNET (config-router)#network 192.168.114.0 0.0.0.255 area 0
INTERNET (config-router)#network 11.11.11.0 0.0.0.255 area 0
- Protocole RIPV2
ONETECHBRANCH(config)#router rip
ONETECHBRANCH(config)#version 2
ONETECHBRANCH (config-router)#network 192.168.92.0
ONETECHBRANCH (config-router)#network 9.9.9.0
ONETECHBH(config)#router rip
ONETECHBH(config)#version 2
ONETECHBH (config-router)#network 192.168.64.0
ONETECHBH (config-router)#network 6.6.6.0
// Activation des différentes mises à jour dans chaque vrf (PE)
Sur le routeur PE1, pour la vrf MONOPRIXHQ
PE1(config)#router eigrp 1
PE1 (config-router)#address-family ipv4 vrf MONOPRIXHQ
PE1 (config-router-af)#autonomous-system 100
PE1 (config-router-af)#network 192.168.12.0
Sur le routeur PE1, pour la vrf BHHQ
PE1(config)#router ospf 4 vrf BHHQ
PE1 (config-router)#network 192.168.102.0 0.0.0.255 area 0
Sur le routeur PE1, pour la vrf ONETECHBRANCH
PE1(config)#router rip
PE1 (config-router)#address-family ipv4 vrf ONETECHBRANCH
PE1 (config-router-af)#version 2
PE1 (config-router-af)#network 192.168.92.0
Sur le routeur PE2, pour la vrf MONOPRIXBRANCH
PE2(config)#router eigrp 1
PE2 (config-router)#address-family ipv4 vrf MONOPRIXBRANCH
PE2 (config-router-af)#autonomous-system 100
PE2 (config-router-af)#network 192.168.54.0
Sur le routeur PE2, pour la vrf BHBRANCHSFAX1
PE2(config)#router ospf 5 vrf BHBRANCHSFAX1
PE2 (config-router)#network 192.168.84.0 0.0.0.255 area 0
Sur le routeur PE2, pour la vrf BHBRANCHSFAX2
10. PE2(config)#router ospf 55 vrf BHBRANCHSFAX2
PE2 (config-router)#network 192.168.74.0 0.0.0.255 area 0
Sur le routeur PE2, pour la vrf INTERNET
PE2(config)#router ospf 3 vrf INTERNET
PE2 (config-router)#network 192.168.114.0 0.0.0.255 area 0
Sur le routeur PE2, pour la vrf ONETECHHQ
PE2(config)#router rip
PE2 (config-router)#address-family ipv4 vrf ONETECHHQ
PE2 (config-router-af)#version 2
PE2 (config-router-af)#network 192.168.54.0
// Déclaration des voisins dans le BGP
PE1(config)#router bgp 1
PE1 (config-router)#neighbor 4.4.4.4 remote-as 1
PE1 (config-router)#neighbor 4.4.4.4 upddate-source loopback 0 //permet de faire les MAJ dans la loopback 0
PE1 (config-router)#address-family vpnv4 //j’entre dans le MBGP pour echanger les routes vpnv4
PE1 (config-router-af)# neighbor 4.4.4.4 activate
PE1 (config-router-af)# neighbor 4.4.4.4 send-community extended //extended : peut importer et exporter à la
fois
PE2(config)#router bgp 1
PE2 (config-router)#neighbor 2.2.2.2 remote-as 1
PE2 (config-router)#neighbor 2.2.2.2 upddate-source loopback 0 //permet de faire les MAJ dans la loopback 0
PE2 (config-router)#address-family vpnv4 //j’entre dans le MBGP pour echanger les routes vpnv4
PE2 (config-router-af)# neighbor 2.2.2.2 activate
PE2 (config-router-af)# neighbor 2.2.2.2 send-community extended//extended : peut importer et exporter à la
fois
11. // Redistribution du EIGRP dans le BGP (MBGP)
PE2(config)#router bgp 1
PE2 (config-router)#address-family ipv4 vrf MONOPRIXBRANCH
PE2 (config-router-af)#redistribute eigrp 100
Dans le meme routeur on fait l’inverse
PE2(config)#router eigrp 1
PE2 (config-router)#address-family ipv4 vrf MONOPRIXBRANCH
PE2 (config-router-af)#redistribute bgp 1 metric 64 1000 255 1 1500
PE1(config)#router bgp 1
PE1 (config-router)#address-family ipv4 vrf MONOPRIXBH
PE1 (config-router-af)#redistribute eigrp 100
Dans le meme routeur on fait l’inverse
PE1(config)#router eigrp 1
PE1 (config-router)#address-family ipv4 vrf MONOPRIXBH
PE1 (config-router-af)#redistribute bgp 1 metric 64 1000 255 1 1500
// Redistribution du protocole OSPF dans le BGP (MBGP)
PE1(config)#router bgp 1
PE1 (config-router)#address-family ipv4 vrf BHBH
PE1 (config-router-af)#redistribute ospf 4
Dans le meme routeur je redistribue le BGP dans l’OSPF 4
PE1(config)#router ospf 4 vrf BHHQ
PE1 (config-router-af)#redistribute bgp 1 subnets
Pour le routeur PE2
PE2(config)#router bgp 1
PE2 (config-router)#address-family ipv4 vrf BHBRANCHSFAX1
PE2 (config-router-af)#redistribute ospf 5
Dans le meme routeur je redistribue le BGP dans l’OSPF 5
PE2(config)#router ospf 5 vrf BHBRANCHSFAX1
PE2 (config-router-af)#redistribute bgp 1 subnets
PE2(config)#router bgp 1
PE2 (config-router)#address-family ipv4 vrf BHBRANCHSFAX2
PE2 (config-router-af)#redistribute ospf 55
Dans le meme routeur je redistribue le BGP dans l’OSPF 55
PE2(config)#router ospf 55 vrf BHBRANCHSFAX2
PE2 (config-router-af)#redistribute bgp 1 subnets
PE2(config)#router bgp 1
PE2 (config-router)#address-family ipv4 vrf INTERNET
PE2 (config-router-af)#redistribute ospf 3 vrf INTERNET match internal external 1 external 2
PE2 (config-router-af)#default-information originate
Dans le meme routeur je redistribue le BGP dans l’OSPF 3
PE2(config)#router ospf 3 vrf INTERNET
12. PE2 (config-router-af)#redistribute bgp 1 subnets
// Redistribution du protocole RIP dans le BGP (MBGP)
PE2(config)#router bgp 1
PE2 (config-router)#address-family ipv4 vrf ONETECHHQ
PE2 (config-router-af)#redistribute rip
Dans le meme routeur je redistribue le bgp dans le rip
PE2(config)#router rip
PE2 (config-router)#address-family ipv4 vrf ONETECHHQ
PE2 (config-router-af)#redistribute bgp 1 metric transparent
Pour le routeur PE1
PE1(config)#router bgp 1
PE1 (config-router)#address-family ipv4 vrf ONETECHBRANCH
PE1 (config-router-af)#redistribute rip
Dans le meme routeur je redistribue le bgp dans le rip
PE1(config)#router rip
PE1 (config-router)#address-family ipv4 vrf ONETECHBRANCH
PE1 (config-router-af)#redistribute bgp 1 metric transparent
// Vérification du fonctionnement du MP-BGP
Pour connaitre toutes les routes apprises par le MP-BGP sur un routeur donné, la commande « show ip bgp vpnv4
all » peut être utilisée :
13. Pour le routeur internet je redirige tout d’abord le trafic vers l’intérieur à travers le NAT sur l’interface connecté
au Backbone MPLS
INTERNET(config)#int Fa 0/0
INTERNET (config-router)#ip nat inside
J’entre dans l’interface qui est connectée au cloud et je redirige le trafic vers l’extérieur
INTERNET(config)#int Fa 0/1
INTERNET (config-router)#ip nat outside
INTERNET (config-router)#ip address 192.168.137.2 255.255.255.0
INTERNET (config-router)#no shutdown
Sur le routeur INTERNET, je me connecte physiquement au réseau
INTERNET(config)#access-list 1 permit any
INTERNET (config)#ip nat pool cloud 192.168.137.100 192.168.137.200 netmask 255.255.255.0
INTERNET (config)#ip nat source list 1pool overload