{"id":201,"date":"2011-11-22T23:36:08","date_gmt":"2011-11-22T23:36:08","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=201"},"modified":"2018-09-06T23:09:34","modified_gmt":"2018-09-06T23:09:34","slug":"adding-a-switch-to-a-router-for-more-ports","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=201","title":{"rendered":"Adding a Switch to a Router for more ports"},"content":{"rendered":"<p>I often see questions in the forums from people struggling with one  of the most basic tasks in creating a home network: what to do when you  run out of ports in your router.<\/p>\n<p>The answer is to just connect a switch, as shown in the diagram below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Expanding Router Ports\" src=\"http:\/\/www.smallnetbuilder.com\/images\/stories\/basics\/how_to_add_ports\/router_and_switch.jpg\" border=\"1\" alt=\"Expanding Router Ports\" width=\"550\" height=\"453\" \/><\/p>\n<div><ins><ins id=\"aswift_0_anchor\"><\/ins><\/ins><\/div>\n<p>But since that makes for a very short article, I&#8217;ll answer some questions about adding a switch that I&#8217;ve often seen.<\/p>\n<h3>1. Is a switch the same as a router?<\/h3>\n<p>No. The simple explanation is that (consumer) routers can share a single Internet connection among multiple <a id=\"itxthook1\" rel=\"nofollow\" href=\"http:\/\/www.smallnetbuilder.com\/lanwan\/lanwan-basics\/31442-how-to-add-ports-to-a-router#\">computers<\/a>. Switches cannot. Switches allow you to share a single port on your router (or another switch) among multiple Ethernet devices.<\/p>\n<h3>2. How does a switch work?<\/h3>\n<p>Switches handle data based on the <a href=\"http:\/\/en.wikipedia.org\/wiki\/MAC_address\" target=\"_blank\">MAC address<\/a> in the data packet. The switch automatically learns the MAC address of  each device connected to its ports and stores it in a lookup table in  the switch.<\/p>\n<p>Each data packet sent contains the  source MAC address from the  device sending the data and a destination MAC address for the device  that the data is intended for. The switch looks at the destination  address and sends the data only to the physical switch port that the  destination device is connected to.<\/p>\n<h3>3. Does adding a switch to my router slow it down?<\/h3>\n<p>No. The only time data leaves the switch is when the data packet  contains a destination address for a device that is not connected to the  switch.<\/p>\n<p>So if you have a network media player playing a file stored on a  NAS that are both connected to the same switch as shown below, data  never  touches the cable connecting the switch to a router.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Local Data Stays Local\" src=\"http:\/\/www.smallnetbuilder.com\/images\/stories\/basics\/how_to_add_ports\/local_data_flow.jpg\" border=\"1\" alt=\"Local Data Stays Local\" width=\"455\" height=\"470\" \/><\/p>\n<h3>4. Will putting devices on an added switch slow them down?<\/h3>\n<p>Maybe. The single  connection between the switch and a router can become a bottleneck if the total amount of data <em>simultaneously<\/em> sent across the connection exceeds the capacity of the connection. A 10\/100 switch can handle 100 Mbps total of data <em>in each direction<\/em> simultaneously on each port; a Gigabit (10\/100\/1000) switch can handle 1000 Mbps.<\/p>\n<p>Bottlenecking usually doesn&#8217;t happen for web browsing, email and similar activities in home and small <a id=\"itxthook2\" rel=\"nofollow\" href=\"http:\/\/www.smallnetbuilder.com\/lanwan\/lanwan-basics\/31442-how-to-add-ports-to-a-router#\">business networks<\/a> because the data sizes are relatively small, the activity is intermittent and the number of devices is low.<\/p>\n<p>What <em>can<\/em> cause problems are sustained activities like large file transfers, Torrenting and multiple video streams.<\/p>\n<p>The only way to make sure that you don&#8217;t run into a bottleneck is  to analyze  your data flows and keep flows with high bandwidth  requirements on the same switch. If you want to actually measure network  speed, see <a href=\"http:\/\/www.smallnetbuilder.com\/lanwan\/lanwan-basics\/31220-how-fast-is-your-network-five-ways-to-measure-network-speed\">How Fast Is Your Network? Five Ways To Measure Network Speed<\/a>.<\/p>\n<p>All of today&#8217;s  switches (10\/100 and Gigabit) are designed to  provide non-blocking wire-speed transfer between all switch ports  simultaneously. This means each pair of devices can send and receive  data at their maximum port speed, without interfering with any other  pair.<\/p>\n<p>Also see #14 below.<\/p>\n<h3>5. Does it matter which ports I use to connect?<\/h3>\n<p>No. But in the old days, it did. Switch ports were designed to  primarily connect to devices. So when you had to add a switch you had to  either use a special crossover cable that swapped the receive and  transmit wire pairs. Or sometimes <a id=\"itxthook3\" rel=\"nofollow\" href=\"http:\/\/www.smallnetbuilder.com\/lanwan\/lanwan-basics\/31442-how-to-add-ports-to-a-router#\">routers<\/a> and \/ or switches would have special &#8220;uplink&#8221; ports that had the receive and transmit connections already swapped.<\/p>\n<p>All that has gone away. All of today&#8217;s routers and switches have ports with <a href=\"http:\/\/en.wikipedia.org\/wiki\/Medium_dependent_interface#Auto-MDIX\" target=\"_blank\">auto MDIX<\/a>, which automatically detects whether a device or another switch port is connected and adjusts accordingly.<\/p>\n<p>Even if you have a very old router, the switch you purchase will  have auto MDIX and all you need is one device that supports it (but it&#8217;s  ok if both switch and router do).<\/p>\n<h3>6. Can I add more than one switch?<\/h3>\n<p>Sure. But keep in mind the bottlenecking issue in #4 and group your devices and size your switches to avoid it.<\/p>\n<p>If you do add multiple switches, use a star connection (see below) when possible and avoid daisy-chaining switches.<\/p>\n<p><img title=\"Suggested way to connect multiple=\" alt=\"\" \/><\/p>\n<p>Managed and &#8220;smart&#8221; switches won&#8217;t buy you any more performance.  They do provide special features that can come in handy in larger  networks. See <a href=\"http:\/\/www.smallnetbuilder.com\/lanwan\/lanwan-basics\/30840-smart-switch-how-to-part-1-what-a-managed-switch-can-do-for-your-small-network\">Smart Switch How To &#8211; Part 1: What A Managed Switch Can Do For Your Small Network<\/a> to help you decide.<\/p>\n<h3>9. Can I reuse an old router as a switch?<\/h3>\n<p>Yep. <a href=\"http:\/\/www.smallnetbuilder.com\/lanwan\/lanwan-basics\/30740-how-to-use-a-router-to-add-network-ports\">See How To Use a Router To Add Network Ports<\/a>. Use Method 1 to avoid unnecessary hassle.<\/p>\n<h3>10. Does it matter whether I use ports on the router or ports on the added switch?<\/h3>\n<p>No. The ports on the router connect to a switch chip, which works  the same way as a chip in a standalone switch. The &#8220;routing&#8221; part of the  router, i.e. the part that handles data to and from the Internet  doesn&#8217;t get involved with data moving <em>between<\/em> devices on the switch.<\/p>\n<h3>11. How long can cables between switches be?<\/h3>\n<p>100 Meters, the same as between a device and the switch.<\/p>\n<h3>12. What does the inside of a switch look like?<\/h3>\n<p>Today&#8217;s switches have everything integrated into a chip. The   inside of the D-Link DGS-2208 shown below clearly shows the Vitesse  switch chip. The rest of the components are for power supply and  required to support the switch chip.<\/p>\n<p><a title=\"Inside of D-Link DGS-2208 switch\" rel=\"thumbnail\" href=\"http:\/\/www.smallnetbuilder.com\/images\/stories\/lansrouters\/8port_gigabit_roundup\/dlink_dgs_2208_board.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Inside of D-Link DGS-2208 switch\" src=\"http:\/\/www.smallnetbuilder.com\/cache\/multithumb_thumbs\/b_551_0_16777215_0___images_stories_lansrouters_8port_gigabit_roundup_dlink_dgs_2208_board.jpg\" alt=\"Inside of D-Link DGS-2208 switch\" width=\"551\" height=\"342\" \/><\/a><\/p>\n<h3>13. Does adding a switch mess up IP assignment?<\/h3>\n<p>No. As described in #2, all a switch does is direct traffic based  on MAC address. IP assignment is done via DHCP or manually and is a  higher level protocol (TCP\/IP), which switches just pass through. IP  address assignment is made to devices attached to the switch ports, not  the ports themselves. As long as packets contain the correct destination  MAC address, they&#8217;ll get through to the proper device.<\/p>\n<h3>14. Does adding a switch increase latency \/ ping time?<\/h3>\n<p>Technically, yes. But the increase is  lower than anything you will notice. For example, NETGEAR specs latency for its <a href=\"http:\/\/netgear.com\/business\/products\/switches\/unmanaged-desktop-switches\/GS108.aspx\" target=\"_blank\">GS108 8 port Gigabit switch<\/a> at 4uS (microseconds) for 1500 byte packets @ 1000 Mbps. This is nothing to be concerned with.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I often see questions in the forums from people struggling with one of the most basic tasks in creating a home network: what to do when you run out of ports in your router. The answer is to just connect a switch, as shown in the diagram below. But since that makes for a very [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-201","post","type-post","status-publish","format-standard","hentry","category-networking-stuff"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=201"}],"version-history":[{"count":5,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/201\/revisions"}],"predecessor-version":[{"id":2629,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/201\/revisions\/2629"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}