Introduction CS 118 Computer Network Fundamentals Peter Reiher - - PowerPoint PPT Presentation

introduction cs 118 computer network fundamentals peter
SMART_READER_LITE
LIVE PREVIEW

Introduction CS 118 Computer Network Fundamentals Peter Reiher - - PowerPoint PPT Presentation

Introduction CS 118 Computer Network Fundamentals Peter Reiher Lecture 1 CS 118 Page 1 Winter 2016 Purpose of the class To familiarize you with the basic concepts of computer networking Computer networks are increasingly key to


slide-1
SLIDE 1

Lecture 1 Page 1 CS 118 Winter 2016

Introduction CS 118 Computer Network Fundamentals Peter Reiher

slide-2
SLIDE 2

Lecture 1 Page 2 CS 118 Winter 2016

Purpose of the class

  • To familiarize you with the basic concepts of

computer networking

  • Computer networks are increasingly key to

most systems

  • All educated computer scientists should have a

good understanding of how they work

slide-3
SLIDE 3

Lecture 1 Page 3 CS 118 Winter 2016

Pre-requisite

  • CS 111 – Operating System Principles

– Which itself has CS 31, 32, and 35 as pre- requisites

  • So you’re expected to be able to program
  • And to have a reasonable understanding about

how computer software systems work

slide-4
SLIDE 4

Lecture 1 Page 4 CS 118 Winter 2016

Textbooks

  • Shannon/Weaver,

The Mathematical Theory of Communication (any edition)

  • Peterson/Davie,

Computer Networks: A systems approach (any edition)*

– *readings are cited from the Sixth Edition; students are responsible for location of corresponding material if using other editions

slide-5
SLIDE 5

Lecture 1 Page 5 CS 118 Winter 2016

Assignments

  • Programming projects

– Two – On a schedule set by the TA

  • All work is to be completed INDIVIDUALLY.
slide-6
SLIDE 6

Lecture 1 Page 6 CS 118 Winter 2016

Grading

  • 30% projects

– 15% each for 2 assignments

  • 30% midterm

– Feb. 4, in class

  • 40% final exam

– March 14, 8-11 AM

  • Projects due as announced

– Due at the start of class on date indicated – TA will set policy for late submissions

slide-7
SLIDE 7

Lecture 1 Page 7 CS 118 Winter 2016

Office Hours

  • TTh 2-3 PM
  • In 3532F Boelter Hall
  • Other times possible by arrangment
slide-8
SLIDE 8

Lecture 1 Page 8 CS 118 Winter 2016

The TA

  • Seungbae Kim

– ksb2043@gmail.com

  • He will handle all issues related to the projects
  • Also will hold weekly recitation sections and
  • ffice hours

– Times to be announced

slide-9
SLIDE 9

Lecture 1 Page 9 CS 118 Winter 2016

A bit about style

  • A bit more “abstract” than typical

– This is an education, not merely training – It’s for your entire life, not just your first job

  • You’re expected to *apply* what you learn

– Repeating what you learn will not be enough – Just attending class will not be enough

  • You will be challenged
  • I am here to help

– Specific questions will always be answered

slide-10
SLIDE 10

Lecture 1 Page 10 CS 118 Winter 2016

Mastering the material

  • There’s a lot of stuff

– What should you focus on?

  • Things to keep in mind:

– Understanding – Recognizing – NOT memorizing

  • Focus on the subject

– Side-discussions are intended to illuminate, not dump extra stuff on you

slide-11
SLIDE 11

Lecture 1 Page 11 CS 118 Winter 2016

Let’s begin…

slide-12
SLIDE 12

Lecture 1 Page 12 CS 118 Winter 2016

A Roadmap

  • Introduction and history
  • Performance and efficiency
slide-13
SLIDE 13

Lecture 1 Page 13 CS 118 Winter 2016

Overview

  • Definitions
  • What about the layers we’ve heard about?
  • The first-principles approach
  • A little history
slide-14
SLIDE 14

Lecture 1 Page 14 CS 118 Winter 2016

Why are we here?

  • Computer networking

– Really: networked computer communication – Information exchange between computers

  • The challenge:

– What is information? – What is communication? – What is networking? – How are these related?

slide-15
SLIDE 15

Lecture 1 Page 15 CS 118 Winter 2016

What is communication?

  • Methods for exchanging information between:

– a fixed set of – directly-connected parties – using a single, shared set of pre-agreed rules

slide-16
SLIDE 16

Lecture 1 Page 16 CS 118 Winter 2016

So then what’s a protocol?

  • A single, shared set of pre-agreed rules
  • E.g.:

– I call you – The phone rings – You pickup and say “Hello” – We start talking

slide-17
SLIDE 17

Lecture 1 Page 17 CS 118 Winter 2016

Protocol variations

  • What word (for the telephone)?

– Bell originally proposed “Ahoy!”

  • Who talks first when I call you?

– Typically:

  • You pickup and you say “Hello”

[callee first]

– Alternate:

  • You pickup and I say “Hello”

[caller first]

– Either one works

  • Only if both sides agree in advance

There is a lot of complexity in just two-party communication.

slide-18
SLIDE 18

Lecture 1 Page 18 CS 118 Winter 2016

What is networking?

  • Methods to enable communication between:

– varying sets of – indirectly connected parties – that don’t share a single set of rules

  • Networking:

– how we get from “nothing” to being able to communicate

slide-19
SLIDE 19

Lecture 1 Page 19 CS 118 Winter 2016

Let’s compare…

Communication

  • Methods for exchanging

information between:

– a fixed set of – directly-connected parties – using a single, shared set of pre-agreed rules (a protocol)

  • How you exchange info

when you know who you’re talking to and how Networking

  • Methods to enable

communication between:

– varying sets of – indirectly connected parties – that don’t share a single set

  • f rules
  • How you figure out who

you’re talking to and how

slide-20
SLIDE 20

Lecture 1 Page 20 CS 118 Winter 2016

Summary definitions

  • Communication

– Methods for exchanging information between a fixed set of directly-connected parties using a single protocol

  • Networking

– Methods to enable communication between varying sets of indirectly connected parties that don’t share a single protocol

  • Protocol

– A set of rules, agreed in advance, that enable communication

slide-21
SLIDE 21

Lecture 1 Page 21 CS 118 Winter 2016

Where are the layers we’ve heard about?

  • International Standards Organization (ISO)

– Open Systems Interconnect (OSI) – Seven layers based on function/capability – Developed as a reference model – Implemented but not really used

  • Internet

– Four layers – More or less . . .

slide-22
SLIDE 22

Lecture 1 Page 22 CS 118 Winter 2016

Slapping Names on Layers Isn’t Useful

  • The name doesn’t really tell you anything

– Calling it “transport” doesn’t mean much

  • What’s important is what happens in the

network

  • There can be many ways of mapping desired

functionality into elements of the system

slide-23
SLIDE 23

Lecture 1 Page 23 CS 118 Winter 2016

Names – What’s valuable about them

  • They allow us to specify things
  • To make sure the right actions happen to the

right things

  • In networks, to get messages to the right

recipients

  • In network layers, to ensure that we understand

what layer we’re dealing with

slide-24
SLIDE 24

Lecture 1 Page 24 CS 118 Winter 2016

Names – What’s unimportant about them

  • The actual name is meaningless
  • Meaning is achieved by binding it to

something

  • The same thing can have several different

names

  • The same name can be applied to several

different things

– Depending on context – Changing over time

slide-25
SLIDE 25

Lecture 1 Page 25 CS 118 Winter 2016

The important lesson about names

  • Don’t obsess about the name itself
  • Concentrate on how the name relates to reality
slide-26
SLIDE 26

Lecture 1 Page 26 CS 118 Winter 2016

These Layers Aren’t the Truth, Anyway

  • It’s not 1984 anymore

– Both models describe early networking

  • Layers aren’t defined by function

– Most layers do most functions now

  • There are too many exceptions

– In-between layers – Virtual layers (tunnels)

slide-27
SLIDE 27

Lecture 1 Page 27 CS 118 Winter 2016

Let’s go back to the beginning…

Two fundamental ideas of CS:

  • Abstraction
  • Recursion
slide-28
SLIDE 28

Lecture 1 Page 28 CS 118 Winter 2016

Abstraction

  • Represent something complex…

– with something simpler… – that is easier to understand – AND – that can be used to predict the behavior of the complex

A MODEL

slide-29
SLIDE 29

Lecture 1 Page 29 CS 118 Winter 2016

Recursion

  • The converse of induction

– decompose a large problem into the combination

  • f its components

– declare a value for the minimal atomic component

slide-30
SLIDE 30

Lecture 1 Page 30 CS 118 Winter 2016

The goal of our approach

  • To describe networked computer

communication from first principles of:

– Abstraction – Recursion

  • We’ll still have layers

– Just recursive ones

slide-31
SLIDE 31

Lecture 1 Page 31 CS 118 Winter 2016

If layers aren’t fixed things?

  • Then what are they?

– A layer is the largest set that can communicate – i.e., a layer is the largest group that is: – directly connected – shares a single, common protocol

slide-32
SLIDE 32

Lecture 1 Page 32 CS 118 Winter 2016

A Roadmap Through the Course

  • Bits

– A very fine place to start…

  • Communication

– Two-party bit sharing

  • Networking

– Multiparty bit sharing

slide-33
SLIDE 33

Lecture 1 Page 33 CS 118 Winter 2016

Course roadmap

  • Communication

– Two-party shared state – Channels – Protocols

slide-34
SLIDE 34

Lecture 1 Page 34 CS 118 Winter 2016

Course roadmap

  • Communication

– Two-party shared state – Channels – Protocols

  • Networking

– Multiparty complications – Layers – Naming – Recursion/forwarding

slide-35
SLIDE 35

Lecture 1 Page 35 CS 118 Winter 2016

Course roadmap

  • Communication

– Two-party shared state – Channels – Protocols

  • Networking

– Multiparty complications – Layers – Naming – Recursion/forwarding

  • Examples & mechanisms

– Communication – Networking

slide-36
SLIDE 36

Lecture 1 Page 36 CS 118 Winter 2016

A little history too

  • ~5000 years of networking to consider!
slide-37
SLIDE 37

Lecture 1 Page 37 CS 118 Winter 2016

Couriers

  • Human-based

– More reliable

  • Slow

– Walking, horse galloping

  • Limited range

– Tens of miles – Relay only where pre-deployed

  • Vulnerable

– Loss, corruption, interference

  • Costly
slide-38
SLIDE 38

Lecture 1 Page 38 CS 118 Winter 2016

Carrier pigeons

  • Unidirectional messaging

– From release to “home”

  • Hard to “reset”

– Bring the pigeon back

  • Fixed locations

– Messages go only where pigeons are “homed”

  • Unpredictable

– High loss rate!

slide-39
SLIDE 39

Lecture 1 Page 39 CS 118 Winter 2016

Beacons

  • Limited BW

– One signal – Slow to reset

  • Long distance

– Relays over hundreds of miles

  • Costly

– Requires resident attendant

  • First optical comms!

– Works at night – Better than daytime – Worked for Paul Revere

slide-40
SLIDE 40

Lecture 1 Page 40 CS 118 Winter 2016

Heliograph

  • More optical comms

– Sunlight

  • Unreliable

– Hard to aim

  • Limited use

– Sunny days only – Low bitrate

slide-41
SLIDE 41

Lecture 1 Page 41 CS 118 Winter 2016

Flags

  • Still in current use

– Maritime communications – Public communications

  • E.g., swim safety
slide-42
SLIDE 42

Lecture 1 Page 42 CS 118 Winter 2016

Origins

  • Couriers

Spoken/written (30,000 BC)

  • Pigeons

2900 BC, Egypt

  • Beacons

1200 BC, Troy

  • Heliographs

400 BC, Greece

  • Flags

400 BC, Greece

slide-43
SLIDE 43

Lecture 1 Page 43 CS 118 Winter 2016

Hooke

  • Yes, the microscope guy

– 1680’s – “On Showing a Way How to Communicate One’s Mind at a Distance” – Telescope + semaphores

slide-44
SLIDE 44

Lecture 1 Page 44 CS 118 Winter 2016

French Telegraph

  • Semaphore telegraph

– 1790s, Claude Chappe – Letters, numbers – Time sync – Contention (message collision) – Priority – Flow control – Error recovery

slide-45
SLIDE 45

Lecture 1 Page 45 CS 118 Winter 2016

Emergence of electricity

  • Electromagnets invented 1820 (Sturgeon)

– Electrical relays – 1835

  • Cooke/Wheatstone – 1837

– Multiple needles – 13 miles near London

  • Morse – 1837

– Single relay – Killed the Pony Express (courier) by 1861

slide-46
SLIDE 46

Lecture 1 Page 46 CS 118 Winter 2016

Cooke/Wheatstone

slide-47
SLIDE 47

Lecture 1 Page 47 CS 118 Winter 2016

Morse

  • Symbols == letters
  • Time encoding

– Dot – 3 dots = dash – Intra-symbol

  • dot delay

– Inter-symbol

  • dash delay

– Inter-word

  • seven dot delay
slide-48
SLIDE 48

Lecture 1 Page 48 CS 118 Winter 2016

Telephone

  • First patented by Alexander Graham Bell

– In 1876

  • Carried actual voice over electromagnetic

media

  • In wide use by early 20th century
  • Still in wide use today
slide-49
SLIDE 49

Lecture 1 Page 49 CS 118 Winter 2016

Radio

  • Transmission of signals without wires

– Originally encoding sound – Eventually encoding many forms of data

  • Theoretical possibility shown by Maxwell

(1864)

  • Patent of practical device by Marconi (1896)
slide-50
SLIDE 50

Lecture 1 Page 50 CS 118 Winter 2016

Computer networking

  • Small, special purpose computer networks in

1950s, 1960s

  • Packet switching developed in 1960s
  • ARPANET went online in 1969
  • Internet replaced the ARPANET in 1981

– And became commercial in 1989

  • World Wide Web introduced in 1991

– Not a new hardware technique – But a revolution in what networks could do

slide-51
SLIDE 51

Lecture 1 Page 51 CS 118 Winter 2016

Characterizing Networks

  • Some characterizations are based on purpose

– “It’s a network for voice”

  • Others are numerical

– “It can transmit 10 Mbytes per second” – Numerical characterizations tend to be more useful

  • What will we measure for networks?
  • Values to characterize work and power

– Time – Number & size of messages

slide-52
SLIDE 52

Lecture 1 Page 52 CS 118 Winter 2016

Communications is all about time…

  • Time for information transfer

– Info at A -> info at B

  • Time for a transformation

– Info -> f(info)

  • Time for a transaction

I at A -> request starts at A I at B -> request arrives at B f(I) at B -> response created at B f(I) at A response moves to A

slide-53
SLIDE 53

Lecture 1 Page 53 CS 118 Winter 2016

Communications/Network Measures

  • Frequency

– Bandwidth – Processing

  • Speed

– Propagation speed

  • Delay

– Propagation latency – Access delay

  • Loss rate
slide-54
SLIDE 54

Lecture 1 Page 54 CS 118 Winter 2016

Rate vs. Frequency

  • Rate

– Events per unit time

  • Frequency

– Time between events – Sometimes: time to complete (TTC) a given event

  • Not always related!

– Rate = 1/TTC * #servers – E.g., you can cook pies at a rate faster than 1 pie per hour, but each pie will still take 1 hour to cook (i.e., pie baking frequency doesn’t change)

slide-55
SLIDE 55

Lecture 1 Page 55 CS 118 Winter 2016

The importance of being quick

  • Latency is the fundamental metric
  • f computing and communication

– Performance is measured as the latency required to perform a task – Everything else is a means to that end – Exceptions aren’t computing or communication (e.g., I/O capabilities such as screen size, pixel depth, digitizer resolution)

slide-56
SLIDE 56

Lecture 1 Page 56 CS 118 Winter 2016

What is latency?

  • Latency is...

(focus) The ,me between: Generic two events Interac/on asking ques/on and receiving an answer Communica/on crea/ng informa/on at a source and receiving it at a des/na/on

slide-57
SLIDE 57

Lecture 1 Page 57 CS 118 Winter 2016

Defining latency

  • Latency is:

– The time between creating information at a source and receiving it at a destination

  • Latency is:

– A cumulative effect – A property of two events and a message in a system (sender/receiver/path)

slide-58
SLIDE 58

Lecture 1 Page 58 CS 118 Winter 2016

Latency isn’t a single value

  • The cumulative system impact on a message

– Fixed, per-message costs

  • Header processing
  • Message house-keeping
  • Propagation delay

– Proportional, per-bit costs

  • Message composition/interpretation
  • Transmission delay

– Unpredictable aggregate effect

  • Not strictly additive
  • Some latencies overlap (pipeline), others don’t

Message size matters

slide-59
SLIDE 59

Lecture 1 Page 59 CS 118 Winter 2016

Five Root Causes

  • 1. Generation
  • 2. Transmission
  • 3. Processing
  • 4. Multiplexing
  • 5. Grouping

More than propagation + transmit + queue!

slide-60
SLIDE 60

Lecture 1 Page 60 CS 118 Winter 2016

Cost #1: Generation

  • Delay between occurrence of a physical event

and the availability of information

slide-61
SLIDE 61

Lecture 1 Page 61 CS 118 Winter 2016

Cost #2: Transmission

  • The delay in transferring information from one

location to another

slide-62
SLIDE 62

Lecture 1 Page 62 CS 118 Winter 2016

The speed of light – or less

  • Constant in each medium:

Vacuum c (3E8 m/s) Air (RF) 0.9997 c Open-ladder wire 0.95 c Twin-axial wire 0.8 c Coax wire Twisted –pair wire Op/cal fiber 0.66 c

slide-63
SLIDE 63

Lecture 1 Page 63 CS 118 Winter 2016

Cost #3: Processing

  • The delay due to the computational translation
  • r frequency of information
slide-64
SLIDE 64

Lecture 1 Page 64 CS 118 Winter 2016

Cost #4: Multiplexing

  • The delay incurred as the result of sharing a

resource

slide-65
SLIDE 65

Lecture 1 Page 65 CS 118 Winter 2016

Cost #5: Grouping

  • The delay incurred to reduce the amount of

control information and overhead

slide-66
SLIDE 66

Lecture 1 Page 66 CS 118 Winter 2016

Summary

  • Definitions

– Communication, networking, and protocol

  • Names are just names

– You do need to know them – But their meaning is just as important

  • Networking didn’t start with the Internet

– There’s a lot of history that’s still useful

  • Important characterization of network

performance are time related

– Especially latency