cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4826
Views
0
Helpful
22
Replies

Can't get DHCP to work in Spanning Tree

jholman96
Level 1
Level 1

I'm not entirely sure what I'm doing wrong. I configured the inter-VLAN routing from the main router with the IP addresses I used as default router for the DHCP pools I also set in the main router. I set the spanning-tree VLANs and even added switchport native VLAN for all of the switches in the spanning tree. I added one of the switchport access to the first PC to test it, but it isn't working and I need some help. Here's my packet tracer file:https://drive.google.com/file/d/1g6yE9gmgRWFj6gWLt-FYNAylYLyYyqPV/view?usp=sharing

Here's the map of the network. None of the PCs can get DHCP. I also didn't hook up the Wireless AP because I wanted to make sure the PCs could get DHCP, first. The Main Router and 2 main switches are in the MDF and the other 6 function in the IDF.

7Do05

MDF Router (MCE_MDF_Router) config:

Building configuration...

Current configuration : 3910 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Router
!
!
!
enable password 7 0822404F1A0A
!
!
ip dhcp excluded-address 192.168.8.1 192.168.8.10
ip dhcp excluded-address 192.168.9.1 192.168.9.10
ip dhcp excluded-address 192.168.9.129 192.168.9.138
ip dhcp excluded-address 192.168.10.1 192.168.10.10
ip dhcp excluded-address 192.168.10.65 192.168.10.74
ip dhcp excluded-address 192.168.10.81 192.168.10.90
ip dhcp excluded-address 192.168.10.97 192.168.10.106
ip dhcp excluded-address 192.168.10.113 192.168.10.116
ip dhcp excluded-address 192.168.10.121 192.168.10.122
ip dhcp excluded-address 192.168.10.124 192.168.10.125
!
ip dhcp pool Students-ELEMENTARY-POOL
 network 192.168.8.0 255.255.255.0
 default-router 192.168.8.1
ip dhcp pool Wireless-ELEMENTARY-POOL
 network 192.168.9.0 255.255.255.128
 default-router 192.168.9.1
ip dhcp pool VoIP-ELEMENTARY-POOL
 network 192.168.9.128 255.255.255.128
 default-router 192.168.9.129
ip dhcp pool Faculty-ELEMENTARY-POOL
 network 192.168.10.0 255.255.255.192
 default-router 192.168.10.1
ip dhcp pool IP-Camera-ELEMENTARY-Pool
 network 192.168.10.64 255.255.255.240
 default-router 192.168.10.65
ip dhcp pool Admin-ELEMENTARY-POOL
 network 192.168.10.80 255.255.255.240
 default-router 192.168.10.81
ip dhcp pool Printer-ELEMENTARY-POOL
 network 192.168.10.96 255.255.255.240
 default-router 192.168.10.97
ip dhcp pool Staff-ELEMENTARY-POOL
 network 192.168.10.112 255.255.255.248
 default-router 192.168.10.113
ip dhcp pool Management-ELEMENTARY-POOL
 network 192.168.10.120 255.255.255.252
 default-router 192.168.10.121
ip dhcp pool Native-ELEMENTARY-POOL
 network 192.168.10.124 255.255.255.252
 default-router 192.168.10.125
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2901/K9 sn FTX1524EIIO
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
 description MCE_MDF_Router to MCE_MDF_CoreSW1
 no ip address
 duplex auto
 speed auto
!
interface GigabitEthernet0/0.10
 encapsulation dot1Q 10
 ip address 192.168.10.81 255.255.255.240
!
interface GigabitEthernet0/0.20
 encapsulation dot1Q 20
 ip address 192.168.8.1 255.255.255.0
!
interface GigabitEthernet0/0.30
 encapsulation dot1Q 30
 ip address 192.168.10.113 255.255.255.248
!
interface GigabitEthernet0/0.40
 encapsulation dot1Q 40
 ip address 192.168.10.1 255.255.255.192
!
interface GigabitEthernet0/0.50
 encapsulation dot1Q 50
 ip address 192.168.10.97 255.255.255.240
!
interface GigabitEthernet0/0.60
 encapsulation dot1Q 60
 ip address 192.168.9.1 255.255.255.128
!
interface GigabitEthernet0/0.70
 encapsulation dot1Q 70
 ip address 192.168.9.129 255.255.255.128
!
interface GigabitEthernet0/0.80
 encapsulation dot1Q 80
 ip address 192.168.10.121 255.255.255.252
!
interface GigabitEthernet0/0.88
 encapsulation dot1Q 88
 ip address 192.168.10.65 255.255.255.240
!
interface GigabitEthernet0/0.99
 encapsulation dot1Q 99 native
 ip address 192.168.10.125 255.255.255.252
!
interface GigabitEthernet0/1
 no ip address
 duplex auto
 speed auto
!
interface GigabitEthernet0/1.10
 encapsulation dot1Q 10
 no ip address
!
interface GigabitEthernet0/1.20
 encapsulation dot1Q 20
 no ip address
!
interface GigabitEthernet0/1.99
 encapsulation dot1Q 99 native
 no ip address
!
interface Serial0/0/0
 no ip address
 clock rate 2000000
 shutdown
!
interface Serial0/0/1
 no ip address
 clock rate 2000000
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
no cdp run
!
banner motd ^CNo Unauthorized Access^C
!
!
!
!
line con 0
 exec-timeout 15 0
 password 7 0822455D0A16
 logging synchronous
 login
!
line aux 0
!
line vty 0 4
 exec-timeout 15 0
 password 7 0822455D0A16
 logging synchronous
 login
line vty 5 15
 exec-timeout 15 0
 password 7 0822455D0A16
 logging synchronous
 login
!
!
!
end

MDF Switch (MCE_MDF_CoreSw1) config:

Building configuration...

Current configuration : 3369 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
spanning-tree vlan 10,20,30,40,50,60 priority 24576
spanning-tree vlan 70,80,88,99 priority 28672
!
interface FastEthernet0/1
 description MCE_MDF_CoreSw1 to MCE_IDF_Switch1_STUDENT
 switchport trunk native vlan 99
 switchport mode trunk
 switchport nonegotiate
!
interface FastEthernet0/2
 description MCE_MDF_CoreSw1 to MCE_IDF_Switch2
 switchport access vlan 80
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/3
 description MCE_MDF_CoreSw1 to MCE_IDF_Switch3
 switchport access vlan 88
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/4
 description MCE_MDF_CoreSw1 to MCE_IDF_Switch4
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/5
 description MCE_MDF_CoreSw1 to MCE_IDF_Switch5
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/6
 description MCE_MDF_CoreSw1 to MCE_IDF_Switch6
 switchport trunk native vlan 99
 switchport trunk allowed vlan 10
 switchport mode trunk
!
interface FastEthernet0/7
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/8
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/9
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/10
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/11
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/12
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/13
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/14
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/15
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/16
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/17
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/18
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/19
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/20
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/21
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/22
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/23
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/24
 switchport access vlan 60
 switchport trunk native vlan 99
 switchport mode trunk
 switchport port-security maximum 60
 switchport port-security violation restrict 
!
interface GigabitEthernet0/1
 description MCE_MDF_CoreSw1 to MCE_MDF_Router
 switchport trunk native vlan 99
 switchport mode trunk
!
interface GigabitEthernet0/2
 description MCE_MDF_CoreSw1 to MCE_MDF_CoreSw2
 switchport trunk native vlan 99
 switchport mode trunk
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan80
 mac-address 0002.17d4.6101
 ip address 192.168.10.122 255.255.255.248
!
ip default-gateway 192.168.10.125
!
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
!
end

IDF Switch (MCE_IDF1_Switch1_STUDENT) config:

Building configuration...

Current configuration : 3363 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
 description MCE_IDF1_Switch1_STUDENT to PC0
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/2
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/3
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/4
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/5
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/6
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/7
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/8
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/9
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/10
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/11
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/12
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/13
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/14
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/15
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/16
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/17
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/18
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/19
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/20
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/21
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/22
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/23
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface FastEthernet0/24
 switchport access vlan 20
 switchport trunk native vlan 99
 switchport mode access
!
interface GigabitEthernet0/1
 description MCE_IDF1_Switch1_STUDENT to MCE_MDF_CoreSw1
 switchport trunk native vlan 99
 switchport mode trunk
!
interface GigabitEthernet0/2
 description MCE_IDF1_Switch1_STUDENT to MCE_MDF_CoreSw2
 switchport trunk native vlan 99
 switchport mode trunk
!
interface Vlan1
 no ip address
 shutdown
!
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
!
end 

 

22 Replies 22

Hello,

 t

the problem is that the VLAN information does not get propagated to the other switches. The output of 'show vlan' must be the same on all switches. The reason is that the VTP revision number for the core switch 1 is the same as for all the other switches:

 

MCE_IDF2_Switch1#sh vtp status
VTP Version : 2
Configuration Revision : 1
Maximum VLANs supported locally : 255
Number of existing VLANs : 16
VTP Operating Mode : Client
VTP Domain Name : mcsc.com
VTP Pruning Mode : Disabled

VTP V2 Mode : Enabled

VTP Traps Generation : Disabled
MD5 digest : 0x2B 0x59 0x2B 0xC1 0xF3 0x69 0x2A 0x98
Configuration last modified by 192.168.10.122 at 3-1-93 00:02:24

 

To change this, create a dummy VLAN on that switch:

 

MCE_IDF2_Switch1#conf t

MCE_IDF2_Switch1(config)#vlan 999

 

That will change the revision number to 2:

 

MCE_IDF2_Switch1#sh vtp status
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 255
Number of existing VLANs : 16
VTP Operating Mode : Client
VTP Domain Name : mcsc.com
VTP Pruning Mode : Disabled

VTP V2 Mode : Enabled

VTP Traps Generation : Disabled
MD5 digest : 0x2B 0x59 0x2B 0xC1 0xF3 0x69 0x2A 0x98 
Configuration last modified by 192.168.10.122 at 3-1-93 00:02:24

 

The output of 'show vtp status' should now be the same on all switches.

 

That said, you also need to configure 'spanning-tree portfast' on all access switchports where the PCs are connected to.

 

The phones do not appear to be powered on ?

 

And last but not least, what is the enable password for the router ?

 

 

Hello

 

 

 


@Georg Pauwen wrote:

Hello,

 t

the problem is that the VLAN information does not get propagated to the other switches. The output of 'show vlan' must be the same on all switches. The reason is that the VTP revision number for the core switch 1 is the same as for all the other switches:

 

MCE_IDF2_Switch1#sh vtp status
VTP Version : 2
Configuration Revision : 1
Maximum VLANs supported locally : 255
Number of existing VLANs : 16
VTP Operating Mode : Client
VTP Domain Name : mcsc.com
VTP Pruning Mode : Disabled

VTP V2 Mode : Enabled

VTP Traps Generation : Disabled
MD5 digest : 0x2B 0x59 0x2B 0xC1 0xF3 0x69 0x2A 0x98
Configuration last modified by 192.168.10.122 at 3-1-93 00:02:24

 

To change this, create a dummy VLAN on that switch:

 

MCE_IDF2_Switch1#conf t

MCE_IDF2_Switch1(config)#vlan 999

 

That will change the revision number to 2:

 

MCE_IDF2_Switch1#sh vtp status
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 255
Number of existing VLANs : 16
VTP Operating Mode : Client
VTP Domain Name : mcsc.com
VTP Pruning Mode : Disabled

VTP V2 Mode : Enabled

VTP Traps Generation : Disabled
MD5 digest : 0x2B 0x59 0x2B 0xC1 0xF3 0x69 0x2A 0x98 
Configuration last modified by 192.168.10.122 at 3-1-93 00:02:24

 

The output of 'show vtp status' should now be the same on all switches

 


Unfortunately i cannot see the PKT file as I don't have Packet tracer -  But he revision although should e the same it doesn't necessary mean its prohibiting connection - both devices you have shown have the same vtp version and the same amount of vlans so if these vlans are the same on either switch and are being allowed over the trunks then it shouldn't prohibit connection

 

What is very noticeable from what has been posted is the incorrect addressing on the SVi's and their related dhcp scopes  that does need to be changed

 

res

Paul

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello

On the rtr - you may need enable dhcp service

conf t
Service dhcp

Also your vlan 80 subnet which is incorrect.

ip dhcp pool Admin-ELEMENTARY-POOL
 network 192.168.10.80 255.255.255.240
 default-router 192.168.10.81

interface GigabitEthernet0/0.80
 encapsulation dot1Q 80
 ip address 192.168.10.121 255.255.255.252

Core switch
interface Vlan80
 mac-address 0002.17d4.6101
 ip address 192.168.10.122 255.255.255.248
ip default-gateway 192.168.10.125  <-- this should be the rtr gig0/0.80 ip address

sh vlan brief
sh int trunk

res
Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello,

 

the main reason that DHCP doesn't work is that your core switch is connected to interface GigabitEthernet0/1 on the router, while that as to be GigabitEthernet0/0 (all the subinterfaces are configured here).

 

Attached is the fixed version (rename it to .pkt).

 

 

I did this, and I understand what you changed. But I only got VLAN 20, the PC0, to get an IP from DHCP. Is it still the cable that needs to be switched to G0/1 on the router and Inter-VLAN routing switched to G0/1?

Hello,

 

you need to enable DHCP on the PCs, none of them have t configured in the file you sent me. You also need to power on the IPhones. The interfaces connecting the PCs/Iphones to the switches need all be configured like below:

 

interface FastEthernet0/1
switchport access vlan 20
switchport trunk native vlan 99
switchport mode access
switchport voice vlan 70
spanning-tree portfast

 

I have attached the revised file, all PCs can now get DHCP assigned addresses...

 

 

I changed the first IDF switch to switchport mode access, switchport access vlan 20, trunk native vlan 99, switchport voice vlan 70, and spanning-tree portfast, but it still is coming back as DHCP failed, APIPA is used. What am I doing wrong? Is it the G0/0 and G0/1 in how the Router is connected to the Core Sw1 MDF switch.

Hello,

 

are you using the last .pkt file that I sent you ?

Yes.

Which switchport on which switch have you configured, or better, which PC is connected to that switchport, PC0 or PC5 ?

 

Try ipconfig /release and then ipconfig /renew from the command prompt...

I configured the IDF 1 STUDENTS switch and it's connected to PC0. I did the ipconfig /release and /renew on the PC0, but it again gave me a DHCP failed message in the command prompt.

Hello,

 

save your configuration and post the file back here, something might be missing.

Hello,

 

the IP Phones are still powered off.

 

Click on the IP_Phone, go to the 'Physical' tab, and drag the VoIP power adapter to the phone (it needs to connect to the round jack on the left, hover over the phone until you see a + sign.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card