06-25-2011 12:28 PM
I have a cisco 2921 router connected to a cisco sg300-52 L3 switch. The switch is configured with several subnets and I need to use the router for DHCP. I setup DHCP on the router to assign addresses to a subnet on the switch but cannot get it to work.
Router:
gateway to LAN is xxx.16.10.1
ip dhcp excluded-address xxx.16.0.1 xxx.16.0.9
!
ip dhcp pool data
network xxx.16.0.0 255.255.254.0
default-router xxx.16.1.1
dns-server xxx.16.1.202
domain-name mydhcp.com
Switch to router xxx.16.10.2
Network on switch for DHCP is xxx.16.1.1
when I do a sho dhcp spool I see the addresses
any idea?
06-27-2011 09:49 AM
Hi Gary,
I am wondering if you need to vlan and trunk your ethernet interface going to the SG300 switch?
See a example i used on my old 2821 router; usually on my 300 series switch I leave vlan1 untagged and leave vlan 100 tagged on my trunk port.
Here is my router config , notice that I tagged the interfaces going to my ethernet switch. Works ok.
GigabitEthernet0/1 is the interface trunked to my switch.
ip dhcp excluded-address 192.168.20.1 192.168.20.10
ip dhcp excluded-address 10.2.1.1 10.2.1.10
!
ip dhcp pool data
import all
network 192.168.20.0 255.255.255.0
default-router 192.168.20.1
dns-server 209.18.47.61 209.18.47.62
!
ip dhcp pool Voice
network 10.2.1.0 255.255.255.0
dns-server 209.18.47.61 209.18.47.62
default-router 10.2.1.1
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/1.1
encapsulation dot1Q 1 native
ip address 192.168.20.1 255.255.255.0
ip virtual-reassembly in
!
interface GigabitEthernet0/1.100
encapsulation dot1Q 100
ip address 10.2.1.1 255.255.255.0
hope this helps
regards Dave
06-27-2011 06:41 PM
David,
Thanks for the response. When I finally found where to download the sg300 maintenance manual I found where I needed to setup the switch as a DHCP relay for the various subnets on the switch.
Thanks
06-27-2011 06:42 PM
David,
What does the “import all” command do in the DHCP?
06-27-2011 11:55 PM
Hi Gary,
My config assumes that the Sx300 series switch is trunked to the router. I guess you are just relaying dhcp requests via vlan1 to a router.
Import all does the following, it imports Dynamic Host Configuration Protocol option parameters into the DHCP server database.
regards Dave
06-28-2011 07:42 AM
David,
Thanks, I was reading up on that. Last thing is to setup the Firewall in the 2921 router, any examples on that?
Thanks
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide