cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
929
Views
20
Helpful
7
Replies

DHCP Server On Layer 2 / Access Layer Switch - Cisco 3750G

Saeed Siddiqui
Level 1
Level 1

Hello Wonderful People

i need your help to configure DHCP in client's environment, i have existing situation that needs to be changed and new situation for which i need your help.

please refer to attached topology, information is fictitious but topology is real.

Existing Situation:

- i have 4 x nexus 9508, 2 of them are on core layer and 2 of them are in access layer. campus LAN SVI is configured on CORE switches with HSRP running between them. on core switches, access layer switch 3 and switch 4 are directly connected, these access switches are directly connected to DHCP clients like laptop etc. hosts are getting DHCP address for Corporate intranet and DHCP server is located somewhere in North America.  I have been asked to host DHCP server locally, i do not have any additional server or switch to configure DHCP server on. it would have been easier if core switches supported DHCP but those are Nexus 9k there is no easy way to run DHCP on nexus 9k, unless you can give me any fancy technique to achieve this.

the goal is to have DHCP server internally and i have only one option which is Cisco 3750G which is acting as layer 2, access layer switch, i want to configure DHCP on 3750 without moving Campus LAN SVI from the CORE. the only layer 3 config is lo0 on 3750.

so the whole idea is: cisco 3750G should be DHCP server that should release IPs to the DHCP client which are directly connected to the same switch and Gateway should reside on 9K.

is it doable ?

1 Accepted Solution

Accepted Solutions

for my opinion guest shell is perfect.
but anyway if you have bad  experience with it then I have one solution. 
config one SVI in access SW, only one.
then config DHCP Pool in Access SW
finally config DHCP relay in SVI of client in NSK toward SVI of access SW.

this prevent Access SW from inter-vlan and in same time you use it as DHCP server in your network.  

View solution in original post

7 Replies 7

balaji.bandi
Hall of Fame
Hall of Fame

i would not suggest access switch act as DHCP Server, if that go down, all the device not able to get DHCP Address or fail to work

there is an alternative option look if you can using a nexus 9K guest shell to host the DHCP container.

https://github.com/ndelecro/nx-os-programmability/tree/master/Guest_Shell/PXE_Server

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

guest shell is not worth the effort and it will be problematic as well for operations team to troubleshoot. furthermore, Guest shell configs are not approved.

for my opinion guest shell is perfect.
but anyway if you have bad  experience with it then I have one solution. 
config one SVI in access SW, only one.
then config DHCP Pool in Access SW
finally config DHCP relay in SVI of client in NSK toward SVI of access SW.

this prevent Access SW from inter-vlan and in same time you use it as DHCP server in your network.  

Thanks a lot for the solution, i have another question regarding the same solution, access switch is the same switch where DHCP clients are residing, so if i create a SVI on access switch, can i define different pool within that SVI ?

this is what i came up with, do you think its going to work? or do i need to change something?

 

Access Switch # 3

Switch(config)# interface VLAN100
Switch(config-if)# ip address 192.168.10.1 255.255.255.0

Switch(config)# ip dhcp pool VLAN10
Switch(dhcp-config)#network 10.10.10.0 255.255.255.0
Switch(dhcp-config)#default-router 10.10.10.1
Switch(dhcp-config)#dns-server 8.8.8.8 4.4.4.4

Switch(config)# ip dhcp pool VLAN20
Switch(dhcp-config)#network 20.20.20.0 255.255.255.0
Switch(dhcp-config)#default-router 20.20.20.1
Switch(dhcp-config)#dns-server 8.8.8.8 4.4.4.4


Core Switch (Nexus)

interface Vlan10
description Campus LAN
no shutdown
ip address 10.10.10.2/24
ip router eigrp 100
hsrp 10
preempt
priority 110
ip 10.10.10.1
ip dhcp relay address 192.168.10.1

If the Clients device come from the same Access switch - you would like to have a different pool for each access switch, and create the local pool and Local SVI -  for that no need to have a helper address on the core.

make sure those pools are in the routing table for other devices to reach (example in your EIGRP)

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Yes it will work. 
the access SW dont need to have SVI for DHCP Pool. 

Access Switch without SVI can not server DHCP
for NSK 

[ENG] DHCP server using Nexus 9000 Guest shell - YouTube

 

Review Cisco Networking products for a $25 gift card