Anda di halaman 1dari 10

OSI Model The OSI Model is a theoretical, seven-layered model of how networks work.

The Open Systems Interconnect Model (the OSI Model) is a theoretical model of networking that organizes network functions into seven layers (physical layer, datalink layer, network layer, transport layer, session layer, presentation layer and application layer) and specifies the communication interfaces between the OSI Model's layers and between network endpoints utilizing an OSI Model-based protocol suite.

The OSI Model is a way of thinking about how networks 'work' THEORY: The OSI Model is a theoretical model o The OSI Model is not a technology. o The OSI Model is not a protocol. o The OSI Model is not a program or software. LAYERS: o The OSI Model sorts network communication functions into seven layers o Layer functions are not specified and should be transparent to other layers. o Layer Communications (how layers communcate with each other) ARE specified in the model o Layer behavior should be invisible other layers

The OSI Model was developed as the ISO designed their own suite of networking protocols (the ISO OSI Protocol Suite). The OSI Model is always in the middle of any discussions of networking and network and sometimes computer troubleshooting. The OSI model is used so commonly as a point of reference that you really should learn the OSI Model's seven layers and learn how the OSI Model explains this layered approach to networking. Engineers working on a network problem will frequently say "Well, it's a data link layer problem", clearly referring to the data link layer of the OSI Model and more specifically, the physical network connection, not the networking software or the applications. The OSI Model's layers are so well known that they are referred to by number: "Well, looks like we have a layer 2 problem here". If you don't know the OSI Model, you will have great difficulties as a network engineer, or even talking to one. The International Standards Organization (ISO) developed a theoretical model of how networks should behave and how they are put together. This model is called the Open Standards Interconnect (OSI) Model. The "ISO OSI Model" was developed because it appeared that IBM was going to patent the design of their SNA networks so that no one else could use IBM's design model for networking. The ISO OSI model is used throughout the network, internet and telecom industries today to describe various networking issues. The OSI model is also of use in a learning or training environment where a novice can use it as a point of reference to learn how various technologies interact, where they reside, what functions they perform and how each protocol communicates with other protocols. Don't worry about memorizing the OSI Model just yet, you'll run into the OSI Model of networking over and over again in all the tutorials on this site (including this OSI Model tutorial)-all of which link back to this OSI Model tutorial whenever they use these terms, you're going to see it so often, you may end up memorizing it without trying... A Layered Approach to Networking

Like IBM's SNA, the OSI model was also designed with seven layers:

Application Presentation Session Transport Network Data Link Physical

Please keep in mind that the organization and functions of the OSI layers differed significantly from those of IBM's SNA. The layers were designed so that specific functions (such as ARP) would be contained at specific layers (ARP is a Data Link layer function) and the interface between functions would be specified at the boundaries between layers. All that this really means that an application should not have to know anything about the hardware in order to send or receive data over a network connection and that the hardware shouldn't Application have to know what application is running in order to send it data from the Presentation network.
APPLICATION LAYER Session Transport Network Data Link Physical

The OSI model defines the application layer as being the user interface. The OSI application layer is responsible for displaying data and images to the user in a human-recognizable format and to interface with the presentation layer below it. Examples of applications that utilize the network are:

Telnet FTP Instant Message software (AIM, MSN, ICQ, Yahoo) Microsoft Windows File Shares Web Browsers (Internet Explorer, Firefox, Google Chrome, Safari) Network games of Doom, Quake, Unreal (first-person 3D shooter video games) IRC (mIRC)

Application Presentatio n PRESENTATION LAYER Session Transport Network Data Link Physical

The presentation layer handles the conversion of data between a Standards-based or platform independent formats to a format understood by the local machine. This allows for data to be transported between devices and still be understood.

The presentation layer performs the folowing functions:


1. Communication with the application layer above. 2. Translation of data conforming to cross-platform standards into formats understood by the local machine. 3. Communication with the session layer below. Examples of Presentation Layer Functions

Conversion of Conversion of Conversion of Conversion of

a Sun .RAS raster graphic to JPG. ASCII to IBM EBCDIC .PICT on a MAC to .jpg .wav to .mp3

Application Presentation Session Transport Network Data Link Physical

SESSION LAYER

The session layer tracks connections, also called sessions. The session layer should keep track of multiple file downloads requested by a particiular FTP application, or multiple telnet connections from a single terminal client, or web page retrievals from a web server. With TCP/IP this functionality is handled by application software addressing a connection to a remote machine and using a different local port number for each connection. The session layer performs the following functions:

1. Communication with the Presentation layer above. 2. Organize and manage one or more connections per application, between hosts. 3. Communication with the Transport layer below. EXAMPLE

Sessions are used to keep track of individual connections to remote servers. Your web browser is an excellent example of the use of sessions. Your web browser (an application layer object) opens a web page. That page contains text, graphics, Macromedia Flash objects and perhaps a Java applet. The graphics, the Flash object and the Java applet are all stored as separate files on the web server. To access them, a separate download must be started. Your web browser opens a separate session to the web server to download each of the individual files. The session layer keeps track of which packets and data belong to which file and keeps track of where they go (in this case, to your web browser). In most modern Internet applications, the session, presentation and application layers are usually rolled together inside the application itself, thus, your web browser performs all functions of the session, presentation and application layers.

Application TRANSPORT LAYER Presentation Session Transport Network Data Link Physical

If networking software performs reliable data tranfer functions, then the detection of errors, and retransmission of data to recover those errors or lost data will occur in software managing this layer. The transport layer may use a variety of techniques such as a Cyclic Redundancy Check, windowing and acknowledgements. If data is lost or damaged it is the transport layer's responsibility to recover from that error.
1. Communicate with the Session layer above. 2. Reassemble transport Protocol Data Units into data streams 3. Reliable protocols operating at this layer will o Detect errors and lost data o Recover lost data o Manage retransmission of data. 4. Segmentation of data streams into transport Protocol Data Units. 5. Communicate with the Network layer below.

Examples of transport layer protocols include:


Application

Transmission Control Protocol (Reliable) User Datagram Protocol (Unreliable)

Presentation Session Transport Network Data Link Physical

NETWORK LAYER

It is the network layer's job to figure out the network topology, handle routing and to prepare data for transmission. The network layer is concerned with the following primary functions:
1. Communication with the Transport layer above. 2. Encapsulation of Transport data into Network layer Protocol Data Units. 3. Management of connectivity and routing between hosts or networks. 4. Communication with the data link layer below.

Examples of network layer protocols include:


Internet Protocol Internet Control Message Protocol (ICMP or "ping") Internet Gateway Management Protocol (IGMP), IPX/SPX

Application Presentation Session Transport Network Data Link Physical

DATA LINK LAYER

The data link Layer is the second layer of the OSI model. The data link layer performs various functions depending upon the hardware protocol used, but has four primary functions:
1. COMMUNICATION with the Network layer above.

2. SEGMENTATION of upper layer datagrams (also called packets) into frames in sizes that can be handled by the communications hardware. 3. BIT ORDERING. The data link layer organizes the pattern of data bits into frames before transmission. The frame formatting issues such as stop and start bits, bit order, parity and other functions are handled here. Management of bigendian / little-endian issues are also managed at this layer. 4. COMMUNICATION with the Physical layer below

This layer provides reliable transit of data across a physical link. The data link layer is concerned with physical addressing, network topology, physical link management, error notification, ordered delivery of frames, and flow control. It should be noted that in most modern network interface adaptors, the Physical and Datalink functions are performed by the network interface adaptor.
EXAMPLE

Ethernet Network Adaptors uses a Media Access Control (MAC) address, which is a physical address that (somewhat) uniquely identifies a network card to the physical network. The Ethernet Adaptor's primary job at the data link layer is to transmit Ethernet frames onto the wire. It places its own MAC address in the frame, followed by the destination MAC address to which it wishes to communicate, sets various other values in the Ethernet frame (protocol type etc.) and then transmits on the wire. The CSMA/CD protocol that Ethernet uses to control access to the common network bus could be said to occur at the data link layer of the OSI model or could Application also be called a data link function.
Presentation Physical Layer Session Transport Network Data Link

The OSI Model's layer 1, the Physical Layer, outlines the characteristics of the physical medium between networked devices--cabling, wiring, fiber strands and the air. Transmission and receipt of data from the physical medium (copper wire, fiber, radio frequencies, barbed wire, string etc.) is managed at this layer.

The Physical Layer receives data from the data link Layer, and transmits it to the wire. The physical layer controls the electrical and mechanical functions related to the transmission and receipt of a communications signal. It also manages the encoding and decoding of data contained within the modulated signal.

Physical

Note that for two devices to communicate, they must beconnected to the same type of physical medium (wiring). 802.3 Ethernet to 802.3 Ethernet, FDDI to FDDI, serial to serial etc. Two end stations using different protocols can only communicate through a multi-protocol bridge or a router. The physical layer is responsible for two jobs:

1. 2. 3. 4.

Communication with the data link layer above it. Fragmentation of data into frames Reassembly of frames into data link Protocol Data Units. Transmission and reciept of data.

It should be noted that in most modern network interface adaptors, the physical and data link functions are performed by the adaptor.
Example Physical Protocols

CSMA/CD - Carrier Sense Multipl Access / Collision Detect CSMA/CA - Carrier Sense Multiple Access / Collision Avoid FDMA - Frequency Division Multiple Access MSK - Minimum Shift Keying GFMSK - Gaussian-Fitered Minimum Shift Keying TDMA - Time Division Multiple Access CDMA - Code Division Multiple Access B8ZS - Binary 8 Zero Substitution 2B1Q - 2 Binary 1 Quaternary PCM - Pulse Code Modulation QAM - Quadrature Amplitude Modulation PSK - Phase Shift Keying

How the OSI Model works Real World Example

Due to popular demand, InetDaemon has written an operational example of how the OSI model can be used to describe what happens when you browse a web page on a web site. This page you are reading is stored on our website and you are most probably using a web browser to read this. We will use the OSI model to describe what happens when you click a link in a web page in your web browser and what happens as the web server receives, processes and responds to your request. This example assumes that you are on a local area network and that you are using an Ethernet card to communicate with the network. If you're on a dial-up modem, it will work a little differently from the data link layer down. Modem communication is a bit more complicated. We won't cover that here.

LAYER APPLICATION

EXAMPLE Web Browser

FUNCTION/ACTIVITY

A web browser such as Internet Explorer or Netscape provides the means for your computer to contact a web server

and download several files that go together to produce a single web page. You can request a web page by typing in a web address (a URL) or by clicking a link in an open web page. The web browser is an APPLICATION. The web browser application gives you the means to select a web server, contact the server and request a web page. The web browser handles the process of finding the web server (the remote computer that has the web page you want stored on it) , requesting the desired web page and displaying all the files contained within the web page. The web browser handles PRESENTATION of the web page to the user by converting the files stored at the web server into formats used to display them on your computer. Your web browser supports varous text formats (UNICODE and ASCII), image file formats (JPG, GIF, PNG, BMP), audio file formats (WAV, MP3, AIFF) as well as Hypertext Markup Language (HTML) and one or more scripting languages (JavaScript, JScript, VBScript). Conversion of data from one format to another is the job of the PRESENTATION layer. A web browser can convert these file formats into the local formats used on the local computer for displaying images, playing sounds and displaying text; if it cannot, it often can launch an application which does understand the format. Much of the PRESENTATION layer conversions are handled in the program you're running. When you request a web page, a the web browser opens a TCP connection to the web server. The web server sends back the web page and closes the connection. Your web browser then parses the HTML of the web page. Within the web page are instructions written in HTML tags which tell the browser where to find additional files to be displayed within the web page such as style sheets, sound files, images, movies, Flash files and applets. Your web browser automatically opens additional TCP connections to the web server. Each TCP connection is a SESSION. To communicate with a web server your computer must open a TCP connection to the web server and request a web page. The TCP connection breaks up theweb page into managable chunks, lables them with numbers so they can be reassembled in the correct order and TRANSPORTS the pieces across the correct SESSION.

PRESENTATIO N

HTTP

SESSION

TRANSPORT

TCP

NETWORK

IP ARP

Internet Protocol (IP) is a NETWORK layer protocol that uses unique addresses for the web server and for your computer. IP provides the means for your computer to determine whether the web server is a local computer or a computer located somewhere on the Internet. To reach a web server on the Internet, IP protocol also allows your computer to figure out how to reach the Internet web server via your default gateway. Your computer creates a message addressed to the web server with your computer's return IP address. Your computer uses ARP to figure out the physical MAC address of the default gateway and then passes the data to the NETWORK layer. Once the request from your web browser has been created it is sent to the network card. Once it reaches your network card it must be converted into a message that is sent from your computer to the default gateway which will forward the message to the Internet. At the DATA LINK layer, the web request is inserted inside a network request to the default gateway. The physical layer provides the means to transmit the web page request to the default gateway.

DATA LINK

PHYSICAL

E T H E R N E T

LLC

MAC

CSMA/C D

Keep in mind that this entire system didn't spring into existence in a day, it took decades for dozens of developments to come together to make the process of requesting, retreiving, delivering and displaying web pages possible.

OSI Model vs. Internet Model (TCP/IP Model)

When you describe the way the Internet works, you don't always see all seven layers of the OSI Model as separate layers. The OSI Model is a seven layer design model and the Internet only needs a four layer model to describe how it works. If you haven't already read the OSI Model tutorial, you should go back and look at it now.

The Internet only utilizes a few of the OSI Model's seven layers. Functionality of other layers is combined in some cases or not used at all. For example, the network interface device is said to compose the Physical and Data Link layers of the OSI Model, while a web browser performs the functions of the OSI Model's Session, Presentation and Application layers.

Telnet likewise handles Session, Presentation and Application issues. A web browser or a telnet session utilize IP addresses to reach the computer they are communicating with. Every device that communicate with a local network will use a MAC address that is unique on that LAN (but only if the computing device is using an 802.x protocol). IP addresses are mapped to specific MAC addresses on a local LAN.

At each layer, information unique to that layer is used to identify the specific computer and specific service that is being communicated with.

OSI Model (7 layers) Layer Name Application Presentation Session Transport Network Data Link Physical

Internet Model Layer Name Protocol Address Telnet hostname Application E-mail User@domain Web Browser URL Transmission Control Protocol Transport or Port Numbers User Datagram Protocol Network Interrnet Protocol IP Address Data Link Network Interface MAC Address Physical Device

OSI Protocol Suite


Just to confuse things, The ISO also outlined a suite of protocols they called "OSI". This suite was based on the ISO's OSI Design Model. Don't confuse the OSI protocols with the OSI MODEL. Just learn the OSI Model as shown in this tutorial. Very few organizations use the OSI protocol suite today. Why should you be aware of the ISO's OSI Protocol suite? Around 1984-5 certain people in the government started to see that network integration could be very powerful. When these government people turned to their technical people and asked them what they should do, the technical people told them to use something that follows the OSI Model to ensure that there are no problems with integration. The Government people took the words OSI and integration and turned it into a buzzword. The government next set about making sure a suite of protocols that exactly conformed to the OSI model was created. The government set the National Institute of Standards and Technology (NIST) to work writing a document outlining a government standard called the Government Open Standards Interconnect Profile or GOSIP.

Government Open Standards Interconnect Profile (GOSIP)


THE FEDERAL INFORMATION PROCESSING STANDARD (FIPS) #146: Government Open Systems Interconnection Profile (GOSIP) National Institute of Standards and Technology (NIST), 1990 In 1990, NIST released a document called The Federal Information Processing Standard (FIPS #146) which outlined the GOSIP. All vendors were asked to comply with government offices implementing this profile starting around August of 1990. Unfortunately, by the time the Government got around to 'standardizing' and 'implementing the GOSIP standard' the Internet had already fully implemented TCP/IP as its own standard and was using it exclusively. TCP/IP and GOSIP were NOT compatible. The government, caught with a technology that no longer matched the de-facto standard used on the Internet then mandated that the IETF and the IAB make the Internet compatible with GOSIP even though the OSI GOSIP software was not yet finished and not fully standardized even by 1990 when the FIPS #146 document was published. If you take a look at the NIST website today, you will see that FIPS 146 / GOSIP is no longer listed, a legacy of a bygone era. Why do we bring up GOSIP? Because when dealing with old, crusty government and military networking folks, you will hear references to the OSI protocols, FIPS 146 and GOSIP, because it takes a looong, loooooongg time for government programs and protocols to die. Fortunately, most government offices have now fully embraced the TCP/IP suite.