Why do switches need dhcp? Why not just use router dhcp?

Why do switches need dhcp? Why not just use router dhcp?

Really makes you think.

Switches sometimes need to be configured to forward client dhcp requests to your dhcp server, is this what you're talking about?

what?

Are you referring to managed switches like sonicwalls? They're available features but you shouldn't ever have to use it

A router routes a packet from one network to another.

A DHCP server assigns a Network adress and the basic network configuration to new network members.

I think you should read up on the basics instead of making inane posts.

Sorry I meant procurves not sonicwalls

Wtf are you talking about lol

...

I have no good answer for this. Even in far-fetched configurations like LT2P branch sites you either need a routed MAC on the far side of the WAN acting as a gateway and that could also serve DHCP.

I can only think that perhaps this is a holdover from true bridges with layer2 filtering?

Let's say your dhcp server is at 10.0.0.1/24 but your clients are on a different vlan, say 10.0.1.0/24. How are the dhcp client requests going to make it to the dhcp server? Dhcp helper address to the rescue, the switch will forward the requests and tell the dhcp server which address pool to use.

I was thinking more like lets say the link between your main building and your sub building is a layer 2 bridge that doesn't care about IP but is only permitting traffic from a specific MAC address to another specific MAC address.

Then you would need a DHCP server on either side of that bridge.

People these says say "huh?" when you talk about communication without IP.

Once you have a router in your topology you would setup normal IP helper stuff and it would be superior to have the central configuration.

But before 2000 you wouldn't necessarily have an extra router or layer 3 switch. That's why I was thinking holdover.

One more thing looking at the documentation.

I speculate that the Cisco DHCP implementation would be easier to integrate with AAA.

Switches operate on Layer 2 of the OSI model forwarding frames based on MAC Addresses and port association. No logical operations go on here.

Routers operate on layer 3 of the OSI model and route packets to different subnets, supernets, and outside interconnected networks. It determines its route via logical addressing in the form of IP, which is a layer 3 protocol.

Layer 3 switches do exist now and are becoming more commonplace, but that is currently besides the point. DHCP is an application and thus belongs to layer 7 of the OSI model, the application layer. Its function is to merely assign the IP address, the network address + subnet mask, and the gateway address to it's clients. Because switches do not operate on these grounds, switches do not use DHCP, and adding DHCP into a router is not good practice and uses more resources of the router than can better be used on the actual routing. This last part I'm not so sure about so don't quote me on that.

Networking student question: In a basic home network where is the DHCP server? Are those address assignments coming from my ISP? I was under (probably wrong) impression that home routers include a DHCP server for said home network? How/where am I confused?

Well I too am a student currently, just relaying my current knowledge and understanding.

But DHCP is a service and can be hosted internally within your network, but also externally by the ISP. Most basic bitch home routers come with a very basic integrated DHCP server to hand out it's private IP's, usually within the 192.168.X.X, 10.0.X.X, or 172.16.X.X, each with a subnet mask usually of /24, allowing 254 usable IP's which can then get assigned to 254 connected devices via the local DHCP server.

The only IP address that gets assigned to you by the ISP is your public IP that gets assigned to your router for outside communication. If your ISP is decent, it'll be DHCP'd and change or rotate every so often. If they're shitty like Comcrap, it'll be static and never change no matter what. But as far as IP assigning goes for enterprise and company environments go, if you want more IP's, a public IP CIDR block must be purchased and then subnetted from there yourself to create your network as you see fit.

AAA (802.1x) has nothing to do with IP. EAPoL is a L2 protocol.

Thanks. I understand public v private IP addressing, just wasn't clear about the dhcp part in the small home network... thanks for clarity

Your IP changing has nothing to do with how good your ISP is, and everything to do with how long your DHCP lease is and if some other client on your subnet is requesting an IP address at that time. If you've got a broadband request, your IP should never change because it's easier to just give you the same IP every time your router requests a new one do to the lease time getting close to expiration.

Nigga, with Comcast... all you have to do is change your router's MAC address (as long as your firmware supports this feature) and reboot your modem...

BOOM... new IP address.

Yeah, I know about DHCP leases, it was alluded when I said
>and change or rotate every so often

I don't know if it's just a regional thing or what, but Centurylink had like a week long lease and would automatically rotate the IP or would change it automatically when the router rebooted. Comcrap doesn't do this and actually goes out of their way to ensure the IP you get assigned when you first signed up is directly associated to the MAC of your router and is totally static, despite their shitty asses lying and saying that it too has a week long lease.

So yes, IP changing does have much to do with how good your ISP is because it depends on how they want to implement their address assignments.

Yeah, I know this. But you shouldn't have to even resort to that in the first place, which is why they're so shitty.

Why does anything need DHCP? You can probably answer your own question.

And just to add to this, Static Addressing should be the option, not the default. ISP's that assign addresses statically by default are scum of the highest order.

Outside of home networks, your DHCP server isn't usually on the router.

Man Sup Forums is really bad now. You guys couldn't even pass a simple A+ certification program being this stupid.

Why do we need routers? Computers have the right to share information freely. What in the flippin' h*ck gives DHCP the privilege to determine what's right? Why does it get to push labels onto clients, and interfere with the daemons write to drive it's own life and form it's own identity?

JUST UGH. Networking was designed to be inherently oppressive by sexist S.T.E.M. Lords. This is why we need more women in IT.

>Networking student question
Aren't they supposed to teach this shit in school?

Let's assume your regular old home network that applies to most people; generally these days a router is provided which provides the WAN link with a single public address provided by your ISP, modern routers also generally come with a DHCP and DNS server to hand out local IP addresses for anything that gets plugged in, most also come with a firewall as well.

>Women in charge of DNS
>naming schemes constantly change to their fleeting emotional whims
>shits constantly fucked

well its always a question of what you need. A static IP is great if you want to host a home server but bad if you get IP Banned anywhere or do not want to get traced.
That said here in germany the IP Address is changed every 24 hours, this has two reasons one to stop people from hosting servers and secound because there was a point in time where they sold more connections that they had IP Addresses so you got any free IP

for a while there i thought i was in /sqt/

>DHCP is an application and thus belongs to layer 7
What?
If a station communicates with the internet, traffic directed to it pass through the DHCP tables in the router to assert the MAC address to be used, wouldn't that mean it is well below layer 7 in the stack?

> traffic directed to it pass through the DHCP tables in the router

Nope, DHCP does nothing after leasing an IP address to the host.
ARP is the protocol that handles IP/MAC address resolution, and is entirely independent from DHCP.

ping is a tool with a phallic allusion in it's name

>Why do switches need dhcp?
easy answer: they don't.

individual vlans and closed networks mostly.

Layer 3 switches ARE routers, by definition.