{"id":462,"date":"2012-02-10T20:36:32","date_gmt":"2012-02-10T20:36:32","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=462"},"modified":"2018-09-06T23:25:20","modified_gmt":"2018-09-06T23:25:20","slug":"networking-basics-part-2-routers","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=462","title":{"rendered":"Networking Basics: Part 2 &#8211; Routers"},"content":{"rendered":"<p>This article continues the discussion of networking hardware by talking  about one of the most important networking components; routers.<\/p>\n<p>In the first part of this article series, I talked  about some basic networking hardware such as hubs and switches.\u00a0In this  article, I want to continue the discussion of networking hardware by  talking about one of the most important networking components; routers.<\/p>\n<p>Even if you are new to networking, you have  probably heard of routers.\u00a0Broadband Internet connections, such as those  utilizing a cable modem or a DSL modem, almost always require a router.  A router&#8217;s job isn&#8217;t to provide Internet connectivity though.\u00a0A  router&#8217;s job is to move packets of data from one network to  another.\u00a0There are actually many different types of routers ranging from  simple, inexpensive routers used for home Internet connectivity to the  insanely expensive routers used by giant corporations. Regardless of a  router\u2019s cost or complexity, routers all work on the same basic  principles.<\/p>\n<p>That being the case, I&#8217;m going to focus my  discussion around simple, low budget routers that are typically used to  connect a PC to a broadband Internet connection.\u00a0My reason for doing\u00a0so  is that this article series is intended for beginners.\u00a0In my opinion, it  will be a lot easier to teach you the basics if I am referencing  something that is at least somewhat familiar to most people, and that is  not as complicated as many of the routers used within huge  corporations. Besides, the routers used\u00a0in corporations work on the same  basic principles as the routers that I will be discussing in this  article. If you are wanting a greater level of knowledge though, don\u2019t  worry. I will talk about the science of routing in a whole lot more  detail later in this article series.<\/p>\n<p>As I explained earlier, a router&#8217;s job is to move  packets of data from one network to another.\u00a0This definition might seem  strange in the context of a PC that&#8217;s connected to a broadband Internet  connection. If you stop and think about it, the Internet is a network  (actually it&#8217;s a collection of networks, but that&#8217;s beside the point).<\/p>\n<p>So if a router&#8217;s job is to move traffic between two  networks, and the Internet is one of those networks, where is the other  one? In this particular case, the PC that is connected to the router is  actually configured as a very simple network.<\/p>\n<p>To get a better idea of what I am talking about,  take a look at the pictures shown in Figures A and B. Figure A shows the  front of a 3COM broadband router, while Figure B shows the back view of  the same router.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.windowsnetworking.com\/img\/upl\/image002a1159951461656.JPG\" border=\"0\" alt=\"\" hspace=\"0\" align=\"bottom\" \/><br \/>\n<strong>Figure A: <\/strong>This is the front view of a 3COM broadband router<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.windowsnetworking.com\/img\/upl\/image004a1159951461656.JPG\" border=\"0\" alt=\"\" hspace=\"0\" align=\"bottom\" \/><br \/>\n<strong>Figure B: <\/strong>A broadband Internet router contains a set of RJ-45 ports just like a hub or switch<\/p>\n<p>As you can see in the figures, there is nothing  especially remarkable about the front view of the router.\u00a0I wanted to  include this view anyway though, so that those of you who are unfamiliar  with routers can see what a router looks like. Figure B is much more  interesting.<\/p>\n<p>If you look at Figure B, you\u2019ll see that there are  three sets of ports on the back of the router.\u00a0The port on the far left  is where the power supply connects to the router.\u00a0The middle port is an  RJ-45 port used to connect to the remote network.\u00a0In this particular  case, this router is intended to provide Internet connectivity.\u00a0As such,  this middle port would typically be used to connect the router to a  cable modem or to a DSL modem.\u00a0The modem in turn would provide the  actual connectivity to the Internet.<\/p>\n<p>If you look at the set of ports on the far right,  you\u2019ll see that there are four RJ-45 ports.\u00a0If you think back to the  first part of this article series, you\u2019ll recall that hubs and switches  also contained large groups of RJ-45 ports.\u00a0In the case of a hub or  switch, the RJ-45 ports are used to provide connectivity to the  computers on the network.<\/p>\n<p>These ports work the exact same way on this  router.\u00a0This particular router has a four port switch built in.\u00a0Remember  earlier when I said that a router\u2019s job was to move packets between one  network and another? I explained that in the case of a broadband  router, the Internet represents one network, and the PC represents the  second network.\u00a0The reason why a single computer can represent an entire  network is because the router does not treat the PC as a standalone  device. Routers treat the PC as a node on a network.\u00a0As you can see from  the photo in Figure B, this particular router could actually  accommodate a network of four PCs.\u00a0It\u2019s just that most home users who  use this type of configuration only plug one PC into the router.  Therefore\u00a0a more precise explanation would be that this type of network  routes packets of data between a small network (even if that network  only consists of a single computer) to the Internet (which it treats as a  second network).<\/p>\n<h2>The Routing Process<\/h2>\n<p>Now  that I&#8217;ve talked a little bit about what a router is and what it does, I  want to talk about the routing process.\u00a0In order to understand how  routing works, you have to understand a little bit about how the TCP\/IP  protocol works.<\/p>\n<p>Every device connected to a TCP\/IP network has a  unique IP address bound to its network interface.\u00a0The IP address  consists of a series of four numbers separated by periods.\u00a0For example, a  typical IP address looks something like this: 192.168.0.1<\/p>\n<p>The best analogy I can think of to describe an IP  address is to compare it to a street address.\u00a0A street address consists  of a number and a street name.\u00a0The number identifies the specific  building on the street. An IP address works kind of the same way.\u00a0The  address is broken into the network number and a device number.\u00a0If\u00a0you  were to compare an IP address to a Street address, then think of the  network number as being like a street name, and at the device number as  being like a house number.\u00a0The network number identifies which network  the device is on, and the device number gives the device an identity on  that network.<\/p>\n<p>So how do you know where\u00a0the network number ends  and the device number begins? This is the job of the subnet  mask.\u00a0A\u00a0subnet mask tells the computer where the network number portion  of an IP address stops, and where the device number starts. Subnetting  can be complicated, and I will cover in detail in a separate article.  For now, let&#8217;s keep it simple and look at a very basic subnet mask.<\/p>\n<p>A subnet mask looks a lot like an IP address in  that it follows the format of having four numbers separated by  periods.\u00a0A typical subnet mask looks like this: 255.255.255.0<\/p>\n<p>In this particular example, the first three numbers  (called octets) are each 255, and the last number 0.\u00a0The number 255  indicates that all of the bits in the corresponding position in the IP  address are a part of the network number.\u00a0The number zero indicates that  none of the bits in the corresponding position in the IP address are a  part of the network number, and therefore they all belong to the device  number.<\/p>\n<p>I know this probably sounds a little bit confusing,  so consider this example.\u00a0Imagine that you had a PC with an IP address  of 192.168.1.1 and a subnet mask of 255.255.255.0. In this particular  case, the first three octets of the subnet mask are all 255. This means  that the first three octets of the IP address all belong to the network  number. Therefore, the network number portion of this IP address is  192.168.1.x.<\/p>\n<p>The reason why this is important to know is because  a router\u2019s job is to move packets of data from one network to  another.\u00a0All of the devices on a network (or on a network segment to be  more precise) share a common network number.\u00a0For example, if 192.168.1.x  was the network number associated with computers attached to the router  shown in Figure B, then the IP addresses for four individual computers  might be:<\/p>\n<ul>\n<li>\n<div>192.168.1.1<\/div>\n<\/li>\n<li>\n<div>192.168.1.2<\/div>\n<\/li>\n<li>\n<div>192.168.1.3<\/div>\n<\/li>\n<li>\n<div>192.168.1.4<\/div>\n<\/li>\n<\/ul>\n<p>As you can see, each computer on the local network  shares the same network number, but has a different device number. As  you may know, whenever a computer needs to communicate with another  computer on a network, it does so by referring to the other computer\u2019s  IP address.\u00a0For example, in this particular case the computer with the  address of 192.168.1.1 could easily send a packet of data to the  computer with the address of 192.168.1.3, because both computers are a  part of the same physical network.<\/p>\n<p>Things work a bit differently if a computer needs  to access a computer on another network.\u00a0Since I am focusing this  particular discussion on small broadband routers that are designed to  provide Internet connectivity, let\u2019s pretend that one of the users on  the local network wanted to visit the <a href=\"http:\/\/www.microsoftgeek.com\/\" target=\"_blank\">www.MicrosoftGeek.com<\/a> Web site. A Web site is hosted by a server. Like any other computer, a  Web server has a unique IP address. The IP address for this particular  Web site is 24.235.10.4.<\/p>\n<p>You can easily look at this IP address and tell  that it does not belong to the 192.168.1.x network. That being the case,  the computer that\u2019s trying to reach the Web site can\u2019t just send the  packet out along the local network, because the Web server isn\u2019t a part  of the local network. Instead, the computer that needs to send the  packet looks at its default gateway address.<\/p>\n<p>The default gateway is a part of a computer\u2019s  TCP\/IP configuration. It is basically a way of telling a computer that  if it does not know where to send a packet, then send it to the  specified default gateway address. The default gateway\u2019s address would  be the router\u2019s IP address. In this case, the router\u2019s IP address would  probably be 192.168.1.0.<\/p>\n<p>Notice that the router\u2019s IP address shares the same  network number as the other computers on the local network. It has to  so that it can be accessible to those computers. Actually, a router has  at least two IP addresses. One of those addresses uses the same network  number as your local network. The router\u2019s other IP address is assigned  by your ISP. This IP address uses the same network number as the ISPs  network. The router\u2019s job is therefore to move packets from your local  network onto the ISPs network. Your ISP has routers of its own that work  in exactly the same way, but that route packets to other parts of the  Internet.<\/p>\n<p>As you can see, a router is a vital network component. Without routers,  connectivity between networks (such as the Internet) would be  impossible. In Part 3 of this article series, I will discuss the TCP\/IP  protocol in more detail.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article continues the discussion of networking hardware by talking about one of the most important networking components; routers. In the first part of this article series, I talked about some basic networking hardware such as hubs and switches.\u00a0In this article, I want to continue the discussion of networking hardware by talking about one of [&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-462","post","type-post","status-publish","format-standard","hentry","category-networking-stuff"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/462","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=462"}],"version-history":[{"count":5,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/462\/revisions"}],"predecessor-version":[{"id":2651,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/462\/revisions\/2651"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}