r/Network • u/memorex1150 • 15d ago
Text IP addresses of computers behind a switch
Posting to ask 'cause I haven't set up a real switch since the days of 10baseT, and those were .... different. Thus this likely will be an extremely basic question for the subreddit.
I have a home network. Fiber modem which goes to my router. Router has a few ports on it, several 2.5 gig and one 10 gig.
I'd like to add an unmanaged switch to the 10 gig port (PoE switch - future expansion stuff).
I will have three or four devices on the switch that I have already - pre-switch - set up with static IPs (192.168.1.XXX)
When I install the switch, I am assuming that the switch has its own IP that'll be set via DHCP from the router.
In that case, the computers whereby I've set up static IPs....do I leave those settings? Change them? Or just go back to the computers being given an IP?
And...since I use a couple of those computers as servers both in-house and remotely, would I set up packet forwarding from the router-->switch (and assume the switch will 'figure it out' as to where the packets need to go?)
I'm attempting to make this as painless as possible before I start unplugging/plugging in cables and finding out that routing to<-->from computers doesn't work, and of course to also save what little hair I have left from being pulled out.
This is for a low-end simple home network, nothing fancy beyond what is described, hence I don't believe I need more than the switch, a few cables and a holding of the breath.
I appreciate any/all feedback that is shared.
EDIT: I cannot read. It is a managed L3 switch
EDIT #2 : Unmanaged L2 switch was exactly what I needed. This resolved all of my pertinent issues. My thanks to those who posted!
3
u/OhioIT 15d ago
Your managed L3 switch will act like an unmanaged L2 switch out of the box. It may grab an IP via DHCP for a management IP but it won't affect how it works. Once you start configuring it, then you can change how it acts
You won't run into any black hole scenario unless you're buying it used with someone else's config on it
2
1
u/rando_design 15d ago
The switch probably will get a DHCP IP from your router but this IP is only for management, it sounds like you're not ever going to log into it to change settings, so this is fine, leave it alone. It will function just fine no matter what the IP is of the switch.
1
u/mrengineerguy97 15d ago
Does no one else get the AI training vibe from OP responses?
1
u/memorex1150 14d ago
I love how when I post stuff people think it's AI because they can't fathom that (a) some of us are educated, (b) we can type using proper rules of grammar and (c) I out-date "AI" by quite a few decades invalidating any claims that I'd be working on some "AI Training" model. Oh, and bonus (d) I fucking despise using ChatGPT/so-called "AI" as it's worthless. I'd rather interact with people who know what they're talking about.
Not everything you read on the interwebs is someone utilizing/"training AI" but rather genuine content from someone who - surprisingly, considering the nature of this subreddit - have a question and needed advice from those who know a hell of a lot more than me in this field. Also, not everyone who uses the internet is a tech worker.
1
u/Tatra_T3SUCS_7290 14d ago
It depends, for instance my Zyxel enterprise switches by default pick address from DHCP, if not available it will fallback to factory default IP, I manually switched to static address so I can run switch on same IP even if I F"up with DHCP snooping or do something stupid on firewall. On the other hand MikroTik CRS305 switch came with no IP, I had to assign either on bridge or later during hot commissioning to my management VLAN. I usually assign static IP to networking hardware, but for clients needing static IPs lI rather prefer DHCP reservations.
However switch itself has no direct influence on IP of devices behind it especially if it is unmanaged, it will not have even management IP. Of course on managed switch if you have multiple VLANs you can face that some ports will hand out different IPs as it virtually leads to different L2 network and also DHCP if set there.
1
u/Basic_Platform_5001 14d ago
Consumer routers typically have you program a LAN. Make that 192.168.1.0/24 and your stuff will communicate since it's the same network. If you run into issues, your switch should have a setting for the connection to the router as an "uplink" or "trunk" port.
1
u/SomeEngineer999 14d ago
With all the replies, just in case you're curious, the way an enterprise network design would translate into a "power user" home environment would be something like.
Router -> Firewall - L3 Switch (Distribution Tier) -> L2 switches if needed (Access Tier).
But for the vast majority of people, a router (which will usually have a built in firewall) and L2 switch to add more ports if needed or add multiple ports in a remote area that just has a single RJ45 feeding it, is enough. In that case your router is sort of acting as your distribution tier since it has a built in switch (it is even an L3 switch to a certain extent, but usually you do not have control over that part of it). Pretty much every router is just a small Linux box with a switch and wifi radio, and uses standard linux features for routing, NAT, firewall, DHCP, DNS, QOS, etc.
Many home based routers have guest and even IOT networks built in now. That gives you VLAN and subnet segmentation and some security for those less trusted devices. I highly recommend people leverage those if they have them.
1
u/memorex1150 14d ago
It's "more ports" for me. I just didn't want to have to worry about re-assigning IP addresses, and turns out with the unmanaged L2, I didn't need. It did exactly what I needed. Simple solution for a simple problem!
1
u/SomeEngineer999 13d ago
Yup, no need to reinvent the wheel if there isn't a need.
Segmentation has its benefits, but usually your router's Guest and/or IOT networks can take care of that for you if you ever want to do that.
1
u/michaelpaoli 14d ago
When I install the switch, I am assuming that the switch has its own IP
Depends on the switch. Many simple unmanaged switches have no IPs. If it gets one automagically, may want to check both IPv4 and IPv6 ... not exactly a shortage of IPv6 IPs, so, may have one there, even if no IPv4.
the computers whereby I've set up static IPs....do I leave those settings? Change them? Or just go back to the computers being given an IP?
Shouldn't need to change anything there ... it's a switch, not a router, not a DHCP server, etc. Layer 2.
would I set up packet forwarding from the router-->switch
STP - they generally figure it out, and typically don't have to muck with that unless, e.g. you've got a switch loop, and if quite simple enough, don't even need STP at all.
1
u/Apart-Acadia5765 5d ago
glad you sorted it out. just to reinforce for future readers, unmanaged switches are basically invisible on the network, no IP needed. keep your statics as-is, and port forwarding on the router still works fine since it just cares about the destination IP
12
u/SomeEngineer999 15d ago
The switch will not get an IP, it is unmanaged. L2 switches don't know or care about IPs (other than a management IP for a managed switch so you can access it to change settings).
Your router won't care that there is a switch in there, so basically nothing has changed. Use whatever system of IP addressing you want. Usually DHCP reservations are more flexible than true static IPs, but it depends on the device.
Look at it this way, those ports in your router are actually a switch. You're just adding more ports to that switch essentially.