I know that modem provides internet access owing to modulation-demodulation. Router provides connection between networks as a gateway.(e.g. between LAN and ISP) Switch provides a local area network(LAN). Router and switch can share internet by means of modem. But why do we use router and switch together? Both of them can distribute the internet to devices in LAN in home usage. That is, they do same thing in home usage. What is the reason of using these devices together? In home usage, Are either router or switch redundant? The second thing I wonder is that many ISP companies give us single device which is 2 in 1. This device contains modem and router. Why do we need router to access internet? I know that router cannot go to internet without modem. So we need just modem to access internet. Why do they give both of them as a single device. I want to understand all of these. If anyone help me, I will be grateful. Thanks in advance.
Are either router or switch redundant?
The kind of router you use at home has some consumer-friendly features that make it a little different from a "true" enterprise router, and I think that may be the cause of your confusion. If you look at the back of your home router, you will probably see four ports labeled "LAN" where you can connect your devices via Ethernet cable. Those four "LAN" ports, technically speaking, are a switch built right into the router. In other words, home routers are not really just routers, but a router and switch put together. This makes things more consumer friendly because if you have only four wired devices to connect, then you don't need to purchase a switch. In this case, it is true that purchasing a switch would be redundant.
In an enterprise router, however, there is a good chance the router will NOT have a built-in switch, so it may have only two ports: one for your internet connection, and one for your LAN. In that case, you would have to connect a separate switch to the LAN port.
The second thing I wonder is that many ISP companies give us single device which is 2 in 1. This device contains modem and router. Why do we need router to access internet? I know that router cannot go to internet without modem. So we need just modem to access internet.
You are correct: All you really need is a modem to access the Internet. In fact, you could go to the store and purchase just a modem right now, plug it in, activate the modem with your ISP, connect a computer straight to the modem, and browse the Internet just fine without a router at all. In fact, this was the norm about a decade ago.
However, there are some problems with this setup. First, most internet service providers these days only give one public IP address to each customer, so you can only connect one computer to the modem. Consumer routers perform a function known as NAT (Network Address Translation), so that multiple devices can share a single public IP address.
Also, when you directly connect a computer to the modem, you no longer have a private LAN - instead, you are connected directly to the LAN of your Internet service provider which is connected to the Internet. This directly exposes your computer to all the hackers, port scanners, vulnerability-scanning bots, and other not-so-nice stuff on the Internet, with only Windows Firewall to protect you. Consumer routers typically have built-in firewalls which will block almost all incoming connections, so that your computer doesn't have to deal with the bulk of the malicious traffic out there. For these reasons, it is very rare to not use a router.
You want a router at home that you can configure to your own preferences. With a router you can provide internal DHCP leasing, assign IP addresses, create a wireless network with a strong password, filter traffic, and other things. I've never had a "2 in 1" device that provides routing and a modem (I have a modem only at home, with my own router behind it). If I did have one, I would make sure that it's set up the way I want it set up, not doing what the ISP wants it to do - I wouldn't trust them to necessarily be trying to protect your network (as noted above, it could be just a modem + switch, not really a modem + router). Also,you probably do not need any switches in a home network unless you have a wired network with a lot of pcs and need more ethernet ports to plug into.
In short, I think of a router as a line of defense between my network and a direct connection to the internet -- one of the main things it will do is only forward traffic into your network that is meant to go there. A switch will do this too, but less intelligently.