Pool DHCP par vlan (GLPB load balancing:round robin)

Serveur DHCP

Ce serveur distribue les 4 scopes suivant à travers leurs vlans respectifs.

  • VLAN10 => 10.0.10.0/24 gw 10.0.10.20.254
  • VLAN20 =>10.0.20.0/24 gw 10.0.20.254
  • VLAN30 => 10.0.30.0/24 gw 10.0.30.254

Gestion des Vlans via VTP

Le switch DSW1 est configuré en mode server.
L
es autres swiths DSW2, ASW03, ASW04, ASW05 sont configures en mode: client

Liaisons inter équipement

Les connexions entre les switchs d'acces et les PC sont en mode access.
Les connexions entre les switchs d'accès et les switchs de distribution sont en mode trunk.
Les connexions entre les switchs de distribution et les routeurs sont en mode trunk.

Architecture réseau

SWITCHS

Exemple de configration d'un switch en mode trunk

DSW1#configure terminal
! Configuration des trunk vers DSW1
DSW1(config)#interface range fastEthernet 1/0 - 4
DSW1(config-if-range)#switchport trunk encapsulation dot1q
DSW1(config-if-range)#switchport mode trunk
DSW1(config-if-range)#exit

Exemple de configration d'un switch en mode access

ASW01#configure terminal
! Configuration de 4 interfaces fastEthernet dans le VLAN 10
ASW01(config)#interface range fastEthernet 1/3 - 6
ASW01(config-if-range)#switchport mode access
ASW01(config-if-range)#switchport access vlan 10
ASW01(config-if-range)#exit

 

ROUTEURS

DHCP-R1 (configuration des sous interfaces et activation du load balancing)

interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.10
 encapsulation dot1Q 10
 ip address 10.0.10.252 255.255.255.0
 glbp 1 ip 10.0.10.254
 glbp 1 priority 150
 glbp 1 preempt
 glbp 1 load-balancing round-robin
!
interface FastEthernet0/0.20
 encapsulation dot1Q 20
 ip address 10.0.20.252 255.255.255.0
 glbp 2 ip 10.0.20.254
 glbp 2 preempt
 glbp 2 load-balancing round-robin
!
interface FastEthernet0/0.30
 encapsulation dot1Q 30
 ip address 10.0.30.252 255.255.255.0
 glbp 3 ip 10.0.30.254
 glbp 3 priority 150
 glbp 3 preempt
 glbp 3 load-balancing round-robin
!

DHCP-R1 (Configuration du serveur DHCP)

ip dhcp excluded-address 10.0.10.252 10.0.10.254
ip dhcp excluded-address 10.0.20.252 10.0.20.254
ip dhcp excluded-address 10.0.30.252 10.0.30.254
!
ip dhcp pool VLAN10
   network 10.0.10.0 255.255.255.0
   default-router 10.0.10.254
!
ip dhcp pool VLAN20
   network 10.0.20.0 255.255.255.0
   default-router 10.0.20.254
!
ip dhcp pool VLAN30
   network 10.0.30.0 255.255.255.0
   default-router 10.0.30.254
!

R2 (configuration des sous interfaces et activation du load balancing)

interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.10
 encapsulation dot1Q 10
 ip address 10.0.10.253 255.255.255.0
 glbp 1 ip 10.0.10.254
 glbp 1 preempt glbp
1 load-balancing round-robin
!
interface FastEthernet0/0.20
 encapsulation dot1Q 20
 ip address 10.0.20.253 255.255.255.0
 glbp 2 ip 10.0.20.254
 glbp 2 priority 150
 glbp 2 preempt
glbp 2 load-balancing round-robin
!
interface FastEthernet0/0.30
 encapsulation dot1Q 30
 ip address 10.0.30.253 255.255.255.0
 glbp 3 ip 10.0.30.254
 glbp 3 preempt
glbp 3 load-balancing round-robin
!

Test de fonctionnement dhcp

Ne pas oublier d'affecter le VPC dans son vlan ! puis vérifier

PC5> dhcp
DDORA IP 10.0.30.12/24 GW 10.0.30.254
PC1> dhcp
DDORA IP 10.0.20.12/24 GW 10.0.20.254
PC6> dhcp
DDORA IP 10.0.30.11/24 GW 10.0.30.254