Reference Models. 2 Overview The OSI Reference Model The TCP/IP Reference Model A comparison of the...

38
Reference Models Reference Models

Transcript of Reference Models. 2 Overview The OSI Reference Model The TCP/IP Reference Model A comparison of the...

Reference ModelsReference Models

22

OverviewOverview

The OSI Reference ModelThe OSI Reference Model

The TCP/IP Reference ModelThe TCP/IP Reference Model

A comparison of the OSI and TCP/IP A comparison of the OSI and TCP/IP Reference ModelsReference Models

A hybrid modelA hybrid model

33

Reference ModelsReference Models

Now that we have discussed layered Now that we have discussed layered networks in abstract, it is time to look at networks in abstract, it is time to look at some examples. Next, we will discuss two some examples. Next, we will discuss two important network architectures – the OSI important network architectures – the OSI reference model and the TCP/IP reference reference model and the TCP/IP reference model.model.

44

The OSI Reference ModelThe OSI Reference Model

The OSI models is shown on Fig. 1. (minus the physical The OSI models is shown on Fig. 1. (minus the physical medium). medium).

This model is based on a proposal developed by the This model is based on a proposal developed by the International Standards Organization (ISO) as a first International Standards Organization (ISO) as a first step toward international standardization of the protocols step toward international standardization of the protocols used in the various layers. used in the various layers.

The model is called the The model is called the ISO OSI (Open Systems ISO OSI (Open Systems Interconnection)Interconnection) Reference Model because it deals with Reference Model because it deals with connecting open systems – that is, systems that are connecting open systems – that is, systems that are open for communication with other systems. We will open for communication with other systems. We will usually just call it the OSI model for short. usually just call it the OSI model for short.

55Fig. 1. The OSI reference model

66

The OSI Reference Model - PrinciplesThe OSI Reference Model - PrinciplesThe OSI model has seven layers.The OSI model has seven layers.

The principles that were applied to arrive at the The principles that were applied to arrive at the seven layers are as follows:seven layers are as follows: A layer should be created where a different level of A layer should be created where a different level of

abstraction is needed.abstraction is needed. Each layer should perform a well defined function.Each layer should perform a well defined function. The function of each layer should be chosen with an The function of each layer should be chosen with an

eye toward defining internationally standardized eye toward defining internationally standardized protocols.protocols.

The layer boundaries should be chosen to minimize The layer boundaries should be chosen to minimize the information flow across the interfaces.the information flow across the interfaces.

The number of layers should be large enough that The number of layers should be large enough that distinct functions need not be thrown together in the distinct functions need not be thrown together in the same layer out of necessity, and small enough that same layer out of necessity, and small enough that the architecture dose not become unwieldy.the architecture dose not become unwieldy.

77

The OSI Reference ModelThe OSI Reference Model

Note that the OSI model itself is not a network Note that the OSI model itself is not a network architecture, because it does not specify the architecture, because it does not specify the exact services and protocols to be used in each exact services and protocols to be used in each layer. It just tells what each layer should do. layer. It just tells what each layer should do.

However, ISO has also produced standards for However, ISO has also produced standards for all the layers, although these are not part of the all the layers, although these are not part of the reference model itself. Each one has been reference model itself. Each one has been published as a separate international standard. published as a separate international standard.

Next, we will discuss each layer of the model in Next, we will discuss each layer of the model in turn, starting at the bottom layer.turn, starting at the bottom layer.

88

OSI – The Physical LayerOSI – The Physical LayerThe The physical layerphysical layer is concerned with transmitting raw is concerned with transmitting raw bits over a communication channel. The design issues bits over a communication channel. The design issues have to with making sure that when one side send a 1 have to with making sure that when one side send a 1 bit, it is received by the other side as a 1 bit, not as a 0 bit, it is received by the other side as a 1 bit, not as a 0 bit.bit.

Typical questions here are:Typical questions here are: how many volts should be used to represent a 1 and how may how many volts should be used to represent a 1 and how may

for a 0for a 0 how many microseconds a bit lasts how many microseconds a bit lasts whether transmission may proceed simultaneously in both whether transmission may proceed simultaneously in both

directionsdirections how the initial connection is established and how it is torn down how the initial connection is established and how it is torn down

when both sides are finishedwhen both sides are finished And how many pins the network connector has and what each And how many pins the network connector has and what each

pin is used for.pin is used for.

The design issues here largely deal with The design issues here largely deal with mechanical, mechanical, electricalelectrical, and procedural interfaces, and the , and procedural interfaces, and the physical physical transmission mediumtransmission medium, which lies below the physical , which lies below the physical layer.layer.

99

OSI – The Data Link LayerOSI – The Data Link LayerThe main task of the The main task of the data link layerdata link layer is to take a raw is to take a raw transmission facility and transform it into a line that appears transmission facility and transform it into a line that appears free of undetected transmission errors to the network layer.free of undetected transmission errors to the network layer.

It accomplishes this task by having the sender break the input It accomplishes this task by having the sender break the input data up into data up into data framesdata frames (typically a few hundred or a few (typically a few hundred or a few thousand bytes), transmit the frames sequentially, and thousand bytes), transmit the frames sequentially, and process the process the acknowledgment framesacknowledgment frames sent back by the sent back by the receiver.receiver.

Since the physical layer merely accepts and transmits a Since the physical layer merely accepts and transmits a stream of bits without any regard to meaning or structure, it is stream of bits without any regard to meaning or structure, it is up to the data link layer to create and recognize frame up to the data link layer to create and recognize frame boundaries.boundaries.

This can be accomplished by attaching special bit patterns to This can be accomplished by attaching special bit patterns to the beginning and end of the frame. (if these bit patterns the beginning and end of the frame. (if these bit patterns accidentally occur in the data, special care must be taken to accidentally occur in the data, special care must be taken to make sure these patterns are not incorrectly interpreted as make sure these patterns are not incorrectly interpreted as frame delimiters.)frame delimiters.)

1010

OSI – The Data Link LayerOSI – The Data Link LayerA noise burst on the line can destroy a frame A noise burst on the line can destroy a frame completely. In this case, the data link layer software on completely. In this case, the data link layer software on the source machine can retransmit the frame.the source machine can retransmit the frame.However, multiple transmissions of the same frame However, multiple transmissions of the same frame introduce the possibility of duplicate frames. (if the introduce the possibility of duplicate frames. (if the acknowledgment frame from the receiver back to the acknowledgment frame from the receiver back to the sender was lost)sender was lost)It is up to this layer to It is up to this layer to solve the problems caused by solve the problems caused by damaged, lost and duplicate framesdamaged, lost and duplicate frames..Another issue that arises in the data link layer (and most Another issue that arises in the data link layer (and most higher layers as well) is how to keep a fast transmitter higher layers as well) is how to keep a fast transmitter from drowning a slow receiver in data. Some from drowning a slow receiver in data. Some traffic traffic regulation mechanismregulation mechanism must be employed to let the must be employed to let the transmitter know how much buffer space the receiver transmitter know how much buffer space the receiver has at the moment. Frequently, this flow regulation and has at the moment. Frequently, this flow regulation and error handling are integrated.error handling are integrated.If the line can be used to transmit data in both directions, If the line can be used to transmit data in both directions, this introduces a new complication that the data link this introduces a new complication that the data link layer software must deal with – acknowledgment frames layer software must deal with – acknowledgment frames from A -> B traffic compete for the use of the line with B from A -> B traffic compete for the use of the line with B -> A traffic.-> A traffic.

1111

OSI – The Network LayerOSI – The Network LayerA key design issue with the A key design issue with the network layernetwork layer is determining is determining how packets are routedhow packets are routed from source to destination. from source to destination.

Routes can be based on static tables that are “wired into” the Routes can be based on static tables that are “wired into” the network and rarely changed.network and rarely changed.

They can also be determined at the start of each conversation, They can also be determined at the start of each conversation, for example a terminal session.for example a terminal session.

Finally, the can be highly dynamic, being determined anew for Finally, the can be highly dynamic, being determined anew for each packet, to reflect the current network load.each packet, to reflect the current network load.

If too many packets are present in the communication If too many packets are present in the communication line at the same time, they will get in each other’s way, line at the same time, they will get in each other’s way, forming bottlenecks. The control of such congestion also forming bottlenecks. The control of such congestion also belongs to the network layer.belongs to the network layer.

There is often some accounting function built into the There is often some accounting function built into the network layer. At the very least, the software must count network layer. At the very least, the software must count how many packets or characters or bits are sent by each how many packets or characters or bits are sent by each customer, to produce billing information. When a packet customer, to produce billing information. When a packet crosses a national border, with different rates on each crosses a national border, with different rates on each side, the accounting can become complicated.side, the accounting can become complicated.

1212

OSI – The Network LayerOSI – The Network Layer

When a packet has to travel from one network to When a packet has to travel from one network to another to get to its destination, many problems can another to get to its destination, many problems can arise:arise:

The addressing used by the second network may be different The addressing used by the second network may be different from the first onefrom the first one

The second one may not accept the packet at all because it is The second one may not accept the packet at all because it is too largetoo large

The protocols may differ, and so onThe protocols may differ, and so on

It is up to the network layer to overcome all these It is up to the network layer to overcome all these problems to allow heterogeneous networks to be problems to allow heterogeneous networks to be interconnected.interconnected.

In broadcast networks, the routing problem is simple, so In broadcast networks, the routing problem is simple, so the network layer is often thin or even nonexistent.the network layer is often thin or even nonexistent.

1313

OSI – The Transport LayerOSI – The Transport LayerThe basic function of the The basic function of the transport layertransport layer is to accept data is to accept data from the session layer, from the session layer, split it up into smaller unitssplit it up into smaller units if need be, if need be, pass these to the network layerpass these to the network layer, and ensure that the pieces , and ensure that the pieces all arrive correctly at the other end. Furthermore, all this must all arrive correctly at the other end. Furthermore, all this must be done efficiently, and in a way that isolates the upper layers be done efficiently, and in a way that isolates the upper layers from the inevitable changes in the hardware technology.from the inevitable changes in the hardware technology.

Under normal conditions, the transport layer creates a distinct Under normal conditions, the transport layer creates a distinct network connection for each transport connection required by network connection for each transport connection required by the session layer. If the transport connection requires a high the session layer. If the transport connection requires a high throughput, however the transport layer might create multiple throughput, however the transport layer might create multiple network connections, dividing the data among the network network connections, dividing the data among the network connections to improve throughput. connections to improve throughput.

On the other hand, if creating or maintaining a network On the other hand, if creating or maintaining a network connection is expensive, the transport layer might multiplex connection is expensive, the transport layer might multiplex several transport connections onto the same network several transport connections onto the same network connection to reduce the cost. In all cases, the transport layer connection to reduce the cost. In all cases, the transport layer is required to make the multiplexing transparent to the is required to make the multiplexing transparent to the session layer.session layer.

1414

OSI – The Transport LayerOSI – The Transport Layer

The transport layer also determines what type of The transport layer also determines what type of service to provide the session layer, and service to provide the session layer, and ultimately, the users of the network: ultimately, the users of the network: The most popular type of transport connection is an The most popular type of transport connection is an

error-free point-to-point channel that delivers error-free point-to-point channel that delivers messages or bytes in the order in which they were messages or bytes in the order in which they were sent.sent.

However, other possible kinds of transport service However, other possible kinds of transport service are transport of isolated messages with no guarantee are transport of isolated messages with no guarantee about the order of delivery, andabout the order of delivery, and

broadcasting of messages to multiple destinations. broadcasting of messages to multiple destinations.

The type of service is determined when the The type of service is determined when the connection is established.connection is established.

1515

The transport layer is a The transport layer is a true end-to-end layertrue end-to-end layer, from source to , from source to destination. In other words, a program on the source machine destination. In other words, a program on the source machine carries on a conversation with a similar program on the carries on a conversation with a similar program on the destination machine, using the message headers and control destination machine, using the message headers and control messages. In the lower layers, the protocols are between each messages. In the lower layers, the protocols are between each machine and its immediate neighbors, and not by the ultimate machine and its immediate neighbors, and not by the ultimate source and destination machines (which may be separated by source and destination machines (which may be separated by many routers). The difference between layers 1 through 3, many routers). The difference between layers 1 through 3, which are chained, and 4 through 7, which are end-to-end, is which are chained, and 4 through 7, which are end-to-end, is illustrated in Fig. 4.illustrated in Fig. 4.

In addition to multiplexing several message streams onto one In addition to multiplexing several message streams onto one channel, the transport layer must take care of channel, the transport layer must take care of establishing and establishing and deleting connectionsdeleting connections across the network. This requires some across the network. This requires some kind of naming mechanism, so that a process on one machine kind of naming mechanism, so that a process on one machine has a way of describing with whom it wishes to converse.has a way of describing with whom it wishes to converse.

There must also be a mechanism to regulate the flow of There must also be a mechanism to regulate the flow of information, so that a fast host cannot overrun a slow one – information, so that a fast host cannot overrun a slow one – flow controlflow control..

OSI – The Transport LayerOSI – The Transport Layer

1616

OSI – The Session LayerOSI – The Session LayerThe The session layersession layer allows users on different machines to allows users on different machines to establish establish sessionssessions between them. between them. A session allows ordinary data transport, as does the A session allows ordinary data transport, as does the transport layer, but it also provides enhanced services transport layer, but it also provides enhanced services useful in some applications. A session might be used to useful in some applications. A session might be used to allow a user to allow a user to log inlog into a remote timesharing system or to a remote timesharing system or to to transfer a filetransfer a file between two machines. between two machines. One of the services of the session layer is to manage One of the services of the session layer is to manage dialogue controldialogue control. Session can allow traffic to go in both . Session can allow traffic to go in both directions at the same time, or in only one direction at a directions at the same time, or in only one direction at a time. If traffic goes one way only, the session layer can time. If traffic goes one way only, the session layer can help keep track of whose turn it is.help keep track of whose turn it is.A related session service is A related session service is token managementtoken management. For . For some protocols, it is essential that both sides do not some protocols, it is essential that both sides do not attempt the same operation at the same time. To attempt the same operation at the same time. To manage these activities tokens are exchanged. Only manage these activities tokens are exchanged. Only one side, holding the token, can perform the critical one side, holding the token, can perform the critical operation.operation.

1717

OSI – The Session LayerOSI – The Session LayerAnother session service is synchronization. Another session service is synchronization. Consider the problems that might occur when trying Consider the problems that might occur when trying

to do a 2-hour file transfer between two machines to do a 2-hour file transfer between two machines with 1-hour mean time between crashes. with 1-hour mean time between crashes.

After each transfer was aborted, the whole transfer After each transfer was aborted, the whole transfer would have to start over again and would probably would have to start over again and would probably fail again the next time as well.fail again the next time as well.

To eliminate this problem, the session layer To eliminate this problem, the session layer provides a way to insert checkpoints into the provides a way to insert checkpoints into the data stream so that after a crash, only the data data stream so that after a crash, only the data transferred after the last checkpoint have to be transferred after the last checkpoint have to be repeated.repeated.

1818

OSI – The Presentation LayerOSI – The Presentation LayerThe The presentation layerpresentation layer performs certain functions that performs certain functions that are requested sufficiently often to warrant finding a are requested sufficiently often to warrant finding a general solution for them, rather than letting each user general solution for them, rather than letting each user solve the problems.solve the problems.In particular, unlike all the lower layers, which are just In particular, unlike all the lower layers, which are just interested in moving bits reliably from here to there, the interested in moving bits reliably from here to there, the presentation layer is concerned with the presentation layer is concerned with the syntax and syntax and semantics of the informationsemantics of the information transmitted. transmitted.A typical example of a presentation service is A typical example of a presentation service is encoding encoding data in a standard agreed upon waydata in a standard agreed upon way. Most user . Most user programs do not exchange random binary bit srings. programs do not exchange random binary bit srings. They exchange thins such as people’s names, dates, They exchange thins such as people’s names, dates, amounts of money, and invoices. These items are amounts of money, and invoices. These items are represented as character strings, integers, floating-point represented as character strings, integers, floating-point numbers, and data structures composed of several numbers, and data structures composed of several simpler items. Computers may have different codes for simpler items. Computers may have different codes for representing characters strings (e.g. ASCII and representing characters strings (e.g. ASCII and Unicode), integers (one’s compliment, two’s Unicode), integers (one’s compliment, two’s compliment), and so on.compliment), and so on.

1919

OSI – The Presentation LayerOSI – The Presentation Layer

In order to make it possible for computers with In order to make it possible for computers with different representations to communicate, the different representations to communicate, the data structures to be exchanged can be defined data structures to be exchanged can be defined in an abstract way, along with a standard in an abstract way, along with a standard encoding to be used “on the wire”.encoding to be used “on the wire”.

The presentation layer manages these abstract The presentation layer manages these abstract data structures and converts from the data structures and converts from the representation used inside the computer to the representation used inside the computer to the network standard representation and back.network standard representation and back.

2020

OSI – The Application LayerOSI – The Application LayerThe application layer contains a variety of protocols that The application layer contains a variety of protocols that are commonly needed. are commonly needed. For example, there are hundreds of incompatible For example, there are hundreds of incompatible terminal types in the world. Consider a full screen editor terminal types in the world. Consider a full screen editor that is supposed to work over a network with many that is supposed to work over a network with many different terminal types (each may have different screen different terminal types (each may have different screen layouts, keys for inserting ad deleting text, moving the layouts, keys for inserting ad deleting text, moving the cursor, etc.)cursor, etc.)To handle each terminal type, a To handle each terminal type, a network virtual terminalnetwork virtual terminal can be written. Next, a piece of software must be written can be written. Next, a piece of software must be written to map the functions of the virtual network terminal onto to map the functions of the virtual network terminal onto the functions of the real terminal.the functions of the real terminal.Another application layer function is file transfer. If two Another application layer function is file transfer. If two machines have different files systems for example, the machines have different files systems for example, the files may have incompatible naming conventions, ways files may have incompatible naming conventions, ways to represent text lines, etc. Handling these to represent text lines, etc. Handling these incompatibilities belongs to the application layer.incompatibilities belongs to the application layer.As do: electronic mail, remote job entry, directory look As do: electronic mail, remote job entry, directory look up, data encryption, handling multimedia, etc.up, data encryption, handling multimedia, etc.

2121

OSI – The Application LayerOSI – The Application Layer

In summary: the application layer In summary: the application layer makes makes network services available to applicationsnetwork services available to applications (i.e. (i.e. programs)programs)

It also hides all other layers from programmers, It also hides all other layers from programmers, and and makes using a network application makes using a network application transparent to the usertransparent to the user

2222

ISO/OSI Reference ModelISO/OSI Reference Model

Bottom layersBottom layers Support for physical connectivity, frame formation, Support for physical connectivity, frame formation,

encoding, and signal transmissionencoding, and signal transmission

Middle layersMiddle layers Establish and maintain a communication session Establish and maintain a communication session

between two network nodesbetween two network nodes Monitor for error conditionsMonitor for error conditions

Uppermost layersUppermost layers Application/software support for interpretation, Application/software support for interpretation,

presentation, and encryption of datapresentation, and encryption of data

2323

Data Transmission in the OSI ModelData Transmission in the OSI Model

Fig. 2. An example of how the OSI model is used. Some of the headers may be null.

2424

Data Transmission in the OSI ModelData Transmission in the OSI Model

The sending process has some data it wants to send to The sending process has some data it wants to send to the receiving process. the receiving process. It gives the data to the application layers, which then It gives the data to the application layers, which then attaches the application header attaches the application header AHAH to the front of it and to the front of it and gives the resulting item to the presentation layer.gives the resulting item to the presentation layer.The presentation layer may transform this item in The presentation layer may transform this item in various ways, and possibly add a header to the front, various ways, and possibly add a header to the front, giving the result to the session layer. It is important to giving the result to the session layer. It is important to note that the presentation layer is not aware which note that the presentation layer is not aware which portion of the item is portion of the item is AHAH and which is user data. and which is user data.This process is repeated until the data reach the This process is repeated until the data reach the physical layer, where they are actually transmitted to the physical layer, where they are actually transmitted to the receiving machine. On that machine the various headers receiving machine. On that machine the various headers are stripped off one by one as the message propagates are stripped off one by one as the message propagates up the layers until it finally arrives at the receiving up the layers until it finally arrives at the receiving process (application).process (application).

2525

Data Transmission in the OSI ModelData Transmission in the OSI Model

The The key ideakey idea throughout is that throughout is that although actual data although actual data transmission is verticaltransmission is vertical in Fig. 2., in Fig. 2., each layer is each layer is programmed as though it were horizontalprogrammed as though it were horizontal. (each layer . (each layer thinks it is communicating directly (horizontally) with its thinks it is communicating directly (horizontally) with its peer on the other machine)peer on the other machine)

For example, when the sending transport layer gets a For example, when the sending transport layer gets a message from the session layer, it attaches a transport message from the session layer, it attaches a transport header (with information to be used by the receiving header (with information to be used by the receiving transport layer) and sends it to the receiving transport transport layer) and sends it to the receiving transport layer. From its point of view, the fact that it must actually layer. From its point of view, the fact that it must actually hand the message to the network layer on its own hand the message to the network layer on its own machine is an unimportant technicality. machine is an unimportant technicality.

2626

The TCP/IP Reference ModelThe TCP/IP Reference ModelLet us now turn from the OSI reference model to the Let us now turn from the OSI reference model to the reference model used in the grandparent of all computer reference model used in the grandparent of all computer networks, the ARPANET, and its successor, the networks, the ARPANET, and its successor, the worldwide Internet. worldwide Internet.

Although Although TCP/IP was originally intended for the TCP/IP was originally intended for the ARPANETARPANET, and currently used in the Internet, , and currently used in the Internet, it has it has become so popular that many local networks (LANs) are become so popular that many local networks (LANs) are using it as their protocols as wellusing it as their protocols as well. Thus, we would like to . Thus, we would like to review this model as well.review this model as well.

The ARPANET was a research network sponsored by The ARPANET was a research network sponsored by the DoD (U.S. Department of Defense). It eventually the DoD (U.S. Department of Defense). It eventually connected hundreds of universities and government connected hundreds of universities and government installations using leased telephone lines. When satellite installations using leased telephone lines. When satellite and radio networks were added later, the existing and radio networks were added later, the existing protocols had trouble internetworking with them, so a protocols had trouble internetworking with them, so a new reference architecture was needed. new reference architecture was needed.

2727

The TCP/IP Reference ModelThe TCP/IP Reference ModelThis architecture later became known as the This architecture later became known as the TCP/IP TCP/IP Reference modelReference model, after its two primary protocols. It was , after its two primary protocols. It was first defined in 1974, and updated in 1985 and 1988.first defined in 1974, and updated in 1985 and 1988.

Given the DoD’s worry that some of its precious hosts, Given the DoD’s worry that some of its precious hosts, routers, and internetworking gateways might get blown routers, and internetworking gateways might get blown to pieces at a moment’s notice, another major goal was to pieces at a moment’s notice, another major goal was that the network be able to survive loss of subnet that the network be able to survive loss of subnet hardware, with existing conversations not being broken hardware, with existing conversations not being broken off. off.

In other words, DoD wanted connections to remain In other words, DoD wanted connections to remain intact as long as the source and destination machines intact as long as the source and destination machines were functioning even if some of the machines or were functioning even if some of the machines or transmission lines in between were suddenly put out of transmission lines in between were suddenly put out of operation. Furthermore, a flexible architecture was operation. Furthermore, a flexible architecture was needed, since applications with divergent requirements needed, since applications with divergent requirements were envisioned, ranging from transferring files to real-were envisioned, ranging from transferring files to real-time speech transmission.time speech transmission.

2828

TCP/IP – The Internet LayerTCP/IP – The Internet LayerAll these requirements lead to the choice of a packet-All these requirements lead to the choice of a packet-switching network based on a connectionless switching network based on a connectionless internetwork layer. This layer, called the internetwork layer. This layer, called the internet layerinternet layer, is , is the glue that holds the whole architecture together.the glue that holds the whole architecture together.

Its job is to Its job is to permit hosts to inject packets into any permit hosts to inject packets into any networknetwork and have them and have them travel independently to the travel independently to the destinationdestination (potentially on a different network). They (potentially on a different network). They may even arrive in a different ordermay even arrive in a different order than they were sent, than they were sent, in which case it is the job of higher layers to rearrange in which case it is the job of higher layers to rearrange them, if in-order delivery is desired. them, if in-order delivery is desired.

Note that “internet” is used here in a generic sense, Note that “internet” is used here in a generic sense, even though this layer is present in the Internet.even though this layer is present in the Internet.

2929

TCP/IP – The Internet LayerTCP/IP – The Internet LayerThe analogy here is with the mail system. A person can The analogy here is with the mail system. A person can drop a sequence of international letters into a mail box in drop a sequence of international letters into a mail box in one country, and most of them will be delivered to the one country, and most of them will be delivered to the correct address in the destination country. Probably the correct address in the destination country. Probably the letters will travel through one or more international mail letters will travel through one or more international mail gateways along the way, but this is transparent to the gateways along the way, but this is transparent to the users. Furthermore, the letters may arrive out of order, users. Furthermore, the letters may arrive out of order, and each country (i.e. network) has its own stamps, and each country (i.e. network) has its own stamps, preferred envelope sizes, and delivery rules, which is preferred envelope sizes, and delivery rules, which is also hidden from the users.also hidden from the users.The internet layer The internet layer defines an official packet formatdefines an official packet format and and protocol called protocol called IP (Internet Protocol)IP (Internet Protocol). The job of the . The job of the internet layer is to deliver IP packets where they are internet layer is to deliver IP packets where they are supposed to go. Packet routing is clearly the major issue supposed to go. Packet routing is clearly the major issue here, as is avoiding congestion. For these reasons, we here, as is avoiding congestion. For these reasons, we can say that the TCP/IP internet layer is very similar to can say that the TCP/IP internet layer is very similar to the OSI network layer. Fig. 3. shows the the OSI network layer. Fig. 3. shows the correspondence.correspondence.

3030Fig. 3. The TCP/IP reference model

OSIOSI

77 ApplicationApplication

66 PresentationPresentation

55 SessionSession

44 TransportTransport

33 NetworkNetwork

22 Data LinkData Link

11 PhysicalPhysical

TCP/IPTCP/IP

ApplicationApplication

TransportTransport

InternetInternet

Host-to-networkHost-to-network

TCP/IP – The Internet LayerTCP/IP – The Internet Layer

3131

TCP/IP – The Transport LayerTCP/IP – The Transport Layer

The layer above the internet layer in the TCP/IP model The layer above the internet layer in the TCP/IP model is now usually called the transport layer. is now usually called the transport layer.

It is designed to allow peer entities on the source and It is designed to allow peer entities on the source and destination hosts to carry on a conversation, the same destination hosts to carry on a conversation, the same as the OSI transport layer. as the OSI transport layer.

Two end-to-end protocols have been defined here:Two end-to-end protocols have been defined here:1.1. TCP (Transmission Control Protocol)TCP (Transmission Control Protocol) is a reliable connection- is a reliable connection-

oriented protocol that allows a byte stream originating on one oriented protocol that allows a byte stream originating on one machine to be delivered without errors on any other machine machine to be delivered without errors on any other machine in the internet. It fragments the incoming byte stream into in the internet. It fragments the incoming byte stream into discrete messages and passes each one onto the internet discrete messages and passes each one onto the internet layer. At the destination, the receiving TCP process layer. At the destination, the receiving TCP process reassembles the received messages into the output stream. reassembles the received messages into the output stream. TCP also handles flow control to make sure a fast sender TCP also handles flow control to make sure a fast sender cannot swamp a slow receiver with more messages than it cannot swamp a slow receiver with more messages than it can handle.can handle.

3232

TCP/IP – The Transport LayerTCP/IP – The Transport Layer2.2. UDP (User Datagram Protocol)UDP (User Datagram Protocol) is an unreliable, is an unreliable,

connectionless protocol for applications that do not want connectionless protocol for applications that do not want TCP’s sequencing or flow control and wish to provide their TCP’s sequencing or flow control and wish to provide their own. It is also widely used for one-shot, client-server type own. It is also widely used for one-shot, client-server type request-reply queries and applications in which fast delivery is request-reply queries and applications in which fast delivery is more important than accurate delivery, such as transmitting more important than accurate delivery, such as transmitting speech or video. speech or video.

The relation of IP, TCP and UDP is shown on Fig. 4. Since this The relation of IP, TCP and UDP is shown on Fig. 4. Since this model was developed, IP has been implemented on many other model was developed, IP has been implemented on many other networks. networks.

Fig. 4. Protocols and networks in the TCP/IP model initially.

3333

TCP/IP – The Application LayerTCP/IP – The Application Layer

The TCP/IP model does not have session or The TCP/IP model does not have session or presentation layers. No need for them was perceived, presentation layers. No need for them was perceived, so they were not included. Experience with the OSI so they were not included. Experience with the OSI model has proven this view correct: they are of little model has proven this view correct: they are of little use to most applications. use to most applications.

On top of the transport layer is the application layer. It On top of the transport layer is the application layer. It contains all the higher-level protocols. The early ones , contains all the higher-level protocols. The early ones , included:included:

virtual terminal (TELNET) – allows a user on one machine to virtual terminal (TELNET) – allows a user on one machine to log into a distant machine and work therelog into a distant machine and work there

file transfer (FTP) and – provides a way to move data file transfer (FTP) and – provides a way to move data efficiently from one machine to anotherefficiently from one machine to another

electronic mail (SMTP) electronic mail (SMTP)

3434

TCP/IP – The Application LayerTCP/IP – The Application Layer

Many other protocols have been added to these over Many other protocols have been added to these over the years, such as: the years, such as:

the DNS (Domain Name Service) – for mapping host names the DNS (Domain Name Service) – for mapping host names onto their network addressesonto their network addresses

NNTP (Network News Transfer Protocol) – for moving news NNTP (Network News Transfer Protocol) – for moving news articles aroundarticles around

HTTP (HyperText Transfer Protocol) – used for fetching HTTP (HyperText Transfer Protocol) – used for fetching pages on the World Wide Web, and many otherspages on the World Wide Web, and many others

3535

A comparison of OSI and TCP/IPA comparison of OSI and TCP/IP

The OSI and TCP/IP reference models have much in The OSI and TCP/IP reference models have much in common. Both are based on the concept of a stack of common. Both are based on the concept of a stack of independent protocols. Also, the functionality of the independent protocols. Also, the functionality of the layers is roughly similar.layers is roughly similar.Despite the fundamental similarities, the two models Despite the fundamental similarities, the two models also have many differences. also have many differences. Probably the Probably the biggest contribution of the OSI modelbiggest contribution of the OSI model is is to make the distinction between the to make the distinction between the ServicesServices, , InterfacesInterfaces, and , and ProtocolsProtocols explicit. explicit.These These ideas fit very nicely with modern ideas about ideas fit very nicely with modern ideas about object-oriented programmingobject-oriented programming. An object, like a layer, . An object, like a layer, has a set of methods (operations) that can be invoked has a set of methods (operations) that can be invoked outside the object. The semantics of these methods outside the object. The semantics of these methods define the set of services that the object offers. The define the set of services that the object offers. The methods’ parameters and results from the object's methods’ parameters and results from the object's interface. The code internal to the object is its protocol interface. The code internal to the object is its protocol and is not visible or of any concern outside the object.and is not visible or of any concern outside the object.

3636

A comparison of OSI and TCP/IPA comparison of OSI and TCP/IP

The OSI reference model was devised The OSI reference model was devised beforebefore the protocols were invented. the protocols were invented.

With the TCP/IP the reverse is true: the With the TCP/IP the reverse is true: the protocols came first, and the model was really protocols came first, and the model was really just a description of the existing protocols. just a description of the existing protocols. There was no problem with the protocols fitting There was no problem with the protocols fitting the model: they fit perfectly. The only trouble the model: they fit perfectly. The only trouble was that the was that the modelmodel did not fit any other did not fit any other protocol stacks. protocol stacks.

3737

A comparison of OSI and TCP/IPA comparison of OSI and TCP/IP

In summary: In summary:

despite its problems, the OSI despite its problems, the OSI modelmodel (minus the (minus the session and presentation layers) has proven to be session and presentation layers) has proven to be exceptionally useful for discussing computer networks. exceptionally useful for discussing computer networks. In contrast, the OSI In contrast, the OSI protocolsprotocols have not become have not become popular.popular.

The opposite is true for TCP/IP: the The opposite is true for TCP/IP: the modelmodel is is practically nonexistent, but the practically nonexistent, but the protocolsprotocols are widely are widely used. used.

Therefore, we would like to think of a modified OSI Therefore, we would like to think of a modified OSI model and concentrate on the TCP/IP and related model and concentrate on the TCP/IP and related protocols and use a hybrid model, shown on Fig. 5. , protocols and use a hybrid model, shown on Fig. 5. , as a framework.as a framework.

3838

A hybrid modelA hybrid model

Fig. 5. The hybrid reference model

hybridhybrid

55 ApplicationApplication

44 TransportTransport

33 NetworkNetwork

22 Data LinkData Link

11 PhysicalPhysical