Computer networks (How the internet works?) | Lukas Vyhnalek | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Computer networks (How the internet works?)

teacher avatar Lukas Vyhnalek, Microsoft Employee, Programming Teacher

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

8 Lessons (1h 2m)
    • 1. Introduction

    • 2. 01 Types of networks

    • 3. 02 Cables

    • 4. 03 TCPIP

    • 5. 04 IP Protocol

    • 6. 05 TCP and UDP

    • 7. 06 TCP Connection Management

    • 8. 07 DNS

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

I remember the time when I took Computer Network class at my University. It was extremely boring. Though the professor had great knowledge about Computer Networks, he couldn't explain it in a simple, fast and engaging way. That is why I created this course.

In this course I will explain the most important concepts of Computer Networks in a simple, fast and engaging way!

Who is this course for?

  • Anyone who wants to learn the most important concepts of Computer Networks

  • Person who just wants to learn how the Internet works

  • Anyone who is studying on their Computer Network exam.

What will you learn?

As I wrote earlier, you will learn the most important concepts of Computer Networks. The exact topics include:

  • Types of networks (size, topology)

  • Cables in computer networks

  • TCP/IP architecture

  • ISO/OSI model

  • IP protocol (IP address, routing)

  • TCP & UDP - How they work and what they do

  • TCP - Connection management

  • DNS Servers

What things do I need?

In order to take this course, you only need your computer or smartphone and internet connection.

Also, if you don't understand something or if you need help with something. You can always reach out to me. Mostly I respond within a Day.

So do you want to learn how the internet works?

Enroll today and I will see you in the course

Meet Your Teacher

Teacher Profile Image

Lukas Vyhnalek

Microsoft Employee, Programming Teacher


Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Introduction: Welcome to the introduction to Computer Networks course where you will learn the most important concepts off computer networks. Let me ask you one simple question. What is the Internet and how it works? I guess you think for a while and you realize how much you don't know about computer networks. Dad is OK, and this course you will find everything you need to answer that question and so much more . So who is this course for? The scores is designed for beginners with no experience with dumping their networks. And it's also a good match for people who are currently studying for dare computer networks exam. Basically, if you want to learn how company the networks work in a fast and engaging way, this is the course for you. So what can you find in saggy course? You learn what types off network do We have also what Topology day can have Dan and we'll take a look at the DCP. I'd be architecture, which is basically how the Internet works. We also talk about the protocol. You probably heard the term I P address, but I P product will provide so much more. Then we will take a look at the TCP and UDP, and lastly, we will talk about domain name servers. And if you don't understand something, you can always reach out to me. Mostly, I respond. Within a day at the end of this course, you will get a certificate off completion. Did you get put on your resume or on your lengthen profile core skills with amazing 30 day money back guarantee so we can try to course risk free. So, do you want to learn how computer networks were enrolled today and I'll see you in the course? 2. 01 Types of networks: Or I guess so. What are the types off the computer networks? There is not only one computer network, but there are multiple types, and basically, we divide the networks by size off the network. All right, so if we have some smaller network, it should probably be a local area network. And when we have some, like extremely big Network that contains connects, right connects smaller networks into a bigger run, that would be probably a wide area network. All right, so it's important to know what type of networks do we have. So the 1st 1 is the local area network. This is basically the smallest network, smallest computer network, dead we can have. It's usually inside a house or some sort of building. It usually reaches around 100 meters, right and something like that. And today it's most commonly used while WiFi right. So we have WiFi inside our home, and then we connect to the router probably. And so we have a local area network inside our home, so this is usually the smallest possible network. Then we have the metropolitan area network, so desist. Usually the network Dad's big s a city, all right, so it's usually like 10 kilometers big, all right, and it connects multiple local area networks into the metropolitan area network, all right, and this network has mostly most of the times it have. Higher speed writes Hi. Speak off the connection, right? The local area network have slower connection, and then we have the white area network. So these are de cables that run under the ocean, right? The huge sites. This This is the biggest computer network that we can get. All right, And the white area network Ah, basically connects multiple metropolitan area network and multiple local area network into one groove 11 huge computer network so that all of the's computer can communicate between each other, right? So these are basically the computer kinda networks, and lastly, we have also the personal area network, so that's usually not made off computer. It's usually like phone and your your headphones right phone and your headphones for phone and your smartwatch, right, so this kind of network is around one person. So when I like, I have some smartwatches right and I want to connect them to my phone who have Bluetooth, mostly onda. When I connect them. I create a personal area network. So what is important? What this network needs? Well, this network needs to be energy efficient. Write it. You don't want to drown your battery because you are connecting your mobile phone and your Bluetooth headphones. All right, so this should be energy efficient. It should also be isolated, right? So when I'm, for example, in a train and there is a lot of people right, each of these people have their own personal area network. So they have phone that is connected to their headphones and what I don't want. I don't want their music to be played in my headphones. Right. So we need these personal area networks to be isolated from each other, right? Because both of these devices are in reach, right? He's standing two meters away from me and brutal reaches like 10 meters. So if I want, I can connect to his headphones and start playing music right? But this distinct. We don't want that in a personal area network, all right? And but that's not the only way we can divide our networks. We can also divide them by deeds apology. So the apology basically stands for how are these devices connected to the network or ride ? So we have something called the bus topology, which is the all this one. And it's pretty much not used today. But it's still good to know, right, since it's the beginning, right? That's how he thinks worked. And it's also a good example of what not to do so in the bus topology we have inside here. As you can see, we have huge boss, which is connecting all of these devices, right. All of these devices are connected to this bus. And when I want to, for example, send data from this one to, for example, this one. I am sending it wildest one bus. So can't you see a problem with this? Well, the problem is that if I if do devices, for example, this one and this one want to connect to, for example, the sprinter, All right. They send data in the same time the collision happens. All right, so the data is not being received by the printer. All right, if the if two computers starts sending data in the same time, right, there will be collegian. All right, so that's probably mostly Weide. Bus topology, ISS not used anymore. So what we have next? Next we have the ring topology. So as you can see, the devices and this scheme are connected as a ring. All right. And what is the problem with this? Well, let's say that I want to send data from this computer to this one so I can send it like this, right? We are wired. These two computers that desu computers can also see the data I am sending right? So D communication is not private, all right? Because they can. They can simply listen to what I'm saying, right? So that's quite bad. We want the communication to be private. We don't want the other devices to be able to see what we are sending what data we are sending. All right. And also, if the rink, if you cross somewhere right, the d cable Debus inside here and inside here, the connection right will be lost. So that's also a bit of a problem. And the last one, which is currently mostly used, is the star topology. Where somewhere in the middle, right inside. Here we have some active element which is usually a router. or a switch or it And these elements basically takes care off the connection between all of these devices. Right? So it looks kind of like a star, all right? And when I, for example, wants to connect from this computer to this server, I can connected wireless router. And what's the advantage? Well, when I'm sending data from this computer to dis server, all of the other devices, right, cannot see the information, all right, because I'm not sharing any bus with them. It's It only goes from the center to the receiver, and no one else can read the information, right? Only if you hack like the active element inside here that then you can read the information . But if you don't, your communications should be private. All right, so that's the huge advantage off this star topology. You can also see the advantage on another case where, for example, if you cross the cable inside here, All right, So this Or, for example, when the device in here stop working right, the network will run anyways. Or you can still send data from this computer to dis server, even though this this computer doesn't work right, so That's also a huge advantage against the other. It's apologies, and that is spent much it for this lecture. If you have any questions, feel free to ask, and I'll see you next time. 3. 02 Cables: Okay, So in his lecture, where you want to talk about he cables. So basically, we will talk about how to physically connect to devices. All right, so when I want to come communicate with something, I need to be connected, right? I need to have some medium to transfer the data that I'm sending. All right. So the cable basically provides that. And what type of cables do we have? Well, 1st 1 is the core X cable, which is the all this one, and it's pretty much not used anymore. It was used during the hap hap topology. Right. Wendy hopped. Apology was popular. The corks cable waas also very popular. Why? Because the Cox Cable was the only medium that was possible to be the active bus inside the bus topology. All right, so the bus topology used the corks cable. But in the other networks, it's not used anymore. Why? Because it's very slow. So, as you can see, we have some isolation inside here, right? And then we have the data transmitter inside here, so that's where the data actually floats. All right, that's why why this week we transferred the data, but as I was saying, The Cox Cable is not used anymore, it so that there's no need to talk about it much longer and the thing that s quite used. Still, even though it's still kind of slow, it's twisted pair cable. So the twisted pair, as you can see, we have bears right off cables and their twisted into each other white are twisted. Well, because the electromagnetic field is then stronger, all right, And yet so they are twisted into each other and also distressed it. Pairs are also twisted into each other. All right, so they're like double double twisted if you want. And yes, so this cable is quite used, its very often used for the ethnic cable, right? So if you know the connection to your probably desktop computer, if you have one, is the R G. A 45 connector, all right, which uses mostly this cable. All right, so that's basically how your cable to your computer looks inside. And the twisted pair is good because it's cheap, all right. If we want some cheap cable to be able to connect to devices, we probably want to go with the twisted pair cable. Since it's like reasonably fast for the price. But, yeah, it's it's quite it's. There's good balance between price and speed, all right? And if you want some extra speed, we can use the fiber optic cable. So what's the difference? Well, in those cables before the data once was transmitted, where a electric pulse. All right, So we we sent a pass, which means there's one. And when we don't send a pulse, it zero right and we can do the same thing with light, right? If we send light, it's one. And if we don't send, light it zero all right, so we can also transmit information while light. And that's basically what the fiber optic cable. Thus so they are basically like two glasses where you just sent light and on the other hand , on the other end. As you can see, there's also light. So this is this cable basically allows you to transfer light. And what's the advantage? Well, it's extremely fast, right, its speed off light fast, and this is the kind of cable that is used in the right area network. So the network that connects these smaller networks together there must be like something really fast to connect those, right? So because if I want to transfer something from Europe to America, right, I need some fast medium to transfer the data, which is basically the fiber optic cable. So the fiber optic cable is extremely fast. That's the biggest advantage of that. And yes. So if you want something extremely fast to go with fiber, if you want something cheap, you go with twisted pair. And yes, So these are basically the cables that are used today in the in the computer networks, but yeah, so that's pretty much it for this lecture. If you have any questions, feel free to ask, and I'll see you next time. 4. 03 TCPIP: All right, so now we are getting into the good stuff. The D C key I p architecture basically describes how the Internet works. All right, so it basically just tell us how the Internet works and it goes, right? It's based on something called S 00 S. I model. And this is something that is rarely used, right? But it is just something it's it's more of like theoretical model, right? So if you want, for example d bag your application, you can use what I saw. Always I write, but I will talk about it in a minute. So how does the data transport actually works? So if I, for example, want to connect to some website right to some server how it actually works. So as I was saying, I will talk first about the OS I model, right? So the communication is divided into layers. All right, so we have several layers based on each other, and each layer is responsible for some part of the community communication. All right, so we have the application there which basically provides the application that runs on your computer, for example, a Web browser to excess. The communication media, right, so to excess to be able to communicate with other devices. All right, so does the application layer. Then we have the presentation layer, which basically takes scare off the data transformations. All right, So, for example, when I have a website and I click on some button on the website, I want to send some data right to server that I clicked on the button. So when I click, it is transmitted into zeros and one right. There is a sequence of euros and one and the presentation layer. Basically, they scare off the encrypting and decrypting the data so that the communication is actually safe, right? So that if somebody is listening to my communication, he is not able to be able to Teoh, he's not able to read my communication. That right? And also the presentation layer takes care off the compression off the data. Right. So did we send a small amount of data as possible? All right, then there is the session layer the session layer. Basically, they scare off the establishment off the connection, right? It allows to two devices to connect between each other. All right, then we have the transferred layer, which basically manages the data flow between those devices. Right, So it decides what data will be sent and when. Right. And on the other hand, on the other end of the communication, it will receive the data and takes care of you processing. All right, so in the transport layer usually works two protocols TCP and UDP. All right. And then we have the network layer de netware glare basically takes care off the routing off the information, which is one of the most probably complicated things in the computer networks, and also one of the most important things. So the network layer basically, during, like, the I P Protocol that you probably heard off it's working on the net for glare, right? Or the device called router. It's also working on the network layer. Right. So basically, on this layer, we are taking care off the data being sent in the right route. All right, so inside here, we basically take care off the data, actually reaching out to the receiving and all right, then we have the data Linge layer, which basically takes care off the connection between two two devices that are next to each other, all right. And then we have the physical air, which basically takes care off the of transforming the information into, like, electric balls. All right. And also inside here, on the physical air, there are, like, cables and stuff like that, right? And also on the data Linge layer. There are, like hops and switch or at the peace. So switch probably is the most common device. Debt uses the data ling glare. All right, so that's the OS I model. As I said before, it's more of AIDS theoretical model. It is not used in as a architecture 40 Internet network, but the architecture 40 Internet network counts from this model. How does how does it work? Well, the architecture, as you can see inside here, is the D c B I. B. Right and the D. C P I. P have only four layers. It have the application layer. It have the transmission control protocol. So the transferred layer basically, then it have the Internet vertical. I be but a short which is basically the network layer. And then it have the lingua her. So which is basically those two layers connected into one all right and the application layer basically means these free layers off the OS I model connected into one. All right, so on the application layer, there are some protocols, right? So, for example, like http protocol, You probably know when you type some VIP side. You type http? Right. Dad, I dont know google dot com or at so the http is basically a protocol that works on the internet to transfer html files, right? So basically websites and the protocol works on the application layer. Right? So if I type http Google that calm, right, the application devette browser, which is somewhere around here up here. It sends the data to the application layer right to the http protocol The http Berrocal takes care of the data transferring right and the connection establishment between you and the server and then sends the data to the transmission control protocol. The transmission control protocol. Basically the sites howdy data is being sent. How much data are re actually sending right? Because we can't send all data at once because we would blow up the network, right? We can send the data own in small chunks. All right, So he decides, For example, I want to send. I know 10 kilobytes right now. All right, Den. It sends the 10 kilobytes into the network layer. So the Internet protocol and what it us? Well, it chops that 10 gigabytes into, for example, let's say 10 packets, right? So Beckett, as just like small information that is being transmitted wire the Internet and the Beckett basically just picks his route. Right? So we have rotors that are sending the back. It's in the right direction, right? So that it actually reaches the receiving end. All right. And the cool thing about this architecture is that when I sent the beck, it's to back its can take different routes and still reach the end. All right, so that's basically the the decentralization, right? So if one wrote IHS, for example, digestive, I can take the other route, OK, and still reach the end. So that's like the huge importance. This is like the huge factor off the Internet off this D C v I p. Architecture. Okay. And lastly, we have dealing Glor, which basically takes care of the transformation, as I said before. Okay, so yeah, that's don't care about this one right? Just yet. this will come up later. And yes. So Asai was saying these are d the layers off the d c p I p. Architecture, which is the architecture off the internet. So you definitely want to remember dose? Because it will probably be on your test if you have, like, some networking network exam, Right. This is kind of have to know, right? You have to know these things. So inside here we have the d c p i p on the transport layer in the application layer. We have protocols like http, right? Or some mailing particles. And on the network, there's like the I P Protocol. All right. And on the network excess layer there, like the mac addresses and stuff like that. And the physical cables. All right. And so how do you data is being transmitted? Well, as I say, it was from the application layer. It generates some data, sent it to the transfer layer. Then it gives suiting network layer. Then it goes su de Sorry, then, in Joe's suiting network excess layer. And what happens then? Well, this is just one device. All right? So all those four things are just one are happening at one device and dandy data is being sent. And then what's happened on the receiving device? Well, basically the same thing, but in the different order. So we received some information in the network excess layer. So from the cable, will you receive some bits or ride? And what we do while we send it to the network layer to say, like, hey, network player, I just received some bits. I don't know what that is, right? The network layer basically takes care of the who is sending the information and whether I am the receiving end of the information. So whether I am the person that actually needs this information, okay. And if I am, it will send the information up into the transferred layer, which basically takes care off the like, ordering off the data right, so that the data comes in correct order and also like other stuff. All right, I will talk more about it later in discourse and Dendy transfer layer basically sends the data to the application, and then you can, for example, see a website. Okay, so, yeah, there's basically how d d c b I b architecture works. And if you have any questions, feel free to ask and I'll see you next time 5. 04 IP Protocol: All right, let's talk about one of the most used producto and whatever the most important for articles , which is the I B particle, the I P particle basically allows you to communicate and computer networks it it allows to communicate to devices there are far from each other. For example, me, my my laptop, that is in Europe. And like some server off Google that is in us, all right, they can communicate with each other because of the i b protocal. And yes, So how do we How did we get the I B? Berrocal? Well, it was actually made by US military. So it was basically a way to communicate so that the army can communicate when we are being under attack. All right, So if, for example, like foreign government attacks some some communication media, the Internet shoot still works, it is being the centralized. So there is no, like Central Point that would be like able to turn down the hall, Internet or at right. So that's hugely important it It also means that there's no one who have control over the Internet. All right, And the next thing that we need in the I p particle in the computer network. We need a way to address the devices that are in the in the network. Right. So we have something called the I P address. So, for example, my computer, half A i p address because it is being connected to the Internet. All right. And some other computer You you have also some I fi address, and if I want to reach you, I will. Basically, it's it's same s with, like, male, right? When you type a male Elektronik mail, you tied the receiving address. Okay, So, basically, in the Internet, in the computer network, the receiving address that you right into the mail is basically an I p address, right? That there's no there's no signs behind. It is just a number. Okay, there's nothing more. It's just a number. And yes, we need a way to know where to send data. And we have two types off I p addresses. One is I p version for right, which basically allows us to have addresses from 00002 to 222 155. Story 255 255 and 255. Basically, it allows us to have for 32 bit numbers, 32 bit addresses. All right, so bit is just something that can be either zero or one. Okay, so right now, if you are paying attention, you probably noticed that that's not enough, right? Right. If we have to To the power or 32 that basically means that we have lack around four billion addresses, right? Four billion I p addresses. And there's, like, seven billion people, right? And I myself have, like, phone connected, my laptop disconnected. My other left up is connected. So So all of us, like, uses multiple devices. So four billion addresses is just not enough. How does the company how does the computer network works? How does the Internet works? So this is basically done by are a one trick right, which is called the Net. But I will talk more about it later on in this course. Okay, so for now, the important thing is that we are still kind of using the I p version four, even though it's not enough. And we are slowly transferring to I P version six okay, which basically have, like, hugely big I P addresses, like, 128 bits. Okay, so that's two to the power off 128. Ah, number of devices. Okay. It's, like, incredibly big number. And yes, so that should, like be good for a while. So right now, you might think. OK, so why didn't we start with the 128 bit addresses right away? Right. So when the I p. Berko came up, nobody nobody realized that this will be the communication media that will that everyone will use right. When when the military came up with this system, they thought that there would be like I know, like like 100 thousands of devices that are communicated with each other. OK, not more not, not much more. Okay, so they thought their 32 bit addresses will be enough. Also, there is a tradeoff. If you have 32 bit addresses, the Beckett these size off the data that do you need to transfer its smaller right. If you have 32 because in every back it what do you need to transfer? You need to transfer the I P address off the receiving end and off the center right, so that the receiving computer or D device knows who Sandy data. Right. So you need 42 bits in the I P version four protocol. If you use I p version six, you need 256 bit, which is like much more. And right currently, it's it's not that big of a deal, right? Because we have quite fast computer networks bad, like 20 years ago. This would be a huge problem, because the connection would be much slower because of that. Okay, so that's why we still kind of operating on the i P version four. And yeah, so right now, let me actually let me actually show you How do you routing work? So there's the most important part off the I. P Protocol. It basically takes care off the data being transmitted between some devices on the Internet . So imagine that I m the device number one, as you can see inside here, and I want to send some data to the device number six. So all of these are just devices. You can think of them as a computer or as a printer server or basically any device that can be connected into a computer network. Okay. And these red things, these red circles, they are de routers. So the router basically takes care off. What bath does the data take? Okay, So as I was saying, when I want to send some data from the computer number on to the computer number six, I can take the upper path. Right. So this one So I'm sending to data from one to disrupt, er this Rather decides that for some reason, it wants to take this bath. Okay, so it takes this path than this one decides that we need to take this bath, and then it finally reaches these six. Okay, But that's not the only path that we can take right there is the 2nd 1 If I send the data from number one device to disruptor. And it, for some reason, the site that we want to take this path to this router than this Rather decides that we want to take this path, and then this router sends it to D number six. OK, so yeah, that's that's basically how the Internet works. And this is basically the decentralization, right? So the decentralization basically means dead. We can transfer to data. Okay, We can transfer them. And we have multiple bath that we can take. Okay. So, for example, if we if we if I know somebody attacks our country and it basically, like, brew up this this router. Okay, so there's no router. I can still connect to the number six right device because I can take the second fat. Okay, so that's the decentralization. And yet another thing that I also need to talk about is how does the router decides what path to take, Right? As I was saying, there are multiple baths. So how does he know which one is the right one? So I want you to think about it. Which path would you choose if you were the router? Which path would you choose? Well, you would choose Probably the fastest path possible, right? You want the data to be transferred as fast as possible. So yeah, that kind of makes sense. So how does the route or know which path is? The fast as possible is the fastest. So it basically de rounder basically needs to somehow add value to these badges. Okay, So do you know what I think is if if you know what I think is it basically means that you just send data to other device that you somehow connected to wear some cable. Okay, so this this basically edge is a cable. And when you send the data, when you do a pink, it will basically return the data off. How long did it take to respond? Okay, so then you have the information off. How long does it say to get from this point to this point? OK, so you can add value inside here. Then what do you can do is basically do this for every edge. So now you need you know, how long does it take to get from this point to this point And also from this point to this point and then all you need to do is run the shortest path algorithm, which we'll talk later on bar. It basically means that we will find the shortest bath possible. Okay, So where does the router store the information? Right. That's also a question that you might be asking, right? Where does the rotor know what devices it can reach? So when in connected device, it will create an entry in the routing table. Okay, so each router, each of these red circles have a routing table, and inside the routing table, it basically half like entries which identifies what devices it can reach. Okay. And then it have, like, i p addresses and masks and it basically routes. Why a d y d routing table? Okay, so the rounding table is it helps the router to decide what path to take. And yes, so So Dad has been much at four days video. If you have any questions, feel free to ask End al soon Next time. 6. 05 TCP and UDP: Okay, So in the previous lecture, we talk about the I. P. Protocol. So basically, how to transfer the data And right now, well, we will be talking about how to basically manage the data flow. So went to send the data and how to basically establish connection closed the connection and stuff like Dad. So in order to do that, we will talk about a TCP and UDP protocols. So both of these particles operates on the transfer to layer off the D c P I p architecture or on the O S. I model, Okay. And basically, as I was saying, it manages the data flow when and how much data is being sent at the time, and it also manages delivery. So, for example, on the receiving side where you would like to get some feedback, right, If we send some data, we would like to get some feedback whether the data is actually being received. Okay, so we are basically sending something called acknowledgements, which basically means that the other side is saying, Hey, I received that information, okay? And yes, So And let me, first of all, talk you through the d. C. Be practical So here is a example. We have, like, two devices and inside here, this long line basically means the I p protocol inside here is the routing and stuff like that, right? It is hidden currently. So you probably you already know how these devices connect to each other. OK, so right now on the DCP layer, he basically have some packets that will be sent. Why are the Internet okay? So where the i p protocol and then they will be received on the other side. Okay. And the d c b basically make sure that you received the back. It's in the right order. Okay, So when I sent the P one as first and DP one go second, I will receive the P one as first, and you will be to a second. Okay, So right. That's not if you remember the on Internet protocol. There are a couple of routes that we can take. So it is completely possible that db two will be received thirst, even though it was being sent last. Okay, so the DCP basically take scare off the off the ordering off the back, it's ones they arrive, and it also sends acknowledgements. So as I was saying, the device number two would right now respond to the device number one and it will say, Hey, I received DP to as a last packet and the device number one knows that everything is all right and it will send be free and before and so on. Okay. And yes, So right now, what can also happen? Well, inside the Internet, we are not sure Ready back, it's will arrive. OK, so it's completely possible that, for example, the Beckett to will get lost on its way to the device number two. So what will happen then? Well, imagine decays. That d number device number two received only the Beckett number one. So what it will do is it will send the acknowledgement. But the acknowledgement will basically say, Hey, the last thing I received was the P one, okay. And the device number one takes a look at what data it sent, and it will figure out that DP to was not received. On the other hand, on the other side. Sorry. So it will basically re sent dp to so it will once again created data crazy back it and send it to Audi Internet Protocol, and it will finally some some. Some time It will probably reach the number two device the UDP Braddock. Oh, on the other hand, doesn't care about the order of the data. So if I sent P one and P two, they can arrive in un correct order. Okay, so db two can arrive before DP one, even though the P one was being sent first and the UDP basically says whatever right? That the just sometimes happen and I will do nothing about it. So on the advice, we might get D data in wrong order. This doesn't happen debt much often, but it happens, OK? And yet another thing that can happen is that we will, for example, not received the Beckett number one. Okay, so we will not receive some information, But this time do you d be okay? The UDP doesn't use acknowledgements, So this second device basically doesn't send any information to the first device. So it doesn't doesn't tell the first device to send the Beckett once again. Right, because it it doesn't communicate. Right? So in the DCP Protocol, we would say that we didn't receive the packet one okay. And the The device number one would send it again. OK, but in the UDP, we have no way off saying that. So you d be basically if the packet gets lost in the UDP, it's lost and it will not be sent again. Okay, also, this doesn't happen deathmatch often, but it happens, okay? And yes. So which one is better right now you are probably thinking that DCP seems like an easy winner, right? But is this true? Well, not really. What is the problem with DCP? Well, as we are sending the acknowledgements right, the second device needs to send each time it to receive some data in east descent and information that it the received the data. Right? So there's some overhead. Basically some information that are additional to the information that we actually want to send right are being also said so didn't means the DCB connection as slower. Okay. And also the DCP back it's are bigger. So we need to transfer more data because we need to keep track of the numbers off the packages right and stuff like that. So the DCP is slower. What's the advantage? Well, it's reliable right. If you want to send something like, for example, a vet page or a email, we want all the data to be sent, right? We don't want, like, vet page where, for example, A logo is missing, right? Or a item in the navigation bar is missing. We don't want their We want the TCP. We want the reliable connection. We want to be sure that the data was being sent and it was being received. Okay, if you use you d be 40 that services, we would basically we're send the data, send the webpage and hope that it arrives. Okay? And if it doesn't arrive, well, that's just bed lock. So but the U T B particle is still some time Good when? Well, when we are, for example, streaming a game or when we are, for example, do like Skype, right? Some communication. It is a very good idea to use the UDP packets. Why? Because when it is in real time, we pretty much don't care about whether the all of the information is being transferred correctly, right? If some day that is not being received, we are okay with that because that doesn't happen dead much often, right? But that's also the reason why in the Scott communication or something like that, you can sometime notice that the communication just free frozen for second or or just like some click or something happens inside that. Okay, so that's because off the UDP right that we don't want to use TCP because in TCP we would make sure that the communication is being transmitted correctly. But it would take some time. So, for example, this green would be frozen for like, two seconds. And then we would be here. The actual, like word the other person was saying so the Gunvor is ation wouldn't be real time, and it's a huge problem. We want the conversation on Skype to be real time, right? So that's some cases where we use the U. T. Be OK. So both off these are get both of these are useful. The DCB is used when we want to be sure the D data is being received, and UDP is used when we want some communication to be rial time. And we pretty much don't care about some data being lost, right? And eso Dennis pretty much it for this lecture. If you have any questions, feel free to ask, and I'll see you next time 7. 06 TCP Connection Management: Okay. So in the previous lecture, we talk about the differences between D. C, V and UDP, and the differences are pretty clear. Okay, Bad. What's another difference that I forgot to mention or not for? Got to mention but I didn't mention is the connection management. So what d c p Does it basically established connection between two devices, Then it manages how much data is being sent, and then it basically like ends D connection. Okay, What? UDP does it? It doesn't establish any connection. It just sends data. Okay, just have some data it will ever be sent. And that's all the U to be date they scare about. Okay, so we also need to take a look at how d. D. C p established de connection. Okay, so the establishment off the connection is quite simple. It is usually referred to as the free way handshake. Okay, for you. A handshake. That's that's very common term. And you should probably know what that means. So, for example, imagine that I also want to know Get some some vet bait. Okay, so this is a server off Google, and this is my laptop, so we need to establish a connection. A DCP connection between dosa devices before we will send the actual vet bait. Okay, so how do we sent? How do we establish the connection? Well, first of all, my laptop will send a request to connect to the Google server. Okay, so basically it will say, Hey, Google, I would like to connect to your server. And yes, so it will. I will talk about it later. So it will basically say, Hey, I want to connect. The server will respond with something called Okay, you can connect. And I would also like to connect with you so that we can communicate between each other and my laptop drill. Respond to that. Okay, fine. So basically, that's why it's called freeway Handshake, right? Recent one packet. Hey, I want to connect. Then we sent other back. It's Hey, I want to connect. And also you are connected to me. And then we said last pick it. We just said, Hey, you are connected to me. And then we had weekend Sunday that from the client to the server, and we can also send data from the server to the client. Okay, so yes. So the back. It's basically How do we know? How do we know? T Hey, I want to connect in the back it so d Hey, I want to connect is made basically by a sin sin flag. Okay, so we have a synchronization flag inside a packets, which is just one bit inside a picket. That assent set to one. Okay. And when it is being set to one, we know that we want to talk to somebody. Okay, so inside here we are sending a back in that have the sin flag equal to one. Okay, which basically stands for I want to connect. Dendy Server also responds with a back it and this back it has also sent equal to one, so it wants to synchronize. Okay, synchronize. And so it also wants to talk to me. And it also accept the request, right that I made. Okay, so I made your crest, and it will accept it. And how do we accept it? Well, we will send something called the Acknowledgement, So a C K flag is being sent. Okay. Is being set to one inside the back it that we are sending. And then lastly, my client my laptop will send ones Gindi packet with the A C K flag. Okay, and then we have the connection. So how does the data flow? Right? We first we established a connection. And then we are sending the data and the TCP data flow control basically takes care off the digestion off DIY network. So, for example, if I want to send two packets and yet let's say I want to send to back its and it will be you received right then D device number two, for example, the Google Server can tell me to send more right because the network can handle more information. And why to sent only two packets when I can send four. OK, so it will basically say Hey, I received two beck. It's send me more and I will send four back. It's. And if all of those four back it's arrived correctly, it will BRoberts say, Hey, I also received those four Let's sent eight okay and we'll will grow, but eventually it will not receive all the back. It's so, for example, in this case can also happen that we don't receive D beckon number six. OK, so then basically the device. Number two says I received the Beckett five. Ok D beckon number five last and it says, Hey, I can probably I can't handle four packets at once. Next sign sent only two. And write the device Number one says OK. And it will send Onley B six and B seven, Okay. And yeah, that's how the data flow is being is being controlled. Okay. And lastly, we also need to end the connection. Remember how we established the connection? The ending is quite similar. Okay? We have only different different flags in the back. It's so inside. Here we have the fen flag. Basically 40 finished de communication, right? So we sent a back it. This is basically my computer. This is Google Server. I will send a back it debt. I want to I want to stop talking to the end of the communication the Google will respond with. Okay, you can You cannot talk to me anymore, right? The acknowledgement, basically it will respond that Okay, I got the information. You don't want to talk to me. That's fine. And it will also send the packet that want to. It also wants to finish the communication. And to that, I will also respond with the acknowledgement. So basically, I'm also saying, Hey, that's fine and Dendy connection is ended. So yeah, that's basically how D. D. C B manages the connection and manages the data flow, and that is very much it for this lecture. If you have any questions, feel free to ask and Alison next time. 8. 07 DNS: okay, D and s. Or in other words, domain name system. So what it does and how it works. You might not even realize that. But the DNS is used every day everywhere, all the time. OK, so first of all wanted us. Well, you already know that in the I P Protocol, you have something called an I P address in order to address a device in a computer network . Okay, so your laptop right here have something called an I P address and in this case, is just some number. Okay? It's just like a I P version for address, and then you need to know the Google server address in order to reach the Google. That bitch. OK, so if you type google dot com into your browser, you need right, your computer doesn't know. What's google dot com. He needs an I p address off the server in order to contact it and get DeVette page in return. Okay, so that's exactly what Deanna's does, right? The computer doesn't know what's google dot com, but the DNS can answer it. Okay, so basically, the computer asks d d n a server. What is the i p address off google dot com and DDN a server response with, like, 12 doubt 100.54 dot nine. Okay, so basically the address off de Google server, and it's so how it actually works. So as you can see on this example, we have a laptop. So that's just your laptop that wants to know what is the i p address of google dot com. And what would happen if we have only one server answering all the requests? Right? Imagine how many people wants to know the I P. Address off some website, right? It's It would be impossible for one server to handle all off these requests. Okay, so we need something called a hierarchy. Okay, so we have, like, root servers. Okay, up here, there are route servers, which basically there's, like, 240 of them. They are managed by Deanna Corp Corporation, and they basically transferred you request to the domain name servers. Okay, So to deter player domain name servers. So, for example, if you type something like google dot com, right, you will ask first, the Google the root server, right? But the roots of her doesn't know the I p address of Google s camp, so he will basically send you to the top layer domain name servers. In other words, he will send you The address is off those servers. Okay. And those servers are responsible, for example, for dot com domain O Okay, so ever domain that it's on the dot com It will be registered inside these servers. Okay. Obviously there are multiple of those, right? We have also another group off servers that is responsible for that. Our domain. Right. We have another group off servers that is responsible for that, you domains. Okay, so there's just one group of servers that is responsible for dot com domain. Okay. And then those servers will transfer you to the Google DNS servers. So the company Google have its own Deanna servers. Okay. And in those servers, you have the records off. What server? It actually does the i p addresses. Okay, so how it actually works when you ask for the Google address? Well, in order to solve that, we first of all need to define what is this thing? Well, what that means? Welcome, Peter don't want to handle the requests all by its own okay. It needs some help. It doesn't want to do. Do you have a lifting? Right. So also the your Internet service provider. That means this I sp Okay, So the company that provides you the Internet have its own servers, and these servers are basically used in order to handle all the regrets that you make. Okay, so your computer actually doesn't handle the request, But the D N. A server at your local internet service provider solved the requests. Okay, so how it actually works? Well, you basically ask your local Deanna server that is located inside your internet service provider. What is the i b address of google dot com And then the server does the heavy lifting. So he have all of those 240 root servers, right? He have the addresses off them. So then he can ask them What is the i p address of Google that come right? So he will send a request to them, and those servers doesn't know that. OK, they have no idea what is the I'd be address off Google that come so they will respond with something like, I don't know. What's the address of Google has come. But go ask these guys. They will know, and they will refer to you a list off addresses, off dose servers and this stop layer servers right off those servers that are responsible for the dot com domain. Okay, so then your Internet service provider says, OK, I will ask those gas, and he will once again send the request. What is the I P address off google dot com and the stop player servers will respond with. Okay, I still don't know. But I know a company good called Google. That's calm. And they're Deanna servers. Are these Okay? So they will once again respond with a list off I p addresses off the Deanna servers off that company. Okay. And then you will lastly, ask one of those services, right? One of those Google services and sorry servers, and the Google server will respond with the i p. Address. Okay, so these last that last request will actually get you the i P address, and then what you can do? Well, you can contact the i P. Address, and then you will, like, establish connection and, you know, exchange documents. So yeah, Another thing that the Internet service provider server does is it will store the information inside a cash. Okay, so it will basically create a entry inside his table. Right? For example, like Google that come is this I p. Address. And this information is valid. 40 next, like, 30 minutes or one hour. Okay. And then when you ask again, what is the i b address of Google? It will first look inside a stable. Okay. And if it have the i p address of Google inside the table, it will return it right away so that it doesn't need to ask all of those servers. Okay, so, yeah, that's basically how d Deanna's works. So if if any questions feel free to ask and Al Soon Exane.