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.