Computer Communications

Introduction
Computer network is a collection of nodes, where the computing stations (resources) reside. The nodes communicate to each other via communication network. Transmission, and switching accomplishes the course of communications.

Network Types
Networks can be classified by switching methods, topology, functions and representation.

Circuit Switching
is good for long continuous and time-constrained communications.
 * Before the data transmission began, station to station (end-to-end) physical path must be established. All channels in the path are used simultaneously ruding the transmission. The entire path must be used for communication, until the release of the circuit.
 * The best way to memorize operation, consists of three phases:
 * Circuit Establishment (Resources are allocated)
 * Data Transfering (Resource are used)
 * Circuit Termination (Resources are deallocated)

Message Switching
A message is a logical unit of information that one station sends to another. It does not need a path to be established. Instead, the message travels over existing channels. It hops (travels) through the network in a node-to-node manner, in store-and-forward fashion, until it reaches its destination.

Packet Switching
Transmits data in a bursty nature. Small users get fast service in presence of large users. Messages are decomposed into packets. Packets are the smaller units of data.
 * Many packets of the same message can be transmitted at the same time. In other words, the message is cut is small pieces which are transmitted simultaneously, yet by different channels.
 * The message needs to be reassembled after arriving at the destination.

Datagram Packet Switching

 * Data packets are treated independently of each other.
 * Each packet can travel according to the route it found on the network.
 * Sequential order is not required to take place.
 * The connection operation consists only of data transfer phase.

Virtual Circuit packet switching
Virtual circuit is a logical connection, which is established prior to the start of communications. Logical connection is a route, over which all packets travel between the stations. Packets are delivered along the circuits in sequential order.
 * Connection-Oriented Operation:
 * Connection Established
 * Data Transferred
 * Connection Terminated

Protocol Concepts
Consider a simple example of file transfer, which happens almost every day with us. How does it happen: Conversion must be performed if two systems are incompatible.
 * Source either activates direct data communication path, or informs the network about desired destination.
 * Source system must be sure that the destination system is ready to receive data.
 * File transfer application of the source system must be sure that the file management program on the destination system is ready to receive files.

Protocols
Protocol is a set of rules that governs the exchange of the information. It deals with Anything, capable of transmitting and receiving information is called an entity. A system is a physically distinct collection of entities.
 * Syntax, which is the format, coding, signals magnituded
 * Semantics, which takes care of the implementation of control information and error handling.
 * Timing the sequence in which everything occurs.

Protocols are responsible for:
 * Delivering user data
 * Fragmentation and reassambly
 * Encapsulation
 * Connection Control, which consists of
 * Establishment of the connection
 * Data transfer
 * Connection Termination
 * Controling the data flow between two protocol entities
 * Error Control
 * Sequencing, which is maintaining the proper order of Protocol data Unit Delivery
 * Addressing, which is a proper manner of naming and referencing protocol entities.
 * Multiplexing, allowing single connection to multiple users
 * Expedited data delivery, security, which comes under a frame of Transmision Service.

Layered Approach
Entity implements the functions of a given layer, and the protocols for communicating with peer entities. An entity communicates with entities on The entity on the layers N communicated with the entities on lower layers, by invokations of N-1 primitives.
 * Its layer
 * on layers above, or below it, acting as an interface

Primitives:
 * 'Request': used to invoke requested service, passing parameters for full specification
 * In order to show that a procedure has been invoked by a peer service, indication migh be useful.
 * Response is issued to complete or acknowledge some procedure, invoked by an indication to user.
 * Confirmation, used by a service provider to complete or acknowledge some procedure.

OSI MOdel
Suggested reading: OSI model

TCP/IP protocol architecture
Suggested Reading, from WIKIPedia:
 * Internet protocol suite

Data Link: Issues and Requirements
Data link control is respoinsible of data communications between tow transmitting-receving station, connected directly. The most important aspects of the Data Link COntrol are
 * Frame synchronization
 * character oriented, where the character is the basic unit (atom) of information.
 * bit oriented, where the "atom" of information is a bit.
 * Line Configuration, is a criteria that differs the way of data links.
 * Topology (point to point, multipont)
 * Duplexity
 * Simplex, one connection at a time, in one directeion over a single line
 * Half Duplex, One connection at time, during the talk.
 * Full duplex 2 way connection during the talk.
 * Line discipline
 * contention
 * polling
 * selection

Bit Oriented Data Link Protocols
To study
 * High Level Data Link COntrol (HDLC) - ISO
 * LAPB - ITU-T (for x.25)
 * Point-to-Point Protocol used on the internet to connect home users to ISPs, as well as router to router. While working, it relies on:
 * Line Control protocol for establishing connection
 * In order to check the validity of a password, PPP uses either PAP or CHAP. It comes between Establish, and Authenticate states.
 * Network Control Protocol for negotiating network layer option. Comes between Network and Open states.
 * And for providing IP service over the established connection, IPCP is in use. It comes between the states of Authenticate and Network.

Just for reference
 * Advanced Communications Control Procedures (ADCCP)
 * Synchronous data Link COntrol
 * Link Access Procedures, D channelLAPD - ITU-T (for ISDN)
 * Link Access Procedure for Frame-mode Bearer Sercies (LAPF)
 * Logic Link COntrol(LLC) - IEEE 802.2

Network Layer
This layer and its protocols are responsible for the terminal to terminal data packet delivery. One of its main design issues are:

External vs. Internal operation
In case of external.internal virtual circuit, whenever the user requests VC, a dedicated route is set through the network. All packets will follow it.
 * External Virtual Circuit with internal datagrams.
 * Different packets of the same message may follow different routes through the network.
 * The original sequence and the integrity of message is achieved by resassemlby of packets at the destication node.
 * External/Internal datagram, features independent treatment of each packet.

General COmparison

X.25 Standard
The protocol specifies three level interface between Data Terminal Equipment and Data Control Equipment
 * From TOP to BOTTOM, the levels of the interface are:

Packet Levels
enables subscribers of the network to set up logical connections to the subscribers. These logical connections, form a pre-planed routes and are called, Virtutal circuits THis level relies on Packet Layer Protocol
 * Virtual Circuit Service of X.25
 * Dynamically established Virtual Call.
 * Network Assigned, permanet virtual circuit.
 * Packet types

Multilink Procedure

 * Multilink procedure allows multiline DTE-DCE connections.
 * Each link is governed by SLP LAPB
 * MLP frame format
 * Multilink Control Field (MLC) (2 octets)
 * 12 bit sequence number accross al links is needed, to reorder frames sent, which may arrive in different order.
 * Restination reorders the packets according to MLP sequence numbers
 * The X.25 packet.

Physical Level
deals with the physical interface between the link that attaches computer to the network, and the computer.
 * X.21
 * X.21 bis, similar to EIA-232-D

Error control and recovery

 * Reset packet: This operation requires to reinitialize a virtual circuit.
 * Restart packet: This operation requires to reset all active virtual circuits.

Multiplexing

 * DTE is allowed to establish up to 4095 Virtual Circuits simultaneously.
 * each packet contains a 12bit Virtual Circuit number. (0 is reserved for "restart" and diagnostic packets.

Flow Control

 * Sliding Window protocol with default size of 2 (max is 7 or 127)

Acknowledgements
They may have either local or end to end significance.
 * when D=0, the acknowledgement is made between DTE and the network.
 * when D=1, the acknowledgement is made from Remote DTE

Frame Relay Networks

 * This technology is designed to provide lower delays, and higher throughput, in comparison with traditional switching networks.
 * F.R. originated as a part of ISDN standardization, yet can be provided for bothISDN and non-ISDN networks.
 * In x.25 the control packets are carried on the same channel, and the same virtual circuit as the data packet. In fact in-band signaling takes place there. Simply speaking control and data packets travel in series, not in parallel. Multiplexing and switching takes place at level 3, whicle both layers 2 and 3 include flow control.
 * Frame Relay provides separate channels/virtual circuits for data and control packets. In other words, data and control packets travel in parallel ways.

FrameRelay protocol architecture
Consider two separate planes of operations, COntrol (C) plane and user (U) plane.
 * C plane is responsible for establishment and termination of logical connections.
 * U plane is responsible to the transfer of user data between the subscribers.
 * Multiplexing, and logical connection switching takes place at level 2 (instead of 3) leaving level 3 for processing.
 * Flow control is not end to end. No the hop to hop.

Call Control
Call controls signalling is carried on a separate logical connection. Thus the state table maintenance is not required for intermediate nodes.
 * It used LAPD (Q.921) protocol, for relizable data link control
 * Q.931/Q.933 control signalling mesages are exchanged atop of Q.921 protocol.

Frame relay call control functions
Other side can answer with After the connection is established, data transfer can proceed. Clearing a connection is accomplished by the exchange of DISCONNECT, RELEASE, and RELEASE COMPLETE messages.
 * Exchange of a Q.931/Q.933 message over a logical connection dedicated call - establishes and release a frame relay connection.
 * Sending the SETUP message, either side can request the establishment. The side which sends setup message may chose DLCI option by choosing the unused value. Otherwise the accepting side will assign DLCI with the conenct message.
 * CONNECT message to confirm the connection, or the
 * RELEASE COMPLETE message to refus the connection.

User data Transer
User plane provides LAP-F protocol for data transfer (Link Access Procedure for Frame Mode bearer Services) It is defined in Q.922. Only the code function which are used in frame relay are defined here: Core functions of theLAPF constitue a subwayler in a data link layer. They provide bare data transfer service without any flow and error control. Besides this, the user can chose end-to-end function. Network can relay the frames with the following properties
 * delimiting, alignment, and transparancy
 * multiplexing/demultiplexing, using the address field
 * inspecting the frame for integral number of oxtets
 * prior to zero bit insertion
 * after zero bit extraction
 * Small probability of frame loss.
 * Preservation of the order of frame.

Routing protocols
Computer communication protocols can be divided on Routing protocls in turn can be divided on by methode on
 * nonroutable
 * routed
 * routing protocols
 * distance vector routing
 * link state routing

Network address translation
(NAT) is a very important issue of routing. NAT can use either one-to one mapping or one to many mapping. NAT has several advantages. For example: when a user decides to change a provider, along with external IP Addresses, NAT will presedve all the internal IP addresses with the internal to external translation.
 * It conserves public IP addresses
 * NAT hides internal IP scheme from the outside world
 * allows easy renumbering of IP address translation.

However NAT has following disadvantages
 * Delay comes froma NAT router to perform address translation.
 * End to end IP traceablity is lost due to IP translation
 * It is hard to find the originator of the message.

Static NAT
This kind of translation is ONE TO ONE. The configuration is simple, because NAT Routes will be a default gateway for all clients

Dynamic NAT

 * Group-to-Group mapping, where a group of valid outside IP addresses are mapped to a group of private IP addresses.
 * Network administrator doesnt care of specific one-to one mapping.
 * Any private IP address will be automatically translated to any IP address.