18
1 Lecture29 ComputerNetworks

Computer Science 37 Lecture 29

Embed Size (px)

Citation preview

Page 1: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 1/18

1

Lecture29

ComputerNetworks

Page 2: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 2/18

2

ThePurposeofNetworking

• Goal: remotedataexchange.

• Afewdesirableproperties:

– Interoperability,

– Flexibility,

– Geographicalrange,

– Scalability,

– Privacyandsecurity.

Page 3: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 3/18

3

Mattersof Protocol

Everythinginnetworkinghappensthrough protocols:

Aprotocoldetermineshowhostsshareandaccessthemedium,

Aprotocoldetermineshowhostsdealwiththemediabandwidth,

errors,flowcontrol,etc,

Aprotocoldetermineshowconnectionsbetweenhostsareestablished

andmaintained,

Aprotocoldetermineshowinformationisroutedacrossshortandlong

distances.

Etc,etc,etc…

Question: Ok,butwhatis protocol?

Page 4: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 4/18

4

ISO:InternationalStandardsOrganizationOSI:OpenSystemsInterconnection

Physical

Presentation

Session

Transport

Network 

Datalink 

Application

TheISO/OSIReferenceModelSource:ComputerNetworks,AndrewTanenbaum

Theprotocolstack :

Theideabehindthemodel: Breakupthe

designtomakeimplementationsimpler.

Eachlayerhasawell-definedfunction.

Layerspasstooneanotheronlythe

informationthatisrelevantateachlevel.

Communicationhappensonlybetween

adjacentlayers.

Page 5: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 5/18

5

TheLayersintheISO/OSIRFModel

Physical: Transmitrawbitsoverthemedium.

DataLink: Implementstheabstractionofanerrorfreemedium(handlelosses,duplication,errors,flowcontrol).

Network: Routing.

Transport: Breakupdataintochunks,sendthemdowntheprotocolstack,

receivechunks,putthemintherightorder,passthemup.

Session: Establishconnectionsbetweendifferentusersanddifferent

hosts.

Presentation: Handlesyntaxandsemanticsoftheinfo;examples:

encoding,encrypting.

Application: Protocolscommonlyneededbyapplications(cddb,http,

ftp,telnet,etc).

Page 6: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 6/18

6

Layern-1

Layern+1

Layern

CommunicationBetweenLayerswithinaHost

SAP SAP…

SAP SAP…

SAPs (serviceaccesspoints)

Note: ThisisISOterminology.

It’simportanttospecify

theservicesoffered

tohigherlayersin

thehierarchy.What

theyare+howto

usethem=interface.

Page 7: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 7/18

7

CommunicationBetweenLayersinDifferentHosts

sender receiver

data data

AH data

PH data

SH data

TH data

NH data

DHDTdata

BITSPhysical

Presentation

Session

Transport

Network 

Datalink 

Application

Physical

Presentation

Session

Transport

Network 

Datalink 

Application

Page 8: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 8/18

8

TheLayersintheTCP/IPProtocolSuiteSource:TheTCP/IPProtocolSuite,Behrouz A.Forouzan

Physical

Datalink 

IPARP RARP

ICMP IGMP

Transport TCP UDP

Network 

Session

Presentation

Application

FTP HTTP DNS NFS …

Page 9: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 9/18

9

DesignAlternatives

Point-to-pointchannels: physicallinks(asinwiring)connect

everytwocommunicatingpartieswitha“private”channel.

Broadcastchannels: communicatingpartiesareconnected

byasharedmedium;hostscanheartransmissionsnot

necessarilyaddressedtothem.

Page 10: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 10/18

10

NetworkTopology

Wecanclassifycomputernetworksaccordingtotheirtopology:

bus star

ring

mesh

hypercube

Page 11: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 11/18

11

RangeofCoverage

LAN: localareanetwork 

WLAN: wirelesslocalareanetwork 

MAN: metropolitanareanetwork 

WAN: wideareanetwork(longhaulnetwork)

Wecanalsoclassifycomputernetworksaccordingto

theirgeographicalcoverage:

Mostcommonly,we’reinterestedintheseamlessintegration

ofalltheselevels(asintheInternet).

Note: Differentlevelsuseverydifferenttechnologies.

Page 12: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 12/18

12

Technology

NetworkInterfaceCard(NIC): I/Odeviceinthecomputer

systemthatallowsittojoinanetwork.

TheNICworkswithaspecificmedium

(twisted-pair,coaxialcable,opticfiber,etc).

Host

NIC

NIC

Tothehost,theNICisjustanotherI/Odevice,whichhasits

ownaddress.A protocol determineshowtheNICaccesses

themedium.

Aslongasitsbus

allows,ahostcan

havemultiple

NICs.

Page 13: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 13/18

13

Ethernet

BusArbitrationbyCollisionDetection:

CarrierSenseMultipleAccesswith

CollisionDetection(CSMA/CD)

time

HostAlistensand

findsthebusidle.

HostBlistensand

findsthebusidle.

HostAstartsTX.

HostBstartsTX.

COLLISION!

HostAdetects

collision.

HostBdetects

collision.

HostBlistensand

findsthebusidle.

HostBstartsTX.

HostBcompletesTX.

HostBbacksoff.

HostAbacksoff.

Ethernethasabustopology.

Page 14: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 14/18

14

COTSEthernet

Ethernethasabustopology

Themediumcouldbeanythingthatallowsforabusimplementation.

(someoptionsareeasiertoworkwiththanothers)

Host NIC

Host NIC

Host NIC

… Hub:

Anout-of-theboxbus

Page 15: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 15/18

15

SwitchedLANs

Host NIC

Host NIC

Host NIC

… Switch:allowsformorethan

onepairtotalkatthesame

time.

Thebusbandwidthislimited,sogoforaswitchedarchitecture.

Page 16: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 16/18

16

TokenRing

Hostsconnecttoaswitchwhichclosesthering.

Mediumaccessisdonebypassingaroundatoken.

A B C

DEF

Page 17: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 17/18

17

NetworkArchitectureforPerformance

Thekeywordishierarchy:

Switch

Subnet1

Subnet2

SubnetN

hub

hub

hub

Page 18: Computer Science 37 Lecture 29

8/4/2019 Computer Science 37 Lecture 29

http://slidepdf.com/reader/full/computer-science-37-lecture-29 18/18

18

NetworkArchitectureforPerformanceandCoverage

Again,thekeywordishierarchy:

Switch

Subnet1

Subnet2

SubnetN

Switch

Subnet1

Subnet2

SubnetN

RouterConnectiontoothernetworks

hub

hub

hub

hub

hub

hub