 Can someone tell me an example type of internet application? I'll give you one to get started web browsing think of web browsing as an internet application All right web browsing involves you using a web browser as a Client software to access a web server There are different types of web browsers firefox safari opera ie and others and There are different software implementations of web servers Apache web server Microsoft IIS and others which you may not be aware of But they are software applications that we use to do this general application of web browsing We'll call that an internet application Can you give me some other examples? types general types of internet applications Google Chrome is a web browser all right that falls under web browsing something different than web browsing again Mobile applications, what do you mean? Give me a type of? What does it do this mobile application? Online games okay, so online games how do games work online games like multiplayer games What do you do in? Terms of the software So you have with online games many games you have the game client installed on your computer and You often need to contact a game server All right, so there'll be a server the game server and many of the players They all have their own installation of the game client and The client contacts the server and they communicate Say with a multiplayer game what you send to the server you send this to the server your current position This is your XY coordinates Send to the server and the server sends your position to all the other players So that the other players know where you are as you move and it can update the scene or the The display to see where other players are moving in real time So it needs to be quite fast how that happens So online games and there are different variations are as a type of internet application others Come on. I'm sure you've used many Internet applications Bit torrent so bit torrent is an application that Or even a protocol to support what file download Okay, you can download files by downloading via different servers different parts of the file others instant messaging Okay in the old days MSN instant messenger Line and similar at an instant messaging clients where you Type in a message you press send and it sent Instantly hopefully to the other person's computer maybe via a server Another type of application email is another type of application not instant messaging. Sometimes there's a delay what else I tunes in what way is that Music playing music streaming music for example streaming audio The server has the audio that the music and when you press play it sends you in real time That audio and plays back on your computer same with video streaming It may be web-based or it may be stand another application you install on your device that streams to you voice Skype and similar You talk and your friend hears and vice versa Databases so that may be consumer applications that we use but there are many business-oriented applications where For example you access a database or there's an application for a company for managing the accounts or the finance on There are many types of internet applications we We use a lot of them, but there are others that sometimes we're not so familiar with The common thing about most of those applications we mentioned is that they follow what we call a client server model In web browsing your browser is a client. The web server is the server online gaming the Software installed on your computer as a client. There's a game server as well Even with we make voice calls we can think that one person Access the client and calls the server the other person the other person's software is the server So a client server model is commonly used for how to initiate communications in the internet Let's say there are two two users Two applications the client and the server The basic approach that it works is that the server the server software is running on a computer usually always running a Web server is a piece of software always running on a particular computer 24 hours a day runs there And it sits and waits It waits for a client to initiate communications So it's the client that says I want to contact the server Sends a message to the server saying let's communicate and once That communication is initiated for example the client sends a message to the server the server sends one back saying yes Let's communicate. Let's exchange some data Then the data can often flow in both directions Client can send data to the server server can send back to the client The key thing is that it's the client that initiates communications and that will have some impact on how addressing is used and how We identify different applications Some of the ones we mentioned at least are there those internet applications there are a number of issues of how to Support clients server applications in the internet many of our applications. We need reliability That is if I download of one megabyte file from a server I Want to make sure that the one megabytes that one my client gets is identical to what the server had if the server Sends me one megabytes by only get 900 kilobytes That's not reliable communications In the the exam in the next week or so there may be a multiple quest multiple choice question Or even a short answer question. How do I provide reliability? What mechanism provides reliability? What will your answer be? Reliable communications. What's the mechanism we will use? Describe it How do we get reliability? We studied it just after the midterm. It's easier How do we make sure that if data is lost then we can actually get it delivered? retransmit We retransmit Generally, we call that ARQ automatic repeat request, but retransmission Okay, we saw stop and wait we send a packet we get an act back if we don't get an act We send it again and the extension so retransmission is important Many applications need this So rather than the application programmer having to implement that in their application It's off loaded to a separate protocol a transport protocol TCP in particular does reliability the idea The application doesn't have to worry about reliability implementing ARQ stop and wait or go back in or select to reject instead TCP implements that for our application and Your application that you create simply sends the data using TCP So that's one thing that we do we use transport protocols To support some of the common features that many applications need When you go and program your own application to communicate across a network You would like to program it on any operating system using any language Such that the old client can talk to a server running on a different operating system and a different programming language So having a common Programming interface is useful there and there is one. It's called the sockets a bi allows us to write applications that simply or a very Simple interface for sending data between applications common across different languages and different OSes We will not talk about that. You may see that in other courses how to program with sockets and And the last thing which will cover a little bit today is How do I identify applications? So we'll talk about that and we'll see the answer is port numbers So to finish this course Well, we'll say a little bit about transport protocols and especially about port numbers What are the two main transport protocols you used in your assignment? Remember you did tests with IPerf. You probably use TCP and UDP. They are the two main transport protocols There are a few others, but they're the the most common and in fact TCP is the most common of those two as well transport protocols support Sending data between applications software on each computer TCP is the most widely used it involves setting up a connection before we send data It Has error control in that it supports retransmissions send the data if you don't get an act send it again flow control stop and wait or a sliding window flow control mechanism it uses and Another algorithm for congestion control so that the source will not overflow the routers The result is it's very complex And we're not trying to study how those algorithms work although we know some basics of error and flow control Another one which is very simple is UDP Which omits all those features and just sends the data? Very simple, but maybe not so useful some applications that need reliability We'll see it in example, but each transport protocol is given a number. There's a standard number and it's called the protocol number Six is for use for TCP 17 UDP one for ICMP You can look at the website to see many many more we may see some examples as we go So let's look at an example of how we communicate between applications and That will lead us to some addresses that we need We'll use this example Very simple may be old example for communicating put a source application and a destination We have The source host we're wanting to be send data to the destination host and in fact a specific application on the source host to an application on the destination host and For this example, let's say it's my web browser on The source wants to send to the web server on the destination What does my source host need to know to get data to the destination host? How am I going to get data to the destination host? There are many hosts in the internet. How is my source host going to get to that particular destination host in the internet? The address so we need to know the IP address of the destination host. So let's give them some IP addresses for this example so to I To get data to a particular device on the internet. We think an IP address identifies that device so let's say that my source host I'll say is one dot one Dot one dot one and the destination two two two two Simple IP addresses for this example and let's say my source host knows that IP address somehow I've I've Learned it in the past. I know that I want to send to two dot two dot two dot two and The protocol we use to send is IP the internet protocol. We create our datagram and We set the source and destination address. So let's draw our datagram Our IP datagram that we would send across the internet So the IP datagram would have a header an IP header and Inside that will be the data of that datagram we'll see the details of the data shortly and And some fields in the datagram header There'll be a source address I would set when I create this datagram the source address to be my IP address and the destination address and There'll be other fields in the header by those two Currently which we'll need and what I would do is I'd send that IP datagram via the routers in the internet and They would use their routing tables to deliver to our destination host And it will be received by the IP software in my destination host What is inside my IP datagram? What's the payload of this datagram? Well, look at where it came from. We're going to use web browsing as an example With web browsing and we'll simplify the task. Let's say we've created some data and the protocol we use is HTTP for web browsing and web browsing requires reliability When we deliver the request and get a web page in response, we must make sure it's 100% accurate so we use TCP as the transport protocol Because that provides the reliability we need to transfer the request and get the web page so in fact our IP datagram What IP gets is a TCP segment? So inside the IP datagram is a TCP header but we haven't looked at yet and Inside the TCP segment is the HTTP message and if you know a little bit about HTTP It's quite simple. We send a request to the web server. The web server sends a reply So I'll say it's the HTTP request What happens is my browser when I say click on a link eventually it creates a request and That request is sent using TCP TCP will handle retransmissions if necessary Let's say it's set up a connection. There's no retransmissions necessary it TCP attaches a header And we'll see some examples of the content in a moment and then sends using IP across the internet so the IP datagram is destined to 2.2.2.2 and It's going to be arrive at the IP software It'll get to the destination and it should be delivered to the web server. That's our aim here We can think the flow of the data in this case The user does something it generates data and it goes from the web browser through to the TCP software through IP sent via our LAN for example sent across the internet it Arrives at the IP software Why did it arrive there because the destination address matches the address for this interface this computer? What does the IP software do when it receives this datagram? Has it reached the destination? Did this datagram get to the destination? Yes, I am 2.2.2.2.2. So what does the IP software do now? It removes the header That is right. We've got the datagram We'll remove the header. In fact, we'll look at the contents examine the contents of the header and eventually remove it and send what's inside up Up where that is we're going to we get this datagram. We have a thousand bytes inside We're going to send with those 1000 bytes to one of three transport protocols Which one? TCP, how do you know that? How does computer 2.2.2 How many twos? Four twos know that sorry it Something must be included in the datagram in particular one of the headers to say when you get this data What's inside must go to TCP? We can't just guess it's not known what the source sent because they're on the other side of the world So it's in fact inside the IP header There's a another field that says The content of this datagram should go to TCP Which field it's called the protocol number if we jump back to our IP datagram This is our IP datagram. There was a source IP address 32-bit destination IP address and a 16-bit protocol number. Sorry 8-bit protocol number This field indicates the number of the transport protocol That this data belongs to So there's another field here that we use in the IP header We have multiple fields and another one of interest is the protocol field and this is set When we send the datagram when we create it we set it to a value that means TCP What value means TCP if you look on your slides? TCP is number 6 if you just check the slides there they allocated numbers TCP is number 6, so we set it to 6 TCP is 6 UDP is 17 ICMP is 1 Other transport protocols have other numbers, but they're the common ones we will see in this or in other courses So when I create the datagram at my computer I set I use TCP So the destination is also must use TCP. I must use the same transport protocol So I set the protocol number in the IP header to 6 Then when IP receives it at the destination it sees I am the destination and In particular the content must go to protocol number 6 TCP So we send the content up to TCP So the protocol number is another address. It's the address of the transport protocol used What happens next? TCP does some processing. We're not going to study How it processes the data? You'll see that in a next semester Where does TCP send the content of the data so it removes or it will look in the header and then send the content somewhere In this case there are two Applications running Some instant messaging client and the web server. Which one does it send to? How do you know it goes to the web server? Okay, we know we can see that the source sent it But how does this computer that received it know send to the web server? Well, we need another type of address We will need another type of address that identifies the applications on the computer and And the type of address is called a port number or simply a port Applications are allocated port numbers Some are fixed or static some may change over time So let's talk about port numbers Port numbers are a different type of address an IP address identifies an interface of a computer on the internet a Protocol number identifies a transport protocol a port number identifies an application They are 16-bit numbers and They are associated with the transport protocol TCP uses them so does UDP and There's a source and a destination port number in the transport protocol header. They are local to a particular computer so With 16 bits the values can range from zero up to about 65,000 and Those port numbers are managed by my computer my operating system But of those 65,000 possible values. There are three different ranges There's what's called well-known ports up to a thousand and twenty three have been used for a long time since the start of the transport protocols and they use for very very well known or old server based applications usually and Some you I think you may have seen before web browsing or web servers Use HTTP and the corresponding port number is 80 if you use HTTPS For a secure web connection the server uses a different port number 443 If you secure shell log into another computer the server will use port 22 and some others here And there are many up to a thousand some are quite common that you may see over time These are port numbers that the server uses Not the client but the server your web browser doesn't use port 80 the web server you contact uses port 80 But there are many types of servers the well-known ones are the old ones and widely used But you create your own online game and you set up your own server You can set your own port number and you can register a port number So up to about forty nine thousand are port numbers, which are called registered ports Used for maybe not as common applications, but usually mainly for server applications Your MySQL database server can listen on port 3306 Steam gaming servers maybe 27015 and so on so different servers will be registering different port numbers So they are for servers and then clients your web browser your game client your instant messaging client Usually will be allocated a port number in this range of 49,000 up to 65,000 allocated by your operating system and It's up your operating system to uniquely Allocate port numbers and they may change so we call them a dynamic ports today Your web browser uses one number tomorrow a different number to finish our example here and to finish our lecture today. Let's Allocate some port numbers to our applications What port number should my web server use? Well web servers typically use port 80 instant messaging server. I can never remember Messaging clients, but I'll make one up. Don't copy this one down 936 for example. Well It may not be a Well-known port it could have been a higher one in fact But different than port 80 important point my web browser Would have a port number assigned by the operating system and Again, it's in that higher range Let's say I'll just again make one up five oh one two three and Maybe my instant messaging client in this case 53 687 just some random large numbers here within the range so when my computer creates the IP datagram and The TCP segment inside the TCP header are two port numbers Source and destination port the TCP header has two fields of importance the source port The application that centered in my case was five oh one two three and the destination port and Because the application that created it was my web browser The default destination port will be that of a web server Port 80 this is in the TCP header these two fields When TCP receives this segment it checks The destination port Destination port 80 therefore TCP knows which application to send to Don't send to the instant messaging client send to the web server So the port number tells it send to this application Which receives it processes and that the data is being delivered to the destination Most protocols are bi-directional So the server sends back a response Where does it send the response to well we use the source addresses to identify where to respond to The source port Five oh one two three will be the destination port in the response The source IP one dot one dot one dot one will be the destination IP in the response The protocol number is the same it seeks at both endpoints So we can now send a response back to the web browser application So what we've introduced here and is important for Internet communications is two new types of addresses so in total We have five addresses that I did Identify our communications in the internet We have the source IP address the destination IP address Where we can think IP addresses identify hosts on the internet or interfaces of hosts We have a protocol number Which identifies the transport protocol that both hosts are using number six for TCP 17 for UDP and We have port numbers which identify the applications which are communicating source port usually for the client application for the First message and the destination port say the server application port 80 for web browsing web servers For example, so what we'll do tomorrow to finish is we'll recap and we'll see back in our example of Our network and our routing tables of how we send a packet and what are the fields in the packet header And we'll summarize on what we know about The transport protocols and that will complete the course Details of the transport protocols and application protocols you will see in a course on networking next semester