580 likes | 814 Views
Networking. Introduction. Networking - Introduction. Computers are lucky… …but this is not trivial!. Networking - Introduction. RAM. CPU. Easy…. Networking - Introduction. My smartphone in Denmark. www.surf.au in Australia. Hard…. Networking - Introduction.
E N D
Networking Introduction
Networking - Introduction • Computers are lucky… • …but this is not trivial!
Networking - Introduction RAM CPU Easy….
Networking - Introduction My smartphone in Denmark www.surf.au in Australia Hard….
Networking - Introduction • Networking – transmitting data between physically separated computers • No networking – no Internet • The Internet is ”just another computer network” • We will discuss networking within the context of the Internet
Networking - Introduction • What does the Internet look like…? ? My device
Networking - Introduction • What does the Internet look like…? ? My device A Computer
Networking - Introduction • What does the Internet look like…? ? Client Server
Networking - Introduction • Through the Internet, my device (the client) can exchange data with a remote computer (the server) • How is the the client ”connected” to the server?
Networking - Introduction • What does the Internet look like…? C S Client Server Routers
Networking - Introduction • Client is connected to a router C • Server is connected to a router S • Client sends data to C • C sends data to another router, who in turn sends data to another router, etc. • At some point, data reaches the router S • The server gets the data from S • How hard can it be…?
Networking - Introduction • Questions… • How do C and S get to know each other? • How does data find its way from C to S? • What format should data have? • How fast will the data get there? • Can we be sure that the data will reach S? • Can we be sure that the data is not altered? • …?
Networking - Introduction • Communication requires a protocol • This is true for both humans and computers! Hi Hi Do you have the time? Yes, it is 4.30pm Okay, thank you You’re welcome
Networking - Introduction • What can go wrong…? Hi … Я не говорю по английски Oh, I guess he doesn’t speak English…
Networking - Introduction • What can go wrong…? Hi Hmmm, maybe he didn’t hear me… I’ll try again in a minute…
Networking - Introduction • What can go wrong…? Hi I’m busy! I’ll try again in a minute…
Networking - Introduction • What can go wrong…? Hi Hi Do you have the time? Yes, it is &.3¤p? Hmmm, I’ll have to ask him again…
Networking - Introduction • A protocol is about agreement • When has a connection been established • What is the proper format of the transmitted data • What to do when data has been sent • What to do when data has been received • What is the proper order of data • When can data be considered lost • When can a connection be considered broken
Networking - Introduction • What is a connection really…? • Logical aspect • Connection-oriented service • Connectionless service • Physical aspect • Circuit switching • Packet switching
Networking - Introduction • Connection-oriented service • A (logical) way of communication, with certain properties • All data will be delivered • All data will be delivered in the correct order • Nobody ”floods” the counterpart with data • No part of the connection becomes congested
Networking - Introduction • Connection-oriented service Are you ready to receive data? Sure, go ahead OK, here is part 1 of data OK, I got part 1 OK, here is part 2 of data OK, I got part 2 …and so on (handshaking)
Networking - Introduction • Connection-oriented service Here is part n of data Hmmm, I have to send part n again… Here is part n of data OK, I got part n
Networking - Introduction • Connection-oriented service Here is part n of data OK, I got part n Here is part n+1 of data Whoa, slow down a bit! OK, I will send data more slowly
Networking - Introduction • Connection-oriented service • Many good properties, BUT… • More control data is sent • Cannot ”skip” data • Speed of transmission is uncertain
Networking - Introduction • Connectionless service • A (logical) way of communication, with certain properties • No guarantee on delivery • No handshaking • No flow or congestion control • BUT, can potentially deliver data faster
Networking - Introduction • Connectionless service Are you ready to receive data? Sure, go ahead OK, bla bla bla bla bla bla…
Networking - Introduction • Why would we ever use a connectionless service? • Where could it be appropriate? • Sending E-mail? • File transmission • Viewing a web page • Streaming audio • Streaming video
Networking - Introduction • Why would we ever use a connectionless service? • Where could it be appropriate? • Sending E-mail? • File transmission • Viewing a web page • Streaming audio • Streaming video
Networking - Introduction • On the Internet…
Networking - Introduction • Circuit switching • Like in the old days…
Networking - Introduction • Using circuit switching, a dedicated end-to-end circiut is set up C S Client Server
Networking - Introduction • Using circuit switching, a dedicated end-to-end circiut is set up C S Client Server
Networking - Introduction • Properties of circuit switching • Guaranteed transmission rate • Wasteful in idle periods • Best for transmissions with low transmission rate variation (phonecall?) • Very wasteful for ”burst” transmissions
Networking - Introduction • Packet switching • The postal approach…
Networking - Introduction • In packet switching, we no longer use dedicated connnections • A recipient of data has an address • Data is divided into packets, which are ”stamped” with the destination address • The magic lies in the router…
Networking - Introduction • Delivering a letter… Sender Postbox Letterbox Sender Local post office Local post office Regional post office Regional post office National post center National post center
Networking - Introduction Router must choose a destination router… 1 R 2 68.122.87.224 (DATA) 3
Networking - Introduction • Router maintains a routing table of appropriate desitination routers for a given destination adress (or interval of addresses) • How is the routing table created…? • MAGIC…for now
Networking - Introduction • On the Internet, the IP (Internet Protocol) uses packet switching • Formally, the IP implements a datagram network – a specific variant of packet switching
Networking - Introduction • Circuit Switching vs. Packet Switching • I have a 100 megabit/second (mbps) connection available (bandwidth guaranteed) • I want to give all my users a 10 mbps connection • How many users can share the connection?
Networking - Introduction • Circuit Switching guarantees the bandwidth at all times! • Everybody must be guaranteed a 10 mbit connection… • …so the answer must be 100/10 = 10 users
Networking - Introduction • In packet switching, packets are sent • With full transmission rate • Intermixed with packets from other users • No guaranteed bandwidth • We have to know about the expected use of bandwidth per user
Networking - Introduction • Theoretical use per day, given a 10 mbps connection: • 10 mbps ≈ 1 megabyte/sec • 1 megabyte/sec ≈ 4 gigabyte/hour • 4 gigabyte/hour ≈ 100 gigabyte/day • In practice, probably much less!
Networking - Introduction • Bandwidth usage for a typical (?) private user • 10 gigabyte/month • Peak: 1 gigabyte/day • 00-08: ≈ 10 % • 08-16: ≈ 20 % • 16-24: ≈ 70 %
Networking - Introduction • What is my required ”level of service”? • Specified bandwidth available • 50 % of the time? • 90 % of the time? • 99 % of the time? • 99,99 % of the time?
Networking - Introduction • We wish to cover ”peak usage”, but assume that bandwidth usage during peak time is constant… • Peak usage: 1 gigabyte/day, 70 % between 16-24 • 700 megabyte within 8 hours • 90 megabyte within an hour • 25 kilobytes per second… • about 250 kilobits per second (0,25 mbps)
Networking - Introduction • A 100 mbps connection… • …and a ”peak average” of 0,25 mbps… • …gives about 400 users • Circuit switching: 10 users • Packet switching: 400 users • ..if our assumptions hold up!
Networking - Introduction • Now we know about two protocols • TCP – implements connection-oriented service • IP – implements datagram packet switching • Is that enough to e.g. implement a Web browser…? • Still too low-level, we need a protocol ”on top of” TCP • Enter HTTP
Networking - Introduction • HTTP – HyperText Transfer Protocol • Specifically developed for ”distributed, hypermedia-based information systems” • Developed by Tim Berners-Lee (and team) around 1990 • HTTP + HTML + URL = WWW (almost )
Networking - Introduction • HTTP is essentially just a set of methods that can be executed within a program • First HTTP version – one method! (GET) • Current version has nine methods