The OSI model defined by the ISO is a way to layer network communication operations. This standard was defined in the 1970's and provides application vendors with a common way to develop network communication packages.


OSI model contains seven layers, divided into two groups. The top three layers define how end stations communicate with one-another. The bottom four layers are concerned with transferring data from one station to another. The seven layers are:

1. physical
2. datalink
3. network
4. transport
5. session
6. presentation
7. application




Physical:
***************************************************
The physical layer defines voltages, frequencies, shapes and/or pin outs of connectors and network cards. When this layer receives data from the upper layers it performs signal encoding, allowing for transfer along the physical medium (ones and zeros of the data are converted electrical pulses on-off).

Physical layer also defines the physical topology of the network:
- bus
- star
- ring
- mesh

EXAMPLES:
- 10baseT
- 100baseT
- fiber optic
- RS-232
- SCSI





data link:
***************************************************
The data-link layer is made up of two sublayers:
- LLC logical link control 802.2
- MAC media access control 802.3, 802.4, 802.4 (varies for different media access types)

LLC:
The LLC header encapsulates the 802.3 frame providing identification of network layer type. This is accomplished by adding two fields called SSAP and DSAP (each of which is 1-byte). Contained in each of the two fields is an LSAP, which is a hex formatted number specific to a network-layer protocol.

Also, provided at the LLC sublayer are mechanisms for reliable delivery between and flow-control. There are three LLC service types and are identified within the "control field" immediately following the DSAP and SSAP fields. The three LLC service types are:

type 1:
Unacknowledged connectionless service simply allowing sending and receiving of LLC-PDU's

type2:
Connection oriented service allowing two nodes to set up a logical LLC connection. This type of service supports flow control, packet sequencing, and error correction.

type3:
This is a connectionless service like type1, but provides for ack that data has been received



MAC:
The MAC sublayer is responsible for node identification; media access methods, breaking data into frames, and logical network topology.

- node identification is done by an addressing scheme
- media access defines the way frames access the physical media
- the media access type defines frame structure
the more common media access types are 802.3, 802.4, 802.5, 802.12 demand priority, token, and CSMA/CD



- hubs and switches operate at the data-link
- the datalink layer provides error free data-delivery from system to system along the physical network.

EXAMPLES:
- ODI
- NDIS
- Ethernet
- Token Ring
- Demand Priority
- PPP
- Frame Relay



Network:
***************************************************
The network layer is responsible for forwarding packets to devices that do not reside on the local network. Just as the datalink layer provides host-host communications the network layer provides network-network communications. Network layer protocols provide addressing schemes to route remote data. Because each packet is addressed to a specific host a translation from IP to MAC addresses is provided for with ARP.

Also, the network layer will break large datagrams exceeding the MTU. The receiving host then reassembles these fragments.


EXAMPLES:
- routers
- IP
- IPX
- NetBeui
- OSPF
- RIP
- ARP
- RARP



Transport:
***************************************************
Transport layer ensures packets are delivered error free, in sequence, and with no loss or duplication (reliability).

Becuase reliability is a key factor at this layer connection oriented data-exchanges are used (for the most part anyway; UDP). Connections are established by setting up and releasing virtual circuits (logical connections) from host to host. Before any data is exchanged each end system must agree on the connection and inform the o/s that the connection is to be setup. Once connection negotiations are complete the data-exchange can begin.

The most popular protocol to service this layer is TCP of the DOD specification. TCP uses a process called windowing for reliable data delivery. The DOD spec also defines UDP, which provides a lower overhead as a compromise to the more robust correction facilities of TCP.


Multiplexing and demultiplexing allow different application data to share the same transport stream.




EXAMPLES:
- TCP
- UDP
- SPX
- NetBios




Session:
***************************************************
The session layer manages interaction between application processes. It defines whether interactions are simplex, half duplex or full duplex. Included at this layer are checkpointing, session terminating and restarting procedures.

Also, this layer keeps different data streams organized. For example, provides the ability to download multiple files from the same host using the same FTP client. This layer provides authentication as well.


In reality this layer is not used much accept to synchronize data streams.



EXAMPLES:
- Apple talk session protocol
- Data Link Control
- NWLINK
- sql? (according to cisco)




Presentation:
***************************************************
Protocols at the presentation layer are part of the operating system. Network redirectors reside at this layer.


The various coding and conversion processes allow data to be transferred and usable on all different system types despite different encoding schemes. The presentation layer provides:
- common data representation formats (mpeg,jpeg,gif,tiff,pict)
- conversion of character sets such as ascii to ebcdic
- converts and decodes network and application data
- performs encryption and compression



EXAMPLES:
- pop/smtp
- usenet
- http/html
- ftp
- telnet
- dns
- snmp
- nfs
- asn.1



Application:
***************************************************
Network-aware applications make up the application layer. Provided for these applications are user interfaces and various application features. Most of these network aware applications work on a client-server model where the network applications obtain access to network resources (as input by the user).

Also, this layer is responsible for displaying data and images in a format the user can understand. The application layers job is to organize and display data in a human compatible format, and to interface with the Presentation layer.


The two main types of application-layer implementations are TCP/IP applications and OSI applications.