OSI-Protocols and Oracle Net Services Architecture


The Open Systems Interconnection (OSI) Model

Distributed processing implies the ability for computers to communicate directly with each other over a network of nodes. This communication is enabled by a process of stack communications. The OSI model or Open Systems Interconnection model was developed by ISO. OSI is a networking architecture framework for stack communications over a network. OSI has seven layers as shown in the diagram below. Note that each layer services the layer above and uses the layer below.

OSI (Open Systems Interconnection model)

  1. Application Layer - provision to applications with network access and user service. Examples include print spooling, email programs such as sendmail, database communications software such as Net8 or any applications software requiring network connectivity.

  2. Presentation Layer - formatting between application layer above and session layer below, ie. character and data-type conversion by Two-Task and SQL-PL/SQL by processing by OCI on the client node or OCP on the server. The presentation should effectively translate multiple data formats perhaps into a common format understood by both nodes in a communication.

  3. Session Layer - network session creation, management and termination. Communication between Oracle software on client and server nodes. The session layer is a pipe carrying traffic and is either synchronous or asynchronous, ie. one direction at once or both directions simultaneously respectively.

  4. Transport Layer - inter-nodal packet transfer reliability and network routing using connection string translation to network service names plus authentication ans security.

  5. Network Layer - addressing and routing information provision between or within networks, ie. the Transparent Network Substrate (TNS) with respect to Oracle.

  6. Data-Link Layer - creates network session packaging data into frames; synchronisation, error checking and data flow control. This is the protocol adaption layer in Oracle.

  7. Physical Layer - hardware definition, physical, electrical/mechanical link between nodes, ie. the network protocol such as TCP/IP. Data transferred in packages as a serial stream of bits over network cables. This level deals with connectors, signalling, media sharing, etc.

Protocols

A protocol is an agreement made between different nodes in a network as to how data is to be transferred. Protocols are standards including syntax (grammatical correctness), semantics (meaning - implied or inferred) and timing. Syntax defines signal level use. Semantics defines data structure for common interpretation between nodes. Timing defines ordering of data plus speed synchronisation between different machines.

TCP/IP [SSL] (Transmission Control Protocol/Internet Protocol

The most popular protocol in use for the Internet is TCP/IP, the Internet Reference Model or standard Ethernet protocol for use on client-server networks. The TCP/IP model has four distinct layers for communication across networks and the internet. TCP/IP generally uses what is known as an IP-Address, a sequence of four numbers (215.123.456.100) to address machines on a network.

  1. Application Layer - combination of OSI model application and presentation layers.

  2. Transport Layer - combination of OSI model session and transport layers. Establishment of virtual circuit connection plus reliable inter-node datagram packet delivery where packets hold header, data and trailer information.

  3. Internetworking Layer - protocols to route messages from sender to receiver, routers and gateways used to move datagram packets between nodes and across the internet. Cisco is all about routers, fire-walls, etc. When connecting to an IP-Address a session typically connects to a fire-wall router. The fire-wall router then re-routes the connection somewhere else within the network behind the firewall. Obviously since OSI was devised prior to the advent of the internet there is no OSI equivalent layer of the Internetworking Layer.

  4. Network Access Layer - combination of OSI model network and data-link layers. Protocols defining how frames are sent and received. Uses network adapter card hard-wired addresses to communicate with hardware.

An extension to the TCP/IP protocol is the TCP/IP protocol with SSL (Secure Sockets Layer). The Secure Sockets Layer stores certificates and private keys for authentication purposes, In the case of Oracle these strings are stored in a thing called an Oracle Wallet. SSL basically performs what in networking jargon is called a handshake. The handshake takes place between two nodes therebye validating certificates between two network nodes. Different encryption and decryption methods apply. Obviously two nodes talking to each other have to use the same encryption method. Private keys and certificates can be sent both directions by both client and server type machines. The idea is not only to validate a key but that a key belongs to a particular user and/or a particular client machine.

SPX (Sequence Packet Exchange Protocol)

SPX applies to Novell Netware networking environments.

Named Pipes

Named Pipes provide high-level interprocess communication between client and server machines in distributed environments. A client-server network is effectively a distributed processing environment. The server generally opens a pipe where the client process can access the pipe by name. A Named Pipe is a more direct connection between client and server machines where whatever one node writes to the pipe the other side can read. Local area networks (LANs) benefit from the use of Named Pipes.

LU6.2 (Logical Unit Type 6.2)

LU6.2 is an IBM APPC (Advanced Program to Program Communication) protocol, part of the IBM SNA (System Network Architecture) networking environment. APPC is what is known as a peer-to-peer type of networking architecture where both client and server machines can initiate connections, not just at the behest of the server machine.

Bequeath

A Bequeath protocol is utilised where client and server processes exist on the same machine. With respect to Oracle the Bequeath protocol does not connect a client process to the database through the listener or a naming method. For instance, when execution of svrmgrl on the Oracle database server machine and issuing the connect internal command; assuming of course the Oracle passwords file exists and appropriate parameters are set.

Oracle's Version of OSI

Oracle has both client-side and server-side stack communication protocols. There are other protocol models for LDAP Directory servers, JDBC clients and JServer clients. Oracle client and server-side stack communications are as in the diagram as shown below. The Net8 side of the client network configuration resides in the tnsnames.ora file; the Transparent Network Substrate, or TNS.

Oracle Net8 OSI Equivalent

Client Stack

Client Application and Oracle Call Interface (OCI) Layer

Application database requests are passed to the OCI. The OCI defines server calls by doing SQL syntax parsing and validation, opening SQL cursors, variable binding into server memory, executing SQL statements, fetching of rows and closing cursors. OCI calls can pass messages to the server one at a time or in bundles of multiple messages (stored procedures). Bundles of multiple messages passed to the server minimises network traffic by sending a procedure call, executing many commands on the server, and passing back the result. Network traffic is generally much slower than the client or server machines in terms of processing/transfer speed. Thus minimising network traffic is expedient.

Server Stack

Oracle Server and Oracle Programming Interface (OPI) Layer

The OPI is exactly the same as the client stack OCI except that the OPI functions by responding to messages sent by the OSI. The Oracle Server processes requests, executes SQL statements and passes results back to the OPI. The OPI will then format and return results to the client node.

Two-Task Common Layer

The OSI presentation layer is represented by the TTC layer. The TTC layer performs character set and data type conversions between multi-formatted nodes.

Net8 Layer

Net8 represents the OSI session and transport layers. Net8 maintains connectivity between nodes plus passes messages between those nodes. Net8 has three sub-layers, NI and NS (OSI session layer) plus Oracle Protocols (OSI transport layer).

  1. NI (Network Interface) - external process access to Net8 functions plus connection reset requests.

    1. Network Naming (NN) - resolving of names to connect descriptors (connection strings).

  2. Network Session (NS) - handles NI requests and multiple protocols between nodes.

    1. Network Route (NR) - used by NS to route network session to its destination node.

    2. Network Authentication (NA) - authentication security with destination node.

  3. Oracle Protocol Adaptors - TCP/IP [SSL], SPX, Named Pipes or LU6.2.

LDAP Directory Server Stack Communications

A Light Weight Directory Access (LDAP) protocol configuration includes an extra LDAP layer for a client connection request to pass through, as shown in the diagram below.

Oracle Net8 LDAP Network Architecture

Net8 Protocol Addresses

Protocol addresses define network nodes. Connection requests from clients are passed across networks using network addresses where a recriprocal process on the recipient node is listening for client connection requests on the listener's network address. Protocol addresses are defined in Oracle network configuration files by containing multiple addresses within address lists. There is a special file called $ORACLE_HOME/network/admin/protocol.ora.

(address_list=
  (address=(protocol=tcp)(host=<hostname>)(port=1521))
  (address=(protocol=tcp)(host=<hostname>)(port=1522))
)

Allowed protocols are Bequeath, IPC, Named Pipes, LU6.2, SPX, TCP/IP and TCP/IP SSL. Oracle allows use of ports 1 through to 65535. Do not use ports below 1024 because operating systems generally use them. Specific ports are used for specific things. Below are default port numbers.

Protocol Parameters

Some protocols require specific parameters for specific platforms. These parameters will be stored in the $ORACLE_HOME/network/admin/protocol.ora.