-2

I'm trying to understand the OSI Model.

On layer 3, we normally have the router which is responsible to route traffic to corresponding host by ip address.

In my home, I have all my devices connected to a router(some wireless, some wired), I don't have a switch installed at home. It seems with the router is already routing the traffic by ip address by itself, where is the layer 2 (switch) ?

Of course, I think switch must be involved somewhere, I just don't know. Can someone also explain how router and switch work together? It seems to me switch is useless, because router can already connect device, route traffic.

Aaron Shen
  • 8,124
  • 10
  • 44
  • 86

1 Answers1

0

Most consumer-grade routers include an integrated switch, ie. they have more than a single LAN port.

A simple switch is plug and play - you just connect all devices to the switch and the can talk to each other. Using a router to connect a local network would be a pain - you'd have to manually assign IP addresses to all its ports and to the connected device. Automatic IP addresses through DHCP rely on a functional layer 2 (ie. switched or shared L2 segment) and doesn't work over routed links.

However, simple doesn't mean useless. Switches are required to expand a single routed uplink into a number of ports that you can connect devices to.

Additionally, there are very sophisticated switches you can use to build a large and powerful network (more advanced switches can also route while switching).

Zac67
  • 2,761
  • 1
  • 10
  • 21