straight back to the same host. The first ``real'' link is number
and every node will havea link number
. Each node's link attributes may be accessed, at runtime, via elements of the C structure variables
, and so on.
itself provides each node with an Application Layer and a Physical Layer. Inaddition, a
Error Layer resides above the Physical Layer, and causes transmitteddata frames to become corrupted or lost according to specified probabilities. (Note: Thestandard OSI/ISO model does not provide an Error Layer!)Perhaps surprisingly, the nodes initially have very little knowledge of the network. Nodes do not know how many other nodes there are, what the other nodes are called, nor the attributes of any nodes or links other than their own. All inter-node communicationnecessary to learn this information must traverse the Physical Layer.
1.2 Protocol layers
protocols are written from the point of view of each node, that is, we imagine that weare writing our protocols
each node. We have the ability to write all of the
) between the Application and Physical Layers (and evento rewrite these two layers if we need). The protocols may be as simple or as complex asdesired, and should follow a layered approach to isolate distinct responsibilities. For example:
a network of only 2 nodes will only need a single layer between the Applicationand Physical Layers (usually termed the Data-Link Layer). This protocol willsimply have the responsibility of reliably moving frames across the single bidirectional link between the two nodes.
a network consisting of more than two nodes, will (ideally) require an additionallayer between the Application and Data-Link Layers (usually termed the Network Layer) to manage packet routing, possibly congestion- and flow-control, andmessage fragmentation (and possibly some other responsibilities).
a network in which the nodes may crash or the links may be severed will (ideally)require an additional layer between the Network and Application Layers (usuallytermed the Session Layer) to ensure that old packets that have been ``floating''around the network between crashes are not considered as part of the
communication sequence, and
a network in which we are conscious of limited bandwidth and security mayrequire an additional layer between the Session and Application Layers (usuallytermed the Presentation Layer) to provide compression and/or encryption of our data before it is transmitted.Of course, these ideas and the responsibilities of each layer are not peculiar to
protocols and are very well motivated and described in many undergraduate textbooks ondata communications and computer networking. However,
supports these ideas by
not getting in the way
imposing particular methodologies or data structures onyour protocols.2