Skip to main content

Layer 2 framing

Layer 2 framing
6.1.5 This page will explain how frames are created at Layer 2 of the OSI model.


Encoded bit streams, or data, on physical media represent a tremendous technological accomplishment, but they, alone, are not enough to make communication happen. Framing provides essential information that could not be obtained from coded bit streams alone. This information includes the following:

• Which computers are in communication with each other

• When communication between individual computers begins and when it ends

• Which errors occurred while the computers communicated

• Which computer will communicate next

Framing is the Layer 2 encapsulation process. A frame is the Layer 2 protocol data unit.

A voltage versus time graph could be used to visualize bits. However, it may be too difficult to graph address and control information for larger units of data. Another type of diagram that could be used is the frame format diagram, which is based on voltage versus time graphs. Frame format diagrams are read from left to right, just like an oscilloscope graph. The frame format diagram shows different groupings of bits, or fields, that perform other functions.

There are many different types of frames described by various standards.A single generic frame has sections called fields. Each field is composed of bytes. The names of the fields are as follows:

• Start Frame field

• Address field

• Length/Type field

• Data field

• Frame Check Sequence (FCS) field

When computers are connected to a physical medium, there must be a way to inform other computers when they are about to transmit a frame. Various technologies do this in different ways. Regardless of the technology, all frames begin with a sequence of bytes to signal the data transmission.

All frames contain naming information, such as the name of the source node, or source MAC address, and the name of the destination node, or destination MAC address.

Most frames have some specialized fields. In some technologies, a Length field specifies the exact length of a frame in bytes. Some frames have a Type field, which specifies the Layer 3 protocol used by the device that wants to send data.

Frames are used to send upper-layer data and ultimately the user application data from a source to a destination. The data package includes the message to be sent, or user application data. Extra bytes may be added so frames have a minimum length for timing purposes. LLC bytes are also included with the Data field in the IEEE standard frames. The LLC sublayer takes the network protocol data, which is an IP packet, and adds control information to help deliver the packet to the destination node. Layer 2 communicates with the upper layers through LLC.

All frames and the bits, bytes, and fields contained within them, are susceptible to errors from a variety of sources. The FCS field contains a number that is calculated by the source node based on the data in the frame. This number is added to the end of a frame that is sent. When the destination node receives the frame the FCS number is recalculated and compared with the FCS number included in the frame. If the two numbers are different, an error is assumed, the frame is discarded.

Because the source cannot detect that the frame has been discarded, retransmission has to be initiated by higher layer connection-oriented protocols providing data flow control. Because these protocols, such as TCP, expect frame acknowledgment, ACK, to be sent by the peer station within a certain time, retransmission usually occurs.

There are three primary ways to calculate the FCS number:

• Cyclic redundancy check (CRC) – performs calculations on the data.

• Two-dimensional parity – places individual bytes in a two-dimensional array and performs redundancy checks vertically and horizontally on the array, creating an extra byte resulting in an even or odd number of binary 1s.

• Internet checksum – adds the values of all of the data bits to arrive at a sum.

The node that transmits data must get the attention of other devices to start and end a frame. The Length field indicates where the frame ends. The frame ends after the FCS. Sometimes there is a formal byte sequence referred to as an end-frame delimiter.

The next page will discuss the frame structure of an Ethernet network.

Comments

Popular posts from this blog

OSI layers / Peer-to-peer communications / TCP/IP model

OSI layers 2.3.4 This page discusses the seven layers of the OSI model. The OSI reference model is a framework that is used to understand how information travels throughout a network. The OSI reference model explains how packets travel through the various layers to another device on a network, even if the sender and destination have different types of network media. In the OSI reference model, there are seven numbered layers, each of which illustrates a particular network function. - Dividing the network into seven layers provides the following advantages: • It breaks network communication into smaller, more manageable parts. • It standardizes network components to allow multiple vendor development and support. • It allows different types of network hardware and software to communicate with each other. • It prevents changes in one layer from affecting other layers. • It divides network communication into smaller parts to make learning it easier to understand. In the foll...

Advantages and disadvantages of link-state routing

Advantages and disadvantages of link-state routing 2.1.5  This page lists the advantages and disadvantages of link-state routing protocols. The following are advantages of link-state routing protocols:  Link-state protocols use cost metrics to choose paths through the network. The cost metric reflects the capacity of the links on those paths. Link-state protocols use triggered updates and LSA floods to immediately report changes in the network topology to all routers in the network. This leads to fast convergence times. Each router has a complete and synchronized picture of the network. Therefore, it is very difficult for routing loops to occur. Routers use the latest information to make the best routing decisions. The link-state database sizes can be minimized with careful network design. This leads to smaller Dijkstra calculations and faster convergence. Every router, at the very least, maps the topology of it...

Ports for services

Ports for services 10.2.2  Services running on hosts must have a port number assigned to them so communication can occur. A remote host attempting to connect to a service expects that service to use specific transport layer protocols and ports. Some ports, which are defined in RFC 1700, are known as the well-known ports. These ports are reserved in both TCP and UDP.  These well-known ports define applications that run above the transport layer protocols. For example, a server that runs FTP will use ports 20 and 21 to forward TCP connections from clients to its FTP application. This allows the server to determine which service a client requests. TCP and UDP use port numbers to determine the correct service to which requests are forwarded. The next page will discuss ports in greater detail.