07-15-2005 12:28 PM - edited 03-03-2019 10:02 AM
If I have 4 VLAN'S. How do i provide the workstation in each VLAN with a dinamically IP address.
Solved! Go to Solution.
07-15-2005 12:33 PM
I assume routing between 4 vlans is done by a layer 3 device either the l3 switch itself or a router. On the router, that does the inter vlan routing, (if its a cisco router) you can run Cisco IOS dhcp and run multiple pools. Otherwise you can configure this L3 device to relay dhcp requests from each vlan to a DHCP server which can be a Microsoft or Linux DHCP server (any DHCP capable server) as follows using helper-address command under each vlan.
int vlan 1
ip helper-address
int vlan 2
ip helper-address
int vlan 3
ip helper-address
int vlan 4
ip helper-address
If the L3 device is running on a router and it has sub interfaces defined for each vlan,
ip dhcp pool Pool1
network 172.16.1.0/24
default-router 172.16.1.1
ip dhcp pool Pool2
network 172.16.2.0/24
default-router 172.16.2.1
ip dhcp pool Pool3
network 172.16.3.0/24
default-router 172.16.3.1
ip dhcp pool Pool4
network 172.16.4.0/24
default-router 172.16.4.1
int fa0/0
no ip add
int fa0/0.1
encap dot1q 1
ip add 172.16.1.1
int fa0/0.2
encap dot1q 2
ip add 172.16.2.1
int fa0/0.3
encap dot1q 3
ip add 172.16.3.1
int fa0/0.4
encap dot1q 3
ip add 172.16.4.1
Where vlans 1,2,3,4 are trunked from the switch where the vlans are defined to the router's fastE interface.
Also exclude the addresses 172.16.1.1, 2.1, 3.1, 4.1 and any other address you want to exclude using command
ip dhcp excluded-address 172.16.1.1
ip dhcp excluded-address 172.16.2.1
ip dhcp excluded-address 172.16.3.1
ip dhcp excluded-address 172.16.4.1
Other options such as Lease time, DNS, WINS, Scope options etc can be specified as part of each pool. Even client reservations based on mac addresses are possible.
HTH
07-15-2005 12:33 PM
I assume routing between 4 vlans is done by a layer 3 device either the l3 switch itself or a router. On the router, that does the inter vlan routing, (if its a cisco router) you can run Cisco IOS dhcp and run multiple pools. Otherwise you can configure this L3 device to relay dhcp requests from each vlan to a DHCP server which can be a Microsoft or Linux DHCP server (any DHCP capable server) as follows using helper-address command under each vlan.
int vlan 1
ip helper-address
int vlan 2
ip helper-address
int vlan 3
ip helper-address
int vlan 4
ip helper-address
If the L3 device is running on a router and it has sub interfaces defined for each vlan,
ip dhcp pool Pool1
network 172.16.1.0/24
default-router 172.16.1.1
ip dhcp pool Pool2
network 172.16.2.0/24
default-router 172.16.2.1
ip dhcp pool Pool3
network 172.16.3.0/24
default-router 172.16.3.1
ip dhcp pool Pool4
network 172.16.4.0/24
default-router 172.16.4.1
int fa0/0
no ip add
int fa0/0.1
encap dot1q 1
ip add 172.16.1.1
int fa0/0.2
encap dot1q 2
ip add 172.16.2.1
int fa0/0.3
encap dot1q 3
ip add 172.16.3.1
int fa0/0.4
encap dot1q 3
ip add 172.16.4.1
Where vlans 1,2,3,4 are trunked from the switch where the vlans are defined to the router's fastE interface.
Also exclude the addresses 172.16.1.1, 2.1, 3.1, 4.1 and any other address you want to exclude using command
ip dhcp excluded-address 172.16.1.1
ip dhcp excluded-address 172.16.2.1
ip dhcp excluded-address 172.16.3.1
ip dhcp excluded-address 172.16.4.1
Other options such as Lease time, DNS, WINS, Scope options etc can be specified as part of each pool. Even client reservations based on mac addresses are possible.
HTH
07-15-2005 04:31 PM
Thank you, I am going to implimented this weekend
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