Hot Downloads

Welcome, Guest
Username: Password: Remember me

TOPIC: dhcp config for vlans

dhcp config for vlans 7 years 6 months ago #30536

  • pedenski
  • pedenski's Avatar
  • Offline
  • Frequent Member
  • Posts: 75
  • Karma: 0
this might sound noob, but thats what im here for.. to learn.. ^^ anyways. can you please explain to me how to properly set dynamic ip to switch. Im using packet tracer.

here's my config

switch(config)#interface vlan 1
switch(config-if)#ip address dhcp
switch(config-if)#no shutdown

after that, i connected a host pc and typed at the CMD ipconfig /renew.

but it replies with dhcp request failed

*is a switch can only be a dhcp client?
*how do i add a dhcp pool on the switch?
The administrator has disabled public write access.

Re: dhcp config for vlans 7 years 6 months ago #30541

  • georbe
  • georbe's Avatar
  • Offline
  • New Member
  • Posts: 4
  • Karma: 0
1. First of all, you have to assign an IP address on the VLAN interface of the switch (if it is a Layer 3 switch).
switch(config)#interface vlan 1
switch(config-if)#ip address 10.20.30.1 255.255.255.0
switch(config-if)#no shutdown

2. Then you have to create a DHCP IP address pool for the IP addresses you want to assign to your clients.
switch(config)# ip dhcp pool mypool

3. You have to specify the network and subnet for the addresses you want to use from the pool.

switch(dhcp-config)# network 10.20.30.0

4. Then you can specify the DNS, the gateway, and other options to send to the clients.

switch(dhcp-config)#dns-server 10.1.1.1 10.10.10.2
switch(dhcp-config)#default-router 10.20.30.1

And you are done...

You can exlude IP addresses to be given to the clients, by using this command:
switch(config)#ip dhcp excluded-address 10.20.30.0 10.20.30.100

With this command, your switch will never give out the addresses below .100 to your clients.

This configuration can only be applied on a Layer 3 switch, or on a Router.

If you don't know if you have a Layer 3 or Layer 3 switch, post here the output of the "show ver" command, and I will tell you.
The administrator has disabled public write access.

Re: dhcp config for vlans 7 years 5 months ago #30556

  • pedenski
  • pedenski's Avatar
  • Offline
  • Frequent Member
  • Posts: 75
  • Karma: 0
wow thanks for that. I finally know now..
anyway, can you just xplain, what differs a layer 3 switch?
The administrator has disabled public write access.

Re: dhcp config for vlans 7 years 5 months ago #30608

  • georbe
  • georbe's Avatar
  • Offline
  • New Member
  • Posts: 4
  • Karma: 0
A layer 3 switch, is a switch that acts as a router.
The interfaces can route packets, except of switching.
The administrator has disabled public write access.
Time to create page: 0.079 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup