Don Montgomery, CSE, Engineering, SMUCh1, slide 1 Computer Networks CSE 4344 * Don Montgomery...

74
Don Montgomery, CSE, Engineering, SMU Ch1, slide 1 Computer Networks CSE 4344 * Don Montgomery Department of Computer Science and Engineering School of Engineering Southern Methodist University * many of the following slides were first developed by Sarvesh -- other credits will be noted in situ

Transcript of Don Montgomery, CSE, Engineering, SMUCh1, slide 1 Computer Networks CSE 4344 * Don Montgomery...

Don Montgomery, CSE, Engineering, SMU Ch1, slide 1

Computer Networks CSE 4344 *

Don MontgomeryDepartment of Computer Science and Engineering

School of EngineeringSouthern Methodist University

* many of the following slides were first developed by Sarvesh Kulkarni, Villanova U.-- other credits will be noted in situ

Don Montgomery, CSE, Engineering, SMU Ch1, slide 2

Background Concepts

Organized set of Computers/Processors

computers running advanced computer networksoperating systems(e.g. distributed systems)

Don Montgomery, CSE, Engineering, SMU Ch1, slide 3

Background Concepts

Organized set of Computers/Processors

computers running advanced computer networksoperating systems(e.g. distributed systems)

Several processing systems or computers are connected together and controlled by an advanced operating system. User sees only one huge computing machine, and is not aware of the distributed nature of the system. The OS couples different subsystems very tightly.

Don Montgomery, CSE, Engineering, SMU Ch1, slide 4

Background Concepts

Organized set of Computers/Processors

computers running advanced computer networksoperating systems(e.g. distributed systems)

Several processing systems or computers are Interconnected mesh of completelyconnected together and controlled by an autonomous computers. One system advanced operating system. User sees only does not control another. Users areone huge computing machine, and is not aware of the existence of differentaware of the distributed nature of the systems, and possibly their system. The OS couples different locations.subsystems very tightly.

Don Montgomery, CSE, Engineering, SMU Ch1, slide 5

what is expected of a network?

accurate delivery in bounded time fair and efficient network resource allocation convenient network administration scales in size to support growth

Don Montgomery, CSE, Engineering, SMU Ch1, slide 6

key concepts in networking * protocols

speaking the same language syntax and semantics

layering standing on the shoulders of giants key to managing complexity

resource allocation dividing scare resources among competing parties memory, link bandwidth, wireless spectrum, paths, … distributed vs. centralized algorithms

naming what to call computers, services, protocols, …

* this slide and the four next slides taken from Larry L. Peterson's Princeton course materials

Don Montgomery, CSE, Engineering, SMU Ch1, slide 7

example of protocol development:a calendar service

Making an appointment with your advisor

specifying the messages that go back and forth understanding what each party is doing

Please meet with me for 1.5 hours starting at

1:30pm on February 8, 2006?

I can’t.I can’t.Yes!

Please meet with me for 1.5 hours starting at

3:00pm on February 8, 2006?

Please meet with me for 1.5 hours starting at

4:30pm on February 8, 2006?

Don Montgomery, CSE, Engineering, SMU Ch1, slide 8

okay, so that was not working ...

• You: When are you free to meet for 1.5 hours during the next two weeks?

• Advisor: 10:30am on Feb 8 and 1:15pm on Feb 9.

You: Book me for 1.5 hours at 10:30am on Feb 8.

Advisor: Yes.

... good enough now?

Don Montgomery, CSE, Engineering, SMU Ch1, slide 9

well, let's try this ...

• Student #1: When can you meet for 1.5 hours during the next two weeks?

• Advisor: 10:30am on Feb 8 and 1:15pm on Feb 9.

• Student #2: When can you meet for 1.5 hours during the next two weeks?

• Advisor: 10:30am on Feb 8 and 1:15pm on Feb 9.

• Student #1: Book me for 1.5 hours at 10:30am on Feb 8.

• Advisor: Yes. Student #2: Book me for 1.5 hours at 10:30am on Feb 8. Advisor: Uh… well… I can no longer can meet then. I’m free at

1:15pm on Feb 9.

• Student #2: Book me for 1.5 hours at 1:15pm on Feb 9.

• Advisor: Yes.

Don Montgomery, CSE, Engineering, SMU Ch1, slide 10

specifying calendar service details

how to identify yourself? name? social security number?

how to represent dates and time? time, day, month, year? in what time zone? formatting? number of seconds since Jan 1, 1970?

what granularities of times to use? any possible start time and meeting duration? multiples of five minutes?

how to represent the messages? strings? record with name, start time, and duration?

what do you do if you don’t get a response? ask again? reply again?

Don Montgomery, CSE, Engineering, SMU Ch1, slide 11

protocol architecture & implementation

evaluation of requirements elaboration of algorithm detail definition at every layer of each network multiple alternative implementations per layer

(exception for TCP/IP: “the narrow waist”)

Don Montgomery, CSE, Engineering, SMU Ch1, slide 12

definitions:

protocol: a set of (rigidly) defined rules for communication. As long as different computers (possibly with varied hardware) can “speak” the same protocol, they can communicate in a network.

service interface: methods exposed by a protocol to a higher layerpeer interface: methods recognized by endpoints on the same layer

network architecture: “set of rules governing the form and content of a [specific] protocol graph” [Peterson/Davie, sec. 1.3.1]

demux key: identifies destination protocol of an incoming message

Don Montgomery, CSE, Engineering, SMU Ch1, slide 13

client: a computer that generates data and/or consumes information.

server: a computer that processes data and “serves up” information.

host: a client or a server connected to a network.

router: a specialized network switch in a network that can store and forward data packets. node: a host or a router in a network.

link: a communication medium (wired or wireless) that connects nodes.point-to-point: connects two nodesmultiple-access: connecting medium shared among a plurality

of nodes

channel: a logical (not necessarily physical) connection between hosts, or between processes on hosts.

request/reply: file transfer, control messagesmessage stream: VoIP, VoD, teleconferencing, etc.

Don Montgomery, CSE, Engineering, SMU Ch1, slide 14

circuit-switching: setting up end-to-end connection between source and sink

multiplexing: combining independent data flows over the same physical channel

time-division multiplexing: independent data flows “time-share” a connection/link using synchronous time-slots

statistical multiplexing: sharing a link/links in an on-demand basis---taking turns

packet-switching: sending messages across a network without establishing connections

Don Montgomery, CSE, Engineering, SMU Ch1, slide 15

cloud: a networked set of nodes of indeterminate configuration.

addressing: scheme to identify hosts uniquely; used during routing/switching negotiation, configuration, and transmission

unicast: a message sent to a single recipient

broadcast: a message sent to ALL recipients

multicast: a message sent to a set of recipients that belong to a group (called a multicast group)

Don Montgomery, CSE, Engineering, SMU Ch1, slide 16

metric units

principal metric prefixes

Don Montgomery, CSE, Engineering, SMU Ch1, slide 17

caution!

• in computer architecture (for data size):– 1 KB = 210 bytes = 210 x 8 bits

– 1 MB = 220 bytes = 220 x 8 bits

• In Computer Networks (for data transmission speed):– 1 KBps = 103 bytes per sec = 103 x 8 bits per sec

– 1 Kbps (or 1 kbps) = 103 bits per sec

and

– 1 MBps = 106 bytes per sec = 106 x 8 bits per sec

– 1 Mbps (or 1 mbps) = 106 bits per sec

Don Montgomery, CSE, Engineering, SMU Ch1, slide 18

network performance:high speed networks

•signal speed (speed of wavefront, of propagation)

•cannot get any faster --- why?

•telegraph vs. 10 gigabit Ethernet

•“hi-speed connection”

•line capacity (bandwidth) gets bigger

•result?•high bandwidth, same propagation delay

Don Montgomery, CSE, Engineering, SMU Ch1, slide 19

network performance metrics

packet latency (delay): txn delay + queueing delay + propagation delay

transmission delay (message size)/bandwidth

queueing delay propagation delay

distance/(speed of light)

Don Montgomery, CSE, Engineering, SMU Ch1, slide 20

network performance metrics

bandwidth: given in freq range (Mhz), or bit rate (Mbps)

throughput: delivered data quantity, per time unit

capacity: maximum throughput possible link utilization:

percentage of link capacity actually used

Don Montgomery, CSE, Engineering, SMU Ch1, slide 21

network performance metric: delay jitter

network induced jitter

Network

Interpacket gap

Packetsource

Packetsink

1234 1234

Don Montgomery, CSE, Engineering, SMU Ch1, slide 22

network performance metric:delay-bandwidth product

network: data pipes with storage

network link (waveguide/medium) is short term memory (why?)

delay-bandwidth product represents “link capacity” (full pipe)

how can we have high link utilization?

how do point-to-point and shared media differ, wrt utilization?

Don Montgomery, CSE, Engineering, SMU Ch1, slide 23

jump

Don Montgomery, CSE, Engineering, SMU Ch1, slide 24

example network for business applications

Don Montgomery, CSE, Engineering, SMU Ch1, slide 25

Another Typical Network

Vill ECE Dept.

Network

Cloud

Router

Host

UT Mech Dept

Don Montgomery, CSE, Engineering, SMU Ch1, slide 26

what is a network cloud? a collection of routers, LANs, stand-alone computers, etc.

subnet

Subnet

Subnet

subnet

Subnet SubnetHost A

Host B

Network Backbone

Don Montgomery, CSE, Engineering, SMU Ch1, slide 27

what is a subnet?

-- short for “communication subnetwork”

-- a collection of routers and their communication lines

Don Montgomery, CSE, Engineering, SMU Ch1, slide 28

network types

geographical size (diameter) classification:

SANs (e.g., Fibre Channel, HiPPI) LANs (e.g., Ethernet, FDDI) MANs (e.g., SONET, RPR, OBS) WANs (e.g., Internet, provider backbones)

Don Montgomery, CSE, Engineering, SMU Ch1, slide 29

Local Area Networks (LANs)

broadcast networks: (a) bus, (b) ringswitched networks (not shown)

Don Montgomery, CSE, Engineering, SMU Ch1, slide 30

Metropolitan Area Networks (MANs)

sample cable TV infrastructure

Don Montgomery, CSE, Engineering, SMU Ch1, slide 31

Wide Area Networks (WANs)

Don Montgomery, CSE, Engineering, SMU Ch1, slide 32

routing in WANs

stream of packets from sender to receiver

Don Montgomery, CSE, Engineering, SMU Ch1, slide 33

network type based on transmission medium

wired wireless hybrid

Don Montgomery, CSE, Engineering, SMU Ch1, slide 34

extra-terrestrial wireless networks

direct sky-land connection sky-LAN (!)

Don Montgomery, CSE, Engineering, SMU Ch1, slide 35

wired vs. wireless

Don Montgomery, CSE, Engineering, SMU Ch1, slide 36

network topologies

links can be: broadcast point-to-point

network topologies can be: ring bus star tree combination of the above completely interconnected!

Don Montgomery, CSE, Engineering, SMU Ch1, slide 37

completely interconnected networks -- a bad idea?

Don Montgomery, CSE, Engineering, SMU Ch1, slide 38

completely interconnected networks -- a bad idea?

in general: yes, a bad idea!

because too many connections are required -- how many?

Don Montgomery, CSE, Engineering, SMU Ch1, slide 39

telephone network vs. data network

circuit-switched -- switches don't store voice

packet-switched -- routers must store data

Don Montgomery, CSE, Engineering, SMU Ch1, slide 40

design issues for layered architecture

• addressing• error control• flow control• multiplexing• routing

Don Montgomery, CSE, Engineering, SMU Ch1, slide 41

network reliability

three classes of failure:

1. bit errors [error rate: 1/106 in Cu, 1/1012 in fiber]1.1 bit inversion1.2 burst errors

causes -for Cu: lightning; car alternators; bad weather;

induction by power linesfor fiber: misfiring laser-diodes / electronic glitch

Don Montgomery, CSE, Engineering, SMU Ch1, slide 42

network reliability

three classes of failure (contd.):

2. packet errors2.1 corrupt packet2.2 missing packet

causes -unsalvageable bit errors; packet drops at routers due to

congestion

Don Montgomery, CSE, Engineering, SMU Ch1, slide 43

network reliability

three classes of failure (contd.):

3. node or link failures3.1 router crash3.2 link goes down

causes -router power failure; buggy software in router; cut/damaged communications line (wired medium); bad weather (wireless); etc.

Don Montgomery, CSE, Engineering, SMU Ch1, slide 44

different types of service in networks

when reliable, in-order delivery is essential ... connection-oriented service

(used by: telnet, rlogin, ftp) has connection setup overhead

when timely delivery is more important than reliable delivery ...

connectionless service (used by: NFS, client-server request-replies, real time

voice/video) no connection setup overhead

Don Montgomery, CSE, Engineering, SMU Ch1, slide 45

network architecture: layers & protocols

hosts & routers need to communicate ↳ communication model needed!

how to model?-- use layers

Don Montgomery, CSE, Engineering, SMU Ch1, slide 46

services to protocols relationship

higher layer uses services of next lower layer, using function calls (APIs)data flows vertically in single instance modeldata flows horizontally across two instance model at lowest layer only

Don Montgomery, CSE, Engineering, SMU Ch1, slide 47

protocol standardization communicating hosts must speak the same protocol

standardization enables multiple implementations or, the same folks have to write all the software

Internet Engineering Task Force (IETF) “working groups” focus on specific issues produce “Request For Comments” (RFCs)

promoted to standards via “rough consensus and running code” e.g., RFC 959 on “File Transfer Protocol”

IETF Web site: http://www.ietf.org

de facto standards: same folks writing the code P2P file sharing, Skype, ..., <your protocol here>, ...

Don Montgomery, CSE, Engineering, SMU Ch1, slide 48

protocol standardization

main players

ISO

ITU

IETF

ANSI

IEEE

Don Montgomery, CSE, Engineering, SMU Ch1, slide 49

ITU main sectors

• radiocommunications• telecommunications Standardization• development

classes of members• national governments• sector members• associate members• regulatory agencies

Don Montgomery, CSE, Engineering, SMU Ch1, slide 50

IEEE 802 Standards

The important ones are marked with *. The ones marked with are hibernating. The one marked with † gave up.

Don Montgomery, CSE, Engineering, SMU Ch1, slide 51

OSI reference model: hosts and routers

One or more nodeswithin the network

End host

Application

Presentation

Session

Transport

Network

Data link

Physical

Network

Data link

Physical

Network

Data link

Physical

End host

Application

Presentation

Session

Transport

Network

Data link

Physical

Don Montgomery, CSE, Engineering, SMU Ch1, slide 52

OSI reference model

Don Montgomery, CSE, Engineering, SMU Ch1, slide 53

notes on the OSI Model

1. protocols running on different machines, but at the same layer (level) → peers

2. one or more protocols per layer

3. layered model → protocol stack

Don Montgomery, CSE, Engineering, SMU Ch1, slide 54

functions of OSI layers

layer 1: physical (PHY) layer

1. electrical, mechanical & procedural interfaces e.g.,

specs of physical medium [wired, wireless, optical], dimensions of media and plugs, timing issues – how long (in nanosecs) a bit lasts

2. direction of communicatione.g.

simplexduplexsemi-duplex (half-duplex)

Don Montgomery, CSE, Engineering, SMU Ch1, slide 55

functions of OSI layerslayer 2: data link layer

1. packet framing

2. error detection / correction - generate/process acknowledgements (ACK/NACK) - “checksum” packets

3. fragmentation/reassembly of packets- fragment sequence numbering

4. medium access control (MAC)- for broadcast (shared) media- rules for sharing, resolving contention

Don Montgomery, CSE, Engineering, SMU Ch1, slide 56

functions of OSI layers

layer 3: network layer

1. finding & using routes

2. interconnection of heterogeneous networks/nodes

3. congestion control* - congestion avoidance - congestion recovery

* this function is implemented in the transport layer in the tcp/ip model

Don Montgomery, CSE, Engineering, SMU Ch1, slide 57

functions of OSI layers

layer 4: transport layer

1. establish connection; segment data into packets

2. sequencing of packets

3. flow control (to prevent fast sender from swamping slow receiver with data)

note: the transport layer and all higher layers are true end-to-end layers

Don Montgomery, CSE, Engineering, SMU Ch1, slide 58

functions of OSI layers

layer 5: session layer

1. establish sessions between source-destination hosts

2. synchronization / checkpointing i.e., “bookmarking” during file transfers

3. token management (for performing critical functions)

Don Montgomery, CSE, Engineering, SMU Ch1, slide 59

functions of OSI layers

layer 6: presentation layer

1. representation of characters/numbers is m/c specific - # bits in characters, integers & fp numbers

- bit/byte ordering (little endian & big endian)- ASCII vs. EBCDICso,convert char/num representation to

network standard format

Don Montgomery, CSE, Engineering, SMU Ch1, slide 60

functions of OSI layers

layer 7: application layer

1. virtual terminal control

2. application programs - email, web browser, file transfer, telnet, chat

Don Montgomery, CSE, Engineering, SMU Ch1, slide 61

OSI & TCP/IP reference models compared

TCP/IP reference modelOSI reference model

Don Montgomery, CSE, Engineering, SMU Ch1, slide 62

TCP/IP protocol interaction

sendIP (message) deliverTCP (message)

TCP

IP

Don Montgomery, CSE, Engineering, SMU Ch1, slide 63

intermission

Don Montgomery, CSE, Engineering, SMU Ch1, slide 64

protocol hierarchies & headers/trailers

information flow in a 5 layer model

Don Montgomery, CSE, Engineering, SMU Ch1, slide 65

is layering harmful? layer n may duplicate lower level functionality

e.g., error recovery to retransmit lost data

layers may need redundant information e.g., timestamps, maximum transmission unit size

strict adherence to layering may hurt performance e.g., hiding details about what is really going on

some layers are not always cleanly separated inter-layer dependencies for performance reasons some dependencies in standards (header checksums)

multi-part headers start to get really big sometimes more header bytes than actual content

Don Montgomery, CSE, Engineering, SMU Ch1, slide 66

TCP/IP model

defined in its original form by Cerf & Kahn (1974)

built for robustness - used redundant routers & connections

the Internet layer in the TCP/IP model is equivalent to the network layer in the OSI model -- in TCP/IP, hosts are assigned IP addresses -- the IP address identifies a host/router (like a postal address) -- packets are routed using IP addresses

Don Montgomery, CSE, Engineering, SMU Ch1, slide 67

TCP/IP protocols

protocols and networks in the TCP/IP model

NOTE: the TCP/IP model specifies no specific protocol for the lowest (IP-to-network) layer, therefore a subnet may implement its own, “shim,” interior routing protocol above the link layer.

Don Montgomery, CSE, Engineering, SMU Ch1, slide 68

TCP/IP model

<re-emphasis>

transport layer has 2 main protocols:1. TCP : reliable, connection-oriented2. UDP: unreliable, connectionless

Internet layer (network layer) has 1 main protocol:1. IP : routing

Internet model name: “TCP/IP”

Don Montgomery, CSE, Engineering, SMU Ch1, slide 69

OSI vs. TCP/IP

OSI► seven layer model came first► protocols after► supports numerous network protocols

TCP/IP► four layer protocols came first► model descriptive► supports only IP network protocol (narrow waist)*

Don Montgomery, CSE, Engineering, SMU Ch1, slide 70

defining characteristic of the Internet architecture

need sub-layer to join incompatible networksbetween transport and network layers at gateways between networksfor routing and flow control between networks

sub-layer looks like transport, to networks being joinedsub-layer looks like network, to end-to-end transport

In the Internet, the Internet Protocol (IP) is that sub-layer.

(when IP is used as the network layer in the networks, no other network layer protocol is needed)

(from a slide by Eytan Modiano)

Don Montgomery, CSE, Engineering, SMU Ch1, slide 71

example networks

• the Internet

• connection-oriented networks: X.25, frame relay, and ATM

• Ethernet

• wireless LANs: 802.11

Don Montgomery, CSE, Engineering, SMU Ch1, slide 72

NSFNET

NSFNET backbone in 1988

Don Montgomery, CSE, Engineering, SMU Ch1, slide 73

architecture of the Internet

(Telecom/datacom is swimming in synonyms and redundant acronyms.)

Don Montgomery, CSE, Engineering, SMU Ch1, slide 74

demo of 'ping'

What is ping?

- a utility to see if destination host is reachable

and

- if reachable, to find packet Round Trip Time (RTT)