Networking

Could you use a switch as a DHCP server?

No. It can not assign Dynamic IPs.

user, I don't know if it's possible to ask a more vague question. Yes, some can. No some can't. Without details (Make, model) nobody can help you.

Some managed switches can be considered routers. Lookup layer 3 switch

Let's say, I have a DHCP server. Could a switch be potentially used as a relay between the server and the other devices or would I need a router? It should work the same way, yes?

I'm having trouble wraping my head around all that.

I have never seen a switch that will do this. Why not just plug in something that will serve DHCP?

DHCP only works on a single broadcast so they only work with switches without added configuration.

You have to put more work in configuring your routers if you want to repeat a dhcp offer/request beyond broadcast domains.

Yeah, sorry, I fucked up the question. I'm a bit sleepy I guess ahah.

I'm trying to find out how to have the DHCP server assign the ip in the vlan pc and phone.

This look interesting. Thanks.

You're going to need a dhcp service for each vlan

>I'm trying to find out how to have the DHCP server assign the ip in the vlan pc and phone.
You'd need a router to route packets between vlans.
You'd need to configure that router to pass DHCP offers/requests between vlans/subnets/broadcasts...whatever you want to call them.

Or a relay agent which is built into most cisco IOS images and all currently supported ones.

Do you think op knows how to do this? He just wants it to work and I'm thinking the easiest solution is a lightweight dhcp per vlan

I'll try to rethink my ip table then. I was under the impression it could be doone but II guess not. Thanks a lot.

Do you seriously expect this OP to manage that?
Or even know what an IOS image is?

Well, I wanted the switch to do the relay but apparently it can't. Well, whatever.

What switch are you dealing with?

>Do you think op knows how to do this?
>Do you seriously expect this OP to manage that?
I'd hope so. If he can afford cisco equipment....

>
>What switch are you dealing with?
Asking the real questions..

I mean I've asked twice and got no answer.
I'm willing to bet this isn't a Cisco 7700 series but rather a best-buy switch with a cisco logo.

Generic PT if Cisco is to be believed. There's no physical interface involed for now so I can do whatever.

What kind of switch should I look for? I also have a multilayer one.

>No
dhcp-server pool "Guest"
authoritative
default-router "172.16.0.1"
dns-server "8.8.8.8"
lease 00:04:00
network 172.16.0.0 255.255.254.0
range 172.16.0.10 172.16.1.254
exit
ok buddy

Wait where does it say anything about Cisco

If you're just doing it for training and your network map is in your OP then you'd configure a dhcp-relay agent on your "lollipop on a stick router" that is routing traffic between your vlans

OP image name.

So I just replace the switch with a router then? Got it.

No, but whatever.
It's fun to play with packet tracer.

Oh well. I didn't get what you meant by "lolipop on a stick router".

I didn't expect to get so many helpful replies.

Acting as a DHCP server is not the original purpose of a switch idiot.

>not the original purpose
no one said anything about "original purpose"
>idiot
no u

what does your network map look like? is it in the OP?

Yep. I just have to link the VLAN PC and phone.

OK then do what I said.
See Router-PT-Router1 you configure that to route your vlans so they can talk each other (VLAN PC, VLAN Phone Vlan Server). this configuration is called a " "router on a stick" ( hint thats a queue for you to google that term)
Since it is configured to route vlans you can also configure it to relay dhcp via dhcp relay agent so both the phones (vlan phones) and PCs (vlan pc) will be able to get dhcp requests/offers from the servers (vlan servers)

Ok, I'll do all that.
Again, thanks for all the help, I should be ok now.
I can go to sleep in peace.

if it is a layer 3 switch, yeah.