Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Computer networking 
Olivier Bonaventure 
http://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 
Bits 
010100010100010101001010 
Physical layer Physical layer 
Physical transmission medium 
• unreliable service 
• transmission errors 
• loss/creation of bits
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 service 
A B 
Data.request(a) Frame(a) 
Data.request(b) Frame(b) Data.ind(a) 
Data.request(c) Frame(c) Data.ind(b) 
Data.ind(c)
Does this always 
work ?
Control frames 
A B 
Data.req(a) D(a) 
Data.req(b) C(OK) Data.ind(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(a) D(0,a) 
Data.req(b) C(OK0) Data.ind(a) 
Duplicate detected 
D(1,b) 
Retransmission timer 
D(1,b) 
Data.ind(b) 
D(1,b) recvd C(OK1) 
Data.req(c) 
C(OK1) 
D(0,c) Lost 
D(1,b) recvd 
Retransmission timer 
D(0,c) Data.ind(c)
Performance 
• What is the performance of this reliable 
protocol ? 
• Two high-end servers 
• 10 Gbps interfaces 
• 1000 bytes frames 
• 1 millisecond delay
Pipelining 
A B 
• How many frames can A send ? 
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 Data.req(a) 
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 
Data.ind(a) 
0 1 2 3 4 5 6 7 8 Data.req(b) D(0,a) 
Data.ind(b) 
0 1 2 3 4 5 6 7 8 D(1,b) 
Data.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) 
Data.req(b) D(0,a) 
Data.ind(b) 
Data.req(c) D(1,b) 
Data.ind(c) 
D(2,c) 
C(OK0) 
C(OK1) 
Data.req(d) C(OK2) 
Data.ind(d) 
Data.req(e) D(3,d) 
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-n 
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.req(e) 
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 
Retransmission 
timer expires 
0 1 2 3 
0 1 2 3 
Sending window is full 
D(1,b) 
Data.ind(b) 
Data.req(d) 
D(3,d) 
Data.ind(d) 
D(2,c) 
Data.ind(c)
Selective repeat 
A 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) 
Retransmission 
0 1 2 3 timer expires 
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. window 
0 1 2 3 
0 1 2 3

More Related Content

Computer Networking : Principles, Protocols and Practice - lesson 1

  • 1. Computer networking Olivier Bonaventure http://perso.uclouvain.be/olivier.bonaventure
  • 2. Computer networking • What do you already know about computer networks ? • Which topics should be covered in this course ?
  • 4. 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
  • 5. Teaching material • Second edition, beta version every week • http://cnp3bis.info.ucl.ac.be • Feedback/Fixes/Suggestions/Comments • http://github.com/obonaventure/cnp3
  • 6. 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)
  • 8. Learning by doing • At home • MCQ • In the lab • netkit
  • 11. 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%)
  • 13. The physical layer • Transmitting bits over a wire • Time sequence diagram
  • 14. The physical layer service Bits 010100010100010101001010 Physical layer Physical layer Physical transmission medium • unreliable service • transmission errors • loss/creation of bits
  • 17. WiFi
  • 18. The framing problem • How to extract frames from a sequence of bits ? • Bit stuffing • Character stuffing
  • 19. How to reliably transfer data ? • Hypothesis • Reliable physical layer service A B Data.request(a) Frame(a) Data.request(b) Frame(b) Data.ind(a) Data.request(c) Frame(c) Data.ind(b) Data.ind(c)
  • 21. Control frames A B Data.req(a) D(a) Data.req(b) C(OK) Data.ind(a) D(b) Data.ind(b) C(OK)
  • 22. How to deal with transmission errors • Affecting the data frames • Affecting the control frames
  • 23. Alternating Bit Protocol A B Data.req(a) D(0,a) Data.req(b) C(OK0) Data.ind(a) Duplicate detected D(1,b) Retransmission timer D(1,b) Data.ind(b) D(1,b) recvd C(OK1) Data.req(c) C(OK1) D(0,c) Lost D(1,b) recvd Retransmission timer D(0,c) Data.ind(c)
  • 24. Performance • What is the performance of this reliable protocol ? • Two high-end servers • 10 Gbps interfaces • 1000 bytes frames • 1 millisecond delay
  • 25. Pipelining A B • How many frames can A send ? Data.ind(a) Data.req(a) ... D(0,a) ... D(4,e) Data.req(b) Data.req(e) Data.ind(e)
  • 26. Pipelining example A B 0 1 2 3 4 5 6 7 8 Data.req(a) 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 Data.ind(a) 0 1 2 3 4 5 6 7 8 Data.req(b) D(0,a) Data.ind(b) 0 1 2 3 4 5 6 7 8 D(1,b) Data.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
  • 27. 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) Data.req(b) D(0,a) Data.ind(b) Data.req(c) D(1,b) Data.ind(c) D(2,c) C(OK0) C(OK1) Data.req(d) C(OK2) Data.ind(d) Data.req(e) D(3,d) D(0,e) Sending window 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3
  • 28. How to deal with errors/frame losses ? • Go-back-n • Selective repeat
  • 29. Go-back-n 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.req(e) 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 Retransmission timer expires 0 1 2 3 0 1 2 3 Sending window is full D(1,b) Data.ind(b) Data.req(d) D(3,d) Data.ind(d) D(2,c) Data.ind(c)
  • 30. Selective repeat A 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) Retransmission 0 1 2 3 timer expires 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. window 0 1 2 3 0 1 2 3