What is a router? - podcast episode cover

What is a router?

Aug 08, 201135 min
--:--
--:--
Download Metacast podcast app
Listen to this episode in Metacast mobile app
Don't just listen to podcasts. Learn from them with transcripts, summaries, and chapters for every episode. Skim, search, and bookmark insights. Learn more

Episode description

Routers are common in offices and homes across the planet, but what do they actually do? What is network address translation? Join Chris and Jonathan as they break down the science behind routers.

Learn more about your ad-choices at https://www.iheartpodcastnetwork.com

See omnystudio.com/listener for privacy information.

Transcript

Speaker 1

Brought to you by the reinvented two thousand twelve Camray. It's ready. Are you get in touch with technology? With tech Stuff from how stuff works dot com. Hello everyone, welcome to tech stuff. My name is Chris Polette. I'm an editor at how stuff works dot com, and as usual, sitting across from me, I have senior writer Jonathan Strickland. We're on a road to nowhere, which just goes to show you that we're not a couple of talking heads.

That's right, Before we get into this topic, we have actually it's a two fur First, we have a little listener mail. This listener mail comes from Sam, and Sam says, Hello, John and Chris. I really enjoy your show and I appreciate all the wonderful information you provide about various tech Keep up the good work, could you, guys, perhaps to a podcast that covers how network routers such as links Us and other's work for and their role in office and home networks. That'd be swell if you did. Thank

you guys for making such entertaining yet informative podcast. Cheers. PS. Is there any chance that the old listener mail audio clip might be played again? You know, the one with the annoying alarm. I like the new one, and I know it is stuck, but there are times where I yearned to hear the old one. Sam. This is for you. Everyone else, please turn down the volume on your your various playback devices. You have been warned, and now that I have warned you, here comes a little old school

sound effect for listener. But on top of the listener mail that we just read from Sam from Austin, Texas, we also had a little Facebook feedback you be This comes from Scott, who says, Hey, I was wondering if you guys could do a podcast about routers, the different uses for them and which is best for gaming, streaming, video, etcetera. Thanks so much. Your episode on I p V six was great and the number of IP address as was nuts. You're telling me, Scott, I'm still trying to get my

breath back. So we are going to talk about routers. And before we get too far into this, I want to say we have some great articles on how stuff works dot Com about routers, so if you want to get more information, I recommend checking out how routers work, also how network address translation works. Both of those are going to be important in this discussion. Um, so let's talk about what a roller is and what it does and why it's important, yes, and talking about what value

it has to the Internet. Let's just say there wouldn't be one without routers because you know, of course, the Internet is a network of computers. It's just networks. Yes, it's exactly. It's a it's a basically, it's a vast system of computers talking to one another via multiple networks and protocols. So yes, well yeah, they use the protocols

to talk to us. But yeah, I mean you have you might have only one computer in your house and it hooks up to you know, the networks at the Internet service provider, and then those go to other networks and it just goes on and on and on. Or you might even have multiple computers in your house running on another network which is attached to the other networks. That's why they call it a cloud, because there's no

definite shape to the Internet. It all. It all depends on what's on and what's off at any given time, and these routers make it possible, especially when you do have one line coming into your house and you have multiple computers. Yeah, So what routers allow is the transfer of information across different layers of communication. Now, what I mean by that is that the Open Systems inter Connection or os I model of communication divides up communication into

seven layers. And uh, really we're just going to be thinking about the first three layers here. Actually now I'm thinking about seven layer bars. Yeah, I'm thinking about seven layer dip so um dip so. The the the seven layers are. This was a system that was proposed by Charles Bachman of a Honeywell Information Services. Honeywell, of course, is one of those big names that's important in uh in computer science. Yeah, they they've done all kinds of

technological things. Yes, So the seven layers are sort of as a concepts so that you can break down what sort of communication happens between various components within a communication system. And it's uh so that you can really figure out, all right, well, how do we have these various layers interact with one another, which ones need to be, you know, segregated from the rest and uh and just kind of a way of defining it, at least from an ideal

perspective as opposed to necessarily a physical one. But layer one is what we call the bit layer it's the physical layer of data communication. So we're talking about physical elements such as pens and uh the voltage, it's act also electrical layout. It's the voltage that you need it transfer information. And really you're talking about a single device communicating through some sort of medium. So this is where

we were talking about one device. We're not connecting it to anything else at on a layer one layer of communication. Layer two is where we start talking about communication between devices, and in this case we're talking about communication between devices within a local area network or land. All right, so

a land you do not need a router. We actually had another fellow right in UM recently on on our Facebook page, I posted a quiz about routers, and he pointed out that actually this is Carl who said this is called me pedantic. But question one, A home network does not require a router to operate either. Carl is absolutely correct. You do not need a router to allow communication within a local area network. You need a switch that can switch the data back and forth, but you

don't need a router. Right, So this is layer to all that all that communication within layer two within a local area network, a single network can be uh controlled through a switch. You don't have to worry about a router at that point. Now, if you want to communicate to a device, it's on another network. This is where the Internet comes in. The Internet is that network of networks.

So let's say I want to visit a website and the server that has that websites information on it is not on my local area network, but is on some other network, possibly on the other side of the world. That's when you need a router, because what the router does is it controls the the information moving from your local area network to the Internet so that it will

go to the proper place. And it also receives information from the Internet and transfers it to your local area network so that you can view it or interact with it in whatever way. So that's the basic purpose of a router, uh And it's you know, when you break it down that way, it kind of it makes it

easier to understand why routers are important. Without a router, you would not be able to have this this data transfer between a larger network or or a computer on another network and your computer you would just have You'd be able to have communication through a local system, but not through a global system. Unless you have a really

long cable. Yeah. That's especially important for the Internet because as as you will remember, or at least as a long time listeners will remember, Uh, traffic on the Internet goes in little uh pieces or packets. They're actually called packets, um, and they're sent uh redundantly. So you know, you might take a file, uh say, an email and break it down into a series of packets. Each of those has some information that tells where it's going, UM, where it's

coming from, and what piece it is. It might be, you know, piece three of packet three of forty, let's say, um, so it tells uh the network where to send it and how to reassemble it when it gets there. On the other side, Well, the thing is, uh, it might say, okay, well, I'm going from uh computer A to computer B, to computer C to computer D. Well, all of a sudden, there's a power failure at computer C, so it goes

from A to B. Oh it's stuck. Well, in the Internet, Uh, it's set up where the packets can be sent and re routed around computer C. So you might go to computer F and then back to computer D. Because they can be sent at multiple directions. At the same time, and then you know with the idea that one set of packets will be reassembled into the file on the

other end. And the router is crucial to making this happen. Yeah, Routers have this thing called a routing table, and routing table is essentially a guide saying this is where, this is the direction you need to send packets in order for information to come to go from to this machine and get to that machine. So machine A and machine beat will say, alright, So a routing table will in general give the fastest uh route. Now, the fastest route is not necessarily the shortest route, true, And it's the

same as if you live in a city. All right, So let's say let's let's let's take the city as a kind of a metaphor here. We're gonna look at the city as an analog to the internet. It's not it's not entirely analogous, but we're going to kind of make some jumps here. So let's say you live in a city and the city tends to have a lot of traffic in it, and you may be at your house and you want to go eat at a popular restaurant that's across town. And so you know three different

ways of getting to the place across town. One of them takes the least number of turns. It's it's the most direct route, but it's also the most heavily traffic route. So in other words, you could go that way and you wouldn't have to turn as frequently, but because of the the number of cars on that route, it will actually take you longer to get there than if you took a slightly more circuitous route that would have less

traffic on it. So in that case, you say, you know what, I know that this is the direct path, but I'm going to take this more out of the way path. This it's it's a shortcut in time, but not in distance. And the same thing is true on the internet. You might be able to find a route to push traffic through that's going to be faster, even

though it's not as direct. By the way, if you happen to live in Los Angeles, I understand that this is a sport that in Los Angeles, if you have a group of people and you have all decided to go someplace, the first hour of your travel time will actually be taken up spending time talking about the best way to get to where you're going. Okay, yeah, very

little driving in LA so well that's it's. What's required is that you and at least one other person each in their own vehicles, have to be going to a specific place, leaving from the same location. And at that point you have launched into the game where then you say no, no, no, you don't want to do that. That's going to take you on the four oh five And haven't you heard of Carmageddon? And um so, yeah,

it's the same sort of thing. Now. Granted, if if the city were empty, then the direct route would be the shortest, but the city is never empty because the zombie apocalypse hasn't happened yet, at least at the time of the recording of this podcast. Yes so, and by the way, if by the zombie apocalypse has happened since we record this podcast, I would like to have a shout out to all of our new listeners with BRAT. We're great with the zombie demographic. Oh I'm a little

loopy today, Yeah you know, I hadn't noticed. Yeah, so anyway, The routing table is this list of essentially rules that the router follows in order to send packets across the network. And you might say, well, that seems pretty um stiff and and and inflexible. What happens when things change, Well, routing tables are not static. They are dynamic. They change

all the time. And what's happening is routers are actually communicating with each other across the Internet constantly updating this information and changing it so that the most uh, the most efficient route is constantly being adjusted. And they're doing this through various protocols. Routing Information Protocol or r I p RIP that would be the one of the common protocols used. Another one is the Open Shortest Path First

or OSPF protocol. These protocols are what routers use in order to update these routing tables so that data will co go across the network, across the Internet in the most efficient way possible, the way that's got the best guarantee that your information is going to get to where it needs to be. And each packet that Chris was talking about earlier has data in it that allows it to um well, allows it to the system to keep

track of it. So let's say that you've sent a file like let's say I'm sending a file to Chris and Chris is on one network and I'm on another network, and uh, some of my packets don't get through. Well, the system keeps track of that. The what will happen is the information will come back to my computer and it will say, hey, packets three, seven, and twelve out of the forty that you sent never made it to Chris's machine. Then my machine will automatically re send those

packets so that they will hopefully get to Chris's machine. Now, granted, all this is happening at near the speed of light, so you don't really notice the delay unless something's really really bad has happened. Um. And so this is all happening in the blink of an eye, but it's happening over and over and over across the Internet, right, um and and yes it's um just to go back to protocols to the protocols are basically, uh, languages that the

routers used to speak to one another. Um. It's it enables people multiple manufacturers to make devices that will communicate with one another and be interoperable, which is you know, we talked about that actually on our podcast about how the Internet works, and we mentioned on some of the others. I think we probably did on IPv six that, uh, there are certain protocols that allow MC to talk to a Linux box and the Linux box to talk to a PC and etcetera. Right, they're all they're all using

the computer equivalent of Esperanto. Yes, no, anyway, Yeah, that's that's what that's what our protocol is. And route routers do have those, uh, protocols that are specific to routers, and that that does help them balance the load somewhat on the Internet. Yeah, we should should say, I guess that a router really is a very specific computer. It's not just this box that you buy and you know it's got lights on it and when it's lit up, you know that the information is going through it is

actually a very specific type of computer. Yeah, very specialized device. And and a lot of the routers, like the home routers that you purchase for your your home network, whether it's wireless or wired, also tend to act as a switch. And what by by that, I mean that it allows

you to have your computers talk to one another. So if you have multiple computers at your house, you can send files from one machine to another machine without having to set up like some weird email thing or whatever, you can actually send it directly through your home network because your router also can be a switch. It's not just a router that sends information from your network to

the Internet and back. Um. Also, when we were talking about information going across the network and figuring out the most efficient way, in the sense of routers, what they do is they calculate the cost of a of any particular data transmission, and cost does not mean dollars. It means hops, alright, So when a router sends information across the network, information may go from one router to another router to another router until it finally gets to wherever

it's going. All right, Each time that information goes from one route or to another, that's called a hop, right now. Protocols, certain protocols have a limited number of hops that are built into uh any sort of data transference, and that information is stored in the data packet. Okay, So it's almost like I'm passing a note in class, and the note can only pass through three other people before it gets to my destination. It's one of them, the teacher.

The teacher accesses the the packet of information it gets discarded, which is very much like what happens on the internet. Actually, so, so let's say that again. But now we're talking about a classroom. So Chris is sitting across the class from from me. I'm on one side, he's on the other side. I want to pass him a note that says something like, uh, I don't know the didn't the teacher wear that same

outfit yesterday? And so I'm trying to send the the note across the class and it can only pass through three other hands up before it hits Chris. If it passes through more than that, then whoever the fourth person is is like, this is not worthwhile and just tosses the note away. The same thing is happening with hop

counts if I send a packet of information. If I'm sending a file to Chris and it's going across the Internet, there's a certain number of hops that packet will go through before it hits the maximum number of hop count. Now that does not mean that the packet just automatically gets thrown away. It means that the system says, you know what, this packet has gone through this kind of serpentine pathway in order to get to where it's going.

It's not getting there efficiently. Chances are this packet has already made it to the destination through a fewer number of hops. So I'm just going to toss the packet aside because otherwise, because the Internet is a redundant system, and because it's meant to be robust, and it's meant to get a packet of information to the destination through whatever means possible within the parameters of the Internet. If you didn't have these sort of uh discards them is

put into place, the Internet would become overrun with packets. Yeah, because you know, if I'm sending that file to Chris and there's these duplicate packets going across the network, what happens when one packet gets to the destination and the other packets are still out there trying to trying to get to the destination. You're starting to clog up the Internet with all of this data. So these these fail safes are in place in order to prevent the Internet

from just bogging down with too much data. And they didn't have to buy a like a digital router and go in and yeah, we've got we've got the routers, but not the routers router routers. I had to call them once it was did not go well, No, it's never anyway. Um. So in order to make all this work, in addition to your router and your network, you also have to have an address, a unique address for each item on the network. And this we've talked about in the I p V four versus I p V six podcast.

Ideally you would have every single device that connects to the Internet would have its own unique address, so that whenever I want to send something to another device or receive information from another device, it would always go to the same address. And that way, it's just it's just efficient. It's a clean, efficient system. But we don't have enough

addresses to do that, right. But each item and you may have actually seen this when you're going into your computer or you know, other devices like tablets and smartphones that use Internet networks, or video game systems, video game systems, uh, set top boxes, TVs. There's a lot of different devices that do it now, which is again part of the problem. Yeah,

that this is called a MAC address. It's known as Media Access control and it doesn't look like well, actually, it kind of resembles an IP address because it has a series of letters and numbers separated by by colon's and that this is how you can identify I. Um, you know, say you have been foolish and have left your wireless network open to the public, and you have let's say a computer and a tablet and wait a minute,

there are three things on your network. Well, then you can look at the MAC address on your computer, and you can look at the MAC address and your tablet and UH by process of elimination, figure out what the other device is and maybe even get an idea. If you can access the uh um the routers information page, you can you can see what what's going on, how much traffic it's using, and hopefully shut it down. You can even on on some uh probably on most of them,

I would guess. I just don't want to be absolute um, you know, restricted to certain Mac addresses, so you can you can actually add you can on mind on the device I have at home. You can say, you know, I'm adding this tablet, I'm adding this game console, I'm adding this uh smartphone, I actually use WiFi calling on my smartphone, you know, and things like that, and say, okay, I'm only allowing MAC addresses that I know to join

this network. But Basically, this is a way for um, you know, local networks to identify the devices and send the packets that go to that device, so they know, um that if you are reading how Stuff Works dot Com and your spouse is looking at a news network and you know you don't get the packets mixed up. It says, oh, well, these belong to this address, these belong to that address, and I'm going to be the traffic cop and send the right packets to the right place, right. Yeah.

This this kind of ties into network address translation, which I referred to at the beginning of the podcast. We've also talked about that in the I p V four versus I p V six. Yes, it's one of the ways to address the problem of having more devices in the world than we have available IP addresses for those devices to connect to the Internet. Now, for information to travel across the Internet, it means that you have to

have an Internet Protocol address. This allows the information to travel across it allows it allows other computers to find you, and allows your computer to send information to other computers. Uh. Without the IP addresses, you of course would have no way of knowing how to get information from one machine to another. It's kind of like in a sense, it's

kind of like a physical address or phone number. If we didn't have phone numbers, if it was all a party line, you would just have to pick up the phone and hope that whomever you're trying to contact is also on the phone at that time, and everyone else will be able to hear your conversation at the same time. And but in just curious, have we ever talked about party lines? I don't think, so that might be fun. Then we can add that to the to do list.

So the network address translation, this is a layer that, uh that could be very useful in this sense. You would have a router that would have a number of static IP addresses, or it possibly would have a number of addresses assigned to it by the whatever your Internet service provider is. Your devices would not have static IP addresses.

They would have like some non unique IP address and dynamically assigned and and and because they are non unique, that means you can't just automatically tag into the Internet and send stuff because if it's a non unique address, I mean some other devices out there on the Internet may also have that same address, So anything you request would be sent to all of them. So what happens is your router acts as kind of a postmaster. You

have this non unique address. You send information to the you're trying to get, uh, let's say again a website. I'm trying to visit a website. Uh. That request goes through to my router. My router then replaces my non unique address with a unique static IP address and keeps track of that relationship within the routing table. When it's own pro re calls, sends that request out to the internet. It eventually gets to the server that I want. The

information comes back to the router. The routers says, all right, this information is meant for static IP address whatever. Now it has to refer to its table and see which of your devices on your home network, your local area network has temporarily been assigned that static address. It then sends the information to you. If if you are no longer part of that network, or if it can identify it,

it gets dumped. It dumps that information so it goes nowhere. Um. Now, this is one of the things that kind of it depending on the type of engineer, it can really irritate engineers because it's a less efficient system and this is also one of the issues with gaming routers we talked about. You know, the request asked about what kind of routers are best for gaming. Well, because of the network address translation, this can slow down data trans mission a little bit.

I mean, there can also be some compatibility issues, um, especially if the router has to change these the IP address for whatever the device is. Like, if you've got a lot of devices that are connecting to this router, there could be some complications and complications when you're gaming. That's a bad thing because it's going to affect how fast that information is traveling to whichever device you're using

the game. It's complicated. Yeah, well that can that can mean that you will get lag in the game you're playing. It means that you might get artifacts. Uh, the game will not play as well as you would want it to. So any any device that's using that you're that's one of the things you gotta look at, like, well, how how well rated is this router for that particular function. Um. Also depending on well, if you are a serious gamer, you probably you probably want a wired router. Uh. A

lot of the wireless routers also have wired connections to them. Yeah, so you probably want a wired connection, and the reason for that is that it's more reliable than wireless. You are less likely to have interference. Uh, you're not going

to find a dead spot. Like you know, if you have your wireless network set up in one room and you tend to game in a different room and uh, and there are certain materials in your walls, it may end up blocking some of the signal, which means that you may not have a clear signal and that will affect your gaming. So a wired connection tends to be best if you want to go wireless. UH, the IN protocol tends to be the best. It's the fastest, and it has a really good penetration as far as various

materials goes. So if you have a wireless or other set up, it's a it's a pretty good bet. G is the next step. I would go with either INN or G preferably. And now you have to make sure that whatever devices you're using are compatible with that particular protocol. Yes, that's the eight O, two dot eleven. Yes, proto a call with with the various flavors A, B, G and yeah.

And so if you have a if you have a device that is running that it can accept G. I mean, these are all different kinds of radio frequencies, but it is designed for a G frequency then G rated. Yeah, and you have an N router, it's not gonna work. They are not compatible. You have to have one that

can do I mean, they're great. There are plenty of routers out there that will do multiple frequencies, and there are plenty of of UH wireless chips out there that can do multiple frequencies as well, But you want to make sure that you do have that compatibility in there or else. You know, you might have the fastest connection with the router possible, but your device is not compatible.

Also keep in mind this is also very heavily dependent upon what your internet service provider plan is, because if you're you can have the if you have the fastest router, and you think of it like a doorway, it could be a really really wide doorway, but the path is really narrow once you open the door, it doesn't help you. You have to have that broadband connection with a really good data transfer rate for the router to even make

a difference. Um, if you don't have that high speed internet connection, if your cable modem or or however you're getting your your internet. If that is a bottleneck, the router is not gonna help. You have to have that too. Yeah. Keep in mind too that if your I s P caps data, you might keep an eye on that. Yeah, I mean, depending on what you're doing, it may not make a difference. Most people never reach their I s P S data cap, although that's that's changing as people

are getting more into like consuming streaming video. You know. So if you are watching some streaming video service and you're perhaps you have it on a couple of different televisions. I mean it's not unusual now. You might have a Roku box on one machine one television. You might have a an Xbox three six yr ps three on another one. You could potentially have five or six different televisions all consuming streaming video. That's gonna that's gonna cause a pretty

big bottleneck too. You've gotta have a really good Internet connection and a decent router for that to work. It's not impossible. Um, it's impossible with my setup, but because I have a I have a much slower home network. Uh. But yeah, if you don't, um, yeah, that's that's possible, and then that could very quickly run up against a data cap right. Uh, did you want to touch on There's one one issue I thought it might be interesting to touch on. UM. That's in the routers article on

how stuff works dot com. And that's what happens when people intentionally try to clog a network hit me up with it. That would be a do OS denial of a denial of service attack. UM. And basically, in these attacks, UH, what happens is someone will intentionally send as many packets as possible to the same spot. So basically, remember we were talking just a few moments ago about how routers are aware of what else is going on in the network,

and they talk to one another and they can they communicate. Well, if you know where there is a specific router, uh. And it leads to say, say you're some someone who is who has a grievance against the company, and you know where their their router is, you can send you know,

billions of packets to it. Uh. Someone's going to correct me and say they can't be that many, but let's say lots and lots of packets to it in an attempt to overwhelm the router and give it so much traffic that it cannot UM handle it, and it will cause it to UH have errors. Basically, it will become

really sluggish or possibly even have it just shut down. Yeah, it's certainly been known to happen in then variation of this which is becoming more common as the d d O S or distributed denial of service attack, which happens a lot in a lot of cases with UH bot nets where people have UM installed some kind of malware on their computer and someone is running this attack to UH you know, basically take over possibly thousands of computers and have all of them send an attack against one

target at the same time. Which, as you might imagine, if you had thousands of computers working on this problem as it were sending sending requests at the speed of light all to a single target, it's it's very easy to overwhelm a single router with that kind of UH

with that kind of traffic. So UM when you when you hear about these attacks, you can keep that in mind, that that there's some router somewhere that it's doing its level best to handle the traffic, but it is just not keeping up with a flood of UH packets swarming at it. And also on that same note, because a router is essentially a computer. You can install software on that router so that it has its own protections against such things. So when you hear about people talking about firewalls,

there are various ways you can have a firewall. You can a computer firewall, you can have it as a software layer, you can have it as a hardware layer. Well, routers kind of a hardware layer level firewall. A lot of routers come with a firewall system in place that you can configure once you set up your router, and this will help protect your home network system from intrusions from malware coming in, uh, from unrequested data coming in,

so sort sort of a spam protector as well. UM, and routers can also have other kinds of software programmed into them, things like encryption, UM, intrusion detection, that kind of stuff. So, uh, depending on the model of router, that'll that'll tell you what kind of protection is built into the system. And uh, you know, it's not uncommon to find routers come with firewall software and pre installed

in the router itself, which is also very useful. It do highly recommend that if you know, if you're setting up a home area network and you want to uh, you want to have a router there to connect to the internet. Setting up a firewall is a very good stuff. It's not just like any other security system on the Internet. I have to stress it's never full proof. You're never going to have the perfect security system because people are ingenious at getting around uh firewalls and other kind of barriers.

But it does mean that you're going to prevent the overwhelming percentage of attacks from getting to you because most people are also lazy, so they're gonna aim for a wide array of targets and they're gonna be happy if they just hit a few of those targets. They're not necessarily aiming directly for you, unless you're some sort of important individual with like a government or perhaps a news agency or something like that. If you have like a high profile status, then you might have to worry about

more stringent security. But for the average user, it doesn't. You know, a decent viral wall is enough. Yeah, Indecent fire walls are never enough. Well. I think that's a good discussion on routers. We really pretty much covered the basics there, and like I said, if you want to learn more, visit how stuff works dot com. Check out our articles on how routers work and how network address

translation works. Um those those articles are very helpful to understand the ins and outs of how this data goes across. There's also some great animations and everything that show this in action. So if you have problems visualizing it, check out the website. It really does help. And guys, if you have any requests that you would like us to address uh huh, you can let us know via email our addresses, text stuff at how stuff Works dot com, or send us a little message on that Facebook or

Twitter thing. Both of those places are handle is tech Stuff hs W and Chris and I will talk to you again really soon. Be sure to check out our new video podcast, Stuff from the Future. Join How Stuff Work staff as we explore the most promising and perplexing possibilities of tomorrow. The How Stuff Works iPhone app has arrived. Download it today on iTunes, brought to you by the reinvented two thousand twelve camera. It's ready, are you

Transcript source: Provided by creator in RSS feed: download file
For the best experience, listen in Metacast app for iOS or Android