Do I need a router? Or will a switch do the same thing?

This is a two part question.
1. First, explain to me the differences between a router and a switch. I get that a router has a switch on it, but I want to know what exactly that router does differently than the switch.
2. What would be your hardware suggestion based on my scenario.

I'm setting up a small home network using Ethernet. I have 3 computers and a FreeNas server. I bought a new modem and I've looking at getting an old PC for cheap and using it in conjunction with pfSense for my router; just like the tutorial Wendell posted. I mentioned this to my co-worker (I work at Best Buy) and he said that I don't need a router, but a switch will do the same thing. However, he then realized that my ISP enforces 1 IP address rules so I do in fact need a router. Now I'm determining weather to continue with my original plan, or should I just get a cheap router and a switch.

A router sends thing from your modem to your internal network

a switch connects everything to your internal network from the router

internet>modem>router>switch>end device

internet>modem>bastardization that is router/switch/WAP combo unit>end device

2 Likes

But is the router actually necessary? If I had a switch connected directly to the modem, wouldn't that work just fine? And if I did that, would I have an external IP address for all my devices?

yes

What is a Network Switch versus a Router?

Switches create a network. Routers connect networks. A router links computers to the Internet, so users can share the connection. A router acts as a dispatcher, choosing the best path for information to travel so it's received quickly.

especially not unmanaged switch

1 Like

So in other words, my co-worker is misinformed.

Thank you good sir.

1 Like

While we are on the subject, maybe you could explain how internal VS. external IP address work. This is the other thing that was tripping me up. The part I'm confused about is how they translate from one to the other.

So what is happening is that your router is getting an external IP from your ISP which is what the internet will see when you connect. In this photo they are the 20.0.0.1 and 20.0.0.2 IPs. You almost always have more than one device you want to connect to your network however so your router gives out IPs to the devices on your network. Since you only get one IP from your ISP you need to use a different and INTERNAL IP set. Those are the 192.168.0.1 IP range. All the traffic from those is aggregated through the single IP from your ISP.

This also means that you can't connect to any device behind a router unless you have something called port forwarding or DMZ configured. Both of these assign certain devices behind your router as targets for certain traffic. Port forwarding does it on a port by port basis and DMZ targets all traffic to a single machine.

2 Likes

That makes more sense.

One other question. Does the modem do anything other than translate? For DSL to Ethernet it has to translate analog to digital, but what about cable? Isn't cable digital?

Cable is analogue. It's basically radio waves over a cable.

1 Like

Oh, didn't know that.

I guess modems can create one internal IP on their own, right? If I wired my PC directly to the modem, it doesn't give me an external address.

With Network Address Translation. NAT uses ports to remember which node on the subnet made a connection to an IP address and stores that information in a state table, so when the request reaches the gateway it knows which device to route the packets to.

Also this video goes into some of the basics of networking and explains the difference between switches and routers and how they work:

1 Like

Honestly couldn't say for sure. I have ATT and have a combo unit forced upon me. If your modem is configured with a firewall and routing capabilities then it would be able to generate more IPs than just the one. If not then it should be a direct pass through to the internet.

What kind of IP do you get with a direct connection? Is it a 192/10/172?

A switch switches traffic between physical ports using MAC addresses. A router switches traffic between networks using IP addresses.

So you need a router any time you want one network to communicate with another, so in the case of a home internet connection, you need the router to connect your local network to your ISP's network which they would then have another router which connects them to the internet which is itself a network of routers (an internetwork)

NAT is part of the firewall and is seperate from routing but all consumer 'routers' will have this function. NAT is used to share a single public IP address with multiple devices on the network. You can plug a computer directly in to a modem and have a public IP address without the need for a router, because that device is now on the ISP's network. If you plug a computer in to a modem and do not get a public IP then that modem is also a router.

2 Likes

It's 192.168.100.1

Wait, wait, I just realized that's probably not my IP address. That's the address I type in to configure settings on my modem.

yes, your public IP is much more different

like so

230.141.191.127

https://www.browserling.com/tools/random-ip

1 Like

Open CMD and type in ipconfig and hit enter. Should show you your IP in the printout.

At the moment I'm using a modem/router combo, so it shows up as an internal IP.

Okay. What did you want to do anyway?

Well for starters, I'm going to get rid of the modem/router I've been renting and replace it with my own modem, which I purchased. Now I need to decide what to do for a router. (on a budget)

A. Build my own router using an old PC off of craigslist.
B. Buy a cheap N router and a switch.(and disable wifi because I won't use it)

The whole reason this thread started is because my co-worker told me I could connect a switch directly to the modem