Computer Networking : Principles, Protocols and Practice - lesson 1

Preview:

DESCRIPTION

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

Citation preview

Computer networking

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

Computer networking

•What do you already know about computer networks ?

•Which topics should be covered in this course ?

Our focus

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

Teaching material

•Second edition, beta version every week

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

•Feedback/Fixes/Suggestions/Comments

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

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)

Course Team

Learning by doing

•At home

•MCQ

•In the lab

•netkit

Why IPv6 ?

IPv6 in Belgium

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%)

Connecting two hosts

The physical layer

•Transmitting bits over a wire

•Time sequence diagram

The physical layer service

•unreliable service

•transmission errors

•loss/creation of bits

Physical layer Physical layer

Physical transmission medium

Bits010100010100010101001010

Modems and ISDN

xDSL and DOCSIS

WiFi

The framing problem

•How to extract frames from a sequence of bits ?

•Bit stuffing

•Character stuffing

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)

Does this always work ?

Control frames

A B

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

D(a)Data.req(a)

D(b)

Data.ind(b)C(OK)

How to deal with transmission

errors

•Affecting the data frames

•Affecting the control frames

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)

Performance

•What is the performance of this reliable protocol ?

•Two high-end servers

•10 Gbps interfaces

•1000 bytes frames

•1 millisecond delay

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)

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

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

How to deal with errors/frame losses ?

•Go-back-n

•Selective repeat

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)

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

Recommended