In the last episode, I covered a brief history of networks and networking. Initially, for this post, I wanted to discuss some of the hardware involved. But before I can really list the devices and describe how they’re used, I think it would be best to discuss the conceptual model that characterizes and standardizes how these devices handle data in a communications system by partitioning it into 7 abstract layers. This model is known as the OSI (Open Systems Interconnection) Model and was developed by the International Organization for Standardization. Each layer serves the layer above it and is served by the layer below it. On a side note – several terms will be used in this discussion. Don’t concern yourself with what they do or how they work. These terms simply can’t all be covered in one post – their inclusion here is just to make you familiar with them. That said – visually, the OSI model looks like this:
Starting from the bottom – the physical layer defines both the electrical and physical specifications of a connection. It not only defines the relationship between each device and the physical transmission medium, but it also defines the layout of pins, voltages, line impedance, and signal timing. It also defines the protocol(s) used to initiate and tear down a communication link between two directly connected nodes over the communications medium – including the transmission mode (simplex, half or full duplex), and the topology of the network itself. Physical medium used to transmit data includes coaxial, twisted pair and fiber optic cable. While this layer is referred to as the Physical Layer, the medium used to transmit data doesn’t have to actually be physical. It also includes the use of RF (Radio Frequency) energy, or radio waves, to transmit data between two points. Ethernet, Token Ring, FDDI, IEEE 802.11 (Wi-Fi) and Bluetooth all work at the Physical Layer. The Physical Layer is, perhaps, the easiest layer to understand. As we progress up through the layers you’ll see why.
Why Do You Have To Go and Make Things So Complicated…
The next layer up is the Data Link Layer and it is this layer where the protocols responsible for the transfer of data between neighboring network nodes in a wide area network or between nodes within a local area network reside. The Data Link Layer provides the “functional and procedural means to transfer data between network entities”. Depending on the protocol used the means to detect and possibly correct errors that may occur during transmission in the physical layer may be present. Some examples of protocols found on the Data Link Layer are Cisco Discovery Protocol (CDP), Ethernet, Frame Relay, Point-to-Point Protocol (PPP), High-Level Data Link Control (HDLC), Spanning Tree Protocol (STP – used in routing, which will be discussed later) and Advanced Data Communication Control Procedures (ADCCP).
The Data Link Layer’s main objective is the delivery of frames between devices on the same local area network (LAN). Information transmitted on this layer is referred to as data-link frames and they do not cross the boundaries of the local network. Any data that needs to be transmitted to another network is handled at a higher layer where routing and global addressing take place. Think of the Data Link Layer as a traffic light at an intersection. It attempts to control the flow or access of data to the medium at the Physical Layer without any concern as to the final destination. When two or more devices attempt to use the medium at the same time, collisions can occur. Data-link protocols specify how these devices detect and recover from any collisions.
As if that didn’t leave you scratching your head a bit, it gets a bit more confusing because the Data Link Layer consists of two sub-layers referred to as Logical Link Control and Media Access Control.
The Logical Link Control sub-layer multiplexes (a method of combining analog or digital signals into one signal over a shared medium) the protocols running on the Data Link Layer. It also provides the means by which the Data Link Layer controls the flow of data through the use of flow control, acknowledgement and error notification. Essentially, it determines which mechanisms will be used for addressing devices over the Physical Layer medium and it controls the data exchanged between the sending and receiving devices.
The next sub-layer is the Media Access Control. If any of you have heard of a MAC address…this is where it comes from and refers to the actual hardware address of any device that accesses a network. But MAC also refers to the sub-layer that determines what device is allowed to access the media at any one time. This sub-layer also determines where one frame of data ends and the next frame starts – referred to as frame synchronization. There are four methods used for frame synchronization: time based, character counting, byte stuffing (sounds like a side dish) and bit stuffing (yummy).
• Time based frame synchronization assigns a specified amount of time between each frame. There’s one major drawback to this method external influences (such as interference) can make gaps longer or even shorten them, throwing off the timing.
• Character counting, as its name implies, notes the number of remaining characters in the framer’s header. But this method can be easily “thrown off” if the field in the frame’s header becomes faulty (corrupted) in some way.
• Byte stuffing starts and ends each frame with a special byte sequence such as DLE STX (Data Link Escape – Start of Text) and DLE ETX (Data Link Escape – End of Text). This is used because an appearance of DLE in a frame has to be “escaped” (a series of characters used to change the state of computers) through the use of another DLE. Essentially, it provides a start and stop mark telling the receiver that everything in between the two DLE control sequences is the actual frame.
• Bit Stuffing is similar to byte stuffing. The difference is that the start and stop marks are replaced with “flags” consisting of a special bit pattern – perhaps a 0, six 1 bits and another 0 (01111110). Since this bit sequence can happen naturally in the data being transmitted, to prevent a false flag an additional bit is inserted after the fifth consecutive 1 so that 01111110 becomes 011111010.
As mentioned earlier, the Data Link Layer can provide a means for error correction. There are several types of error correction but, for the purpose of this post, I’ll give an example of a basic error detection method. The simplest among the types of error correction out there is the parity bit. This single bit, also known as meta-data, is placed at the end of a frame and allows the receiver to detect transmission errors. Meta-data is nothing more than data about your data. Nice huh? It works something like this:
Let’s assume that each letter in the alphabet has a corresponding number (A=1, B=2, etc).
Now, let’s say we want to send the word NETWORK. That would look like this when transposed to its corresponding number: 14 5 20 23 15 18 11. We start by adding up those digits to get 106, which is the meta-data. So we transmit 14 5 20 23 15 18 11 106. The receiver knows that the last number is the error detecting meta-data and that everything prior to it is the message. The receiver can then add those same numbers – if it comes up with something different than the meta-data received, then it knows there’s an error and can ask for the message to be sent again.
Get Your Kicks On Route 66…
The Network Layer is the third layer in the OSI Model. This layer is responsible for packet forwarding – which includes routing. Put another way – the Network Layer provides both the functional and procedural means of sending and receiving variable length data messages from one source to another source via one or more networks. It is the lowest layer in the model that’s concerned with actually getting data from one computer to another…even if that computer is on another network.
Some of the specific tasks performed by the Network Layer are:
• Logical Addressing – ever device, whether a computer, printer or server, that communicates over a network has a logical address assigned to it. For instance, IP (Internet Protocol) is a Network Layer protocol and every device on a network has an IP address.
• Routing – moving information or data from one or more interconnected networks is quite possibly the defining function of the Network Layer. In other words, it is the responsibility of the devices and software routines that function at the network layer to handle incoming traffic from various sources, determine where that traffic is going and then figure out where they need to send it to get the information to its final destination.
• Datagram Encapsulation – messages received from the higher layers of the OSI model are encapsulated into datagrams or packets with a network layer header.
• Fragmentation and Reassembly – for messages to be transmitted,, they need to be moved down to the data link layer. However, some technologies found on the Data Link Layer have size limits on how long a message can be. If any packet the Network Layer wants to send is too large then the Network Layer needs to split that packet up into however many smaller packets it takes to get the message sent. Each “piece” is sent to the Data Link Layer and the “pieces” are reassembled once they arrive at the Network Layer of the destination.
Finally, the Network Layer also offers both connection-oriented and connectionless services used for delivering packets across the network. Connection-oriented protocols, in simplest terms, require that a link be established before transmission begins. This is done by following specific steps that were established for initiating, negotiating, managing and terminating a link. The sending device waits for an acknowledgement from the receiving device after each packet is sent. Connectionless protocols, on the other hand, do not require a link be established and do not require any kind of acknowledgement that a packet was even received.
Well, that covers it for this post. I’ll work on the next one that will cover the Transport through Application layers once I get it written.