The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP...

45
TCP/IP Protocol Suite 1 The OSI Model and the TCP/IP Protocol Suite

Transcript of The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP...

Page 1: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 1

The OSI Model and the TCP/IP Protocol Suite

Page 2: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 2

 To discuss the idea of multiple layering in data communication and networking and the interrelationship between layers.

 To discuss the OSI model and its layer architecture and to show the interface between the layers.

 To briefly discuss the functions of each layer in the OSI model.

 To introduce the TCP/IP protocol suite and compare its layers with the ones in the OSI model.

 To show the functionality of each layer in the TCP/IP protocol with some examples.

 To discuss the addressing mechanism used in some layers of the TCP/IP protocol suite for the delivery of a message from the source to the destination.

Page 3: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 3

Page 4: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 4

2-1 PROTOCOL LAYERS

In Chapter 1, we discussed that a protocol is required when two entities need to communicate.Whencommunication isnotsimple,wemaydivide the complex task of communication into severallayers.Inthiscase,wemayneedseveralprotocols,oneforeachlayer. Letususeascenarioincommunicationinwhich the role of protocol layering may be better understood. We use two examples. In the first example, communication is so simple that it canoccurinonlyonelayer.

Page 5: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 5

 Hierarchy  Services

Page 6: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 6

Assume Maria and Ann are neighbors with a lot of common ideas.However,MariaspeaksonlySpanish,andAnnspeaks only English. Since both have learned the sign language intheirchildhood,theyenjoymeetinginacafeacoupleofdaysperweekandexchangetheir ideasusingsigns.Occasionally, theyalsouseabilingualdictionary.Communication is face tofaceandHappensinonelayerasshowninFigure2.1.

Page 7: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 7

Figure 2.1 Example 2.1

Page 8: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 8

NowassumethatAnnhastomovetoanothertownbecauseofherjob.Beforeshemoves,thetwomeetforthelasttimeinthesamecafe.Althoughbotharesad,MariasurprisesAnnwhensheopensapacketthatcontainstwosmallmachines.ThefirstmachinecanscanandtransformaletterinEnglishtoasecretcodeorviceversa.TheothermachinecanscanandtranslatealetterinSpanishtothesamesecretcodeorviceversa.Anntakesthefirstmachine;Mariakeepsthesecondone.Thetwofriendscanstillcommunicateusingthesecretcode,asshowninFigure2.2.

Page 9: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 9

Figure 2.2 Example 2.2

Page 10: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 10

2-2 THE OSI MODEL

Established in 1947, the International StandardsOrganization(ISO)isamultinationalbodydedicatedtoworldwideagreementoninternationalstandards. Almost three-fourths of countries in the world arerepresentedintheISO.AnISOstandardthatcoversallaspectsofnetworkcommunicationsistheOpen Systems Interconnection (OSI) model. It was firstintroducedinthelate1970s.

Page 11: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 11

 Layered Architecture  Layer-to-layer Communication  Encapsulation  Layers in the OSI Model  Summary of OSI Layers

Page 12: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 12

ISO is the organization; OSI is the model.

Note

Page 13: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 13

Figure 2.3 The OSI model

Page 14: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 14

Figure 2.4 OSI layers

Page 15: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 15

Figure 2.5 An exchange using the OSI model

Page 16: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 16

The physical layer is responsible for moving individual bits from one

(node) to the next.

Note

Page 17: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 17

Figure 2.6 Summary of OSI Layers

Page 18: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 18

2-3 TCP/IP PROTOCOL SUITE

TheTCP/IPprotocolsuitewasdevelopedpriortothe OSI model. Therefore, the layers in the TCP/IPprotocolsuitedonotmatchexactlywiththoseintheOSImodel.TheoriginalTCP/IPprotocolsuitewas defined as four software layers built upon thehardware.Today,however,TCP/IPisthoughtofasafive-layermodelwiththelayersnamedsimilarlyto theones in theOSImodel.Figure2.7showsbothconfigurations.

Page 19: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 19

 Comparison between OSI and TCP/IP  Layers in the TCP/IP Suite

Page 20: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 20

Figure 2.7 Layers in the TCP/IP Protocol Suite

Page 21: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 21

Figure 2.8 TCP/IP and OSI model

Page 22: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 22

Figure 2.9 A private internet

Page 23: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 23

Figure 2.10 Communication at the physical layer

Page 24: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 24

The unit of communication at the physical layer is a bit.

Note

Page 25: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 25

Figure 2.11 Communication at the data link layer

Page 26: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 26

The unit of communication at the data link layer is a frame.

Note

Page 27: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 27

Figure 2.12 Communication at the network layer

Page 28: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 28

The unit of communication at the network layer is a datagram.

Note

Page 29: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 29

Figure 2.13 Communication at transport layer

Page 30: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 30

The unit of communication at the transport layer is a segment, user

datagram, or a packet, depending on the specific protocol used in this layer.

Note

Page 31: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 31

Figure 2.14 Communication at application layer

Page 32: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 32

The unit of communication at the application layer is a message.

Note

Page 33: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 33

2-4 ADDRESSING

Four levels of addresses are used in an internet employing theTCP/IP protocols: physical address, logical address, port address, and application-specific address.Eachaddress is related toaonelayerintheTCP/IParchitecture,asshowninFigure2.15.

Page 34: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 34

  Physical Addresses   Logical Addresses   Port Addresses   Application-Specific Addresses

Page 35: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 35

Figure 2.15 Addresses in the TCP/IP protocol suite

Page 36: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 36

InFigure2.16anodewithphysical address10 sendsa frame toanodewithphysicaladdress87.The twonodesareconnectedbyalink(aLAN).Atthedatalinklayer,thisframecontainsphysical(link)addressesintheheader.Thesearetheonlyaddressesneeded.Therestoftheheadercontainsotherinformationneededatthislevel.As the figure shows, the computer with physical address 10 is thesender,and thecomputerwithphysicaladdress87 is the receiver.Thedatalinklayeratthesenderreceivesdatafromanupperlayer.Itencapsulates thedata ina frame.Theframeispropagatedthrough theLAN.Eachstationwithaphysicaladdressother than87drops the frame because the destination address in the frame does notmatchitsownphysicaladdress.Theintendeddestinationcomputer,however,findsamatchbetweenthedestinationaddressintheframeanditsownphysicaladdress.

Page 37: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 37

Figure 2.16 Example 2.3: physical addresses

Page 38: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 38

AswewillseeinChapter3,mostlocalareanetworksusea48-bit (6-byte)physicaladdresswrittenas12hexadecimaldigits;everybyte (2hexadecimaldigits) isseparatedbyacolon,asshownbelow:

Page 39: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 39

Figure2.17 showsapart of an internetwith two routers connecting three LANs. Each device (computer or router) has a pair of addresses (logical and physical) for each connection. In this case,eachcomputer isconnectedtoonlyonelinkandthereforehasonlyonepairofaddresses.Eachrouter,however, isconnected to threenetworks.Soeachrouterhasthreepairsofaddresses,oneforeachconnection.Althoughitmaybeobviousthateachroutermusthaveaseparatephysicaladdressforeachconnection,itmaynotbeobvious why it needs a logical address for each connection. We discuss these issues inChapters11and12whenwediscuss routing.Thecomputerwith logicaladdressAandphysicaladdress10needs tosendapacket to thecomputerwith logicaladdressPandphysical address 95. We use letters to show the logical addresses and numbers for physical addresses, but note that both are actuallynumbers,aswewillseeinlaterchapters.

Page 40: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 40

Figure 2.17 Example 2.5: logical addresses

Page 41: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 41

The physical addresses will change from hop to hop, but the logical

addresses remain the same.

Note

Page 42: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 42

Figure 2.18 shows two computers communicating via the Internet.Thesendingcomputer is running threeprocessesat this time with port addresses a, b, and c. The receiving computer is running two processes at this time with portaddressesjandk.Processainthesendingcomputerneedsto communicate with process j in the receiving computer. Note thatalthoughbothcomputersareusing thesameapplication,FTP,forexample,theportaddressesaredifferentbecauseoneisaclientprogramandtheotherisaserverprogram,aswewillseeinChapter17.

Page 43: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 43

Figure 2.18 Example 2.6: port numbers

Page 44: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 44

The physical addresses change from hop to hop, but the logical and port addresses usually remain the same.

Note

Page 45: The OSI Model and the TCP/IP Protocol Suiteeceweb1.rutgers.edu/~szhou/568/TCP-IP.pdf · TCP/IP Protocol Suite 2 To discuss the idea of multiple layering in data communication and

TCP/IP Protocol Suite 45

As we will see in future chapters, a port address is a 16-bitaddressrepresentedbyonedecimalnumberasshown.

753A16-bitportaddressrepresentedasonesinglenumber