07-01-2013 12:30 AM
Hello,
I want to use the internal DHCP Server of a SG500-Stack (Layer3-Mode) to assign addresses to several VLANs.
I was able to create several Pools, but I didn't find any option to assign these pools to VLANs or Ports.
For Example:
Addresses from Pool 192.168.0.0/24 are assigned to VLAN10
Addresses from Pool 10.0.0.0/24 are assigned to VLAN20
Addresses from Pool 10.128.128.0/24 are assigned to VLAN30
Is this possible with a SG500?
If it is, please give me a hint where I can set this up as I didn't find anything about this.
Thanks in advance,
Christoph
07-01-2013 03:06 AM
This is an example to create Vlan and DHCP per vlan and how to assign the port to vlan
but before please change the mode of the router to layer 3 and ensure you have the latest firmware
1. Create a vlan
#configure terminal
#vlan database
#vlan 10
#vlan 20
#vlan 30
#exit
2. Create interface of the Vlan's
#interface vlan 10
#ip address 192.168.0.254 255.255.255.0
#interface vlan 20
#ip address 10.0.0.254 255.255.255.0
#interface vlan 30
#ip address 10.128.128.254 255.255.255.0
#exit
3. Enable DHCP server on vlan's in this example the range is from 100 to 200 hosts
#address low 192.168.0.100 high 192.168.0.200 /24
#address low 10.0.0.100 high 10.0.0.200 /24
#address low 10.128.128.100 high 10.128.128.200 /24
#exit
4. Assign the port to Vlan 10 and 20 and 30 in my example I assign port 1 to vlan 10 , port 2 to vlan 20 and port 3 to vlan 30
#interface gigabitethernet 1/1
#switchport mode access
#switchport access vlan 10
#exit
#interface gigabitethernet 1/2
#switchport mode access
#switchport access vlan 20
#exit
#interface gigabitethernet 1/3
#switchport mode access
#switchport access vlan 30
#exit
So now connect pc with on port 1,2,3 to make a test
Please lets me know and please rate the post and mark answered to help other customers
Thanks
Mehdi
07-01-2013 03:14 AM
I did configuration over the web interface, but it looks like it's the same I did.
Is the correct pool automatically chosen based on the interface address of the vlan?
07-01-2013 03:39 AM
Hi Christoph
yes the coorect pool is automatically chosen based on the interface vlan should be match
ensure the default vlan on the switch has an IP static not DHCP
And ensure if the DHCP server is enable
thanks
Mehdi
07-01-2013 06:11 AM
Hi Mehdi,
all Interfaces on the Switch have static IP's.
I just noticed, that your config has the ports set to access, while my setup still has these on trunk.
Maybe that could be the problem?
07-01-2013 06:16 AM
Hi Christoph,
Can you please share your running configuration file ?
thanks
Mehdi
07-01-2013 06:42 AM
Hi Mehdi,
just sent you the running-config as private message
regards,
Christoph
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