 Welcome to Computer Science E1. My name is David Malin. This is lecture 5, Internet Continued. In your hands by now, you probably have one of my favorite problem sets, problem set 4, the Internet Continued. Because if you look at the last few pages of this thing, what do you notice you've been given? Sorry? A shopping list, along with 2,000 virtual dollars, with which to go shopping at a local store. This is one of my favorite parts of our problem set roster, for the reason that you'll actually now, particularly after tonight's lecture, be able to go into a store, and hopefully, if it is a successful problem set, realize that in just 5 weeks, you now know more than the salesperson who's going to be helping you out the store. So among the questions you'll be asking are, what's inside of this computer, or what can you give me for 500 dollars? And as we know, in the problem set itself, it tends not to go over well if you happen to mention that your dollars are virtual, so we suggest that you leave that till the end of the conversation with the sales rep. But read through the spec, and you'll see what you're to get out of this. But really, it's an opportunity to go now and look at labels on the shelves, look at the fine print on these systems on the shelves, and finally appreciate that, wow, you now know what they're talking about, you now know what questions to ask, and you know when the answer you've been given just doesn't make sense for reasons not your own. I saw a hand in back, was there a question? Okay, fantastic. So good luck with that, you have a couple of weeks to tackle that particular project, but I think you'll enjoy it. On the roster for tonight is more about the internet. Last week we focused more on the application layer of the internet, focusing on what you can do with it. But tonight we focus on how it allows you to do such things as we discussed last week. What is a network? What is the internet? Quite literally we'll take the hood off of the internet and take a look at how it works inside, along with a number of demos related there too. But first, let's start with the simplest question. We've sort of taken it for granted that everyone here knows what the internet is, but can you define it in your own words, in just a sentence? That is accurate. What is the internet? Is it software to surf the network? Okay, I'd actually say that's not a good definition, though it has building blocks for one. What is the internet? Yeah, more of an interconnection of computers spread out geographically. Notice the emphasis in this particular definition is more on the infrastructure, and that was one of the distinctions we tried to make last week, which was first and foremost the worldwide web and the internet. Were they the same thing? Well, no. I mean, the worldwide web we discovered was more of an application, a service that ran on top of what's otherwise more of a hardware-based infrastructure. So the internet is really the network of networks, an Uber network, if you will. It is the largest network in the world, because by definition it interconnects most smaller networks in the world. Now, let's take a step back from that, unless we lose sight of where we started from and tease the word apart. Well, internet suggests an inter-network. Well, what is just a network? Quite simply, single computers connected. So we could say two or more computers connected. So quite simply, we might say, and this is how I'll typically quickly depict a computer. It's sort of quickly becoming dated, but a monitor on top of a CPU, or the case encasing a CPU. So we might say that this here is a network of two computers. Specifically, what do you tend to call networks when they do involve computers that are next to each other, or perhaps are just two computers networked to one another? It's a special case of a network. It is a LAN that would work. I heard something else? Okay, the individual machines could be called workstations, sure. This could be called a LAN, where a LAN, henceforth, will be known as a local area network. And all this means is that it's a cluster of interconnected computers that share some geographic proximity. So a LAN might be said to be all of the computers if they're networked inside of a classroom, or inside of a computer lab, or you could be more broad about it, and you could say that all the computers on campus here form a LAN, even though there might be several thousand computers, or you might say that a LAN comprises only the computers inside of a particular building. So it's not a well-defined term, but its distinction is with the term known as a WAN. And a WAN is, WAN, a wide area network. And what a WAN really is, is just a network of, take a guess, LANs. So a WAN, WAN, is a network of LANs. So if you have, for instance, a couple of computers inside of, what will henceforth be known as my depiction of a typical office building, a LAN, as soon as you connect this LAN to, say, another building, however far away it is, that itself contains internet-worked computers, well, then you have a WAN. But where you draw the line is rather arbitrary. There's certainly no numbers that qualify a network as a LAN versus a WAN. And let's not forget the door. So there we have a WAN. Taking a step back, though, if we look at these two computers in isolation, you could also call them peers, because in a sense they look to be sort of equivalent computers, but they are networked. So you could also call this a peer-to-peer network. And back in the day, when you did connect just two of your computers, even you're in your home, for the purposes of sharing files between them, well, that would generally be called a peer-to-peer network. But as many of you know, this term peer-to-peer network has sort of taken on a much broader meaning these days. In what context have you heard of peer-to-peer networks today? Napster, Grokster, Limewire, all of the file-sharing networks, that even if you haven't used them, you've perhaps heard of them, at least, well, those two are peer-to-peer networks in the sense, and we'll talk about them a bit more in our multimedia lecture, in the sense that they work as follows. Napster, which was the earliest of these, the most popular of these inventions, which got itself into quite the legal hot water, essentially was not quite a peer-to-peer network in the truest sense. The reason that Napster was ultimately prosecuted, rather effectively, was because all of the computers that were running the Napster software connected to a central server. And what that server did was combine, consolidate all of the lists of music that each of those individual computers had on it. It's a brilliantly simple system, and it's incredibly straightforward, because if all of the college students throughout the country are all essentially uploading lists of the songs that they had to the central server, well, it's incredibly easy then to search thousands, tens of thousands of computers for some song you want, because that server can then say, okay, David wants this new M&M song, all right? Well, it looks like Joe Bob on the west coast at Stanford has that song on his computer. So I, the Napster central server, I'm gonna put David in touch with Joe Bob, and then it becomes more of a peer-to-peer communication. So even though the data, the actual music, wasn't being routed through Napster central server, the lists of file names were, and it's in that regard that they were ultimately held legally liable for facilitating illegal file sharing, because of all the people on this network, they were in the best position to actually regulate what was going through their systems. So that's the context in which you see peer-to-peer networks today, but back to the situation at hand, this remains quite typical. You have a few computers in one building, network together. What kinds of things can you put on a network besides computers? Sorry? Printers, a wonderfully useful application of networks has been used for decades these days. So you have a networked printer so that everyone can share the printer. You can do this in your own home relatively easily these days. What else can you put on a network? If you work in the corporate context, you probably have one or more file servers, as they're called on the network. A file server is by definition a computer, because it's a server, and a server typically is just a computer, maybe a faster, more expensive computer, but it's just a computer, but it too could be interconnected with all of the other computers on the network and say a building. So that's pretty much the predominant uses of networks within a small geographic area for sharing data, or for sharing data with a printer, or for sharing data with other computers. But let's dive a bit deeper into this picture. Since I've just drawn rather lazily with a wavy line exactly how these two computers are connected together, but suppose that the network is not so simple as to have just a pair of computers, but we now have three computers. The question of how to connect them becomes a little more interesting then, and a little more relevant to a typical network. So if we instead have at least three computers physically located within some building or some campus, and the goal is to physically connect these computers together, well, what do you need? What do you have to go to the store and buy to connect three such computers together? Okay, Firewire is one such option. I'll come back to that in a moment. A hub is another relevant piece of terminology that might come into play. What else might you need? Other things you think you might need. The cabling of some sort, the cheapest part, fortunately. Let's focus on that for just a moment and then we'll add these additional pieces into the puzzle. We have these three computers. Let's abstract away all the technicalities of what the cables are called and what the hardware is called that we actually need. But just physically, if I wanted to connect these three computers together, with what kind of topology would I want to do so? In other words, how, given a network that could consist of many different nodes like this, there's clearly many different ways to interconnect them with straight lines, a.k.a. wires, so what's perhaps the simplest approach? Okay, I hear serially. Oh, Wi-Fi, we don't even need the cables, but let's defer that for a moment and focus on the cabling for now. So serially, what do you mean by serially? Okay, so we could do that. One, two, three, and they're now all interconnected. We could make it a little simpler, too, because this sort of suggests that you have to have a way of going into the computer and out, so let's actually draw it a little more generally and just say that, yeah, there's this central line that's laced throughout the building, but attached to that line are the actual connections. So there's sort of like a bus route using that term bus from our hardware lectures, a bus being a pathway along which data can travel, and there are all these little bus stops, if you will, at which point data can get on and data can get off. And that's sort of a reasonable analogy, because this is quite... this is exactly what people would refer to as a bus network. Incredibly straightforward. You want to connect multiple computers together, string a wire that goes pretty close to each of them, and then attach to that wire some kinds of connection points using the appropriate kind of hardware, and now all of your computers are networked together. Now, even not being an engineer necessarily, what might be a problem with this kind of topology out of your network? Sorry? Okay, traffic in what sense? There is a seeming bottleneck, and it might not be too striking, given that we just have three computers, but if they're all sharing the same medium, the same piece of cable, well, presumably, if this thing is just some kind of wire, only one computer can probably talk on it at once, because otherwise, if multiple computers are trying to send their bits in the form of electrical currents, as we discussed in the first couple of lectures, that electricity is going to collide, and it's sort of not going to make any sense to anyone. So, yes, on a network, typically, only one computer can talk at a time, and though that might seem incredibly inefficient, appreciate that when computers communicate electronically, we're talking about the flow of electrons moving theoretically at the speed of light. But in reality, it's actually much slower than that, but it's still much quicker than any human could really appreciate in a physical sense. So it's fast, but it is ultimately inefficient, especially as you have more nodes or computers on this network. There's another problem with a network like this, particularly as it gets longer the bus and more and more computers are connected. So there's a distance factor. If we actually continue this bus to include many other computers, perhaps the delay, the amount of time it takes for data to go from A to computer Z becomes increasingly worrisome. It turns out that, again, because the data travels so quickly, it's a huge issue, only when you start talking about stringing wires across the Atlantic Ocean, Pacific Ocean, across the country, does distance really start to come into play? In a building, not really, but it's a reasonable assertion. What else? Failure points. What do you mean? A good use of the analogy. Suppose that something goes wrong here, and you get the old mouse chewing through the wires or someone tripping over the wire and so you now have what's called a partitioned network. You have two halves. This side to the left of the break and the other side to the right of the break. So you have, in reality, a single point of failure. That single point of failure is sort of stretched out throughout the building, but if just one part of it breaks, your network is now sort of damaged. All right, well let's focus on that problem for a moment. How could we eliminate this so-called single point of failure and keep these computers more robustly connected? All right, turn the corner. Make it a circle. So we can do exactly that. So if this cable actually doesn't just stop there, but essentially continues in a circle, well, you have what's known as a ring network. That's a useful thing because now, even if you do have a partition in the network for some physical reason, well, at least the data can now go in the other direction. And if you've ever heard, particularly in years pasts, of token ring networks, if you've at least noticed that term, well, this is the kind of topology it's referring to, literally a ring of computers interconnected. But unfortunately in the real world, as your physical spaces become more challenging architecturally and as you want to interconnect computers, not just in a single room that happened to be conveniently arranged in a circle, but that happened to be in the back corner of the room and over there and over there and behind another wall, well, no longer is it as easy to just naively wire your computers in a nice straightforward circle. You have to start to be a little more flexible with it. And so it turns out that though these are both feasible topologies, the most commonly one used today, their say is called a star network. And this is where we can start to now draw on some of those other pieces of hardware. A star network would put, and I'll redraw our picture to make it a bit more clear, if you have multiple computers connected together, what does the notion of a star suggest to you about what I should draw to represent this topology? Everyone is connected to everyone else and we'll do that in this case by way of a central point, which is by far the most straightforward way of wiring a building. Imagine after all if you simply have some piece of special hardware in what might be called a wiring closet in your office building and all you now have to do is from everyone's office or desk is run an individual cable from that computer to that central point. Now granted there's a cost implicit here. What's a downside of this approach straightforward as it might be? Okay, you need an additional piece of hardware in the middle which itself suggests a single point of failure. So you sort of have taken a step back from that previous solution. What else exists about this? You do need more wiring. And it's not obvious from the small scale picture I've drawn here but just imagine if your wiring closet as is often the case in someone's home these days. People who are building new homes and sort of thinking ahead are putting the so-called wiring closet or really just mess of hardware and cables in the basement just because it's one centrally easy place to keep everything but that means now that all of your computers even if all four of your computers are in the same room you now need pieces of cable going from that bedroom or that home office all the way down to the basement. And so you're sort of using four times as much cable as you might have needed in the past. The reality is though this cable as we'll discuss more in just a moment we're talking pennies per foot these days if that. So cost is fortunately no longer such an issue as it was in years past. So we've heard a couple of terms now to describe this central point and let me ask first how many of you in your own homes already have multiple computers? Okay, so about half of you. How many of you have those computers already interconnected in some kind of network? With what hardware are you achieving this interconnection? Okay, a wireless card, I heard. What else? A router. We heard another term earlier. A hub. Excuse me for a moment, let me just open the window for my own sake here. Let me ask one of the stronger teaching fellows to open the window since I have the luxury of standing right in front of the heating vent here but let us know if you get cold. So we just tossed out a few pieces of hardware. Well, let's tease each of these apart. It is absolutely true that you can interconnect. It's great that I just embarrassed myself like that. Next time I'll think to ask the T.F. to help first. Oh, I've just redeemed myself. So let's start with the hub because this is what was commonly used a few years ago is still in use today but it is not as useful as we'll soon see. So a hub is... There we go. A hub is essentially a dumb little piece of hardware. You plug it into the wall so that it does have some electricity usually flowing through it but all it does is have a bunch of different ports or jacks on the back of it. The type of jack that you would find on the back of your computer. So recall that in lecture one or two we had that slide that depicted a variety of different types of computer connectors one of which was about the size of a telephone jack but a little fatter and that was called an Ethernet jack. So essentially a hub has multiple Ethernet jacks on it and what you do in order to interconnect your three computers is you plug each of those computers into one of those jacks and what the hub does is when data comes in from computer A it simply, the hub, rebroadcasts that identical data to computers B and C and essentially repeats the data echoing out to the other computers. Meanwhile when B wants to reply to A well clearly the data has to be passed through the hub, HUB and so the hub just as before just broadcasts it out to everyone else but I've taken care to describe it in a certain way. What is inefficient clearly about a hub if not a security risk of it? Go ahead. Everybody does indeed get the information. A hub is as said a dumb device and it just blindly rebroadcasts whatever comes into it out on each and every one of its other ports. That makes it a relatively cheap device because it's quite easy to implement that in hardware but it's a security risk in the sense that even if A only wants to send some data to B who else is receiving it? Well computer C. Now by definition of the software running on C a computer by default will ignore any network traffic that's not meant for it. That's simply how Microsoft and the various software vendors have pre-programmed things like Windows or Mac OS or Linux to behave. However it just takes someone with a bit of tech savvy to actually change the way Windows or Mac OS or Linux is working and to put their Ethernet card as it's called Ethernet being the language that computers tend to speak on a LAN simply changing their Ethernet card into what's called promiscuous mode. Promiscuous suggesting a sort of looseness or easiness and what it suggests in this context is that the Ethernet card starts listening to all of the traffic that visits it. And literally if you have a network arranged with a hub as the central point with the right software which these days can be downloaded for free or for a cost off the Internet you can literally sit at computer C in your locked room and watch what computers A and B are doing on the Internet. By that I mean you can watch what emails are going between computers A and B. You can watch what websites they are visiting. You can log what passwords are being sent from their computers over the network. It's a dangerous situation but for many years and even in a lot of networks today this is still the case because hubs early on were incredibly cheap they were installed even Harvard's own undergraduate campus used hubs back in the day and you could sitting in your dorm room have access though it was by policy though not by technology disallowed watch what every one of your neighbors and roommates were doing if you had the know-how to do so. Okay? Yeah. Good question. No this eavesdropping is limited only to the traffic going across the network if I were just sitting there typing an essay and I was not interacting with the Internet in any way that data should remain isolated to my own computer. So you're not completely exposed as it were. Well fast forward a few years to where the price differential between a hub and a switch is nearly negligible if not non-existent and you have an almost identically looking device but it's now called a switch and I say it's almost identical because physically it pretty much looks the same manufacturers pretty much use the same plastic casing the same hardware the only thing they changed was some of the circuitry inside of these devices but physically and just to give you a historical perspective back in the day hubs and switches were probably devices that were about this long and this wide and maybe you know pretty narrow but they would often fit on racks and computer racks and hardware center well over time they've gotten smaller and smaller and smaller you buy them today you can get them this big now granted that's not an enterprise quality one but certainly for a home network it achieves the job and even when just 10 years ago they were probably twice as big but that's always the case it seems in this world well take a guess as to what a switch does that is an improvement over a hub given our emphasis of this one particular problem it only delivers data to the specified computer so if computer A sends data destined for B the hub the switch rather now receives it looks at the data coming across the wire and by definition what Ethernet does and this is what protocols and languages are all about Ethernet doesn't just send the data doesn't just send the email that I'm trying to transmit to B it usually includes what's called header information or metadata essentially just as you would send a letter or a postcard through the U.S. postal system you don't just write the postcards content dear mom dot dot dot love David and then drop it in the mail box what else do you add to that postcard an address you add an address and in the case of a letter you would often add a return address so included with every network transmission are destination addresses and return addresses hubs just ignored that information but the recipient computers would look at it and if the destination address was for B B would look at it but if C received data where the destination address happened to be B by definition he would ignore it unless he were in promiscuous mode but with a switch the switch is smart enough only to route that data from A to whoever it is destined for but now let's consider a slightly more technical problem how does the switch know where to send the data you buy this switch from Microcenter or CompUSA in a shrink-wrapped box plug it into your network plug it into your electrical wall and connect your three computers in your home A, B and C how in the world does the switch know where computer B even is the ISP, your internet service provider actually doesn't come into play here because we could be doing this in complete isolation of the internet we could just be operating inside of our home and these devices are so simple I'll say that you literally just plug it in as I described good, the last part of which you emphasize which is that the switch figures it out is absolutely correct there's fortunately no configuration required on the part of the user and we're off this what the computer does and it's worth appreciating this if only for the security implications though the fact of the matter is the odds that you would sacrifice any degree of privacy or security during the moment of time I'm about to describe is really negligible but when a switch is first turned on it turns out that it does behave just like a hub the first time A transmits data destined for B which will receive it and sort of shrugged shoulders I don't know where B is and so it just blindly sends it to everyone but it then pays attention because by definition almost every internet service involves not just data going one direction it involves data coming back if only to say I got it I got that data so what the switch starts doing is listening and the first time it hears from B it makes a note and says ah, B is connected to this port and typically these ports on the devices themselves are physically numbered and so the switch essentially associates in the RAM that does happen to exist in the switch like this because it's sort of like a mini computer but not in the conventional sense it just remembers computer B is on port 2 computer A is on port 1 and the first time it hears from computer C it will remember that it's on port 3 and thereafter will the transmissions actually be more private now it turns out today most of you who have computers interconnected in your homes you do own a switch do you agree most of you would call it something else what would you call it what have you called it tonight a router so if you look closely though at the router that you bought it would probably was called something like a wireless router with 4 port switch or even if it weren't called that if you actually read the list of bullet points of features on the back of the box a 4 port switch or a 2 port switch or an 8 port switch would probably be among the features you can know if you have a switch built into your router by the following simple fact if you have more than just one connector on the back of that router more than one ethernet connector looks again like a fat phone jack then you have a switch wireless routers and home routers today is that they unite the notion of a switch with the notion of a router with the notion of an access point now we already touched upon what a switch was it just handles the interconnections of data what is a router in the context of a home network like this you can sort of cheat and guess what a router's purpose in life is the one time you can use the word in the definition to route data from one point to another similar in spirit to what a switch does but we'll see later tonight why a router is particularly more interesting and powerful and a little pricier than just a switch itself but by price now I mean wireless routers today you can get them for free frankly after rebates but maybe the typical cost is like $40 so it's all quite reasonable these days for what they do but it's also an access point that the fact that your wireless router if you have such has those one or two little antennae on the top of it that makes it an access point which means it is a point via which wireless laptops can access the router and in fact these wireless routers are also what are called proxies or firewalls today as well but we'll get to that in turn but first any questions really on the topologies that we've discussed and perhaps the two pieces of hardware hubs and switches with which you can connect to those computers yeah hubs are indeed being phased out you don't see them being installed in new network simply because there's little reason for them you wouldn't look at computer A or B per se you would be looking at if this were a hub the data the zeros and ones coming across the wire being blindly forwarded to you and you would look at that so-called computer to say if this data is meant for computer A well if you were in this promiscuous mode C would then realize oh this is meant for A but it looks like it's an email from A to B and if you were nosy you could then look at those bits I'm not sure if I've answered what you were getting at though oh I see what you mean it seems you have to split the screen somehow we're not talking about seeing literally what computer A or what computer B is seeing it's not as though your monitor is now sort of magically physically connected to their computer when I say you put your card into promiscuous mode what I mean is that among other things you're probably running some special if in appropriate if hacker like software that shows you in a window the data that is going across the wire you don't see what A sees on his screen per se you see what he has sent across the network maybe that is as simple as a URL or like www.inappropriate.com or the actual contents of an email that he's sent across the wire correct you would not necessarily see the website but you could then certainly pull it up yourself but if he requested it from the internet and there were also a fourth connection here leading off to the internet on which that inappropriate it is well that data is also going to be coming back through eventually the hub being broadcast out to everyone then and so then C could say you know what I'm also going to eavesdrop I'm going to go back it's destined for A not originating from A and then you could actually look at what's called the HTML that's coming back across the wire and literally see the website and well-written packet sniffing programs as these things are called can do exactly that it's remarkable actually I went to a sort of sales pitch by a local company that was started by among other people this fellow at MIT that I work with and long story short of a computer but sans monitor that you can plug into your corporate network and what it does is essentially sit between all of the computers on your network and it logs everything that goes into the network and out of the network and the software is so remarkably user-friendly administrator-friendly that it's as simple as clicking on for instance the letter A on the screen to look at the exact transcript in history of what computer A has done on the internet looking at where they've sent emails who they've had instant messaging conversations with what websites they visited so it is absolutely true that the whole notion of big brother is incredibly trivial these days to implement on the internet it's harder to do so though on for instance your home or your central office unless you have access to that central point because hubs are no longer so much in use a couple questions how do laptops get connected let me defer that for just a little bit tonight and we'll come back to that when we discuss more in detail the idea of a router same question okay other questions yeah yes if you have two computers with these so-called Ethernet cards a picture of which I'll put up in just a moment you can connect those two computers together in a so-called peer-to-peer network like this using what's called a crossover cable which we'll get to also in just a moment it's often frankly not as easy as you would like to actually then get the computers to work together Windows tends not to make it so easy but it is in theory quite possible other questions well Ethernet I keep using this term and again it is the language that computers tend to speak when talking on a LAN specifically well what do these things look like well generally an Ethernet card is just known as a NIC a network interface card in this world there are many different ways to describe the same kinds of hardware so NIC is synonymous with Ethernet card back in the day and on older computers today perhaps even ones in your offices you would have an Ethernet card like that and I keep saying card what kind of card is this exactly relating this to lectures one and two probably a PCI or an ISA or just more generally an expansion card that's plugged into the back of the computer these days and as an aside networking is so omnipresent and popular in the world that most motherboards actually have a jack built into them so you don't need an additional card but some computers still do contain these expansion cards and there were multiple types of connectors on the earliest of Ethernet cards to support different types of wiring schemes but by far the Ethernet jack with which you're familiar has become the most popular and the most common card you might see today is that PCI card on the top right which clearly sticks into the motherboard with those gold pins but then on the outside you have again an Ethernet like connector and a common newbie mistake believe it or not is to connect accidentally the phone cable to the network jack and then to try to do the network jack to the phone jack but it doesn't quite work but realize it's an easy mistake to make this thing though also an Ethernet card but for what for sorry it's not wireless in fact for a laptop so this is what's called a PCMCIA card or just shortened these days colloquially to be PC card even though they exist for Macs and other computers as well this is just a thin card about the size of a credit card that slips in usually to the side of one's laptop and this is called this is a special connector that came on a lot of 3-com cards and other companies cards you just kind of pop it out with a spring and you plug your Ethernet cable in vertically to it so it's a clever use of space instead of the incredibly annoying and perpetually lost dongle as they're called if any of you have ever had a laptop where you have to connect that silly little $50 adapter if you ever need to replace it to the side of the computer well this thing has been integrated and is by far a more popular option but again these days most computers laptops in particular don't have PCMCIA cards for network cards it's built into the motherboard and hence just sticks out of the side of the laptop then but what else might you see well what's this thing it's also for a laptop sorry it's an internet card but what does that mean you're right wireless this is a wireless Ethernet card so this too is one that's designed to slip into the side of a laptop into the PCMCIA slot it's a little longer than this one because this is effectively an antenna but this is how with laptops that didn't come with built-in wireless some of which you might still have at home you would add wireless network capabilities you would buy one of these cards these days 20, 40, 60 dollars to buy one slide it into the side of your computer install the software that comes with the card on the CD called drivers so that the operating system knows how to talk to the new piece of hardware and then you would be able to connect wirelessly to what's called a wireless router which again we'll come back to in a little bit but these days how many of you have wireless capabilities in your laptop but don't think you have one of these cards sticking out of the side alright so what's happened in this case too it's built-in so these technologies do exist and it's certainly relevant for older computers which is often people's inclination when they want to start a home network you might just have an old computer sitting in the closet wouldn't it be nice to at least go back into rotation so that you have another terminal that family can check email on print from and so forth well such cards as these can expand the capabilities of older computers as well and this is sort of a ridiculous looking thing but it was the cheapest manufacturing trick to give desktop computers wireless capabilities for a while it was the case that it was cheaper for card manufacturers to build a pretty generic PCI card and then literally slap a PCMCIA card onto it and then put that into people's desktops to give them wireless capability and it looks as silly as that these days it's just a greenish looking card with the connectors on it that has wireless capabilities into it but it's an integrated device and not this sort of hack that the industry came up with presumably for reasons of cost so those are all nicks now a bit on cabling which perhaps in and of itself is among the most boring concepts that you could ever dwell on but it's incredibly fun in the context of the courses sections because next week on the agenda among other challenges like networking wirelessly and with wires a number of computers that the staff has spent the past few weeks reassembling after our initial hardware sections you're also going to create crimp as it's called your own ethernet cables in section and walk home with hopefully your own working ethernet cable that you can use in your own home and on what these cables are going to look like at the left here you have what is called a typical ethernet cable any of you at home with internet access via DSL or cable modems probably have one of these cables even if you haven't seen it since the day you plugged your computer in it's probably connecting at least one computer to your DSL modem or to your cable modem or to your wireless router as it may be the middle cable here is a type of coaxial cable that's somewhat dated just for a historical perspective most commonly used today are these cables here to network computers increasingly common behind the scenes in say corporate or university networks are these thinner orange wires the speed with which you can communicate if your network has cables like this tends to be what's how do you describe the speed of a network or a cable megabytes per second but actually in the networking world it tends not to be spoken in bits but rather in bits so megabits tends to be the metric with which the speed or bandwidth of networks is measured what do I mean by bandwidth well the bandwidth of a network or of a cable is just how much stuff can flow along it at once the higher the bandwidth the more lanes you have on an interstate highway the higher the bandwidth is of that particular highway because more cars can fit across it per unit of time so you do measure networking speeds or bandwidth in megabits per second and what number is usually associated with the speed of say home networks 54 does come into play what other numbers do you hear in the context of home networks 28 not megabits but you're probably recalling 28.8 kilobits per second and that would be if you're still using an older dial-up modem so kilo suggesting a thousand mega suggesting a million those of you, anyone still on dial-up it's okay you can admit it here we go our one dial-up user is probably suffering the most quite literally this is a thousand times theoretically faster than what a dial-up connection is now the fact of the matter is your internet connection those of you with cable modems DSL probably the rest of you in the audience well your internet connections are not this fast in fact they're usually closer to what values any guesses so Comcast these days just recently started to promise or whatever that's worth download speeds of four to six megabits RCN I don't know what they promise these days very fast it's all kind of relative and I'll show you in a moment a website with which you can test it yourself most commonly for a while though was to have cable modems be about 1.5 megabits per second but Comcast is increasingly bumping up the download speed for reasons I don't quite understand I don't really feel the increasing download speeds and less frankly you're in the business let's say a downloading large if illegal movies or mp3s and so forth it is FIOS is a different technology that uses it's only being rolled out now slowly but I don't know what bandwidth it tends to offer but it's faster than DSL DSL is used to be much slower than a cable modem service and this is perhaps a good juncture to discuss this let me start labeling this and come back to that in just a moment since we're sort of jumping around 54 megabits per second is usually the speed maximally of one's wireless router if you buy a wireless router put it in your home network and connect computers A, B and C the fastest that those computers communicate through this device for a second now appreciate that that value is much faster than say a typical cable modem which is to say that the bandwidth limitation is rarely going to be the number of computers in your own home but rather the speed of your network connection since you have more than enough capacity to share the network connection so no more complaining that if the kids are using the computer it just is not likely to be the case but it is the case in the world of cable modems that your neighbors are sapping your internet speed the way the cable industry has laid things out is in such a way that generally speaking you and some number of neighbors are all sharing the same physical wiring on the telephone poles or underground on your street which does quite literally mean 5 o'clock, 6 o'clock, 7 o'clock rolls around people get home from work they hop onto the internet you will tend to find that your speed degrades the more people in your neighborhood that are using or are subscribing to cable modem services contrast this now with the world of DSL with DSL which is just another technology that allows you to connect home computers to the internet your download speeds tend to be a little slower now they tend to be from Verizon about 1.5 megabits per second clearly much slower than 4 to 6 megabits but it's guaranteed the number of neighbors using their DSL connections does not affect the speed of your own DSL connection now let's talk price for a moment your two most common options these days when choosing between internet providers is certainly dial up you can probably get for 5, 10 or 15 dollars a month these days and the speed at which dial up works tends to be between 28.8 to 56 kilobits per second so much, much slower by a factor of 1000 than the other technologies that exist today turns out that DSL these days whereas this one might be 5 dollars and you kind of have to hunt around to find a deal like that cable modem, what is Comcast's typical rate these days yeah it's expensive ignoring promotions that they've started to run out of marketing necessity you tend to pay and I don't remember the exact amount because I myself have been on the promotion for a while like 40 to 60 dollars a month I'm going to say closer to 40 but it's ridiculously expensive for the internet connection world beyond the cost of dial up DSL in the form of Verizon locally in the country do the things differently DSL from Verizon I believe now is sold for a fixed or at least promotional price of 1499 this is just an unacceptable difference for most consumers and you would immediately go to DSL Comcast though for what it's worth and if any of you are paying incidentally 40 to 60 dollars per month with Comcast you didn't hear this from me but if you call and threaten to leave for DSL and you quote specifically the price available to Verizon or one of the other DSL providers they will if they are like like they were with me give you the DSL price for at least half a year so I've been paying myself I think 20 dollars a month for the past several months much more reasonable two months from now I will also I think threaten to leave again so it seems like too obvious a choice right 1499 guaranteed speed it is lower but again it's guaranteed what do you think what should you go with what should you switch to if you have something different it's tough call and it's sort of a matter of finance ultimately right this is sort of a no brainer if cost is your prevailing factor the fact of the matter is that 1.5 megabits download speed is more than enough for what most of us are doing on the internet downloading web pages sending emails instant messaging this is overkill for doing something like that if however you're more into the practice of downloading legal movies legal MP3's or just generally doing more data intensive work for instance even if you work from home and you're constantly downloading large powerpoint presentations from work well four times faster does in fact feel better and it does in fact make a difference but the fact of the matter is DSL is a relatively reasonable option for most people but this differential again is decreasing and Verizon starting to roll out better technology than this in the form of FIOS and it remains to be seen where other wireless services are soon available but for these days I would say cost should motivate your decision for the typical user indeed and that's an important distinction I should note DSL by definition runs over your telephone lines it's the speed that you can get to this day is also dependent on how far you are from the so-called CO or central office of the telephone company which means sadly that those of you who tend to live pretty far out in the suburbs pretty far away from Verizon's hardware might not be able to even get DSL or if you can it might not even be close to 1.5 megabits per second because distance very much determines the speed cable modem service is less dependent on your distance pretty much if you have cable service and Comcast has the right hardware in place it will work and you'll get the same speed no matter how far you are from the center of town but cable modem service as the description suggests runs over your cable lines so unless you're already wired with cable lines you could not presumably get cable modem service an excellent question if DSL runs on your phone lines does that preclude you from using the phone well those of you from DSL can answer this who have DSL you can still use the telephone because the way DSL works is it essentially uses sends data at a different frequency than a typical phone call would use so you can use both simultaneously but what you typically need from Verizon or the DSL provider is what's called a filter which allows your current telephones not to interfere with the modem but they throw those in for free other questions DSL cable modem and you'll see what more of this hardware looks like the routers and the cables again in upcoming sections local network I am not current enough on other countries technologies I believe Japan's download speed tends to be remarkably faster in a lot of areas even wirelessly and on cell phones I know pricing models are somewhat different I was in Austria recently and they have a curious approach at least the ISP that my friends had which was they charge you per megabit downloaded so the more stuff that you're downloading the more web pages you're visiting the more emails you're sending the more you're paying which may make sense but in the end I think they're actually paying much more I would have to defer to Google or some online resource to get a sense of the different numbers what I can show you locally though is a wonderfully useful website and I would suggest tinkering with this from home if only to satisfy your curiosity this is a site called broadbandreports.com broadband is just a general term that usually means cable modem though it's sort of been usurped by just the whole high speed internet world so it usually just means you have DSL or a cable modem broadbandreports.com is a free website that has a whole bunch of tests that you can run via the network one of the most useful of which is the one on the left here called speed tests if you visit the site and then find your way down to the tools menu and then click speed tests what you'll get is a page like this which is a little confusing at first but if you skip all the first steps and look at step 4 of different servers what you can do is run a program that this website will temporarily install on your computer that tests what your download and your upload speed is now it's certainly dependent on a number of factors but if you run it a few times at a few different times during the day or week you'll get a pretty good sense of what the speed of your network connection is and fast forwarding to the actual application I visited this website before in advance of class but now I'm going to do the live speed test simply by clicking start it tells you don't use your connection because if I start downloading mp3s in the background that's going to impact the performance results this will just take a moment this happens to be what's called a java applet which is a little program written in a language called java that we'll talk about later in the course that allows you to run software locally via a web page well let's see what our download speed is your download speed is what? I'm hearing upload speed your download speed is 1495 kilobits per second which is actually relatively slow my upload speed though is remarkably fast it's almost 4 megabits notice the translation it's 3812 kilobits so that's 3800 kilobits so that's 3.8 megabits but the download speed is pretty low it would seem number of factors could influence that if you run this at home you will not see anywhere near that particular upload speed that's because we're on a very nice university campus with a particularly fast internet connection were you to run it at home it turns out that you would not see an upload speed that even approaches 4 to 6 megabits these days and it probably doesn't even approach 1.5 megabits because the small prints that Comcast and Verizon sometimes don't even print is that it's an asymmetric offering these bandwidths when you have a 4 to 6 megabit download speed with Comcast for 20 bucks a month or 40 bucks a month guess what the upload speed actually is maximally it's clearly smaller because that's where I'm going with this so how much smaller half? worse than half what's that? a tenth a tenth is pretty good what Comcast tends to give you is 384 kilobits per second 384 kilobits per second versus 4 to 6 megabits per second down now what are the implications? well it turns out for the typical user not many because think about it how often are you the home user uploading big stuff you might be downloading big web pages you might be downloading mp3s videos but unless you're serving mp3s and videos you're not often sending big stuff across the internet now the exception might be what with what program might you tend to send big pieces of data absolutely if you're sending like email attachments or you're using a nice digital photo website like ophoto.com or Kodak gallery or any of those websites designed for digital photos and you're uploading big files then you start to feel the effect of 384 kilobits per second on your home connection but DSL is similarly asymmetric I don't know what Verizon offers now because the fact of the matter is they don't really quote download speeds anymore they talk to you about how much faster it is than cable modem service or how much faster it is actually than dial up without actually committing to numbers but it's much slower than 1.5 it's a good question why the asymmetry especially when data is traveling along the same wires part of it is related to hardware especially for DSL you need certain filters on the lines and it's simply cheaper to put in half as many filters just for one direction the other reason is also that they don't want people running servers from their homes it's fine for the home user to use email download files but what they don't want to see happening is people running websites out of their homes because that means that they can no longer charge small businesses $100 a month for the exact same service but under the auspices of a small business practice so I would say it's for both of those reasons marketing purely and also technological but more so the former these days good question other questions on speed well the other thing you can try too this is a wonderful website for diagnosing problems you're having especially when certainly after this course you start to feel that level one tech support doesn't quite understand your problem as well as you yourself do when for instance you're having intermittent network connectivity issues case in point a few months ago I was going out of my mind when I had Comcast come out no joke eight times to my apartment because around nine p.m. seven p.m. every night for three weeks or more my internet service was just dying until about nine a.m. the next day and of course no tech support guy that I pointed this coincidence out to that it tends to die when people are coming home believe that there was any relevance to that though in the end there actually was the short of it was I was actually using a number of these tests myself because of course Comcast won't come out to your apartment at nine p.m. they'll come out between nine and five when my internet connection was always working perfectly fine so what I did was I use such tools as these one of which I'll demonstrate now that I took screenshots of made printouts of various pieces of data that you yourself should now be able to understand after tonight such as this line packet lost testing this particular tool requires that you sign up for a free account on this site but it is worth it for the following reason I need to first figure out my IP address on a Windows PC and you can play around with this in section as well the easiest way to find this out is to go to the start menu go to run and type in cmd for command and you'll get a little black window that I already pulled up earlier you then at the blinking prompt want to type IP for internet protocol config for configuration and you'll see something like this and actually Comcast and Verizon will often have users doing relatively arcane commands like this these days to help them diagnose problems let's take a look at the things that it says well it seems to mention a connection specific DNS suffix but three things that we'll come back to later tonight an IP address, a subnet mask and a default gateway and it has two sets of these because this computer happens to have two connections one with a wire and one with wireless the fact that they're both plugged in now is just kind of silly because of the way the laptop is currently set up so what I am going to note now is what the IP address is I'm going to type this in it's 140247.44.60 and I'm going to click join the queue and when we come back from a five minute break what this program will tell us is exactly what percentage of data is actually reaching our computer from another source which will tell us if it's not a hundred percent there's a problem somewhere with our connection with that nail biter we'll come back in five minutes alright we are back and tragically somehow my ping test got cancelled let's click on this website and see what exactly happens here ah interesting I've foiled my attempt at a demonstration here so a lot of information on the screen try to hone in on the middle of the page where it says test below that it says simple ping loss check target does not respond to ICM ping well first of all the word ping in a technical sense means to send a piece of data to another computer and hopefully get a acknowledgement back that that data was received incredibly short and simple message it's essentially a hello and if you get a response back that means that host that you said hello to is alive that is their online and functioning well we did not respond to broadband reports ICM ping to their hello to us the reason for this is a bit of a nuisance in that harvard filters out all such ping traffic Comcast and Verizon tend not to do this so this test would work on your home network but what you would see had this worked correctly is that if you had a solid internet connection physically you would see a hundred percent of these pings got through because the website will send maybe ten of them maybe fifty of them will count what percent of them get through if instead you are seeing what's called packet loss of like fifty percent or seventy five percent that means there's a physical problem either in your home maybe frayed wiring or some kind of power issue or one of the so-called routers on the internet is experiencing a problem be it congestion or be it some hardware failure and in fact if we look at this here and we'll look at another view of this idea in just a moment notice what seems to be happening well hop zero for now is essentially where the server is for broadbandreports.com notice that immediately here we got sixty nine percent loss for some reason and then here which is us a hundred percent loss so there may actually be a problem here of some sort but there's clearly a problem here and that no data is reaching me from the outside world the reason for this though is that harvard for security reasons does not let computers on campus answer these hello's because it's a common trick for hackers to just say hello to a whole bunch of random computers and the first time it gets a response it then focuses its attack on a computer it knows exists and is connected to the internet. Good question if you have a home network with a proxy or router in the middle will these pings get through most likely yes because most routers the router will respond to the ping it won't actually get through all the way to your computer however many routers offer configuration feature which you can see in next week's section when we play with an actual wireless router of not responding to these pings the fact the matter is that the security conscious user probably just wants to turn them off because it's not common that you need to ping your own server especially if after this course you don't even remember what it means to ping your server you certainly don't need to be responding to other people's queries about your own personal computer you don't need to get a chart like this in just a bit for now again I told you this teaser on the ethernet cabling well this is just a historical retrospective here coaxial cables were much more invoke years ago but they were much more cumbersome because of their thickness and they were also more expensive but a coaxial cable is still found in your home where the TV so that sort of round is not very flexible cable that you would connect the TV to your car with often or to your cable box or to the jack in the wall is a coaxial cable and that's what tended to be used a variant of that in years past but these days by far more popular is ethernet cabling as I described it before but to be more specific now unshielded twisted pair cabling UTP now what does that mean well I hesitate to take my scissors to the AV department's own ethernet cable as I often do since we're running out of cables but this is a UTP cable unshielded twisted pair and you'll see these in sections and you can see these in your own home in fact most likely if you look at this thing closely you'll see that there are eight wires eight colorful wires inside of it a cable generally just means a plastic sheath around actual wires these are just copper wires they're identical to what you would find in your phone cables but phone cables tend to only have random trivia how many such wires two or four is the typical phone jack connector and that's actually why it's narrower ethernet connectors tend to have eight but only four of those are actually used now these things are called unshielded twisted pair cables for the following reason one they're unshielded well what does that mean there's clearly some kind of plastic or rubber sheath around it but it's not sorry if you put this too close to a strong magnet or to a strong refrigerator or a power box you're going to create electromagnetic interference which is going to degrade the performance so it's unshielded in that sense it's twisted this is where I hurt my fingers every year because the wires inside of it are all twisted over each other in just a very simple crisscross pattern only four of the wires actually convey data the other four simply for very neat physical reasons tend to insulate the other four wires by quite simply being wrapped around them it creates a better connection insulation here is useful only because the less interference means the more of your bits can actually flow through without getting corrupted without a one accidentally becoming a zero just because there's some electrical source nearby they're twisted in that sense there you have a little black and white depiction of them only four of them are used as suggested here this essentially is an artist's rendition of what the plastic jack the connector looks like on the other end and what it suggests is that pins wires one and two are used for TX transmitting data and pins three and six are used for receiving RX data and the other unlabeled wires are just there for insulatory purposes now where is the fun well the fun is actually in taking a wire that has no such connector on the end yet but instead just has let's get this right eight wires popping out of the end of it and actually lining those up in one of the prescribed patterns sliding it into a brand new plastic connector crimping down on it with a special tool that will provide you with and then doing the same but in opposite order on the other end it is a wonderfully frustrating experience but it is also incredibly satisfying when the thing actually does work and starts carrying your network traffic over it at home what you'll see though is that there are two types of Ethernet cables in the world today what are called straight through or patch cables what that means is that the colors on one end of the cable are identical on the other end of the cable notice if you look closely at these colors you've got the little orange candy stripe on the left in the bottom right picture you've got solid orange and then the rest the pattern is the same on the other side hence a straight through cable there's no crossing over in the end there's a lot of crossing there's a lot of twisting throughout the length of the cable but when it finally gets to the other end of the cable everything is back the way it started a crossover cable by contrast does as you might expect it crosses over the wires so one end of the cable looks maybe like this the other end of the cable ultimately looks like this effectively on one end of the cable what were the transmit wires become on the other end the receive wires and vice versa now this is an important distinction only because too often do people buy the wrong types of cables from the store if you want to connect a computer in your home say to a switch or to a router what you want is a patch cable you want to just patch into that router or switch so to speak or that hub if however you want to connect one computer directly to another computer without a hub or switch or router in the middle well intuitively you need to make sure that one computer's transmissions become the other computer's received data so you want a crossover cable when connecting two computers directly together and Radio Shack actually not usually quite good at these things but they do actually ask the customer if what they really want is a crossover cable or patch cable so that you don't make this particular mistake it's an easy thing to fix if you own your own crimper you own your own scissors you can just chop off the end and fix it yourself but that is perhaps a frustrating well it's unclear whether it's more frustrating to do that or to go back to Radio Shack so we'll see this is what you'll get to do in section and it is quite fun and we have 800 feet of cable for you so we're very tolerant of mistakes in the first attempts of these things so we'll go back to the orange cables that I pointed out earlier well whereas most Ethernet cables today are capable of 100 megabits per second which is a value we didn't even put up earlier most Ethernet cables today support 100 megabits per second and that's what the cables you've seen and you will make in class well fiber optic cables are particularly good sorry at conveying data at gigabit speeds 1000 megabits is simply 1 gigabit per second so what you're seeing increasingly inside of computer labs inside of corporate offices are network speeds in the gigabit range and then the computers themselves might connect to that network using just 100 megabit connections the reason being the backbone of your company the infrastructure should probably be faster than the speed supported by one little computer on the network and the price is justifying the investment in fiber optic cables fiber optic it works sort of fundamentally differently from a typical wire whereas electricity flows along a cable like this because it's just copper wires inside like a phone cable well how does data travel along a fiber optic cable sorry it's light it's essentially flashes of light that are even closer to the speed of light literally are the speed of light whereas transmissions tend to be slower on cables like this but you do pay for it it tends to be a more expensive thing and you shouldn't stroll into your computer store over the next two weeks and ask for some fiber optic cable for your home network because they probably won't sell it at a typical store but it's also overkill these days because consider after all even if your home network's cables are 100 megabits how fast was your internet connection if you have a cable modem let's say 4 to 6 so even this is overkill now the utility of course in having cables that are 100 megabits in your home is that if for whatever reason you're constantly transferring files from your computer to another computer in the home well then this is wonderful because it's even faster than your own internet connection most people tend not do that though unless you have a file server set up in your own home which is just not that common however what's becoming increasingly increasingly likely is that home entertainment systems will soon enough be based on computers based on like the Tivo type devices of the world where you'll store movies not on your shelf but on say a hard drive and the more bandwidth your homes eventually have the faster you can share that data among your TVs and so forth and so soon enough you'll likely see such hardware as this in homes as well but we shall see okay well there's a lot of fun with hubs before and talking about them this is just another depiction of what we did on the board this slide if it helps you remember it a hub is sort of like this a four way intersection because only one person can talk on the hub at once only one person can go through the intersection at once because hubs not only suffer from that security downfall of blasting the data to all computers it's also the case that a hub shares its bandwidth and it's for the reason that we note this now in fact is because even if you connect 100 megabit cables to a hub and you want to have multiple computers talking at once well effectively they have to share that 100 megabits a switch by contrast guarantees 100 megabit connections between all pairs of computers on the network A to B, B to C C to D, C to A and so forth so again a switch is also a more efficient device not only more secure I believe I think we will remove this discussion of hubs altogether next year since it's becoming decreasingly relevant but it's an interesting security and efficiency discussion nonetheless switches we've discussed it's worth noting though that a popular topology for switches as we said earlier is a star network but as you would see in a real world situation star of star networks are common right you might have one building connected in a star configuration well you might connect multiple buildings on a campus or on an office park to another central point and so you would scale the thing in the exact same spirit as you would in an individual network okay questions thus far alright so let's start talking about how now we've talked essentially about how computers work how networks work within the confines your homes on a campus but we really haven't looked at how this all relates to the internet well let's see how it does when we talk about information flowing on a local area network a LAN we said earlier that every computer on a LAN has sort of a dressing scheme a destination and an an origin address those types of addresses on a LAN are called specifically ethernet addresses in other words any computer on a LAN using ethernet which these days is almost every computer on a LAN has what's called an ethernet address this is like a serial number a unique serial number associated with its ethernet card whether that card is an expansion card or it's built into the motherboard your ethernet jack has a unique serial number associated with it called an ethernet address and it looks like that it looks like number number number number twelve such numbers or maybe colons separating the numbers but twelve digits and each of those digits or question marks can be any of the numbers one through nine or zero through nine or a through F this is an example of something we'll come back to in our HTML discussion what base system are we talking about if we're using zero through nine and a through F it's not base ten or base two it's we'll come back to this but that's the reason for these zeros through nines and a through Fs this is to say that every computer on your home network has an ethernet address it is with these addresses that computer A knows how to send data to computer B have an interesting tidbit about ethernet addresses as the following have you ever tried maybe during some troubleshooting procedure to disconnect maybe one computer from your cable modem or from your DSL modem and then try to reconnect another computer use another computer on your network maybe before you have a router or conversely if you think you're having problems with your wireless router so you disconnect your router from the cable modem and plug a computer in directly well Comcast tends not to tell you this and Verizon tends not to tell you this but a cable modem or a DSL modem latches on to the ethernet address whenever computer is connected to it and it will only talk to that computer subsequently until you kill the power so whenever you are reconfiguring a home network you should almost always unplug almost everything from the electrical circuits then plug it back in because otherwise the lights might still be blinking on the cable modem and the light on the back of your computer might be on but the cable modem will not let the data go through because all of a sudden it sees a new ethernet address connected to it and to be honest if you take nothing else away from this class one of the most sure-fire ways of fixing most problems in this world of computers is to unplug the thing and to reboot it and that is certainly the case in networks as well can you say that again? yes if you ever want to connect a different computer to your cable modem and so you unplug one and plug in the other be sure to turn the power off from your cable modem and then plug it back in or unplug almost everything from the wall before plugging things back in question? I've not heard that one before that would do nothing because that would not achieve anything I don't know why they tell you that maybe it feels like you're doing something then but as we saw and as you can tell them what they're asking you to do is to plug one identical end into the other identical end and to hope that it works then that's a good solution it is true though and these are the kinds of things that will cost you hours of your life late at night though you might not think a cable like this can go bad it is quite possible that sometimes you just have bad hardware maybe it's the ethernet card which can be expensive but honestly you will stumble across if you play with enough of them ethernet cables that go bad what does that mean? it usually just means that a tiny little one cent connector is no good anymore flipping it around doesn't solve the problem but throwing it out and getting a new one does or re-crimping it don't overlook the obvious especially after this course I hope if you are confident that you know what you're doing and you know what could be wrong and someone thinks otherwise don't be afraid to question the basics because frankly it's not realizing that maybe it's the cable that's bad can save you hours of your life yeah it doesn't really matter but yes so long as everything goes into an off state and then comes back on that tends to be a very easily explained way of fixing things because for reasons we'll actually talk about in a moment a lot of processes start at boot up time and so just making the computer go through those steps again is a very easy way of automating rescue type processes okay so every computer on a local area network has an ethernet address but we're still just talking about local networks every computer on the internet has what's called an IP address an internet protocol address where have we seen IP addresses before or how many minutes ago did we see an IP address so when I pasted it in to broadband reports right I had to do IP config and among the things it told me was my IP address that is essentially like my postal address for the internet an IP address is something your computer is assigned usually automatically by your ISP your internet service provider that might be Comcast, that might be Verizon that might be America Online or someone else but typically when you boot up your computer one of the first things it does if it's plugged into a network it says hey ISP, wherever you are what is to be my address today or for the next hour or for the next fixed period of time the language with which your computer makes that request is called DHCP dynamic host configuration protocol more useful is to just remember the acronym DHCP this essentially is a language that a computer like yours speaks to a DHCP server a DHCP server is owned by every ISP in the world and they often have multiple ones but your computer just knows how to find it usually your computer just yells out to every computer it's connected to in the local neighborhood what is my IP address and Comcast server for instance will respond by telling you David your IP address for the day will be 1.2.3.4 because IP addresses are always in come back to this IP addresses are always in this form number.number.number.number where each such number sign is a value from 0 through 255 so the one I had a moment ago recall was 1.4.0.247.44.60 and that is consistent with the number range we just mentioned from 0 to 255 for each of them so again this is like the unique postal code of my computer on the internet so that if someone wants to for instance instant message me behind the scenes I'll never type an IP address of someone I want to instant message directly this all happens behind the scenes but my computer though will inform that essentially that computer who's I aming me will use my address like the mail to part of an envelope for the postal system so that whatever instant message they just sent me will travel over the internet and ultimately make its way to me. The computers on the internet that know what to do with these IP addresses are called guess what stretch? The computers on the internet that know how to route data based on such IP addresses are called routers so that is what a router is if you have quite simply and this is where too you get to see my nice rendition of the United States which I'm told each year tends to look a bit like a cow oh ok so that is the United States here we are in Cambridge and here might be someone in the USA if someone at Stanford sends me an email for instance in a sense it goes from A to B but in reality there are many hops between me and Stanford each of these dots here by representing routers such that my data might actually travel along that path all of this happens behind the scenes these routers simply decide what is the best route to send this email from A to B on these routers are owned typically by large corporations ISPs but ISPs of the form of maybe Comcast but your AT&T's of the world Sprint, MCI big companies that have what are called routers on the backbone of the internet very large pipes if you will information, this is the information of the highway, these are the very fast connections that connect smaller networks of computers for instance the east coast to the west coast together over long distances so these computers might be owned by a variety of different internet providers, backbone providers but eventually they all have agreements with each other so that the data should if the internet is working correctly get from point A to B however it might not each day because as in the spirit of the ARPANET things were designed to be resilient and robust to changes to adapt to changes in performance so if all of a sudden this route is getting very congested at a certain time of day well the routers should be designed to start rerouting data on a more available path but that's what happens between point A and B now how does this all work well when you click send in that mail program at Stanford how does the email even reach me well there's just a few steps none of which need to go we need to go into great technical depth to understand which are as follows you hit send well what piece of information have you included in an email to reach me not my IP address though me explicitly if I am sitting here at Stanford and I want to send someone at Ray at Harvard an email his email address well one of the first things that happens is that Windows because it supports what's called TCP IP which is the language that all computers on the internet speak Windows is defined or macOS linux whatever computer you're using that supports networking essentially does the following it looks at the email says ok this email is destined for harvard.edu that computer asks a local server at Stanford what is the IP address of the mail server for harvard.edu in other words where in the world what is the postal address what is the IP address of the server that I should actually send mail to for someone anyone in harvard.edu that server is called a DNS server domain name system and all it does is the following it translates names to IP addresses harvard.edu will get translated to an IP address like 140.247.x.y something like that my computer now knows ok harvard's mail servers 140.247.x.y my computer is then going to assemble an internet packet just a sequence of zeros and ones in a certain special order inside that packet of data just like an envelope in the world of the postal system a two field in that two field will go what number now the 140.247.x.y in the return address field will go my computer's IP address whatever that happens to be at that moment in time that day of the week that IP address meanwhile came from Stanford DHCP server I now click send behind the scenes all of those look ups have just happened now I have a sort of virtual envelope sitting in my computer that's then sent out my internet card to the nearest router how does my computer know where the nearest router is well when you say that initial hello what's my IP address you don't just get back your IP address you also get back this third thing default gateway a gateway is a synonym for a router so you are told automatically when your computer boots up what your address is what the address is of the next hop for any traffic that you ultimately want to send on the internet so my computer also includes in this virtual envelope the address of that router sends these bits out on my ethernet card the router is by the nearest router the default gateway is by definition in physical proximity to me so he hears that along the wire he then decides all right I have an email from a looks like it's destined for 140.247.x.y well inside of a router is essentially like an excel spreadsheet that lists IP addresses with directions and so the router will realize 140.247 that is that way and it will literally forward the packet out that connection which happens to lead to this router and then that router will make the same decision as well so all of these routers are to some extent automatically configured to know the best route but there is also human involvement engineers working for these large ISPs who actually program the routers to know where data should go it is as an aside a typical practice for an ISP a large one like Quest again or AT&T or Sprint MCI any of these guys that still own large networks to try to keep the data on their networks as long as possible even if that means going like this across the country the reason being they have to pay someone money usually as soon as they route that data not over their routers but some other guys router well let's put this into perspective I'm going to run from a little telnet window here and I'm doing this from my MIT account since MIT has far fewer restrictions on what you can do on your network what I'm going to do is pretend we're actually sitting here at Harvard even though we're technically down the street now I'm going to run a program called trace route which as you might guess will take between me sitting here and pick your favorite website google.com www.google.com enter a whole bunch of stuff started showing up on the screen it's starting to get a little slow but now it's back and now it's done 11 lines each of those lines represents guess what router now it's all a little slow this time but let's try to tease apart some of the data so step one the first server the first router the default gateway for the computer that I have SSH2 from my computer or I'm sitting at essentially now is called what www.rtr-1 well that's called the host name of the computer it's just the English like name of the computer but every computer on the internet has an IP address of MIT's default gateway exactly so put your eyes on line 1 scroll to the parentheses and you see now the corresponding IP address for the router that happens to be called the more esoteric www.rtr-router is probably what that denotes well notice now if you move to the side it says .652 milliseconds that is the amount of time that it took data to get from the computer I've connected to at MIT to the default gateway to the nearest router so less than a second to get there well let's keep looking line 2 we already seem to be on a router that has something to do with a backbone so it's probably a more expensive a faster a bigger more central router line 3 is apparently belongs to a company called cogent if I'm pronouncing it correctly which is an ISP of sorts it seems to be the ISP or one of the ISPs to which MIT connects companies that MIT buys its internet service from well in what town is that connection it's in Boston now this isn't guaranteed to have reasonably sounding names but the convention tends to be so we seem to have between routers 2 and 3 some physical wire leading from Cambridge, Massachusetts down on Mass Ave to across the river in Boston somewhere well line 4 gets a little lines 4 and 5 get a little more interesting so we seem to go from 2 routers with in cogent from line 3 to 4 where do we end up to guess in line 5 New York so routers tend to be named after airport codes so it turns out that between routers 4 and 5 are several states there is a wire leading from wherever that router is in Boston to wherever the next router is in New York and the reason we know that is we're inferring from the name in 5 that JFK denotes a router in New York so how long did it take well if we scroll to the right this time you see 5.949 milliseconds so it took just under 6 milliseconds for data to go from my computer to New York that's pretty fast what about step 7 well already in step 7 we seem to be within the domain of Google steps 8, 9, 10, 11 they don't seem to have names but that's okay computers must have IP addresses they don't need to have host names associated with them well how long did it take in the end to get from us to Google well it looks like just under 27 milliseconds looking at the first number in the last line not bad but it looks like these servers for Google that we connected to are on the east coast even though Google is based in Mountain View, California well let's try another case farther away perhaps give me your next favorite website okay I heard craigslist so craigslist.org has a trace route of the following this is a little more interesting too now so step 1 we're through the same router that makes sense because my computer hasn't moved so the default gateway is going to be the same step 5 we also seem to be in New York where do we end up in step 6 Washington DC so named after one of their airport codes their IAD, Dulles's code we stay in DC for step 7 step 8 is probably still in DC as well steps 9 looks like there's what's called a peering point between steps 8 and 9 there's some kind of financial relationship between cogent and a company called vario.net whereby the former passes data along to the latter when necessary and where do we seem to end up well we're going to have to make an inference here notice between steps 8 and 9 there's a remarkable change somewhere what changes notably between steps 8 and 9 the time we're going from like 5 milliseconds or rather from 13 milliseconds to like 71 milliseconds what does that suggest to you it's a long way it could just be a slow router but more likely is there's some distance between us so where might it be well this vario server PLACASNF probably California San Francisco specifically tough to guess with these host names but that's likely the case now these cases here there's still routers some routers just like at harvors network are designed not to respond to the kinds of requests that trait route triggers so they exist but they're not answering our requests for some interesting information about them well let's try one other experiment we visited last week www.cnn.co.jp let's see if we can take a look at this route so this is literally the path that data travels from me to CNN's Japanese web server alright we start off in line 1 at the same default gateway we seem to be going in line 6 and 7 to Washington so it could be DC there as well making an inference we have no names for a lot of these steps in 9 through 19 but could you tell me where the Pacific ocean is probably not 16 so 11 to 12 or rather 10 to 11 it looks like we're going from about 80 milliseconds to what 189 that suggests to me there's an ocean in between us and the tendency tends to be to go to the left to the west and go across the Pacific ocean rather than going to Europe to get to Japan for a lot of these connections I'm guessing here based just on experience but it's tough to say where these things are when people don't conveniently name them after say airport codes but there is clearly a huge jump in time between steps 8 and 9 and then 9 and or rather 11 and 12 so I'm guessing what's happening is between steps 8 and 9 is the United States and all of the time zones in between us and the California and then with those last two steps is there a hop literally across the Pacific Ocean a really thick cable that a really big boat lays several years ago connecting California to either Hawaii to Japan or directly to Japan or just generally somewhere in Asia such things do exist and it's funny if you pay close attention sometimes in the more scientific media you will see articles such as those years ago about how sharks were a problem for one such transatlantic cable because there were what are called repeaters along this thick cable on the ocean floor repeaters being devices that take a weak signal in and amplify it so to send it a farther distance well these repeaters essentially sent out a noise or an electrical pulse that attracted the curiosity of a local shark population which was not good for keeping the cables intact so there are huge number of issues involved in laying cables thousands of feet miles under water so it's an interesting problem but it has been solved and it is in fact physical connections that exist among the continents today so those are those are our routes I suggest that you play with this you can do this on your own computer at home usually if you have a PC not by typing ipconfig at this same prompt but type traceroute but leave off the O U E for saving so you have traceroute T R A C E R T in command you can then type the name of your favorite website and trace the route from your physical computer to that computer and just appreciate that if you send an email to someone in California and then run traceroute to that person's domain name like stanford.edu you will literally be watching the path that that email just in under a second took to get from in that case B to A it's pretty wild I think this kind of blew my mind when I sort of watched the path that email was taking I used to email my mom in college it would go from Cambridge, Massachusetts to all the way down to New York to DC and then for some reason back up to Connecticut so on the internet the shortest path between two points is not necessarily a straight line as my art suggests as well questions on internet protocol or the routers that make use of the IP addresses yeah quite possible every time you turn on your computer and even sometimes while it's on your IP address could change the fact of the matter is most ISPs Verizon and Comcast do not bother changing your IP address often and I think I've had the same one for several years for instance but the protocol allows them to make such changes as those now we overlooked an important detail in our discussion of email that's relevant to say our web transactions when have you ever gone to cd colon slash slash 1.2.3.4 probably never but you've probably gone to cnn.com or msnbc.com or google.com because clearly humans can remember words and company names better than they can esoteric numeric addresses so just as DNS servers translate the domain names and email addresses to the appropriate IP address you can use such things as DNS servers also help out your browser so when you type in cnn.com your browser by way of windows or macOS says hey local DNS server what is the IP address for cnn.com and it's then that number that is technically contacted by your particular computer how do you determine where you're actually going well another command you can type on fas or on windows box is the ns lookup command I'll try it on windows this time ns for name server lookup and then like cnn.com enter and wow not only does cnn have one IP address they have several why in the world would cnn.com be associated by the DNS system with multiple numeric IP addresses do you think traffic so the beauty too of the DNS system is that you can have multiple servers providing the illusion of just one central website fas as you'll soon see works the same way you will ssh as we say to fas.harvard.edu using something like secure crt and all of this jargon will make sense when we start dealing with webpages but fas.harvard.edu does not exist it's a tracker for many different machines each of which has its own IP address and when you ssh connect to fas.harvard.edu the DNS system and other pieces of hardware at harvard automatically send you to hopefully the least busy of those servers so that you have the fastest possible server however each of those computers just like with cnn they obviously display the same content because they ultimately share some resources copies of the day's news for instance a central file server but it's a wonderful tiered system that allows you to create the illusion of one machine when there actually are several. A final note I think if we may on wireless we won't need to make use of some of our pictures but I think it's worth talking about Mr. Bluetooth here we talked briefly about wireless today in the context certainly of wireless routers well clearly wireless is one means by which you can connect computers to a central point and access point is just a wireless device that connects other wireless devices so I said earlier that routers today are both routers, they route data from the internet to multiple computers behind your home network they also provide access point services because you can connect to them wirelessly if they have the antennas and you can also connect multiple computers to them with cables or also switches well the technology via which you can connect wirelessly to such devices is called not Bluetooth but Wi-Fi colloquially so if you've ever heard of Wi-Fi Wi-Fi is just the standard with which you can connect wirelessly to local computers the bandwidth to that recall earlier was this number 54 megabits per second that's pretty much the speed of today's Wi-Fi connection slightly older routers only supported 11 megabit connections but if you go out today and buy one you're getting 54 megabits and if you want to be really technical you can go into the store and ask someone for an 802.11G router that is the technical description of what is more commonly called Wi-Fi contrast this with meanwhile this which you might have read about the Y-Max wireless technology so the bandwidth of this is not particularly greater than 802.11G its distance is simply much bigger with something like Wi-Fi 802.11G in your home you can usually cover a reasonably sized house with just one wireless router or access point probably roughly in the middle of the house somewhere if you want to connect a city wirelessly as Philadelphia wants to do and as other cities in the US increasingly want to do well you don't want to have to have a wireless access point every 100 feet along a city street it just doesn't make sense financially so Y-Max is a similar technology but it's capable of much larger distances and it is this technology that increasingly in the media you hear about cities wanting to roll out for free internet service to local citizens remains to be seen how and when this happens or if it does but that's where the jargon is related Bluetooth meanwhile is more of a very local wireless technology it allows you to for instance synchronize your cell phone with maybe your computer with the contact list on your computer it allows you in theory to stroll past a Starbucks and have an advertisement for a free cappuccino blasted to your cell phone as you walk past that Starbucks if your phone supports Bluetooth perhaps the most common use today for these people is to have one of those big things on your ear so that you can talk into your cell phone without having a wire go down to your pocket where your cell phone is these are Bluetooth headsets Bluetooth in short is just another wireless technology but is even has even a shorter range than something like Wi-Fi on the order of feet or meters nothing particularly remarkable and what you'll see in the upcoming section not this week when you focus on treasure hunting but in the next week when you focus on the internet again is you will actually connect multiple staff computers PCs probably a laptop maybe a Mac all to a wireless router you actually get your hands dirty with the configuration of these things crimping your own cable so that by sections end you've actually built your own wireless network in the span of just a couple of hours skills you can hopefully then parlay to your own home network and as a useful exercise I would strongly encourage you if you haven't already to at least reinforce the material we did earlier in the course in lectures one and two by going home one night or going to the office one day and literally unplugging every cable from the back of your computer and a useful exercise indeed would be to plug things back in without leveraging the color coding that tends to exist on them today it is a wonderfully useful trick to reinforce even more so when we get to the networking stuff so with that said we will see you next week