cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7964
Views
0
Helpful
10
Replies

Configure dhcp on core switch

richard.abeyta
Level 1
Level 1

I have a cat 3850 as core switch. And 1 cat3850 and 1 cat 9300 as access switches. Any client that gets plugged into an access switch I need it to pull an ip via dhcp from the core switch.

 

So, how do you make this happen. I believe I may be missing something. 

 

-SVI are created on core 

-Vlans are created and access ports are configured with the respective vlans on the access switches. 

- the links connecting the core switch to each access switches are configured as trunks.

-I created 3 dhcp pools for my 3 on the core switch.

      -used network command 

       -used default-router command which is gateway of each SVI.

 

There are no SVIs on the access switches, just the access ports and the trunk link.

 

1 Accepted Solution

Accepted Solutions

Hi @richard.abeyta ,

 

Your settings look ok.

Just to discard, check this:

-In your switch core must exist the vlan associated with the SVIs

-In the trunk links, try entering the command switchport trunk encapsulation dot1q

 

Regards

View solution in original post

10 Replies 10

luis_cordova
VIP Alumni
VIP Alumni

Hi @richard.abeyta 

 

Could you share your settings?

 

Regards

Thomas Schmitt
Level 1
Level 1
my be you have service dhcp disabled?

You can just enable debugging for dhcp and take a look what happens on the core switch. From design point of view I don’t think, that you are missing something

Hello

Can you share you core switch configuration (including the dhcp pools)

Just to confirm, do you ip routing enabled on the core switch and disabled on the access switches?


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,

Thank you all for your help. Below are the dhcp configs for the core switch. "Service DHCP" is enabled. "IP Routing" is enabled on the core switch and the two access switches. These are dummy IP addresses, and the core switch is providing dhcp, so I would not need to use the "dns server" command would I?

!
!
!
ip routing
ip dhcp excluded-address 10.10.10.1 10.10.10.10
ip dhcp excluded-address 10.20.20.1 10.20.20.10
ip dhcp excluded-address 10.30.30.1 10.30.30.10
!
ip dhcp pool Vlan100_POOL
network 10.10.10.0 255.255.255.0
default-router 10.10.10.1
!
ip dhcp pool Vlan200_POOL
network 10.20.20.0 255.255.255.0
default-router 10.20.20.1
!
ip dhcp pool Vlan300_POOL
network 10.30.30.0 255.255.255.0
default-router 10.30.30.1

Hello,

 

just to add, make sure you have 'spanning-tree portfast' configured on the access ports, and excluded the ip addresses of the SVIs from the DHCP pools:

 

interface GigabitEthernet0/0

switchport mode access

switchport access vlan X

spanning-tree portfast

!

ip dhcp excluded-address 192.168.10.1

!

ip dhcp pool VLAN10

network 192.168.10.0 255.255.255.0

default-router 192.168.10.1

dns-server 8.8.8.8 8.8.4.4

!

interface Vlan10

ip address 192.168.10.1

SVI's

interface Vlan100
description ** SVI to cat3850-1 & cat9300 **
ip address 10.10.10.1 255.255.255.0
!
interface Vlan200
description ** SVI to cat3850-1 & cat9300 **
ip address 10.20.20.1 255.255.255.0
!
interface Vlan300
description ** SVI to cat3850-1 & cat9300 **
ip address 10.30.30.1 255.255.255.0
!
interface Vlan900
description ** SVI for Loopback Network
ip address 10.90.90.1 255.255.255.0

richard.abeyta
Level 1
Level 1
One of the access switches:

interface GigabitEthernet1/0/11
switchport access vlan 100
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet1/0/12
switchport access vlan 200
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet1/0/13
switchport access vlan 300
switchport mode access
spanning-tree portfast

-------------------------

interface GigabitEthernet1/0/1
description ** Interconnect Link to 3850-2 GIG1/0/1 **
switchport trunk allowed vlan 100,200,300
switchport mode trunk

Hi @richard.abeyta ,

 

Your settings look ok.

Just to discard, check this:

-In your switch core must exist the vlan associated with the SVIs

-In the trunk links, try entering the command switchport trunk encapsulation dot1q

 

Regards

Okay thanks for the help. I am not in the data center for a few days so I didn't know a way to test my environment. I tried the same setup in packet tracer but dhcp was failing.

Hi @richard.abeyta ,

 

Could you compress your PT exercise (winzip) and attach it to review your settings?

 

Regards

Review Cisco Networking for a $25 gift card