Pool dhcp vlan cisco

Résolu/Fermé
Tibouni - 27 mai 2016 à 16:19
 Tibouni - 30 mai 2016 à 08:05
Bonjour,

Pour mon projet de fin d'année je dois mettre en place 1 switch et 1 routeur cisco afin d'avoir 3 vlans dont 2 qui communiquent entres eux.

Les ACL fonctionnent correctement mais l'attribution d'adresse ip ne fonctionne que dans le VLAN 2 et pas dans le VLAN 3 et 4 quelqu'un peut il m'aider ?

Voici les configurations :

le routeur :

R1#sh run
Building configuration...


Current configuration : 1986 bytes
!
! Last configuration change at 07:03:03 UTC Sat Jan 1 2000
!
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
dot11 syslog
ip source-route
!
!
ip cef
!
!
ip dhcp pool VLAN 2
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
dns-server 192.168.2.11
!
ip dhcp pool VLAN 4
network 192.168.4.0 255.255.255.0
default-router 192.168.4.1
dns-server 192.168.2.11
!
ip dhcp pool VLAN 3
network 192.168.3.0 255.255.255.0
default-router 192.168.3.1
!
!
no ipv6 cef
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
voice-card 0
!
crypto pki token default removal timeout 0
!
!
!
!
license udi pid CISCO2811 sn FCZ1136704S
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 192.168.2.1 255.255.255.0
ip access-group 1 in
!
interface FastEthernet0/0.3
encapsulation dot1Q 3
ip address 192.168.3.1 255.255.255.0
ip access-group 103 in
!
interface FastEthernet0/0.4
encapsulation dot1Q 4
ip address 192.168.4.1 255.255.255.0
ip access-group 104 in
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
!
access-list 1 permit any
access-list 103 permit ip 192.168.3.0 0.0.0.255 192.168.3.0 0.0.0.255
access-list 103 permit ip 192.168.2.0 0.0.0.255 192.168.3.0 0.0.0.255
access-list 103 permit ip 192.168.3.0 0.0.0.255 192.168.2.0 0.0.0.255
access-list 104 permit ip 192.168.4.0 0.0.0.255 192.168.4.0 0.0.0.255
access-list 104 permit ip 192.168.4.0 0.0.0.255 192.168.2.0 0.0.0.255
access-list 104 permit ip 192.168.2.0 0.0.0.255 192.168.4.0 0.0.0.255




Le switch :
S1#sh run
Building configuration...

Current configuration : 2473 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname S1
!
!
ip subnet-zero
!
ip ssh time-out 120
ip ssh authentication-retries 3
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
!
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 2
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 2
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 2
switchport mode access
!
interface FastEthernet0/5
switchport access vlan 3
switchport mode access
!
interface FastEthernet0/6
switchport access vlan 3
!
interface FastEthernet0/7
switchport access vlan 4
!
interface FastEthernet0/8
switchport access vlan 4
!

!
interface FastEthernet0/48
switchport mode trunk
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
no ip route-cache
shutdown
!
interface Vlan2
ip address 192.168.2.2 255.255.255.0
no ip route-cache
shutdown
!
interface Vlan3
ip address 192.168.3.2 255.255.255.0
no ip route-cache
!
interface Vlan4
ip address 192.168.4.2 255.255.255.0
no ip route-cache
shutdown
!
ip http server
!
line con 0
line vty 0 4
login
line vty 5 15
login
!
!
end

Les vlans :

S1#sh vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Fa0/25, Fa0/26, Fa0/27, Fa0/28
Fa0/29, Fa0/30, Fa0/31, Fa0/32
Fa0/33, Fa0/34, Fa0/35, Fa0/36
Fa0/37, Fa0/38, Fa0/39, Fa0/40
Fa0/41, Fa0/42, Fa0/43, Fa0/44
Fa0/45, Fa0/46, Fa0/47, Fa0/48
Gi0/1, Gi0/2
2 Vlan2 active Fa0/2, Fa0/3, Fa0/4
3 Vlan3 active Fa0/5, Fa0/6
4 Vlan4 active Fa0/7, Fa0/8
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

1 réponse

ciscowarrior
28 mai 2016 à 11:59
Salut,
Ta machine quand elle fait une requête DHCP son IP c'est 0.0.0.0 et donc tes ACL sur les vlans 3 et 4 bloquent cette IP alors que sur le vlan 2 tu permets toutes les IP.

Bàt,
0
OK super merci je test demain donc je fais une acl permit 0.0.0.0 255.255.255.255 255.255.255.255 255.255.255.255 ?
0
ciscowarrior
28 mai 2016 à 16:43
ton ACL pour permettre les requêtes DHCP c'est
permit udp any eq bootpc any eq bootps

Bàt,
0
Tibouni > ciscowarrior
28 mai 2016 à 17:17
D'accord merci tu me sauve la mise je rend le matériel lundi !!! je te tiens au courant demain après midi pour voir si tout fonctionne :)
0
ciscowarrior > Tibouni
28 mai 2016 à 22:40
Attention que l'ACL complète c'est
access-list 100 permit udp any eq bootpc any eq bootps
access-list 100 permit ip 192.168.2.0 0.0.0.255 192.168.3.0 0.0.0.255
access-list 100 permit ip 192.168.2.0 0.0.0.255 192.168.4.0 0.0.0.255

Puis tu l'appliques en inbound sur ta sous-interface.
0
Tibouni > ciscowarrior
30 mai 2016 à 08:05
C'était bien ça merci beaucoup :)
0