30
Computer networking Olivier Bonaventure http://perso.uclouvain.be/olivier.bonaventure

Computer Networking : Principles, Protocols and Practice - lesson 1

Embed Size (px)

DESCRIPTION

First lesson for classes using the open-source Computer Networking : Principles, Protocols and Practice ebook

Citation preview

Page 1: Computer Networking : Principles, Protocols and Practice - lesson 1

Computer networking

Olivier Bonaventurehttp://perso.uclouvain.be/olivier.bonaventure

Page 2: Computer Networking : Principles, Protocols and Practice - lesson 1

Computer networking

•What do you already know about computer networks ?

•Which topics should be covered in this course ?

Page 3: Computer Networking : Principles, Protocols and Practice - lesson 1

Our focus

Page 4: Computer Networking : Principles, Protocols and Practice - lesson 1

Course structure•Principles first

•reliable transfer, building a network, sharing resources, serving applications

•Protocols in details

•HTTP, SMTP, DNS, TCP, SCTP, UDP, IPv6, MPLS, RIP, OSPF, BGP, Ethernet, WiFi

•Practice

•Learning by doing

Page 5: Computer Networking : Principles, Protocols and Practice - lesson 1

Teaching material

•Second edition, beta version every week

•http://cnp3bis.info.ucl.ac.be

•Feedback/Fixes/Suggestions/Comments

•http://github.com/obonaventure/cnp3

Page 6: Computer Networking : Principles, Protocols and Practice - lesson 1

Course organisation

•First pass on the week topic (Tue)

•Students read and prepare exercises

•Multiple choice questions

•Some weeks : practical exercises as well

•Discussion with teaching assistants (Mon)

•Second pass on the week topics (Tue)

Page 7: Computer Networking : Principles, Protocols and Practice - lesson 1

Course Team

Page 8: Computer Networking : Principles, Protocols and Practice - lesson 1

Learning by doing

•At home

•MCQ

•In the lab

•netkit

Page 9: Computer Networking : Principles, Protocols and Practice - lesson 1

Why IPv6 ?

Page 10: Computer Networking : Principles, Protocols and Practice - lesson 1

IPv6 in Belgium

Page 11: Computer Networking : Principles, Protocols and Practice - lesson 1

Course evaluation

•Group programming project (15%)

•implement one protocol by end October

•Individual Analysis (20%)

•Review of code

•Explain one website -> Dec.

•Exam

•Both exercises and theory (65%)

Page 12: Computer Networking : Principles, Protocols and Practice - lesson 1

Connecting two hosts

Page 13: Computer Networking : Principles, Protocols and Practice - lesson 1

The physical layer

•Transmitting bits over a wire

•Time sequence diagram

Page 14: Computer Networking : Principles, Protocols and Practice - lesson 1

The physical layer service

•unreliable service

•transmission errors

•loss/creation of bits

Physical layer Physical layer

Physical transmission medium

Bits010100010100010101001010

Page 15: Computer Networking : Principles, Protocols and Practice - lesson 1

Modems and ISDN

Page 16: Computer Networking : Principles, Protocols and Practice - lesson 1

xDSL and DOCSIS

Page 17: Computer Networking : Principles, Protocols and Practice - lesson 1

WiFi

Page 18: Computer Networking : Principles, Protocols and Practice - lesson 1

The framing problem

•How to extract frames from a sequence of bits ?

•Bit stuffing

•Character stuffing

Page 19: Computer Networking : Principles, Protocols and Practice - lesson 1

How to reliably transfer data ?•Hypothesis

•Reliable physical layer serviceA B

Data.request(a) Frame(a)

Data.ind(a)Data.request(b) Frame(b)

Data.ind(b)Data.request(c) Frame(c)

Data.ind(c)

Page 20: Computer Networking : Principles, Protocols and Practice - lesson 1

Does this always work ?

Page 21: Computer Networking : Principles, Protocols and Practice - lesson 1

Control frames

A B

Data.req(b) C(OK) Data.ind(a)

D(a)Data.req(a)

D(b)

Data.ind(b)C(OK)

Page 22: Computer Networking : Principles, Protocols and Practice - lesson 1

How to deal with transmission

errors

•Affecting the data frames

•Affecting the control frames

Page 23: Computer Networking : Principles, Protocols and Practice - lesson 1

Alternating Bit Protocol

A B

Data.req(b) C(OK0) Data.ind(a)

D(0,a)Data.req(a)

Duplicate detected

D(1,b)Retransmission timer

D(1,b)

Data.ind(b)

Data.req(c)

LostD(0,c)

C(OK1)D(1,b) recvdC(OK1)

D(1,b) recvd

Retransmission timer

Data.ind(c)D(0,c)

Page 24: Computer Networking : Principles, Protocols and Practice - lesson 1

Performance

•What is the performance of this reliable protocol ?

•Two high-end servers

•10 Gbps interfaces

•1000 bytes frames

•1 millisecond delay

Page 25: Computer Networking : Principles, Protocols and Practice - lesson 1

Pipelining

•How many frames can A send ?

A B

Data.ind(a)

Data.req(a)

...

D(0,a)

...

D(4,e)

Data.req(b)

Data.req(e)

Data.ind(e)

Page 26: Computer Networking : Principles, Protocols and Practice - lesson 1

Pipelining example

A B

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8Data.req(a)

Data.ind(a)

D(0,a)0 1 2 3 4 5 6 7 8Data.req(b)

Data.ind(b)

D(1,b)0 1 2 3 4 5 6 7 8Data.req(c)

Data.ind(c)

D(2,c)

C(OK0)C(OK1)

C(OK2)0 1 2 3 4 5 6 7 8

Data.req(d)

Data.ind(d)

D(3,d)

0 1 2 3 4 5 6 7 8

Data.req(e)

D(4,e)

Sending window

Page 27: Computer Networking : Principles, Protocols and Practice - lesson 1

Frame header has limited size

A B

0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3

0 1 2 3

Data.req(a)

Data.ind(a)

D(0,a)Data.req(b)

Data.ind(b)

D(1,b)Data.req(c)

Data.ind(c)

D(2,c)

C(OK0)C(OK1)

C(OK2)Data.req(d)

Data.ind(d)

D(3,d)Data.req(e)

D(0,e)

Sending window

0 1 2 3 0 1 2 3

0 1 2 3

0 1 2 3

Page 28: Computer Networking : Principles, Protocols and Practice - lesson 1

How to deal with errors/frame losses ?

•Go-back-n

•Selective repeat

Page 29: Computer Networking : Principles, Protocols and Practice - lesson 1

Go-back-nA B

0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3

0 1 2 3

Data.req(e)

Data.req(a)

Data.ind(a)

D(0,a)

Data.req(c)

D(2,c)

C(OK,0)

C(OK,0)

Sending window

Data.req(b)

D(1,b)

Lost

Not expected seq num,discarded

Retransmissiontimer expires

Sending window is full

0 1 2 3 0 1 2 3

D(1,b)

Data.ind(b)

Data.req(d)

D(3,d)Data.ind(d)

D(2,c)

Data.ind(c)

Page 30: Computer Networking : Principles, Protocols and Practice - lesson 1

Selective repeatA B

0 1 2 3 0 1 2 3 0 1 2 3

0 1 2 3

Data.ind(b)

Data.req(a)

Data.ind(a)

D(0,a)

0 1 2 3 Data.req(c)

D(2,c)

C(OK,0)

C(OK,0)

Sending window

Data.req(b)

D(1,b)

Lost segment

Segment stored

D(1,b)

Retransmissiontimer expires0 1 2 3

0 1 2 3 0 1 2 3

0 1 2 3

0 1 2 3

Data.ind(c)

Data.req(d)

D(3,d)

Data.ind(d)

0 1 2 3

0 1 2 3 C(OK,2)

C(OK,3)

Rec. window0 1 2 3

0 1 2 3