Wednesday, 15 February 2017

Data Link Layer Frame

In networking, a frame is layer 2 (data link layer of the OSI model) data unit that is transmitted between network points. This frame contains complete addressing, necessary protocol, and control information. The data link layer received layer 3 (Network layer of the OSI model) PDU from layer 3 within the data field and then prepare this PDU as layer 2 frame for carrying across network media. Before transmission, data link layer protocol encapsulates this with trailer and header. There are a lot of different data link layer protocols that describe data link layer frames. At the receiving end again data link layer protocols explain and de-encapsulate this frame. Figure 3.24 Illustrate frame which has three basic parts:-




  • Header




  • Data




  • Trailer




Figure 3.24 Illustrate the layer 2 frame general structure.



The frame fields


The general frame as shown in above mention image but, the structure of the frame contains fields in the header and trailer varies according to the protocol. There is no frame structure that meets the requirements of all data transportation across all type of media. Depending on the background, the size of control information needed in the frame varies to match the access control requirements of the media and logical topology. So frame has no standard size its varies according to the media and environment.


 


Typical frame fields are following:-




  • Start and stop indicator fields – These fields  explain the start and end restrictions of the frame




  • Addressing fields- indicate the source nodes and destination nodes.




  • Type  - this field explains layer3 protocols in the data field.




  • Control - identify special flow control services like QoS (Quality of Service).




  • Data -The frame payload (Network layer packet)




  • Error Detection- These frame fields are used for error detection and are included after the data to form the trailer.




Figure 3.25 Illustrate the frame fields 


Monday, 6 February 2017

Carrier Sense Multiple Access (CSMA)

Carrier Sense Multiple Access is a networking protocol that listens to network signals on the carrier/medium before transmitting any data. CSMA is implemented in Ethernet networks with more than one computer or network device attached to it. CSMA is part of the Media Access Control (MAC) protocol.


Carrier Sense Multiple Access/Collision Detection (CSMA/CD)


Carrier Sense Multiple Access/Collision Detection (CSMA/CD) is the most widely used transmission method used in half-duplex Ethernet networks.  On Ethernet, any device can attempt to send a frame at any time. Each device senses whether the line is idle and therefore available to be used. If it is, the device begins to transmit its first frame. If another device has tried to send at the same time, a collision is said to occur and the frames are discarded. Each device then waits a random amount of time and retries until successful in getting its transmission sent.


Carrier Sense Multiple Access with Collision Avoidance


CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance) is a method for carrier transmission in 802.11  networks. CMSA/CA uses a method similar to CSMA/CD to detect if the media is clear. CMSA/CA also uses additional techniques. This method does not detect collisions but attempts prevent collisions before happen. Each device that transmits includes the time duration that it needs for the transmission. All other wireless devices receive this information and know how long the medium will be unavailable.


In CSMA/CA, when a node receives a traffic that is to be sent, it checks to be sure that the channel is clear (no other node is transmitting at the time). If the channel is clear, then the packet is sent. If the channel is not clear, the node waits for a randomly chosen period of time and then checks again to see if the channel is clear. This period of time is called the backoff factor and is counted down by a backoff counter. If the channel is clear when the backoff counter reaches zero, the node transmits the packet. If the channel is not clear when the backoff counter reaches zero, the backoff factor is set again, and the process is repeated. Carrier sense multiple access with collision avoidance (CSMA/CA) is,  the least popular of the access methods. This access method is now used with WLANs.

Saturday, 4 February 2017

Half and Full Duplex Communication

Duplex communication refers to the direction of data transmission between two devices. Half-duplex communications limit the exchange of data to one direction at a time while full-duplex allows the sending and receiving of data at the same time.


Half-duplex communication


In this type of communication where one side can talk at a time. When one side has complete transmitting its data, the other side can reply. Only one node can talk at a time. If both try to talk at the same time, a collision will take place on the network. So both device can transmit and receive on the media but cannot do so at the same time. The half-duplex mode is used in legacy bus topologies and with Ethernet hubs. WLANs also operate in half-duplex. Half-Duplex is used with contention-based access methods. this method of communication is not very efficient and requires more time to send/receive larger amounts of data. Older networks work in half-duplex mode, due to the constraints of the network medium (coax cable) and hardware equipment (hubs). Figure 3.22 illustrate the half-duplex communication.


Half-Duplex Communication


Full-duplex communication 


Full-duplex is the type of communication where Both devices can transmit and receive on the media at the same time. The data link layer assumes that the media is available for transmission for both nodes at any time. Of this type, there is no danger of a collision and therefore the transfer of data is completed much faster. Ethernet switches operate in full-duplex mode by default but can operate in half-duplex if connecting to a device such as an Ethernet hub. Figure 3.23 shows full-duplex communication.


Full-Duplex Communication


Today, all networks make use of switches instead of hubs and UTP Ethernet cabling instead of co-axial cabling, which allow full-duplex communication between all connected hosts. It is important that both interconnected interfaces operate using the

Friday, 3 February 2017

Physical LAN Topologies

Physical LAN topologies define how the end systems are physically interconnected. In shared media LANs, end devices can be interconnected using the following physical topologies:


Star topology


In Star topology, all end devices are connected to the central device.Early star topologies interconnected end devices using Ethernet hubs. However, star topologies now use Ethernet switches. The star topology is easy to install, very scalable (easy to add and remove end devices), and easy to troubleshoot.


All the data on the star topology passes through the central device before reaching the intended destination. Hub/Switch acts as a junction to connect different nodes present in Star Network, and at the same time it manages and controls the whole of the network. Depending on which central device is used, “hub” and “Switch”  can act as repeater or signal booster. Central device can also communicate with other hubs and switch of different network.


Extended Star Topology


In an extended star topology, additional Ethernet switches interconnect other star topologies.


Bus Topology


Bus Topology is the simplest of network topologies. All end systems (computers as well as servers)  are connected to each other and terminated in some form on each end. Infrastructure devices such as switches are not required to interconnect the end devices. Bus topologies using coax cables were used in legacy Ethernet networks because it was inexpensive and easy to set up.


Ring Topology


In the ring topology, end systems are connected to a single circle of cable. Unlike the bus topology, the ring does not need to be terminated. The signals travel around the loop in one direction and pass through each computer, which acts as a repeater to boost the signal and send it to the next computer. Ring topologies were used in legacy Fiber Distributed Data Interface (FDDI) and Token Ring networks.


Figure 3.21 illustrate physical LAN topologies


physical lan topologies


 

Wednesday, 1 February 2017

Network Topology

The network topology is the arrangement or relationship of the network devices, including its nodes and connecting lines. The network really has two shapes or two types of topology; one is physical and the other is logical.


The physical topology


The physical topology of a network is the actual physical and geometric layout of the network that we can see such as devices like routers, switches, and wireless access points, nodes and cables. There are several common physical topologies like point-to-point, ring, bus, star and mesh topologies. 


The logical topology


A logical topology is how devices appear connected to the user. This topology defines the way a network transfers frames from one node to the next. This topology consists of virtual links between the nodes of a network. These logical paths are defined by data link layer protocols.  The data link layer deals the logical topology of a network when controlling data access to the media. It is the logical topology that influences the type of network framing and media access control used.


Common Physical WAN Topologies


WAN's are generally interconnected using the following physical topologies:


Point-to-Point 


Only two devices are involved in a point-to-point connection, with one wire (or air, in the case of wireless) sitting between them.This is the simplest topology in networking. For this reason, this is a very popular WAN topology. Figure 3.18 illustrated the physical point-to-point topology.


point to point wan topology


Hub and Spoke


A hub and spoke network is a traditional and widely used topology for all types of networks. It's also called the star topology. In this topology, a central site interconnects branch sites using point-to-point links. The Central site is called a hub and branch site is called spokes. Communication between two spokes always travels through the hub. Figure 3.19 illustrated the physical hub and spoke topology.


hub and spoke wan topology


Mesh Topology


A mesh network is a network topology in which each node relays data for the network so this topology provides high availability but requires that every end system is interconnected to every other system. Therefore the administrative and physical costs can be very high. Each link is essentially a point-to-point link to the other node. Variations of this topology include a partial mesh where some but not all of the end devices are interconnected. 3.20 illustrated the physical mesh topology.


mesh wan topology


Next - Common Physical LAN Topologies

Tuesday, 24 January 2017

Media Access Control Method

A way to permit PC to transmit data over network cabling as ensure that just one PC transmits at a time. If two PC at once place signals on the wire. Then collision can take place and data may be corrupted except a method is used to resolve the collision gracefully. Media access control method makes the smooth flow of traffic on a network, and they prevent or deal with collisions. Media access control methods are implemented at the data-link layer of the Open Systems Interconnection (OSI) reference model


There are four main media access control methods in Networking:




  • Carrier Sense Multiple Access with Collision Detection (CSMA/CD), used in Ethernet networking




  • Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA), used in AppleTalk networking




  • Demand priority, which is used in 100BaseVG networking




  • Token passing, which is used in Token Ring and Fiber Distributed Data Interface (FDDI) networking




Layer 2 protocols specify the encapsulation of a packet into a frame as well as the method for getting the encapsulated packet on and off each medium. The method used for getting the frame on and off the media is called the media access control method.


As packets travel from the source to the destination, they usually traverse over different physical networks. These physical networks can consist of different types of physical media such as copper wires, optical fibers, and wireless consisting of electromagnetic signals, microwave and radio frequencies, and satellite links.


Without the data link layer, network layer protocols such as IP would have to make provisions for connecting to every type of media that could exist along a delivery path. Moreover, IP would have to adapt every time a new network technology; or medium was developed. This process would slow down protocol and network media innovation and development. This is a key reason for using a layered approach to networking


Providing Access to Media


During a single communication, different media access control methods may be required. Every network environment has different characteristics. For example, Ethernet LAN, WLAN, and serial links have different characteristics.


Router interfaces encapsulate the packet into the suitable frame, and a proper media access control method is used to access each link. In any given exchange of network layer packets, there may be several data link layers and media transitions.At each hop along the path, a router does the following:



  • Accepts a frame from a medium

  • De-encapsulates the frame

  • Re-encapsulates the packet into a new frame

  • Forwards the new frame appropriate to the medium of that segment of the physical network


Controlling Access to The Media


Media access control layer (data link sub-layer) standardize the placement of data frames onto the media. Media access control is the same of traffic rules that control the entry of vehicles onto a roadway. The lack of any media access control would be the equivalent of vehicles ignoring all other traffic and entering the road without regard to the other vehicles. On the other hand, not all roads and entrances are the same. Traffic can enter the road by merging, by waiting for its turn at a stop sign, or by obeying signal lights. A driver follows a different set of rules for each type of entrance.


In the same manner, there are different methods to control placing frames onto the media. The protocols at the data link layer define the rules for access to different media. These media access control techniques describe if and how the nodes share the media. The actual media access control method used depends on:


Topology


How the connection between the nodes appears to the data link layer.


Media sharing


 How the nodes share the media. The media sharing can be point-to-point, such as in WAN connections, or shared such as in LAN networks.


Topologies and media sharing will be discussed briefly in coming articles.

Sunday, 22 January 2017

Data Link Layer

The data link layer(Layer 2) of the OSI model is the protocol layer that handles the moving of data in and out across a physical link in a network. This layer is responsible for the following:-




  • The data link layer is responsible for encoding bits into packets prior to transmission and then decoding the packets back into bits at the destination.




  • Allowing the upper layers to access the media




  • Responsible for logical link control, media access control, hardware addressing,




  • Handling and defining physical layer standards.




  • Preparing network data for the physical network




  • Controlling how data is placed and received on the media




  • Exchanging frames between nodes over a physical network media, such as UTP or fiber-optic




  • Receiving and directing packets to an upper layer protocol




  • Performing error detection




The Layer 2 notation for network devices connected to a common media is called a node. Nodes build and forward frames. The OSI data link layer is responsible for the exchange of Ethernet frames between source and destination nodes over a physical network media.


The data link layer effectively separates the media transitions that occur as the packet is forwarded from the communication processes of the higher layers. The data link layer receives packets from and directs packets to an upper layer protocol, in this case, IPv4 or IPv6. This upper layer protocol does not need to be aware of which media the communication will use.


Data Link Sub-Layers


As we know that data link layer(Layer 2) of the OSI model is the protocol layer as well as handles moving data in and out across a physical link in a network.The data link layer is theoretically divided into two sublayers. which is logical link control (LLC) and media access control (MAC) layers. This division is based on the architecture used in the IEEE 802 Project; which is the IEEE working group responsible for creating the values that describe many networking technologies.



  • Logical Link Control (LLC)

  • Media Access Control (MAC)


Logical Link Control (LLC)


This upper sublayer is called Logical Link Control(LLC) which is communicates with the network layer. It places information in the frame that identifies which network layer protocol is being used for the frame. This information allows multiple Layer 3 protocols; such as IPv4 and IPv6, to utilize the same network interface and media. it provides services to the network layer above it and hides the rest of the details of the data link layer to allow different technologies to work seamlessly with the higher layers. Most local area networking technologies use the IEEE 802.2 LLC protocol.


Media Access Control (MAC)


This lower sublayer defines the media access processes performed by the hardware. It also provides data link layer addressing and access to various network technologies.


dll sublayers


The figure 3.17 illustrates how the data link layer is divided into the LLC and MAC sublayers. The LLC communicates with the network layer while the MAC sublayer allows various network access technologies. For instance, the MAC sublayer communicates with Ethernet LAN technology to send and receive frames over copper or fiber-optic cable. The MAC sublayer also communicates with wireless technologies such as Wi-Fi and Bluetooth to send and receive frames wirelessly.