 Now that the drum roll is complete, welcome back to Computer Science E1. My name is David Malin. This is lecture five, our second lecture on the internet. Allow me to introduce tonight by way of the film above you. I'm David Malin, a dangerous person of death. He's fast, he's tricky, he's TCP IP, and he's got your address. So that is a teaser for a short film we will watch toward the end of tonight's lecture. But before we dive into what TCP and all of that is all about, we are at the point in the semester where it's time to raffle off this iPod t-shirt. Recall that for problems at one, among the students who submit it, if you have received higher than a 75%, you are automatically entered in a raffle. The first prize that we'll be raffling off tonight to students both local and distant alike is this t-shirt for the first time revealed to the class. This is apparently signifying laptop plus iPod. And on the back we have a little advertisement it seems. College students buy a Mac and get a free iPod. So apparently, I'm not sure under what circumstances you get this t-shirt though, but it came to us nonetheless donated by Apple. With that said, I'll do a moment of suspense here. And the winner of this t-shirt this semester is Mr. Gerald Walden. Is Gerald here tonight? Gerald, come on down. A round of applause, of course, please. It is entirely your prerogative if you wish to wear this t-shirt, but congratulations. And well done on problem set one. So lest you think there's some funny business going on, know that Dan Armandara served as witness to the one line program that I wrote before lecture tonight that generated a random number between 1 and 40 that allowed us to select from among those 40 submissions which of you were the lucky winners. I'm going to hold you in a bit more suspense with regard to the iPod shuffle itself. But let's turn our attention now to, again, this topic of the internet. And frankly, Google Earth is just too cool not to revisit in this class. So tonight we'll be entirely about Google Earth, if only because it's the coolest thing that I've wasted several hours on over the past couple of weeks. How many of you out of curiosity downloaded this program after last week? So a few of you. So you will be tasked in problem set four if you haven't noticed already with the downloading of this program in order to satisfy two of the problems' demands, one of which is to seek out some fairly popular tourist attractions somewhere in the world without us giving you so much as directions or longitude and latitude or addresses. And then the second part of the problem set will ask that you seek out three places of interest to you personally. This is more, though, realized than just a fun thing to play with. Know that, one, the software is entirely free, which means we have the luxury of being able to play with it with the expectation that others in the class and beyond are certainly welcome to do the same. But this is actually, as we explained in the problems, that a wonderful opportunity to be told to appreciate if you don't typically do so, that you don't need training to use new software. At least you shouldn't need training. You shouldn't need a user's manual to use new software. You don't need to have certifications to use good new software, at least in the ideal sense. And as we try to assure you in the problem set statement itself, if you struggle for the first time you sit down in front of Microsoft PowerPoint or Microsoft Excel or whatever new application you're required to use at your company, to be honest, it's probably more the fault of the application and of its design and of its development, frankly, than of you, the user. And a number of you enter this course with a bit of apprehension as to what you can do with the computer and dare say you feel you might need training on certain programs and software. Well, the goal of this problem set in part, besides just having fun taking a little vacation in your homes, is to introduce you to a program that is fairly well-designed, I think is fairly intuitive. I'll give you a cursory tour of some of the features, but to be honest, the second sort of implicit goal of this problem set is just to give you an opportunity within the span of a few minutes to download a program and then go figure it out. And that alone can be a sort of empowering trick. But with that said, we've got this spinning globe here. I thought I would take us right away, as we may have done last time, to one Oxford Street in Cambridge, Mass 02138, just a quick tutorial. And this is the extent to which you will be trained on this software for this problem set. And that's precisely our intention to give you very little training. At the top left of this program, if you've not used it before, is a little search box. You can type an address in there. Google is pretty good about knowing if you type Eiffel Tower, where in the world that is. So it's pretty good about guessing where certain popular locations are. But you can more precisely specify a US address, a foreign address for most countries, a latitude and longitude, and sort of other tricks as well. I'm going to go ahead and click Enter after typing that in. And if nothing else, to be honest, it's perhaps the fundamentally unnecessary, there's a gratuitous animations that make this program so cool. As we zoom in here to our location, one Oxford Street, of course, is where? Right here. So we have now a bird's eye view from a bird that's currently flying at about 3,000 feet. You can see in the bottom right corner of the screen, your altitude, at least in feet. You can change that to meters or kilometers, if you prefer, via one of the menu options. But notice, and it's a little hard to see if you don't know to look for it, certainly on our screen here, in the top right of the screen where my cursor is, there's a whole bunch of controls. One, there is a plus and minus in a vertical scroller. So if you simply click on that plus, as you might expect, things to zoom in. If you instead click minus, you're going to zoom out. And then there's also a slider there with which you can sort of move it back and forth without just clicking. But it should be fairly intuitive if you click on the thing yourself. Meanwhile, you can certainly move horizontally and vertically and left to right and so forth to get a different vantage point. Just like Google Maps, if you're familiar, you can click on the display and just drag it around, which is perhaps even more intuitive. And if you're really adventurous and zoom in, for instance, a little bit, and you kind of wonder what this building looks like from a different angle, you can use this slider up top to change your tilt. And you'll get a different perspective on the world. Notice, though, a curious thing happens the more and more we go down. It turns out the earth is indeed flat. But this is obviously why. This result. Why are we seeing that? Right. So you don't have a satellite looking in your window. You have it looking on top of your house from up above. But there are certain parts of the world where you do have multiple angles or you have software, the software is designed to sort of interpolate even better what the shapes of those mountains are or what the canyons are. And we'll go to one such place in just a moment. And this, meanwhile, I'm going to tilt us back up to a more reasonable level. Then you have this big wheel, which by default points you north. But if you click on the big wheel and spin yourself around, you can sort of do a nice 180 spin in that way as well. Meanwhile, do take note. If you haven't seen it already in the bottom left of your screen, you have a whole bunch of layers. This is a fun place to play around because it offers different features of this program. Notice that I have checked terrain. That's a good one to leave on because for those areas of the world where Google has sort of height information, it will show you more of a 3D perspective rather than an interpolated flat perspective. There is a whole bunch of other options here that you can play around with. If you want to find the nearest pizza place in some areas, you can click on such things as dining or the nearest hotel and it operates in that regard like Google Maps. But our purpose tonight is to sort of wow. And so notice in the middle left of this screen under the thing called places, this is where you can store places you like. And essentially what problem set 4 asks you to do is to quote unquote placemark a number of specified locations. This is like bookmarking, but a physical location. And it's terribly simple. There's a little thumbtack here at the top of the program. You click that thumbtack and notice you get one of these placemarks in the middle of the screen. You can then click and drag it around. For instance, I'm putting it on top of Memorial Hall, which is just across the way outside this building. And then up here, you can type a name for it. So I could type Memorial Hall. It tells you already what the latitude and longitude is, if that's at all of interest. And then you can type a little description here like where freshmen eat meals. For instance, Annenberg Hall is inside of Memorial Hall. And then you click OK. And that's as though you've placed a bookmark of sorts into this actual world. What we're going to ask you to do for problem set 4 is to submit via the website's dropboxes those placemarks. And the means by which you do this is very simple. Notice that this placemark ended up under this My Places section of the page. Moreover, as the problem set does tell you to do, notice that if you, for instance, right click on this with a PC or hold and click, say on a Mac, notice that you can say something like add folder. And what we ask you to do in the problem set is to create a folder called 3, I think, and another folder called 4, respective to problems 3 and 4 for the problem set. So I'm going to student type 3 to create the name. Notice I get this 3 folder. And as you might hope, you can simply click and drag Memorial Hall to your 3 folder. And as with other interfaces, notice the pluses and minuses that appear. That'll expand the thing or collapse the thing. And finally, what you'll do for problem set 4 is when you're all done and you've found all the locations in the world that we've asked you to find, you'll simply, for instance, on a PC, right click or hold and click on a Mac. And then you're going to go ahead and say save as. And then notice you get a familiar dialog window. You can go to your desktop. And you can say My Placemarks, or rather we'll call it 3 in this case. Notice the default file name is going to be .kmz. It's a little small, but you'll see as much on your own machine. And then just save it. What that just did was put on my desktop a file called 3.kmz. And that's one of the files you will upload for submission. And what that's going to let the teaching fellows in me do is open your Placemarks, click on those hyperlinks, and whisk ourselves away. Not only to the places you found, but also the places of personal interest that you drew our attention to. Questions at all. I mean, to be honest, if that is not sufficient direction, and frankly, you have the video as the reminder, it's not meant to be an exercise in remembering what David said, how this program works. It's meant to be exploratory. If you don't know how to do something, poke around. You're not going to break the software, certainly. But it's only so much fun. If at all listening to me talk, why don't we take ourselves on a very brief tour, perhaps to one of these places where terrain is of interest? So notice that Google gives you, by default, this sightseeing folder. We created an empty folder a moment ago. But the program comes with a folder called sightseeing, with a whole bunch of popular locations. And why don't we whisk ourselves over to the Grand Canyon? Suffice is just to double-click on that thing. Notice we're heading out west in this country. We're about to zoom in. And the Grand Canyon is a wonderful example of if you have the terrain layer on, you'll actually get this 3D mapping. And then if you really want to have a sort of IMAX experience, you can use the keyboard to navigate these controls besides just using the top right. And you can sort of fly your way through the Grand Canyon and give yourself a little tour. It's really wild. And notice by contrast, if I turn off terrain, there you go. That's the Grand Canyon. So it does make a difference. Finally, let me offer you one other demo of my own design. Let's whisk ourselves away to Boston, Massachusetts. And again, little tricks like Boston, MA. That's sufficient. Google's smart about figuring out what you mean. We're going to jump over here back to Massachusetts. It's going to zoom in. Here we have the main part of downtown. If I drag it over, you can see Boston Common there, the big green area in the middle. But let's focus in on the financial area or right downtown and click on one of these other layers, namely 3D buildings in just a moment. First, I'm going to zoom in. And you can see that these are pretty good photos of these buildings. But if you want to really get a 3D perspective, some cities have support for 3D buildings. People have built virtual models of these buildings such that now, if we dive into the middle of Boston and sort of change our perspective, you can actually see what the city looks like from a 3D perspective. And you can do this for some of the major cities. New York is another one and so forth. Now, here's where you get to partake. Before we go back to understanding the internet, let's use it for just one more minute or so. Where in the world would you like me to take you on this tour? London. So London, UK. Whisk ourselves away over the Atlantic. And in just a moment, we will find ourselves in central London. So there's the Thames looking a little murky as always. And if we scroll ourselves here, it looks like this is the London eye that it's taken us to right there. So the big ferris wheel of sorts in London. Oh, one other thing, especially for those of you who use public transportation. Let me take us back real quick to Boston Mass. Show you one other layer that's kind of fun. I'm going to turn off 3D buildings by unchecking it. And then I'm going to turn on, under transportation, I'm going to turn on transit. And if you've ever wondered topologically what the MBTA system looks like, you can see it now with this nice overlay. Not only for the subway, but also for the commuter rails if you zoom out. And the coolest thing, frankly, I never get tired of this. If you just hold on the keyboard and zoom out, I mean, it's like you're making your own movie, 2001 style. So in any case, one more place. Where do you want me to take you? Big Bend National Park. OK. Sorry? Big Bend National Park. Big Bend National Park. Oh, Bend, OK. Big Bend National Park. Let's see. Here we go. Good. Another one where terrain is nicely depicted. Here too, I'll tilt this back on an axis. And you can really see the 3D there. So it's pretty wild. So in any case, have fun. We're giving you, what, 20 or so points to sit at home having fun, maybe showing off to your family or friends exactly what your homework is on that part of the problem set. There is more to the problem set and realize that this problem set is intentionally not due until the 8th of November, which may seem like a long ways off. But that's because this problem set in particular is fairly involved. Not in a difficult way, but in a fun, as we say, way. Among the other challenges of the problem set is actually to have you go to a local computer store and take your newfound vocabulary, jargon, and comfort, presumably, with hardware and software and the internet to a local computer store and buy, quote, unquote, with some virtual dollars of ours, up to 2,000 virtual dollars, some computer equipment. And this process is all about empowering you with a bit more comfort. In one, reading the tags on the shelves. Two, giving you finally that sense, if you've never experienced it before, that you do, in fact, now know more than the salesman or saleswoman who's trying to sell you that computer. And two, or three, as we qualify in the problem set, we do suggest, since we do this every year and we therefore alienate all local computer stores about once a year, that you not advise the staff until you're done with your assignment that your dollars are, in fact, virtual. You won't get nearly as much assistance. With that said, any questions about problem set four before it or anything beyond this point in the course? All right, so enough about Google Earth. So I connected to my mom's computer remotely in Connecticut last night, installed this on her computer, Google Earth, and that killed the rest of her evening as well, taking a look at all her favorite places. So it's addictive, so beware. All right, so the internet. So last week, and certainly part of tonight, we focused more on the things you can do with the internet, the types of services that it offers. And let's take one step back to last week and pose the following questions, since it's sort of one that recurs every year. Are the internet and the worldwide web the same thing? All right, so no. Let's qualify that now. Why? What's the distinction between these two? So the internet is an operating system within the worldwide web. I tweak that slightly. And before I tweak, let me see if there's another suggestion. Let's go with this one, because it's a bit more precise. So the internet is a network of networks. It's an infrastructure. And I would beware using a term like operating system only, because that's too easily conflated with desktop operating systems. But it's an infrastructure. It's a framework. It's the backbone on which applications and services run. So when we talk about the worldwide web, we're effectively talking about something you can do on the internet. And this use of preposition is by, it's not coincidence. It's the fact that you really are using a service on top of the internet. Whereas the internet itself, though you can't necessarily point to it and say that's the internet, because it really is this network of networks of networks. Well, it's more of the physical infrastructure underlying all those services you run. So what tonight is about ultimately is about lifting up the hood of the internet. Looking at how it works, when it breaks, what does that mean? When your own computer doesn't connect to the internet properly, what does that mean? When you call up Comcast or Verizon and are trying to diagnose why your internet connection is down, well, what kinds of questions can you yourself ask or answer for them? How, in short, might you go about picking up that phone and rattling off so many technical words in the right order and with the right usage that the person on the other end is convinced that you don't need to spend the next hour on the phone with them. You can get bumped right up to, say, level two or level three tech support. It's a wonderful skill. If you can rattle off more information than the person on the other line understands, usually, though not always sadly, they'll realize that it's much easier for them just to pass things up to someone else. And frankly, certainly early on, you can probably get away with using all these words and not necessarily in the right order, but enough of them that you get your way past the initial tech support call anyway. So let's, as always, start from sort of the bottom up and then build up to the juicier, more interesting things. You've got a couple of computers. You've got three computers. How could you go about topologically connecting these things together? Well, what does this mean? Well, last week, we talked about the smallest possible network that's at least interesting. And that had two computers. And we drew our very dated picture of a computer like this. And we said, connect it via some wire or some connection of some sort. And there you have what kind of network? Peer-to-peer network. And again, to be sure, that term has taken on a broader meaning these days in terms of the Napster-like softwares of the world and so forth. But peer-to-peer can also mean quite literally that two peers, two equal computers effectively communicating back and forth. And this was just to make a distinction between a similar pairing but a relationship in which I intentionally drew one computer bigger. And when we drew one small computer connected to one big computer via some connection, we described that relationship in terms of two other buzzwords. Client server. And none of that was meant to say that servers are always bigger than clients. But it's just meant to suggest that just as a restaurant can handle multiple clients, multiple customers at once, so can a server. Handle multiple requests. For instance, it's a web server from multiple clients at once. Well, now enter in computer number three. Well, it would seem just intuitively that if we've already got those two computers connected together, how in the world can we introduce a third? We could disconnect the middle guy and plug the left guy into the right guy, but now we still have a peer-to-peer network of two computers. OK, so using a server, I heard. What was in back? OK, so turn one into a server. What else might we do? What else might we do? Sorry? Yeah, so let's go there. Because this is probably a device that you're all perhaps owners of if you have multiple computers connected to your internet connection. Well, rather than trying to connect them all together, we could certainly connect them to one central computer as was suggested, a server. And that server can sort of figure out how information might go from, and this might be our server here, how information might go from A to the server, then the server could send it to B, or the server could send it to C. Well, it turns out that's a very reasonable solution, but it also turns out that this notion of routing data among computers from A to B, B to C, C to A, it doesn't even require a computer or a server in the conventional sense. This problem can be implemented in very small pieces of hardware. So yes, you could view these pieces of hardware, routers, as they tend to be called as computers, and they are, but they're not computers in the monitor keyboard mouse sense, at least. So one way that we might connect all these computers together then is not so much directly from one to the other, and we don't need a whole other desktop and monitor to connect these three guys to. All we need is some central point. Connect this computer here, this computer here, this computer here. This solves the problem of these computers, presumably only having one port on the back into which you can plug in network cable. Recall in our first or second lecture, when we looked briefly at some of the ports on the back of a computer, and maybe in section you did this as well, well, they take these telephone jack-like plugs. They're a little fatter than a typical telephone jack. Well, a typical computer these days only has one of these jacks. Well, if you only have one of them, you've got to put the other end of the cable into something, and it clearly doesn't work to just connect two together, because then the buck stops here. You can't go any further, so you connect them to a central device like this that clearly must have multiple Ethernet jacks, as they're called. So the technology via which many computers, there's a most computers today, at least so far as we are concerned, the technology that they tend to use is something called Ethernet. So if you ever hear someone talking about an Ethernet cable or an Ethernet jack, for all intents and purposes, they are talking about this standard telephone-like cord and the jack that it plugs into. And the jack specifically, just to throw out something you can impress others with, is called an RJ45 connector. And this is in contrast with a telephone, random trivia, that's called an RJ11 connector. Just think of the, it doesn't necessarily grow out of this, but 45 is bigger than 11, so 45 is the fatter cord. Might be a simple way of remembering that. Frankly, if you never remember that, you won't be terribly worse off than you are right now. But seeing it in print is useful. For instance, you go to the store and you want to buy a cable so that you can connect your computer to one of these central devices. Well, what do you get? Well, you ask for an Ethernet cable, a network cable, a cable with RJ45 connectors on the other end. You might see things labeled differently depending on the circumstances. But let's slap a label now on this thing. We called it a router, but it turns out you don't really need a router per se to have data transmitted among three different computers, call them A, B, and C. This device can simply be something known as a switch. So a switch is quite simply a relatively cheap these days and relatively dumb device whose sole purpose in life upon receiving data that is bits from computer A looks at those bits and realizes, oh, you know what? These bits are intended for computer B. And so it sends it from this jack, this RJ45 jack, out this jack. If instead it receives some bits from A and somewhere embedded in those bits is the label C, well, a switch is designed to send those bits instead to computer C. And switches are, they're not completely dumb. They don't just spit out all the information that comes into them. Rather, they do intelligently select, almost always, which jack out of which it should send the received data. So the reason we qualify switches as being distinct from routers is that those little blue and black devices you buy or those silver devices that you call home routers or call firewalls, they are so many things in one these days. If you have one of these devices that gives you the ability to run multiple computers off of one internet connection, you would be correct, most likely, in calling that a switch, a router, an access point, a firewall, a proxy server, and dare say a whole bunch of other things as well. That's just because at the end of the day it is a computer. It has no monitor. It has no direct keyboard or mouse. But it is a little computer that has embedded in its software that does all of those things. And it has the hardware, that is, the jacks that physically allow those kinds of features to happen. And tonight we'll tease apart what some of those features are. For instance, what a router is, what a switch is. But for now, it suffices to realize that, oh, you know what? We can, in fact, connect multiple computers together with a device like this. How much is it going to run you? If you've got a few computers at home, you want to connect them all together. Well, how much are you going to pay for this kind of switch? And all a switch is. And you can see this perhaps in section is, or you can see it in your own homes. It's got a power adapter that you plug into the wall. And it's a little plastic or metal box that has a whole bunch of these RJ45 jacks. That's pretty much it. No moving parts or switches. No pun intended. How much? $20. $20. Almost always in this class, frankly, these days everything $20, $10, $30. Relatively cheaply these days. And if you watch for rebates and you're really careful with your money, you can sometimes even get these things for free after rebates, maybe plus shipping. So what topology are computers usually connected in these days? This sort of mishmash here is meant to beg the question, when you have multiple computers, how do you connect them together? What you've seen an example of is what's known as a, I'm going to skip ahead, a star topology. This is probably the most common way of connecting multiple computers together in a network these days. You wire all of them to some central point. In fact, if you are really a geek or live with a geek who has him or herself multiple computers, or you work in an office where you have a server room or you have jacks into which all of your coworkers, computers plug in, we'll ask your IT guys sometime this week, where is your server room or where is your wiring closet or where do all these wires go? And if the place is laid out nicely, there probably is somewhere in your office or building some kind of closet or room that you can walk into, see a whole bunch of wires coming out of the wall or coming through the ceiling or from the floor and all of them get plugged into all of these little jacks on a rack. So computers in server rooms are usually laid out in big metal racks and what you see is switches that don't just have three jacks but rather might have 24 or 48 or 100 so that you can plug a whole bunch of computers into. Well, many of you probably have those internet jacks on your walls. Let's see if there's one in the room. Most everything's wireless these days. So back in the day there would have been on the wall somewhere one of these jacks into which you at work plug your computer. Well, all that is is a cheap little box that has a jack. Behind that jack is one of these wires. That wire is most likely leads to that closet or room in your building or company and on the other end is another one of these RJ45 jacks and it plugs into a really big switch and by big I just mean physically so that you can fit a lot of these things so that all of the computers are through that switch interconnected and so if you have a file server at work or printers shared at work it all boils down to them being connected usually these days via Ethernet via cables and switches like these. In yesteryear and the reason for the other pictures is you could connect computers in other topologies which we won't dwell on since it's simply not as common these days but you could go the ring approach which several years ago was common if only because one that's what some of the original protocols languages that computer spoke when network were designed to do and two it's also cheaper when cabling was more expensive you don't want to necessarily run wires from every computer in your office all the way to the basement or all the way to the attic because think about the waste, much more sensible it would seem would be to run those wires to the next closest computer and from there to the next closest and save on costs these days you pay pennies for this kind of cable in fact two or three years ago the teaching fellows and I bought a box a spindle of this kind of cable the cable itself is called usually cat five category five it just means it's capable of internet speeds today we spent 50 bucks maybe 80 bucks and I thought every year we'd have to get a new box because in section we use this cable we're still working off of the same box for three years now which means we pay pennies per foot of this thing and you may wonder why this teaching staff and I need a thousand feet of this cable well one of the things you'll do in an upcoming section if you're local is actually make your own Ethernet cable now that seems a bit weird if I motivated some of this discussion earlier with how to go buy such a cable from the store but there's a remarkable I think sense again of empowerment and also frustration when you try to take the eight little wires that are inside one of these cables line them up in just the right way so that you can slip on one of these half-cent RJ45 connectors you slip those wires in you take a little crimping tool that will hand to you squeeze it as hard as you can usually pass it then to the TF who will squeeze it even harder for you and then at the end of the section if all goes well we will test out your cables on a working computer and if we can bring up a web page you done good and if we didn't well you will walk home with your head held low perhaps but it will be for those of you who get them working a wonderful souvenir to take home to friend or family and in fact let me take this moment as we tend to do you know in this class despite how we try to teach you how to make computers and upgrade computers we always seem to go through more computers and equipment than we actually retain so I'm going to take a knife to one end of this otherwise working Ethernet cable and I'm going to cut off part of the plastic sheath because even though this thing looks pretty thick all this yellow thing is it's just a piece of plastic or rubber that keeps all of the little wires in there sort of tucked together and secure so I'll pass this around now and any of you who have an internet connection at home that uses a cable modem or DSL modem you have one of these in your home and if you have a wired connection at work you have one of these in your home so take a look as this comes around at the eight wires that are now coming out of this thing and again in section your goal will be to line them up in the right way and crimp them back down but then notice too on the other end of this thing that those very same colors and those very same wires are lined up in a certain pattern and therein lies the challenge you can't just plug eight wires in on one end in any old order plug the other eight in any old order and expect them to work they all have to be lined up so that what comes out this end goes in that end and so forth so I'll pass this around and also one of these RJ45 connectors sure I'll pass these around so that you can see exactly what's going on inside these cables this is not to say to be clear that you should ever have a burning desire to crimp your own ethernet cable every time I do it in my apartment to run some new line when I got a Tivo, when I got a sling box and when I just got too much free time I end up banging my head against the wall and I sort of wonder why do we make the students do this but in the end it is in fact possible to do this another way that you can lay out a network is via a bus network this too is somewhat dated at least for today's purposes whereby you essentially run one wire or line in between all the computers and then connect each of your computers to it sort of like bus stops or driveways on a local street so network topologies so we know then how to connect computers locally it takes a switch it takes some ethernet cables and it takes the computers themselves thinking back to last week if I draw a very poorly formed building with a door around these computers well just to put this into context what did we call that kind of network local to say one building so that was our LAN so even though we're focusing more on the details underneath the hood tonight it's really the same tail as last week but once you have a LAN or a bunch of WANs and you actually want to connect these things together well how do you go about connecting them together well therein lies the design of the internet so we said last week that the design of the internet grew out of a US military project called ARPANET one of whose design goals was to have a fairly well distributed and redundant network so that there was never just one path ideally from A to B you could go from A to C to B from A to D to B and so forth but in short there was never just one wire connecting two important sites well what you have these days and the more popular usage of the internet are generally known as internet backbones so companies like MCI and AT&T and the big fish so to speak with which you're familiar largely from the telco days in fact own a lot of the underlying infrastructure that the internet ultimately is defined by and by infrastructure I mean really fast really thick wires thicker at least in these things with just eight wires that carry not just a local networks traffic but can carry gigabytes of traffic terabytes of traffic theoretically you have lines not only in the US certainly but you have transatlantic and trans-pacific cables hundreds of feet below water that themselves are carrying a whole bunch of cables that in spirit work similarly sometimes to these kinds of cables which are copper wires and you can do much better with the right kind of money and right kinds of technology some of these cables these days are fiber optic one of the other cables I'll pass around is this orange cable notice as this thing goes around those are just copper wires if you pull off the plastic colored sheets that are around the eight individual wires you'll just see some bronze or copper colored wire and it's just sort of in a flow of electrons across that wire contrast that with something like a fiber optic cable which this is more expensive and we're not going to clip the ends off of this one tonight but how does data travel along a fiber optic cable it's fundamentally different from a copper based cable like that yeah it's effectively traveling by way of light so not so much the flow of electrons across a metal wire but rather flashes of light if you will across a medium that is conductive and allows the passage of light not just in a straight direction but through a cable in effect and you all might remember say from grade school that even if you don't remember that light travels at what three times ten to the eighth meters per second well you probably remember that light travels really fast whereas anything that tends to be based on electricity or at least it flows on something that has resistance like a metal wire tends to be slower so fiber optic cables tend to be even faster and folks building homes these days or renovating homes that are building into them network capabilities so that they have jacks in the various rooms of their homes will sometimes lay not only cat five cable these days but also something like fiber optic cable not so much because it's necessary or useful yet but you see how fast things move these days probably is useful and cheaper than pulling you know breaking through the walls ten years from now and just to put some more numbers and just jargon all of which you see perhaps anytime you read something tech related cat five cable is essentially capable of operating at up to 100 megabits per second 100 megabits per second contrast that with fiber optic cables which again can go into the gigabit range and you can also have cables that are in the 1000 megabits or rather one gigabit range themselves but in short if you're using the kind of wire that were the yellow wire that we're passing around there you can have flow about 100 million bits per second and that's that's pretty good in fact think back actually did we will come back to that in just a moment exactly where the bottleneck might be in your own home yeah good question I will punt on the first question since I'm not sure off hand but a quick Google search could probably turn up the cost for us per square foot of fiber optic cable how soon will it be useful it's already useful much of Harvard yard for instance is already wired with fiber optic cable because even though the dorms and the buildings themselves are only wired with say 100 megabit wire cat five cable well once you start connecting buildings together that suggests that you're connecting maybe a few dozen or a few hundred people in one building to the few hundred people in the other building which suggests you need more bandwidth that is more ability to have bits flow between them so you see fiber optic cable being used certainly in larger networks but in the home it's good question so if you're renovating a commercial residential condo is it worth wiring with fiber optic cable I'll go out on a limb and say it's probably slightly premature consider after all a point we'll get to tonight which is that even though cat five is capable of 100 megabits per second we can jump ahead here because it's an interesting question how fast is your typical internet modem cable modem or DSL modem sorry 30 30 what 30 megabits per second maybe although if it is I'm quite jealous because that's somewhat high the cable modem typically these days another thought or another proposal so a cable modem tends to be I would say between maybe 1.5 megabits per second to Comcast I think currently offers up to 8 megabits per second a DSL modem meanwhile offers a speed of what 20 megabits wow you guys are getting much better service than I am so usually not I'll say not with DSL at least I would say typically you see slower speeds with DSL although you're seeing a convergence these days as Verizon for instance in Boston and Comcast become more competitive all say that generally and again these numbers are just typical they're not necessarily upper and lower bounds you might get something like 768 kilobits per second to a few megabits per second these days though Verizon in Boston if you pay for DSL modem service which for our purposes is different only in so far as DSL modems come in over your phone lines cable modems use your coaxial cable lines beyond that that's the physical difference the the real world difference is that these days at least in the Boston area cable modems tend to be faster and in fact if you go and but what's the flip side you can sort of spoil answer what's the upside of DSL in the Boston area and elsewhere certainly well Comcast is better in that it tends to be faster right it tends to be more expensive right we saw that same trade-off talking about RAM and hard disk space and so forth so for instance Comcast frankly it's a little insane I think you pay between forty and sixty dollars a month for Comcast service depending on if you have cable bundled with it and phone and all that but it's pretty high whereas DSL even though you can get introductory rates for like fourteen ninety five or nineteen ninety five I think their current rate is probably twenty five ish thirty five max so I'm going to say I'll say something like fifteen to thirty five but take these with the grain of salt but it does tend to be less but and for the not uninformed this isn't such a problem it's very hard if not impossible on say Verizon's website to find out what the speed is of their cable modem service of their DSL modem service what they will typically do these days which is a bit misleading is say that it's forty times faster than dial-up well who cares like how much slower is it than cable modem service well notice too that these numbers are somewhat misleading because in fact even though I get for instance at home eight megabits per second download usually or a lot of the time your upload speed is much slower and it's an asymmetric medium whereby yeah you'll get up to maybe eight megabytes per second megabits per second lowercase b bits megabits per second what is my maximum upload speed of course only I know this but take a guess much slower good we'll take that and you want to answer let's push a little harder one to three yeah it's actually even at seven sixty eight kilobits per second this mind you is because I pay ten dollars more a month to double my upload speed it's a funny thing so with Comcast again you'll pay forty to sixty bucks a month and the typical speed they quote you at least in the greater in the metro boston area is up to six megabits per second and up to three hundred sixty four kilobits per second upload that's okay though why does it tend to be okay for the typical user to have this asymmetry whereby downloads are much faster than uploads are right I mean you tend as a typical user to download far more than you actually upload right what are you doing when you're on the internet you're pulling down web pages you're sending very little request you're saying give me today's news and then all of CNN's news gets sent back to your computer if you're downloading mp3 you're sending a very small request give me the latest mp3 but then you're downloading three megabytes of that file if you're downloading movies you're downloading hundreds of megabytes of files but how often do you say the typical e1 student upload a movie that's two hundred megabytes somewhere else so the sort of interest and this is where you start to see the distinction between people like us down here and people like you what we do every day or often is the other direction sending data up for research purposes for course purposes every time frankly we upload the latest videos to the podcast it's the biggest headache because it saps my internet connection for an hour or two usually every Wednesday night but fortunately lost is on on Wednesday night so it's not such a problem but the point is that you have this asymmetry and you got to read the fine print sometimes to know the difference and you also have to understand what your needs are so as to know does this matter to me DSL will similarly have this asymmetry and it will sometimes be quoted but again you have to beware Verizon in particular has kind of dumb things down enough in a marketing sense where again they say 40 times faster than then dial-up service but even if you get a sales person on the phone they'll tell you well it takes no more than 53 seconds to download a movie what does that mean like how big is the movie and what are we comparing things to so you have to bear that in mind but typically if you want really fast speeds cable modems tend to be better and even here there's a caveat I pay again ten bucks more a month to double my upload speed from 364 which is normal for Comcast up to 768 and for me that's huge it literally has the amount of time it takes to upload one of E1's podcast videos or if you recall from our first lecture sling box when I think we were showing a press your luck on the overhead screen or some TV show sling box being the device that streams my cable TV connection this way you know I'll admit I like to tell myself that I pay ten bucks more a month so that I can work more productively but frankly it also has the fringe benefit of doubling the quality of watching TV remotely but you pay ten bucks more a month and you go from six megabits per second download to eight megabits now that sounds like a lot more right that's 33 percent more for only ten dollars but you have to ask yourselves what question at that point do you need it so yes it's faster but your internet connection is not the only bottleneck in the world the person you're downloading that file from might not have as good an internet connection especially if it is one of these peer to peer file sharing programs if you're downloading even from a big server like iTunes or even E1's podcast the server is configured to send you the file somewhat slowly the presumption being well we want to be able to satisfy lots of downloads at once but you don't really need that video right now you're probably okay with waiting twenty minutes instead of fifteen minutes to download that file so there might be artificial delays on the other end as well the problem is that I don't need more download speeds six megabits is pretty darn fast at least so far as typical computing needs go today it's this where they really get you and it's hard to go beyond this speed unless you want to pay much more for it however those of you who are commuting in from Boston or who are watching this show from outside of Boston from folks like Verizon have the advantage of an up and coming technology known as FiOS and if you've got this then I am genuinely jealous this is a fiber optic based technology for delivery of internet connectivity to the home and it does tend to be much faster than cable modems and I don't remember values off hand maybe the TFs now I want to say something like ten twenty megabits per second in theory this might be a little pricier but some of you in the outer areas of Boston can get this already so I would go to Verizon.com and search around for FiOS, fiber optic and so forth and if only out of curiosity for yourselves if you can get it so in answer to your question is it worth wiring a condo one's own condo for instance for fiber honestly probably not because even though you already have the ability to wire your home pretty cheaply pennies per foot with cat 5 cabling or cat 6 which is slightly better insulated essentially look at the incoming internet speed so you can have a really zippy home network but where is the bottleneck it's in the jack in the wall where your home interfaces with the outside world so the only advantage really to wiring one's home or apartment with something better than say cat 5 100 megabits per second would be for what kinds of situations what kinds of people would want to wire their home say with fiber optic cable so if you upload a lot it doesn't matter actually because this is symmetric you do get 100 megabits down and up you only hit that asymmetry once the data starts to leave your home or your office why would you might want a really fast connection locally even though it's not going to speed up your connection to the outside world because again the bottleneck is at the jack in the wall yeah so to share data among your own computer so companies certainly and Harvard universities campuses will wire their local networks with faster technology so that one you can have peer to peer file transfers happen more quickly students on campus for instance could stream this course's videos at a much higher resolution than outsiders could using the general internet too if you run your own file server or backup server which even though this might seem a little geeky these days to imagine I might in fact be one of the few people in the room with a file server in his apartment well the more the world talks about having like home media centers where you store all your movies and music in a central computer essentially in your entertainment center well sharing data even within the home is becoming a much more plausible and compelling feature so you will see that in the future but again I think you'd probably be over paying at this point but again it's conjecture you can in fact save money sometimes by buying long story short special cables that have pretty much everything inside of them sort of planning for a rainy day coax cable cat 5 cable fiber optic cable so it just depends on the cost and if you think it's worth it to you but as to when that day arrives where it's fast enough it's useful and fast and necessary tough to say long answer to one question but we were going there anyway other questions yeah yeah so municipal wireless let's um Chris how many minutes do we have on tape okay so let's go here now before our break and just do our relate the same conversation to wireless because it's very much in the same vein so municipal wireless is sort of something that's being touted in a number of major and minor cities let me come back to that in just a moment and say first that for your local network this is the kind of technology that you're using for a local network if you have say um the yellow wires that you're running around your apartment so and or if you're in your office and you're plugging into the data jack that's probably the kind of wires you have there but if in your home you have wireless access or even if your office or in Harvard you have wireless access notice and it might be obscured by this big life but there is a little box on the wall here with two little antennae that's plugged in with one of these yellow cables to the wall but that is allowing all of the TFs for instance and some of you to use Harvard's network wirelessly well what is that technology called and this is not an internet providing technology as much as it is a local area technology you have technologies like 802 11 b and 802 11 g if you have a laptop or even a desktop that has wireless capabilities odds are you have a piece of hardware in there that supports one of or both of these technologies the speed of your internet connection locally if you have 802 11 b is anyone know it is in fact 11 megabits per second however that is signal strength dependent so ideally you have 11 megabits per second of throughput within your own apartment is that okay well odds are that's plenty if you were trying to use the internet in your own home why 11 seems much smaller than 100 but why is that probably okay and not cause for worry or to feel that you skimped yes I mean look at the incoming connection speed if this thing is only coming into your home at 8 megabits per second all you need is 8 megabits per second within the home and in fact even though it's maximally 11 it does depend somewhat on signal strength so if you have lots of cement or very thick walls or brick walls or you're on a different floor of your home for instance you're not going to get as strong a signal those of you with windows laptops will see in the bottom right corner of your screen if you're using a wireless connection excellent strength very good strength well that's sort of a nice way of saying you're getting 11 megabits per second you're not getting 11 megabits per second but not all operating systems are precise as to what your actual throughput is so fortunately you can do a little bit better and this is more common these two megabits per second what's your throughput oh sorry 54 megabits per second this too is somewhat signal strength dependent but odds are even if you're only getting a half quality signal well that's still you know 27 megabits per second just speaking off the cuff and that's more likely to guarantee you this throughput here and in fact just to put it into perspective when I finally did set up this supposed file server in my apartment I actually bought a Nick a network interface card off of eBay that would fit in this specific Sony laptop but whose technology was G instead of B because for sharing files in my apartment when I load big files from my file server onto my laptop alright this is you know what five times faster in theory and that means a big speed up for me locally so again you have to consider what are your needs what are your metrics or actually having a good connection versus a bad connection so finally an answer to your question these Wi-Fi oh and this stuff the cute marketing speak is Wi-Fi wireless fidelity you have something called Wi max or other variants of this for municipalities I just read recently one subset of Boston would be rolling this out sometime in the next year or two sort of as an experiment these speeds any of the TFs know what they're quoted at I think it's I don't want to let me check during break to come back to you so I'll hold you in suspense but it is an interesting question because one just to put this into context you now have free internet service potentially competing with the likes of Ryzen and Comcast frankly you know I don't mind so much that you'll see more of that kind of competition but it is an interesting question and I would actually wager that coming from the government huge expenditures of money and wireless infrastructure I don't think these things will last at least in their proposed form for very long because we've all seen even in this course right what we did last week is out of date already so you can only imagine spending millions or hundreds of thousands of dollars on wireless infrastructure it's not going to endure for very long and I question the interest of you know public service in keeping up the expenses of these kinds of services I think it's compelling to have wireless service it's not clear to me if it's going to be sustainable coming to the world for free at least from local governments but it's a nice experiment if nothing else and it's going to push the envelope in terms of wireless speeds and frankly forty sixty bucks a month that's one of my biggest utilities of the month and I use it every day but it's only so much I want to pay to watch TV outside my apartment let's take a five minute break all right welcome back so what do we got done so far so we talked about how a land works really underneath the hood we talked about how you can connect your own land or your own local computer to the rest of the world by way of some internet connection via any of these technologies cable modem dsl ray was kind enough to look up the current speeds for phi os and maximally you can get up to 30 megabits per second download and up to five megabits per second upload so not too shabby at all again you can check out Verizon.com to see if it's available to you odds are it's not because it hasn't been rolled out terribly so but it is being rolled out more in the suburbs than in the local city so once you've got your connection to the internet what does it look like well again this is where we began our discussion so you have these internet backbones which essentially are really fast computers and really fast wires that interconnect major points on the internet and you might hear those points called peering points a peering point generally or a pop point of presence it tends to be areas of the internet where major backbones connect where sprint connects to MCI or to AT&T and so forth and so these very popular nodes here one in Chicago, Los Angeles, Dallas and so forth are major peering points major points of presence that internet connections big ones flow into and flow out of and some of the interesting things that on this macroscopic scale big companies like the sprints and MCIs of the world need to think about is the cost of running their own network and often you will have arrangements between these big providers whereby they pay each other to take traffic from one network onto their own or to put traffic of their own onto another and one of the curious things about the internet is one we already know that data doesn't necessarily have to travel from A to B via one fixed route that was the fundamental design early on in a network like the internet but it turns out sometimes the fastest way the fastest the quickest way from point A to point B is not even the proverbial straight line but rather you'll have data hopping around cities around within cities for either one technological reasons because the data is simply flowing along the fastest possible link not necessarily the shortest possible link or because of various peering arrangements and ISP configurations it's their choice that they want to route your data this way then back that way simply because for instance it might save the backbone money rather than having to put your data on some other network for you the user none of this is even that relevant because at the end of the day presumably you only care about where your data or that your data is arriving either at your computer or at its destination but on a higher scale there are some really interesting network related topics that you can actually explore in other courses here and elsewhere if you take a fancy to this kind of topological discussion but if you've got such complexity manifest in diagrams like this how in the world does data for my computer even get to CNN server somewhere in the world or Google server somewhere in the world well it turns out that every computer on the internet has an address just like you assuming you receive and send postal mail have a US postal service address in this country that uniquely identifies you or your mailbox or your P.O. box or your building in the United States so do computers have an address that uniquely identifies them on the internet this address this IP address internet protocol address is a number that's 32 bits long which is to say every computer on the internet has an address that's 32 bits long thinking way back to lecture one how many computers does this naively suggest can be on the internet at one possible time if each computer must have an IP address and these IP addresses are themselves 32 bits long how many possible IP addresses are there I'll give the E1 answer this time a lot but how many there is one number I begged you to remember in lecture one 256 would be unfortunate if you could only have that many IP addresses in the world and on the internet at the same time it is much more than that bigger, yes so we're talking about if you've got 32 bits again for those of you who love math that's 2 to the 32 power and I didn't expect you to remember the number but I did say please remember that this is roughly give me an order of magnitude people who are watching from home are kicking the screen right now that no one's answering this darn question it is a lot it's roughly 4 billion so that means you can have roughly 4 billion computers on the internet using this IP addressing scheme 256 incidentally if IP addresses were only 8 bits long you'd have 2 to the 8 or 256 possible IP addresses fortunately we have way more and it turns out that even though this might seem like plenty but the way that IP addresses are allocated throughout the world actually sometimes it's increasingly becoming tight the address space and some IP addresses go wasted because one person owns them but doesn't necessarily use them all and so forth but there are ways of sharing it turns out IP addresses and if you've ever wondered if only tonight how your home network uses one internet connection to share internet service to multiple computers in effect what you're getting when you sign up with cable modem providers or DSL modem providers is you are getting yes a physical connection to the internet but more technically you are getting from them one IP address you are being assigned a number that is of this form that uniquely identifies you your computer on the internet and by this form I mean it's a number dot number dot number dot number and each of those numbers themselves can be from 0 to 255 so how do you see this well let's make this a bit more real those of you with windows and again I'm windows biased in lectures only because this is what I bring to lectures but if in windows you go to your network connections and choose your appropriate network connection and click properties and this is the kind of details that ideally you never have to deal with these days but if you scroll down you'll notice something called tcpip and it did flash on the screen a moment ago but you actually heard that spoken by a big booming voice earlier tonight he's tcpip that was the teaser for tonight well tcpip thank you for laughing at me when I mimic the videos here tonight so tcpip is the language that is spoken on the internet any computer that's connected to the internet speaks the language or more technically the protocol known as tcpip so anything you do on the internet for the most part is carried across the backbone that we saw depicted earlier over using a protocol or a language called tcpip how does this relate to your home connection well notice when I double click on tcpip in that window I get this box and for 9.5 out of 10 of you you never need to look at this or change this though a few years ago this kind of tinkering was common notice that the top bubble check there says obtain ip address automatically the bottom bubble says obtain dns server address automatically what that essentially means is that when I turn on my computer and am connected to my cable modem or dsl modem via wireless or wire I am going to automatically ask my isp for that ip address it's not hard to load it into your computer years ago it was not uncommon for a comcast rep or the like to show up at your home with a printed piece of paper and say here type in this number as your ip address and it came printed on a piece of paper it doesn't work very well when you want to be able to change things and reconfigure things on comcast and so things are almost always dynamic these days at least for public networks and for utilities like comcast and dsl providers and so forth but what you do is an ip address well what does this mean well if you request a web page and you receive a response well what is in that response well in our example that we always use it's like the day's news right we said a week or so ago that web pages are written themselves in a language called html well what does it mean then if web pages are written in html and wait a minute what language do web browsers and web servers speak did we say last week think what do you type when you type any url http hypertext transport protocol is the protocol that web browsers and web servers use to themselves transmit data so i seem to be changing our story every week right web pages are written in html wait a minute web pages are transferred via http wait a minute anything on the internet is spoken in tcp ip well it turns out and this is a very clever design fundamentally most everything on the internet so far as the implementation goes is layered so we began tonight talking about ethernet that's a physical layer so to speak once you have a physical connection you can do things with that connection and with that connection with that physical connection you can put on top of that this language this protocol called tcp ip that just gets the data from a to b well what data do you want to send well if it's a web page or request thereof you want to send an http piece of data so you have ethernet you have tcp ip and then you have http on top of that and what is in an http response well if it's for a web page you get back html so it's not that we keep changing our story it's that we're looking at different layers of this puzzle that is the internet and again at the ground floor you have the physical connection something like ethernet on top of that as of tonight you have tcpip which for right now assume that that just gets data from a to b well what is that data if it's a web page it's a chunk of bits that are stored in http's format well if that http response contains a web page inside of that is html well let's try to make this more real suppose that I have made a request to need a volunteer from the back of the room if someone could just call out their name in the back of the room you don't have to come down to the front of the room what's your name anyone abdull so I wish to send data to abdull well I'm going to write this data let's just say in English in some sort let's say it's an email for instance here's my email what I am going to do is hit the send button on my computer what my computer essentially does when I hit send is it's going to figure out wait a minute this is email that's an internet service I'm going to send that email out over the internet well what language do I use to get anything out on the internet I use tcpip and one of the features of tcpip tcpip is in the interest of efficiency and in guaranteeing that all of your data gets from a to b is it breaks it up into smaller chunks and so I pre-tore tonight's paper but imagine your computer essentially without you the user even caring about these details it breaks your message up into four smaller messages each of these messages go inside of what we'll call a tcpip packet the packet will be sealed and it will be numbered this is packet one of four well just like with the US Postal Service if I'm going to send data to abdull I have to address this packet with a virtual envelope so I'm going to write abdull on the to field and then just like you would in the real world I'm going to say david in the return field thereby addressing the envelope both to and from sort of a simple example to belabor but what the computer is doing is precisely that but my computer suppose abdull actually has a computer that I'm sending him this message via well what's going to go here instead of quote unquote abdull based on what we've just learned the IP address of abdull's computer or really to be precise of abdull's mail server which might be gmail or hotmail or whatever my computer figures out based on the domain name in abdull's email address whose IP address needs to go here gmails or hotmails or MSNs or someone else's meanwhile we have three other parts to this message so I'm going to go ahead and slip part two in the envelope the computer is going to go ahead and seal it it's going to become part two of four abdull's name goes in the two field my name goes in the from field that's ready to go I'm going to take part three it's going to go into the virtual envelope fortunately computers do this much faster this is going to be tcpip packet three of four from david to abdull and finally packet three four goes in its own virtual envelope it gets sealed up this is four of four and maybe an obvious question why am I bothering to include the one of four two of four, three of four, four of four putting on one's engineering hat so to speak right you kind of have to know what order to reassemble these things and to abdull's computer these are just going to look like bits well together they're all going to paint some picture of an email if you don't arrange them in the right way it could end up being jibberish so the ordering is important so that data is also included in these so-called packets and now my computer sometimes it feels like it takes this long to send an email so my computer is ready to send these packets this email off to abdull my computer windows macOS supports or speaks tcpip so the computer out of the box just knows how to do these things so where does this go well my laptop is connected wirelessly to harvard's network so somehow or other via 802.11g these packets are going to be sent to these two antennas up here they're going to travel then through the yellow wire in the wall in this building that wire is connected to what piece of hardware somewhere in the building most likely a server but we replaced server in our discussion earlier with a switch which just isn't a big wiring closet probably somewhere in this hallway or in the basement that switch in turn does in fact connect now to a device called a router a router is a more intelligent computer that doesn't just spit data out ports based on what's physically connected to it but a router rather looks at the to field and says hmm abdull well a router is going to have multiple connections coming into it and maybe going out of it and just for simplicity think of a router is having a connection going north south east and west a router is smart a router understands tcpip a switch only understands ethernet but a router understands tcpip and says hmm abdull inside of every router is a table of sorts like an excel spreadsheet or an access database essentially rows and columns where the router can look up and say all right where is abdull and there's going to be a row in a sense in the router's abdull saying abdull is to the north and so what the router effectively is going to do is going to send these four packets as they arrive out its northbound port well where are those packets going to end up odds are I mean abdull is pretty far away from me right now there's no direct connection between me and abdull in fact for the sake of discussion think of all of yourselves as routers and I can reach ray but I can't reach abdull so it turns out that on the internet just as our diagram a moment ago suggested well these circles that have all these points coming in and out of them guess what those are physically router so ray fortunately is connected to another router via some leak maybe one to the north south east west but each of these routers has a table that either automatically that is dynamically or because humans manually input this kind of information each router knows the next best hop to send the packet it might not be basically the closest but it's the preferred next hop well how does a router know well obviously packets aren't stamped with literal abdulls that it that's why the beauty of using numbers as schemes is because routers can for instance look at the first few numbers in an IP address and say oh you know what all IP addresses starting with one four zero go that way and all IP addresses starting with one four one go that way and that's why the numbers are a useful scheme so when I then hit send my computer figures all that out sends it to the access point goes to the switch the switch leads it by cable to the router maybe that router is connected to another one via fiber optic cable or something similar eventually that router is connected by other some other medium maybe a transatlantic cable maybe microwaves maybe some physical landline connection but in short through one or more other routers is there hopefully a connection to Abdul from me just to hammer home this point why don't we go ahead and I'll send them then in order to Ray to Ray and to illustrate our point don't necessarily send each packet to the same no that let's send that one let's not necessarily send each packet the same way because again at any point in time maybe a router is getting busy there's a lot of internet traffic at some point in the country and so a router decides you know what I'm going to route around this congestion into another router hence all those multiple paths between a and b hopefully this has soon arrived at Abdul and Abdul there is actually a real demo here if you wouldn't mind opening up those envelopes that you've received and reassembling them and reading a loud if you could pretty loud what the message is that I sent you I guess it doesn't work to whisper across the crowd so so you have all the envelopes that you've received that goes without saying and they were numbered so read them I think if I did it right one two three four just note to self no self adhering envelopes next year and what do you got for us the winner of the ipod shuffle is it turns out just as in the internet as with tcpip packets can be dropped literally and I don't know if a few of you saw me trying to be clever or witty but I physically drop this one on the floor and that can in fact happen in reality we're not talking about dropping something physical but rather bits or packets but tcpip is designed or rather routers are designed if they get too congested let the sender retransmit and again it's an exaggeration but a router will sometimes just drop your data but that's why they're numbered because built into tcpip and any computer that supports it is a realization that wait a minute if Abdul's computer thinking to itself well let's see I got one of four two or four three four wait a minute where's four of four and he waits a second two seconds nothing's arrived what Abdul's computer is designed to do because it supports tcpip as does windows and mac os and linux he will request that I retransmit at least that packet that he hasn't received and so what will next happen is my computer will say oh wait a minute Abdul has informed me it he didn't get this packet I'll retransmit that same packet and hopefully he will now get it this time and just so I'll save you the routing of this suppose I did send this final packet recall that the sentence that was read in great dramatic flair here was the winner of the ipod shuffle for having submitted and scored higher than 75% on problem set one is a Mr. Timothy Conan Timothy are you here deafening silence what a wonderful dramatic surprise this is for Timothy who will re hear about this in about 48 hours apparently so as much as I'd like to just give it to Abdul I'm afraid we're bound by the rules of this contest to give it to Timothy who also was selected pseudo randomly but if we could it will be preserved on camera a round of applause for Timothy and for Abdul thank you very much for partaking so on top the slides here with and so a top the slides here what we'll get that to Timothy I guess top the slides here what you see is a more technical layout of what we've been talking about it's not so important for tonight's purposes as to what the bits look like that are being sent across the wire via these routers but just to put things into perspective even though we keep calling it tcpip tcpip is actually two different protocols that are just so commonly used together that people usually refer to them as a pair but this it turns out is what a tcp datagram or tcp segment looks like well what does that mean well any piece of information that's sent via tcp is laid out in this fashion and you don't have to really absorb all of this but all this means is that you have the zero the first bit second bit third bit fourth bit fifth bit essentially laid out from left to right top to bottom embedded in this tcp packet then is some interesting stuff which should make intuitive sense notice this sequence number and acknowledgement number well what was I doing in the top right of the envelope I was saying one of four two of four that was the sequence number so embedded in each of those envelopes or tcp packets is precisely that number using in this case how many bits are used to represent a sequence number if this is zero we got ten bits reading for so each of these dashes represents a bit so how many bits the thirty one or we're counting from zero thirty two total bits are used for the sequence numbers now this seems might seem silly how often am I going to send Abdul an email that requires four billion packets to be sent well your computer is doing a lot of other things at once so these sequence numbers aren't just for one email but for all of the internet traffic that your computer is sending so it's useful to have so many different options source port and destination port these I think came up briefly last week though I tend to confuse semesters so help me out what port does http use my remembering am I in two thousand six eighty eighty eighty sound familiar yes no okay so let's talk about ports so I thought we did this last week but you know that a server a computer can do multiple things at once it can provide multiple internet servers one computer can be an email server it can be a web server it can be an ssh server which is a technology you'll use in section if you haven't already in short a computer can do multiple things but if a computer only has one IP address well that sort of begs the question how does your computer distinguish whether some bits that are arriving or that reply from Abdul or that web page from CNN well associated with every internet service and by that I mean http that is web email google talk a well instant messenger all the popular programs you can think of skype last week is a number a relatively small number like twenty two or eighty or one thousand but relatively small that uniquely identifies the type of service that that packet includes so if I wanted to be really particular on each of those envelopes I sent to Abdul I would have written the number twenty five which is the port the number that uniquely identifies email on the internet aka SMTP the sending of email well inside of this TCP packet then are those numbers so that when Abdul receives that envelope his computer can say oh you know what not only do I know this is for me and from David it's an email which means I should route it in effect to outlook or to you Dora instead of to say internet explorer or Firefox or a browser so those are ports in a nutshell meanwhile it's in IP do I have this picture here yes it's in IP just to give you a glimpse of this that we actually store the so-called source address and destination address but again we would defer to like a networking course to tease apart more of these features but we can see them in action what I have here is a window it's a little small but hopefully you'll see it when it fills the screen what I'm going to run in a second is a program called trace route so I am connected right now to one of Harvard's computers in the electrical engineering and computer science building so it's you know few buildings away that's fine think of it as being on my laptop what I'm going to do is ask the computer show me the route between my computer and CNN dot com so I'm going to run trace route as the programs called www.CNN.com and here are the results so there's a lot going on some of it pretty fast we're up to 16 now notice some of these won't work for us for various technical reasons but notice that the very first line just reminds us trace route to CNN.com what's this in parentheses then of the IP address of CNN.com's computer good notice that this first line here starts with one four oh two four seven six oh dot one a useful hint this is not always true but it's often true in the home with your home routers a routers IP address is usually ends in dot one by convention but it's not a requirements and one of these conventions useful heuristic to recognize things so what does one represent do you think what does line one represent landline right idea not quite right though keep looking ahead so we were talking in terms of hops again what is each of these rows represent take a guess server of some sort what type of server backbone of sorts but what does each of these hops again I'm trying to use the same nomenclature hops represent a switch is just a local thing for your local network a node yeah looking for a word starts with our router right so routers so this has been the buzzword most of tonight a router again is just a device that gets data in figures out oh this IP address goes that way let me send it along to the next router well who's the next router well from my computer the first router is that guy depicted in line one who is that router in turn connected to via some kind of physical connection or wireless connection well the router in line two what's its name well the host name of router number two to borrow last week's lingo is this rather cryptic core dash one dash gw's dash v one four one five but thank god something familiar that f as dot harvard dot edu so this is one of the faculty of arts and sciences routers gw is a common nickname for gateway a k a router a gateway is a router and vice versa what's in line three and I'm going to stop it before it scrolls too far for us what's line three well that looks like another router notice one buzzword in there useful to at least see this stuff in practice when so some kind of wide area network but these host names are completely the prerogative of harvard sys admins they mean nothing in and of themselves they've just been chosen by some tech guys for looks like it doesn't have a host name or domain name per se and that's okay not every computer on the internet needs a name that's human memorable because who cares what the name of a router is frankly often you just care about your own computer or the destination but moving on take a look and make an inference here where is my data going from the moment it leaves my computer on its way to CNN what happens in step five where are we so we're in Boston on quests backbone quest being a big ISP of sorts a big backbone provider locally so it looks like our data hops around quests network for a little bit but turns out that between lines six and seven where does our data go geographically sorry good so good so in spirit and what's often happening is your data is leaving your computer going to faster and bigger computers and connections and then eventually on the tail end it the process effectively will tend to reverse at least if you're visiting a somewhat small site but again the question on the table here what looks like something interesting about where my data is going between points a hop six and seven use your airport code I know this one I grew up in tri-state area yeah 33% chance of getting this right Newark EWR is the airport code for Newark this again is convention not all routers are named with airport codes but sysadmins tend to use it because it's useful convention to obey so literally between point six and seven assuming they're not fudging the host names there is some kind of physical connection between Boston and a router in Newark New Jersey how much time does it take for my data to go from my computer to Newark well that's what all the other numbers on these rows are indicating in parentheses is each routers IP address but to the right of each routers IP address say right here 6.983ms and 6.700ms what is that do you think sorry milliseconds and that denotes the number of milliseconds it took for my packets to literally go from my laptop to Newark New Jersey right it takes five to seven hours to drive there it takes six point some odd milliseconds for those virtual envelopes that I sent to Abdul to get to Abdul in Jersey if he were there so when you start talking about speed of light and electricity and fiber optic cables you know in theory traveling up to the speed of light maximally mean six point seven milliseconds to get from here to Jersey that's pretty darn fast it certainly blows away any sort of physical transport mechanism we've yet invented yeah good question why are there three of these numbers well this program in particular just to give you a sense of averages tries this to send the data three times so that you can look at and say alright six six six that's a pretty good estimate because sometimes again you'll get congestion and if you were just to see something like 15 milliseconds you might infer that oh there's a bottleneck there but it might have been very temporal and it might disappear the next time and what this program is doing it's not sending emails it's not sending web pages it's just sending let's say empty envelopes but in such a way that we get a response back it measures the amount of time it took to get there another question so why does it go faster from Boston to Newark what you're actually seeing these times are the times from my computer to that router these aren't the times between routers so in what you would hope you see and what we are generally seeing is that as you look from top to bottom these numbers are in fact getting bigger and bigger and that's consistent with the distance getting slightly farther and farther away so read them from start to the way to the router let's take a look I don't know what DCX is it might be somewhere in DC but I'm not familiar with it if it's an airport code the others are a little more cryptic to me and sometimes you'll get these stars which just means the routers are not set up to respond to our kinds of requests but let's try another one let's say something like I think we said CNN dot code dot UK is the UK version of CNN's website let's give this a try okay notice that there's similarities in the path which you might expect because the data is being routed through some common point notice and you can see it here just for some reason notice line 11 the numbers are all over the place but it looks like it was a temporary bit of congestion or something because notice it took us over where the value go here we go 185 milliseconds to get to hop 11 but clearly we can get past that more recently it looks like the routers along this path just aren't being very cooperative let's try something in the other direction so dot code dot JP for country code of Japan let's see what we get this time okay we got the first few alright so now we can start using our airport code tricks again so we're going from Boston to where New York JFK airport city code SVL and PAX any guesses sorry it's in this country and you can infer that from the times let me ask you this though tell me between which routers is there a really expensive really thick really long trans-pacific cable or trans-atlantic yeah take a look at that and you can read something interesting into these numbers to hop 11 it takes a 75 milliseconds to hop 12 from here takes 200 milliseconds that suggests a really big something in the middle odds are it is in fact the ocean and if I were better at inferring from these host names where they are I could tell you if it's going to the east or to the west since it's going PAX we can look this up later but there that one made it all of the way so to go from here to Japan which in a plane would take many hours with Google Earth even would take a few seconds with the internet itself 200 milliseconds you can get there and back in under half a second literally kind of a mind-blowing thing so how does this all fit together well let's take us as promised first time in history people and machinery are working together realizing a dream a uniting force that knows no geographical boundaries without regard to race, green or color a new era where communication truly brings people together this is the dawn of the net one arm works click here to begin your journey into the net now exactly what happened when you clicked on that link you started a flow of information this information travels down to your own personal mailroom where Mr. imp packages it loopholes it and sends it on its way each packet is loaded in size the mailroom must decide how to divide the information and how to package it now the package needs a label containing important information such as sender's address receiver's address and the type of packet needed us because this particular packet is going out onto the internet it also gives an address for the proxy server which has a special function as we'll see later the packet is now launched onto your local area network or lab this network is used to connect all the local computers routers printers etc from information exchange within the visible walls of the building the lab is a pretty uncontrolled place but fortunately accidents can happen the lab is packed with all types of information these are IP packets new low packets they're going against traffic as usual the local router reads the address set if necessary lifts the packet onto another network ah the router a symbol of control of a seemingly disorganized world there he is systematic uncuring methodical conservative and sometimes not quite to speed up but at least he is exact for the most part not for the most part not for the most part for the most part for the most part for the most part for the most part for the most part for the most part for the most part for the most part as the packets leave the router they make their way into the corporate internet and head for the router switch a bit more efficient than the router the router switch plays fast and loose with IP packets definitely rounding them along the way a digital pinball wizard if you will one day you will probably in there as packets arrive at their destination they are picked up by the network interface ready to be sent to the next level in this case the proxy the proxy is used by many companies as sort of a middle man in order to lessen the load of their internet connection after security reasons as well as you can see the packets are all of various sizes depending upon their content the proxy opens the packet and looks for the address or you are able depending upon whether the address is acceptable the packet is sent on to the internet some addresses which do not meet with the approval the proxy that is to say corporate or management guidelines these are similarly dealt with we will have none of that for those who make it it is on the road again next up the farm wall serves two purposes it prevents some rather nasty things from the internet from coming into the internet and it also prevents sensitive corporate information from being sent out on to the internet once through the firewall a router picks up the packet and places it onto a much narrower road or bandwidth as we say obviously the road is not brought enough to take them all now you might wonder what happens to all those packets which don't make it along the way well when Mr. IP doesn't receive an acknowledgement that the packet has been received in due time he simply sends a replacement packet we are now ready to enter the world of the internet a spider web of interconnected networks which span our entire globe here routers and switches establish links between networks now the net is an entirely different environment than you'll find within the protected walls of your land out here on the west plenty of space, plenty of opportunities plenty of things to explore and places to go thanks to very little control and regulation new ideas find fertile soil to push the info up of their possibilities but because of this freedom certain dangers also lurk you'll never know when you'll need the treated pain of death a special version of a normal request pain with some big about to mess up unsuspecting hosts the pass our packets take maybe vice-satelet telephone lines wireless or even trans-oceanic cable they'll always take the fastest or shortest routes possible but they will get there and they eventually maybe that's why it's sometimes called the worldwide wait but when everything is working smoothly you can circumvent the blow five times over at the drop of a hat literally and offer the cost of a local call or less near the end of our destination we'll find another firewall depending upon your perspective as a data packet the firewall could be a bastion of security or a driven adversary it all depends on which side you're on and what your intentions are the firewall is designed to and only those packets that needs criteria this firewall is operating on ports 80 and 25 all attempts to enter through other ports are closed for business port 25 is used for mail packets while port 80 is the entrance for packets from the internet to the web server inside the firewall packets are screened more thoroughly some packets make it easily through customs while others look just a bit dubious a firewall officer is not into the fool such as when this ping of death packet tries to disguise itself as a normal ping of packet it's okay, it's okay no problem, have a nice day we are here, bye and on that note, we'll leave the ending as a surprise for next time we'll see you next week when we will dive into new material we'll see you later