58
Networking Introduction

Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

  • View
    220

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking

Introduction

Page 2: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Computers are lucky…• …but this is not trivial!

Page 3: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

RAM CPUEasy….

Page 4: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

My smartphonein Denmark

www.surf.au in Australia

Hard….

Page 5: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 6: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• What does the Internet look like…?

?My device

Page 7: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• What does the Internet look like…?

?My device A Computer

Page 8: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• What does the Internet look like…?

?Client Server

Page 9: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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?

Page 10: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• What does the Internet look like…?

Client Server

C S

Routers

Page 11: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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…?

Page 12: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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?– …?

Page 13: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Communication requires a protocol• This is true for both humans and computers!

HiHi

Do you have the time?

Yes, it is 4.30pm

Okay, thank you You’re

welcome

Page 14: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• What can go wrong…?

Hi … Я не говорю по английски

Oh, I guess he doesn’t speak

English…

Page 15: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• What can go wrong…?

Hi

Hmmm, maybe he didn’t hear me…

I’ll try again in a minute…

Page 16: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• What can go wrong…?

HiI’m busy!

I’ll try again in a

minute…

Page 17: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• What can go wrong…?

HiHi

Do you have the time?

Yes, it is &.3¤p?

Hmmm, I’ll have to ask him again…

Page 18: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 19: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• What is a connection really…?• Logical aspect– Connection-oriented service– Connectionless service

• Physical aspect– Circuit switching– Packet switching

Page 20: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 21: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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)

Page 22: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Connection-oriented service

Here is part n of data

Here is part n of data OK, I got

part n

Hmmm, I have to send part n again…

Page 23: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Connection-oriented service

Here is part n of data

Here is part n+1 of data

OK, I got part n

OK, I will send data more

slowly

Whoa, slow down a bit!

Page 24: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Connection-oriented service• Many good properties,

BUT…– More control data is sent– Cannot ”skip” data– Speed of transmission is

uncertain

Page 25: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 26: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Connectionless service

Are you ready to receive data? Sure, go ahead

OK, bla bla bla bla bla bla…

Page 27: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 28: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 29: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• On the Internet…

Connection-oriented service

Connectionless service

TCP – Transmission Control Protocol

UDP – User Datagram Protocol

Page 30: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Circuit switching• Like in the old days…

Page 31: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Using circuit switching, a dedicated end-to-end circiut is set up

Client Server

C S

Page 32: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Using circuit switching, a dedicated end-to-end circiut is set up

Client Server

C S

Page 33: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 34: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Packet switching• The postal approach…

Page 35: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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…

Page 36: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Delivering a letter…

Postbox

Local post office

Regional post office

National post center

Letterbox

Local post office

Regional post office

National post center

Sender Sender

Page 37: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

R

1

3

2

68.122.87.224

(DATA)

Router must choose a destination router…

Page 38: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 39: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 40: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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?

Page 41: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 42: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 43: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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!

Page 44: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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 %

Page 45: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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?

Page 46: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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)

Page 47: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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!

Page 48: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 49: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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 )

Page 50: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

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

Page 51: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Note that HTTP is not the only protocol on this level of abstraction

• SMTP – Simple Mail Transfer Protocol• FTP – File Transfer Protocol• …and some lesser known protocols

Page 52: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• Now we know about (at least) three protocols– HTTP – implements hypertext-based distributed

computer systems– TCP – implements connection-oriented service– IP – implements datagram packet switching

• How are the protocols related?• Are other protocols needed?• How do we ”organise” protocols?

Page 53: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• A standard model for layering functions in a communication system exists: the OSI model

• OSI – Open Systems Interconnection• Model consists of 7 layers, each of which

contains specific functionality

Page 54: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

Page 55: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• The OSI model is a logical model – does not necessarily map one-to-one to actual model

• The model for the Internet is considered to have 4-5 layers

• Kurose & Ross: 5 layers• For simplicity, we consider four layers• The set of protocols is called the Internet

Protocol Stack (or Suite)

Page 56: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

Hardware…

Page 57: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction

• We will discuss the three top levels in the Internet protocol stack in further detail– Application Layer – focus on HTTP– Transport Layer – focus on TCP– Network Layer – focus on IP

Page 58: Networking Introduction. Networking - Introduction Computers are lucky… …but this is not trivial!

Networking - Introduction