How Does a Router Work? A Simple Explanation of the Ins and Outs
Pinterest Whatsapp

routerLately, the Technology Explained articles have talked about the Internet and communications in general. This article will add to that series by explaining a very important piece of equipment – the router What Is a Router and How to Use One: The Beginner's FAQ What Is a Router and How to Use One: The Beginner's FAQ After reading this FAQ, you'll have a better idea of what a router is, how to set one up properly, and how to use it to full effect. Read More .

In order for a computer to connect to more than one other computer, you need a router or a hub. Two very different pieces of equipment that perform somewhat similar jobs. We’ll focus on the router since you very well may have one in your house.

Let me take a moment to explain to the more technically inclined that I understand that there are such things as token ring networks that don’t require a router or a hub. Yet, our average Internet user isn’t going to employ a token ring, so leave that alone, please.

Many of you will have wireless routers, a few of you may have wired routers. How the information gets to and from the router isn’t that important to this discussion. What is important is how does a router work – what happens inside the router with all that data coursing through it. To keep it simple, I’m going to use a 3 computer network to explain the routing principles.

So, let’s say you have three computers in your home and a connection to the Internet. This will give us a network that looks like such:

how does a router work

In the middle of that, is the wireless router. I know you knew that, but it had to be said. Wirelessly attached to it are a laptop, a PC, and a Mac (just for you Jackson!). Actually, the Mac is in there to show that the computers don’t necessarily need to be the same kind or platform. One might be sending up a file to work, one might be downloading something from YouTube and one is reading – of course. All this information is coming down from, and up to, the Internet.

Believe it or not, the router can only talk to one of these things at a time! The process I’m about to talk about just happens so fast that it seems to happen all at once.

Let’s say that the Mac is uploading a file to work, the laptop is watching YouTube and the PC is surfing

Each communication happens in small packets of data. You might recall this from the How the Internet Works How The Internet Works [Technology Explained] How The Internet Works [Technology Explained] Read More article I did awhile back. The IP address in that article was the important thing that allowed packets to find their way to your computer. Here’s a packet:

how does a router work

The important parts, for this article, are the Source Address and the Destination Address. These will be Internet Protocol (IP) addresses.

However, if you are using a router, your computer’s IP address is going to begin with either 198.168.0 or 10.0.0. This is because the powers-that-be decided that those IP address would be reserved for local network use. Like in a home network.

Here’s the catch. There are millions of local networks out there. So, at any point in time, there are millions of people using an IP address exactly like the one your computer is using on your home network. Your router will have to keep track of that AND tag the outgoing packets with the true IP address that your Internet Service Provider has given to your modem. I’ll call that the external IP address. How does the router do that? That’s the question.

I am going to oversimplify this, not to speak down, but to keep this article a reasonable length. The router takes your computer’s local IP address out of the packet’s Source Address and puts it in a table. It then puts the external IP into the packets Source Address space. The router also copies the Destination Address IP from the packet and puts it in the table associated with your local IP. Confuzzled? Me too. I really had to think about how to say this in everyday speak and not geek-speak. Here’s a picture:

how does a router work


how does a wireless router work

When the packet comes back from that server somewhere out on the Internet, the Destination Address IP is now your external IP and the Source Address IP is now the IP address of the server sending you a packet. (Note: that is the IP address of – not my home IP address.)

Think of it like a letter. You send a friend a letter and the return address is yours, and the send-to address is theirs. They write a letter back and the return address is theirs and the send-to address is yours. See how that works? We should write more letters.

how does a wireless router work

Well, the router looks at the Source Address IP of the incoming packet and looks it up in the table as a former Destination Address IP. When it finds it, the router says, “Aha! Guy’s computer sent a packet to that IP address. His computer must be waiting for a reply! Here’s Guy’s local IP address so I’ll pull out the external IP address, pop his local IP address in and send it on its way!” That’ll do router, that’ll do.

how does a wireless router work

You can imagine, with how many thousands of packets travel in and out of your home every minute, how fast this sorting process has to be! It happens so fast, you never even notice the fact that at one moment the router is talking to the Mac, then the laptop, then maybe the Mac again, and then the PC. Miracles everywhere – just stop and notice.

I hope you enjoyed this article on how a router works, and now have a better appreciation of what’s going on in that silly box of electronics next to your modem. If there are any other technologies you’d like me, or our other great writers, to break down for you, I’d be glad to hear about it in the comments!

Image Credit: A.Mohsen Alhendi

Enjoyed this article? Stay informed by joining our newsletter!

Enter your Email

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. prismpeter
    May 3, 2018 at 12:17 am

    There are many technologies used in a router different router uses different technology and the most secure router is netgear customer support because it uses double layer protection

  2. Dis. Vet. Rex R. Bahr
    February 13, 2018 at 4:13 am

    YEH, BUTT, Noone says how the signal gets out of the router and into my smart TV?

  3. Derek
    October 26, 2017 at 8:32 am

    First class article. Now I understand a router and will be more confident in reconfiguring my router myself. ??

  4. krushna
    September 17, 2017 at 5:17 pm

    Nice info

  5. Brendan Calnan
    May 31, 2017 at 4:53 pm

    Thank you for explaining this in terms we tech dummies can understand.

  6. Aziz
    May 31, 2017 at 12:08 pm

    Fantastic piece. I really appreciate it ?

  7. Chand
    April 12, 2017 at 8:49 am

    What is the relation between NAT and Router, please, please write an article about this? here is my mail,

  8. zinnia
    April 8, 2017 at 3:40 pm

    Explained in a simplified manner and hence was able to grab the entire concept easily.Thanks a lot.

  9. Muhammad Abu Bakar
    March 15, 2017 at 6:02 am

    Well explained.

  10. bijan
    February 13, 2017 at 9:16 am

    That is very usefull
    Thank's so much

  11. Rob Moore
    July 16, 2016 at 7:33 pm


    Thanks for a very informative article. One question: You dealt with transmissions that originated from within the Routers network. How does it deal with transmissions that oriiginate from out on the internet but want to talk to a local computer?


  12. Nageswari Sekar
    June 27, 2016 at 11:57 am

    Hello Guy McDowell,
    This article served for my question. And your way of explaining things was very nice to read and understand. Could you tell me, when we were browsing different things in multiple tabs from a same system, will the external IP address be same or different?

    • The Guy's Computer
      August 25, 2016 at 1:22 pm

      The External IP will be the Same even we are browsing different things or webpages or in a different browser. Even If you check 'what's my IP' on your computer and mobile device you will get the same ip flashing on the Ip tracing websites as the both devices are connected to a single router which have the single connection from your ISP.

  13. Anonymous
    April 2, 2016 at 1:33 am

    Thanks for this article. How does the router go from being a plastic box to being so intelligent? Can you point me in a direction where I can enlighten myself? Thanks!

  14. Sam
    March 23, 2016 at 2:33 pm

    I was wondering, how does the router differentiate between two computers that make a request to the same host at the same time? Eg two computers go to at the same time. If the router only knows that each device with a local ip made a request to Facebook, then how does it know which response to return to which computer on the network? Does the router record the MAC address of the respective computer for each request along with its local ip?

    • Guy McDowell
      March 30, 2016 at 12:21 am

      Hi Sam,

      Good questions. I answered them a bit further down in the comments.

  15. Edozie
    March 10, 2016 at 9:41 am

    Pls,i am just a new person in IT world,how can i identify an ip for router and also does router issue ip automatically to a

    • Guy McDowell
      March 14, 2016 at 1:55 pm

      You can search Google for the default IP address of the make and model of your router. Or you can use IP mapping software like nmap to get the IP addresses of any device on your network.

      A router can be set up to issue an IP automatically (DHCP) or to use only static IPs.

  16. Dmitry
    February 23, 2016 at 10:40 am

    I was looking for two days to find that article! Greetings from friendly Belarus :D

    • Guy McDowell
      February 23, 2016 at 11:02 pm

      Hey Dmitry,

      I'm glad you liked it. I love doing these kinds of articles. It makes me very glad when they help someone.

  17. sandeep sigh
    February 17, 2016 at 4:26 am

    awesom ...article

  18. User
    January 27, 2016 at 4:46 am

    Why does Guy's Local IP have 5 parts? There seems to be an extra 0.

    • Guy McDowell
      January 27, 2016 at 9:04 pm

      Good catch. That was a typo when I created the graphic. Even I missed it until you mentioned it.

  19. Anonymous
    September 18, 2015 at 7:43 pm

    Great article!
    What if I have made a VPN connection, how does the sytem work then? I imagine that my PC needs to tell router the IP of my VPN. But how does my PC forward the web address I really need to get to?

  20. Anonymous
    September 12, 2015 at 9:16 am

    Hi Guy!

    This is an awesome article. I have a doubt and it would be great if you could clarify. Suppose 2 devices connected to the same router are fetching data from the same website. So when the router receives the data, how does it map to the correct local device?

    • Guy McDowell
      September 14, 2015 at 4:54 pm

      Each request that passes through the router is tracked. The router tracks which computer made the request and to what site it made the request. When it requests a packet from the site, it tracks that request. So when the packet comes in, the router says, "Aha! You go to computer 2."

      The router doesn't know that two computers may be accessing the same site. So it doesn't get confused when two packets come in from the same site for different computers. It just sees it has a packet that Computer 1 or 2 requested and passes it along.

      Think of it like ordering catologs. You and your spouse both ordered the same catalog from the same company.

      The post office doesn't care. They just take both letters and delivers them. Then the company ships two catalogues to the same address but in different names. The post office gets the catalog and sees that they go to the same house and delivers them. From there they get to the right people.

      That's a really loose analogy, but I hope it helps.

      • Anonymous
        September 14, 2015 at 5:03 pm

        Thanks for the explanation :) . I understand it now.

        • Guy McDowell
          September 14, 2015 at 5:06 pm

          Whew! Glad you did.
          Even as a I was writing it, I was getting a bit confused myself. ;)

          The hardest thing to remember about electronics in general, is they can only ever do one thing at a time. They just do it so fast it seems like they're doing a thousand things at once.

        • Anonymous
          December 11, 2015 at 1:33 pm

          Hi Guy,

          great article. One more question on this:

          In the analogy you are giving above, the post office knows the name of me and my spouse. What is the computer analogy to these names? I.e. what information from the IP package does the external website use to make sure that the IP packages for computer 1 and computer 2 do not get confused in the router?

        • Guy McDowell
          December 12, 2015 at 2:05 am

          Hi Tom,

          I have a funny feeling you already know the answer to that question. ;)

          The IP packet is only part of the system. Another part is the router table.

          Router tables are like a spreadsheet that keeps track of packets coming and going.

          As the packet leaves your computer, it carries a port number as well as the local IP address.

          For Computer 1 it might look like, where the is the IP and 80 is the port number.

          The router records that IP and port in the router table, and assigns its external IP and a different port number to the departing packet.

          So becomes

          Computer 2 may have the address of and in the routing table it may become something like

          So the router knows that anything coming back to 205.206.163:247 goes to computer 1.

          The router also knows that anything coming back to 205.206.163:139 goes to computer 2.

          There's plenty more to the process of how computers talk to each other over networks and the Internet. This is just a very basic explanation.

        • Anonymous
          December 14, 2015 at 6:56 pm

          Hi Guy, thank you very much for that well-explained reply. I did indeed not know this (don't tell anyone ;-), but thanks to you, I do now.

  21. James Knott
    May 22, 2015 at 2:00 pm

    My point was that your comment about token ring is equally valid with Ethernet. You can have either without a router, if you don't want to go beyond the local network and both require a router if you do.

  22. James Knott
    May 21, 2015 at 1:53 am

    "Let me take a moment to explain to the more technically inclined that I understand that there are such things as token ring networks that don’t require a router or a hub."

    Actually, both Ethernet and Token Ring are the same in this respect. You need a router to get off the local network and you don't need one if you don't go beyond the local network. For example, you could set up a stand alone network with either and it would work just fine. Both are layer 2 technologies that can be used to carry a level 3 protocol such as IP. Twenty years ago, token ring had some advantages over Ethernet, in that it was "deterministic", that is you could put a hard limit on how long a frame would have to wait before being sent. With the old collision domain Ethernet, where multiple devices shared a hub or coax cable, the random nature of the collisions meant you had a probable maximum wait, but not a hard maximum. However that difference disappeared when switches replaced hubs. With managed switches, you can even control priority etc. Token ring used a device called a "Multiple Access Unit" or "MAU" to connect the various computers, routers, etc. The MAU prevented loss of the ring, should a cable be disconnected, a computer shut down or other event that would otherwise break the ring.

    BTW, I used to work with token ring at IBM and I'm also a Cisco CCNA.

    • Guy
      May 22, 2015 at 1:20 pm

      That's all true, of course. But beyond the scope of the article.

  23. crapwoman
    May 9, 2015 at 9:46 am

    I live in a LARGE house chopped up having multiple rooms on different levels, Wi-Fi is included the problem is it is very slow.
    Do I need to get a more powerful router, and have a router for each level?

  24. tarun
    April 9, 2015 at 7:10 am

    Thanks for explaining complex things in an easy manner.

    • Guy
      April 9, 2015 at 1:11 pm

      Thnak you, Tarun. It's my only superpower.

  25. Achu
    February 17, 2015 at 1:46 pm

    I really wondering how router communicate between the interfaces its having ...I mean how do a wan port(fast Ethernet 0) communicate to LAN port(Fast Ethernet 1) in the same router.?..Does it have any correct explanation or its just coz both interfaces are in same device..

    • Guy
      February 18, 2015 at 12:48 am

      Physically the ports are the same. They use the same packets and routing protocols. The only true difference is whether the devices attached are local (local area network) or part of a wider area (wide area network).

      If the router determines that the packet is intended for a device on the WAN (by IP address), it will pass the packet to another router or device that can get that packet to it's location. If it sees that the packet is intended for a device in the local area network, it will direct it to that device.

  26. chepkonga david
    January 31, 2015 at 8:36 am

    maybe how am i surposed to confire my network with the router

  27. Haddex
    December 14, 2014 at 7:21 pm

    What happens if two hosts of the same LAN are waiting for a reply from the same server (thus, the same destination IP address)?
    How does the router know where to send the packet?

  28. Raman
    February 5, 2010 at 3:44 pm

    very well explanation. i really help me ?

    thanks a lot
    Can you explain whole process with diagram and including all major deviecs and there function and need explation?

  29. Anuj
    October 13, 2009 at 11:10 pm

    It's really great article.
    It's very thankful to me.

  30. Lou
    October 13, 2009 at 12:56 pm

    Very cool site.....was just tuned on to it bay a friend.

  31. Rahul Rathore
    October 13, 2009 at 6:34 am

    Very usefull information. I am student of BCA.

  32. Fran
    October 12, 2009 at 6:22 pm

    It's crazy how many times I've had to explain a router to my friends and colleagues who still don't understand internet basics. Thanks for sharing!

    Oh the vawncast of it...

  33. varun
    October 11, 2009 at 12:43 pm

    Where does the ISP come fit into?

    • Jack Cola
      October 12, 2009 at 6:19 am

      The ISP gives you an external IP Address. This is to allow your computer to communicate to other computers on the Internet. You computer will use to IP Addresses. An Internal one which as stated 192.196.x.x that allows your computers in your home to talk to each other and an external one, that your ISP provides. This allows your computer to talk to other computers on the internet such as web servers.
      You can find some more information at this link.

      Hoped this helped.

      • Guy McDowell
        October 12, 2009 at 10:08 am

        Thanks for fielding that one Jack! Good answer.

  34. JBu92
    October 11, 2009 at 7:52 am

    First a post on making your own cat5 and now this... did y'all hire a new networking guy or something?
    don't forget the class B private address range of 172.16.X.X :-)

    • Guy McDowell
      October 11, 2009 at 9:03 am

      I remember that range being used on the college's network.

      You gave me an idea to do an article on how to make different cables, like null modem, at home. So much cheaper! And who doesn't enjoy a little solder iron burn every now and again?

  35. ILoveFreeSoftware
    October 10, 2009 at 3:20 pm

    Guy - This is a great article. Very well explained.

    • Guy McDowell
      October 10, 2009 at 7:24 pm

      Thank you.

  36. Jaspal
    October 10, 2009 at 2:40 pm

    Hello , i need a little help in regard of the router. I have a three different operating systems .. One PC, One MAC & One Linux (UBUNTU). all are Wifi enabled , but the problem is that of range.

    My modem cum router is placed such that it can't give enough signal to all the three.

    I want to know that can a additional router can help in improving signals and strength ..

    like can the additional router can receive signal and at the same time can deliver the signal too ..

    if yes , then how ?

    • axl456
      October 10, 2009 at 6:51 pm

      yes, you have to configure the second router as a wireless bridge

    • Guy McDowell
      October 10, 2009 at 7:24 pm

      There are only two ways to increase signal strength as long as all other things are equal. Increase wattage or increase antenna length. You can get directional antennas that you can attach to your wireless card in your desktop - if it has an external antenna to begin with.

      You can also read Prasanth Chandra's article How To Make A WiFi Antenna Out of A Pringles Can. This can extend your range as well.

      I honestly don't know if a second router can be used as a repeater. Some routers do have the ability to increase or decrease signal strength within the administration screen. Maybe look at that first.

      Anyone else have any ideas?

      • neolex
        October 11, 2009 at 12:03 am

        using range extenders will also work. my wifi network in my old pad used a router and a range extender to ensure coverage over the entire area.

      • Jaspal
        October 11, 2009 at 12:49 am

        I have used it as a repeater by connecting both routers with a wire , but the ugly wire has to be replaced .. i was wondering that .. if wire can make the second router a repeater than it would be possible that this same thing can be achieved with a wireless method .. i think the second router needs to be some sort of wireless receiver and transmitter .. as it is working fine with wires ..

      • neolex
        October 11, 2009 at 1:20 am

        most routers have the option to be used as a wireless access point. check the manual or the menus in your router. the simplest method to extend (for me), is to simply use a range extender with your router to increase the area of coverage for your wifi signals.

  37. vogent
    October 10, 2009 at 2:27 pm

    But what will happen, if two packets for two different computers come back from one external IP address?

    • axl456
      October 10, 2009 at 6:37 pm


      the router will "route" the packet to the right computer..

      • Guy McDowell
        October 10, 2009 at 7:18 pm

        I think vogent is wondering how the router knows which packet goes back to what computer, if the incoming packets have the same Sender Address - based on what I wrote in the article. Well, there is more to the packet header and routing tables than I've talked about in this article. If you look at the sample packet header, you'll see spaces for other information about the packet. Based on these, the router will determine the appropriate computer to send it to.

        • volgent
          October 11, 2009 at 9:35 am


    • nitin soman
      January 28, 2015 at 12:33 pm

      What is "spaces for other information" and what exactly is this information. Also where is the mac address differentiated at. Does the router know anything about them. Thanks for the nice article :)

  38. neolex
    October 10, 2009 at 1:05 pm

    the standard home network ip address starts with 192.168.x.x, not 198.168.x.x, though it can be re-defined by the administrator to another number. typo, perhaps?

    very well written. not geeky or techie at all. keep it up!

    • Guy McDowell
      October 10, 2009 at 7:14 pm

      Yep, typo!

  39. Yonathan
    October 10, 2009 at 12:44 pm

    Great article. Thanks.