05-20-2009 11:25 AM - edited 03-06-2019 05:50 AM
Hello,
I have 2 4500 core switches and access switches.I also have 10 vlans.How can i enable dhcp on the core switch so that it assigns ip address to each vlan ?(each vlan has a different class C address space)
Solved! Go to Solution.
05-20-2009 12:03 PM
If a port belonging to vlan 2 initiates dhcp request on the access switch how can the core switch know the address space of the host connected to the port belongs to?
You'll have your hosts assigned by port to vlan 2, and the port that connects to the core will have a trunk that allows vlan 2 over the trunk. The switch will see vlan 2 tagged in the frame and will assign based off of that. The switch is smart enough to know that the dhcp pool you created and the network that's under that will be supported under that particular vlan based off of the ip address that's assigned to your SVI.
05-20-2009 11:33 AM
You would set up a helper address under the vlan's svi, and then point it to a dhcp server that has all of the scopes that you want to support.
vlan 1: 192.168.1.0/24
vlan 2: 192.168.2.0/24
vlan 3: 192.168.3.0/24
DHCP server's address: 192.168.1.50
DHCP server's scopes:
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
int vlan 1:
ip address 192.168.1.1 255.255.255.0
int vlan 2:
ip address 192.168.2.1 255.255.255.0
ip helper-address 192.168.1.50
int vlan 3:
ip address 192.168.3.1 255.255.255.0
ip helper-address 192.168.1.50
I'm assuming that you have ip routing enabled on the switch, so the above should be all that you would need to do. In your scopes, you would set the default gateway as the respective SVI.
HTH,
John
05-20-2009 11:45 AM
Your solution assume that dhcp is implemented on a server but i want it to be implemented on the core switch because windows can not accomodate 20 scopes of 254 addresses each.
05-20-2009 11:48 AM
Same concept then, except remove the helper addresses and create your scopes on the switch:
ip dhcp pool VLAN1
network 192.168.1.0
default-router 192.168.1.1
domain-name test.com
dns-server
ip dhcp pool VLAN2
network 192.168.2.0
default-router 192.168.2.1
domain-name test.com
dns-server
etc...
05-20-2009 12:00 PM
How can the core switch maps ip addresses to the respective vlan ?
EG: If a port belonging to vlan 2 initiates dhcp request on the access switch how can the core switch know the address space of the host connected to the port belongs to ?
05-20-2009 12:03 PM
If a port belonging to vlan 2 initiates dhcp request on the access switch how can the core switch know the address space of the host connected to the port belongs to?
You'll have your hosts assigned by port to vlan 2, and the port that connects to the core will have a trunk that allows vlan 2 over the trunk. The switch will see vlan 2 tagged in the frame and will assign based off of that. The switch is smart enough to know that the dhcp pool you created and the network that's under that will be supported under that particular vlan based off of the ip address that's assigned to your SVI.
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: