You are on page 1of 57

MODULE II

MAC SUB LAYER

IEEE STANDARD 802 FOR LAN AND MANS

How the channel allocation principles apply to real systems IEEE standards for LAN- IEEE 802 include CSMA/CD, token bus, token ring Various standards differ at the physical and MAC sub layer but are compatible at the Data Link Layer.

802.1- gives an introduction to the set of standards and defines the interface primitives 802.2- describes the upper part of the Data Link Layer which uses the LLC ( Logical Link Control ) protocol 802.3 through 802.5- describes 3 LAN standards

IEEE Standard 802.3 and Ethernet


Is for a 1-persistant CSMA/CD LAN CSMA/CD ALOHA system constructed to allow radio communication between machines scattered over the Hawaiian Islands Later carrier sensing was added Xerox PARC built 2.94 Mbps CSMA/ CD system to connect over 100 personal workstation on a 1km cable- ETHERNET (luminiferous ether) It was a successful one later Xerox, DEC and Intel drew up a standard for a 10 Mbps Ethernet. ( forms the basis of 802.3)

802.3 Cabling

Four types of cabling 10 Base 5- thick Ethernet. It operates at 10 Mbps, uses baseband signaling and can support segments of up to 500 meters. Connections to it are made using vampire taps, in which a pin is carefully forced halfway into the coaxial cables core. 10 Base 2- thin Ethernet. Thin Ethernet is much cheaper and easier to install., but it can run for only 200 meters and can handle only 30 machines per cable. 10 Base T- a different kind of wiring pattern in which all stations have a cable running to a central hub 10 base F- uses Fiber optics, expensive but has excellent noise immunity.

To allow larger networks, multiple cables can be connected by Repeaters. A repeater is a physical layer device that receives, amplifies and retransmits signals in both directions.

Three kinds of Ethernet cabling. (a) 10Base5, (b) 10Base2, (c) 10Base-T.

Ethernet Cabling
The most common kinds of Ethernet cabling.

Ethernet Cabling
Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented.

Manchester Encoding

Straight binary encoding leads to ambiguities. Two approaches are used Manchester Encoding Differential Manchester encoding

(a) Binary encoding, (b) Manchester encoding, (c) Differential Manchester encoding.

Manchester encoding

Simple Each bit period is divided into two equal intervals A binary 1 bit is sent by having the voltage set high during the first interval and low in the second one A binary 0 is sent by having the voltage set low during the first interval and high in the second one This scheme ensures that every bit period has a transition in the middle, making it easy fro the receiver to synchronize with the sender. Disadvantage:- it requires twice as much bandwidth as straight binary encoding, because the pulses are half the width

Differential Manchester

A 1 bit is indicated by the absence of a transition at the start of the interval. A 0 bit is indicated by the presence of a transition at the start of the interval. In both cases there is a transition at the middle. This scheme requires more complex equipments Offers better noise immunity All 802.3 systems uses Manchester Encoding The high signal is +0.85 volts The low signal is -0.85 volts

802.3 MAC Sub layer Protocol


Each frame starts with a Preamble of 7 bytes. Next comes a Start of Frame byte containing 10101011 to denote the start of the frame. Frame contains two address Destination Source 2 or 6 byte address High order bit of destination address is a 0 for ordinary address and 1 for group address. Group address allow multiple stations to listen to a single address When a frame is sent to a group address all the stations in the group receive it. Sending to a group of stations is called multicast.

Frame formats. (a) DIX Ethernet, (b) IEEE 802.3. The address consisting of all 1 bits is reserved for broadcast. A frame containing all 1s in the destination field is delivered to all stations on the network. Length field tells how many bytes are present in the data field from a minimum of 0 to a maximum of 1500. Pad field- Valid frames must be atleast 64 bytes long, from destination address to checksum.

If the data portion of the frame is less than 46 bytes, the pad field is used to fill out the frame. Checksum- It is a 32 bit hash code of the data.

IEEE Standard 802.4 Token Bus

Due to MAC protocol a station might have to wait arbitrarily long to send a frame 802.3 frames do not have priorities, making them unsuited for real time systems in which important frames should not be held up waiting for unimportant frames. Ring in which stations take turns sending frames.

Logically the stations are organized into a ring with each station knowing the address of the station to its left and right. When the logical ring is initialized, the highest numbered station may send the first frame After it passes permission to its immediate neighbor by sending the neighbor a special control frame called Token. The token propagates around the logical ring, with only the token holder being permitted to transmit frames. Only one station at a time holds the token, collisions do not occur.

Physical order in which the stations are connected to the cable is not important When a station passes the token, it sends a token frame specifically addressed to its logical neighbor in the ring, irrespective of physical location. MAC protocol has provisions for adding and deleting stations to and from the ring.

Token Bus MAC Sub layer Protocol


Preamble is used to synchronies the receivers clock. It may be short as l1 byte Starting delimiter and Ending Delimiter fields are used to mark the frame boundaries Frame control field is used to distinguish data frames from control frames For data frames, it carriers the frame's property For control frames, it is used to specify the frame type

Allowed type include token passing and various ring maintenance frames Destination Address and Source Address fields are the same as in 802.3 Data Field may be up to 8182 bytes long when 2 byte address are used and up to 8174 bytes long when 6 byte address are used. Checksum is used to detect transmission errors

Token Bus Control Frames


Frame Control Field 00000000 00000001 00000010 00000011 00000100 00001000 Name Claim_token Solicit_successor_1 Solicit_successor_2 Who_follows Resolve _contention Token Meaning Claim token during ring initialization Allow stations to enter the ring Allow stations to enter the ring Recover from lost token Used when multiuple stations want to enter Pass the token

00001100

Set_successor

Allow station to leave the ring

IEEE 802.5 Token Ring

Token Ring and IEEE802.5 are based on token passing MAC protocol with ring topology. They resolve the uncertainty by giving each station a turn on by one. Each node takes turns sending the data; each station may transmit data during its turn. The technique that coordinates this turn mechanism is called Token passing A Token is passed in the network and the station that gets the token can only transmit. As one node transmits at a time, there is no chance of collision.

Stations are connected by point-to-point links using repeaters. Mainly these links are of shielded twisted-pair cables. The repeaters function in two basic modes: Listen mode, Transmit mode. A disadvantage of this topology is that it is vulnerable to link or station failure.

Token Ring Operation

Token-passing networks move a small frame, called a token, around the network. Possession of the token grants the right to transmit. If a node receiving the token has no information to send, it passes the token to the next end station. Each station can hold the token for a maximum period of time.

If a station possessing the token does have information to transmit, it seizes the token, alters 1 bit of the token appends the information that it wants to transmit, and sends this information to the next station on the ring. While the information frame is circling the ring, no token is on the network which means that other stations wanting to transmit must wait. Therefore, collisions cannot occur in Token Ring networks. If early token release is supported, a new token can be released immediately after a frame transmission is complete.

The information frame circulates around the ring until it reaches the intended destination station, which copies the information for further processing. The information frame makes a round trip and is finally removed when it reaches the sending station. The sending station can check the returning frame to see whether the frame was seen and subsequently copied by the destination station in error-free form. Then the sending station inserts a new free token on the ring, if it has finished transmission of its packets

The Token Ring uses shielded twisted pair of wire to establish point-point links between the adjacent stations. The baseband signaling uses differential Manchester encoding. To overcome the problem of cable break or network failure, which brings the entire network down, one suggested technique, is to use wiring concentrator. Although logically the network remains as a ring, physically each station is connected to the wire center with two twisted pairs for 2-way communication. Inside the wire center, bypass relays are used to isolate a broken wire or a faulty station. This Topology is known as Star-Connected Ring.

Token ring Frame Format

Token Ring and IEEE 802.5 support two basic frame types: tokens and data/command frames. Tokens are 3 bytes in length and consist of a start delimiter, an access control byte, and an end delimiter. Data/command frames vary in size, depending on the size of the Information field. Data frames carry information for upper-layer protocols, while command frames contain control information and have no data for upper-layer protocols.

Token Frame Fields

Token Frame contains three fields, each of which is 1 byte in length: Start delimiter (1 byte): Alerts each station of the arrival of a token Access-control (1 byte): Contains the Priority field (the most significant 3 bits) and the Reservation field (the least significant 3 bits), as well as a token bit (used to differentiate a token from a data/command frame) and a monitor bit (used by the active monitor to determine whether a frame is circling the ring endlessly). End delimiter (1 byte): Signals the end of the token or data/command frame.

Data / Command Frame Fields


Data/command frames have the same three fields as Token Frames, plus several others. The Data/command frame fields are described below: Frame-control byte (1 byte)Indicates whether the frame contains data or control information. In control frames, this byte specifies the type of control information. Destination and source addresses (2-6 bytes)Consists of two 6-byte address fields that identify the destination and source station addresses. Data (up to 4500 bytes)Indicates that the length of field is limited by the ring token holding time, which defines the maximum time a station can hold the token. Frame-check sequence (FCS- 4 byte)Is filed by the source station with a calculated value dependent on the frame contents. The destination station recalculates the value to determine whether the frame was damaged in transit. If so, the frame is discarded. Frame Status (1 byte)This is the terminating field of a command/data frame. The Frame Status field includes the address-recognized indicator and frame-copied indicator.

Bridges

LANs can be connected by devices called bridges, which operate in the data link layer Interaction Having separate LAN in cheaper Accommodate the load Total distance covered can be increased Reliability- bridge can be programmed to exercise some discretion about what it forwards and what it does not forward. Security-by inserting bridges at various places and being careful not to forward sensitive traffic, it is possible to isolate parts of the network so that its traffic cannot escape and fall into the wrong hands.

Data Link Layer Switching


Multiple LANs connected by a backbone to handle a total load higher than the capacity of a single LAN.

Bridges from 802.x to 802.y


Operation of a LAN bridge from 802.11 to 802.3.

Working of bridge

Host A has a packet to send Host is connected to 802.3 LAN and destination is connected to 802.4 LAN Packet descends into LLC sublayer and acquires an LLC header Passes to MAC sublayer and an 802.3 header is prepended Passes to the MAC sublayer in the Bridge, where header is stripped off Bare packet is handed off to the LLC sublayer in the bridge A bridge connecting k different LANs will have k different MAC sublayers and k different physical layers, one for each type.

Repeaters

At the bottom, in the physical layer, we find the repeaters. These are analog devices that work with signals on the cables to which they are connected. A signal appearing on one cable is cleaned up, amplified, and put out on another cable. Repeaters do not understand frames, packets, or headers. They understand the symbols that encode bits as volts.

Hubs

A hub has a number of input lines that it joins electrically. Frames arriving on any of the lines are sent out on all the others. If two frames arrive at the same time, they will collide, just as on a coaxial cable. All the lines coming into a hub must operate at the same speed. Hubs differ from repeaters in that they do not amplify the incoming signals and are designed for multiple input lines, but the differences are slight. Like repeaters, hubs are physical layer devices that do not examine the link layer addresses or use them in any way.

Bridges
A bridge connects two or more LANs. When a frame arrives, the bridge extracts the destination address from the frame header and looks it up in a table to see where to send the frame. Bridges were originally intended to be able to join different kinds of LANs, this never worked well because of differences between the LANs. Different frame formats require copying and reformatting, which takes CPU time, requires a new checksum calculation, and introduces the possibility of undetected errors due to bad bits in the bridges memory.

Switches

Switches are modern bridges by another name. The differences are more to do with marketing than technical issues, but there are a few points worth knowing.

Routers

When a packet comes into a router, the frame header and trailer are stripped off and the packet located in the frames payload field is passed to the routing software. This software uses the packet header to choose an output line. For an IP packet, the packet header will contain a 32-bit (IPv4) or 128-bit (IPv6) address, but not a 48bit IEEE 802 address. The routing software does not see the frame addresses and does not even know whether the packet came in on a LAN or a point-to-point line.

Transport Gateways

These connect two computers that use different connection-oriented transport protocols. For example, suppose a computer using the connection-oriented TCP/IP protocol needs to talk to a computer using a different connection-oriented transport protocol called SCTP. The transport gateway can copy the packets from one connection to the other, reformatting them as need be.

Application Gateways

Application gateways understand the format and contents of the data and can translate messages from one format to another. An email gateway could translate Internet messages into SMS messages for mobile phones. Like switch, gateway is somewhat of a general term. It refers to a forwarding process that runs at a high layer.

Wireless LAN IEEE 802.11


802.11 networks can be used in two modes. The most popular mode is to connect clients, such as laptops and smart phones, to another network, such as a company intranet or the Internet. In infrastructure mode, each client is associated with an AP (Access Point) that is in turn connected to the other network. The client sends and receives its packets via the AP. Several access points may be connected together, typically by a wired network called a distribution system, to form an extended 802.11 network. In this case, clients can send frames to other clients via their APs.

ad hoc network-This mode is a collection of computers that are associated so that they can directly send frames to each other. There is no access point. Since Internet access is the killer application for wireless, ad hoc networks are not very popular.

802.11 Protocol Stack

Transmission Techniques in 802.11

Several transmission techniques have been added to the physical layer in 802.11 Two of the initial techniques. infrared -in the manner of television remote controls . frequency hopping- in the 2.4-GHz band. The third technique, direct sequence spread spectrum at 1 or 2 Mbps in the 2.4-GHz band, was extended to run at rates up to 11 Mbps and quickly became a hit. It is now known as 802.11b.

New transmission techniques based on the OFDM (Orthogonal Frequency Division Multiplexing). The first is called 802.11a and uses a different frequency band, 5 GHz. The second stuck with 2.4 GHz and compatibility. It is called 802.11g. Both give rates up to 54 Mbps. Most recently, transmission techniques that simultaneously use multiple antennas at the transmitter and receiver for a speed boost were finalized as 802.11n

802.11n uses up to four antennas to transmit up to four streams of information at the same time. The signals of the streams interfere at the receiver, but they can be separated using MIMO (Multiple Input Multiple Output) communications techniques. 802.11 tries to avoid collisions with a protocol called CSMA/CA (CSMA with Collision Avoidance). This protocol is conceptually similar to Ethernets CSMA/CD, with channel sensing before sending and exponential back off after collisions.

802.11 Frame Structure

Data Frame

First comes the Frame control field, which is made up of 11 subfields. The first of these is the Protocol version, set to 00. It is there to allow future versions of 802.11 to operate at the same time in the same cell. Then come the Type (data, control, or management) Subtype fields (e.g., RTS or CTS). For a regular data frame , they are set to 10 and 0000 in binary. The To DS and From DS bits are set to indicate whether the frame is going to or coming from the network connected to the APs, which is called the distribution system.

Frame Control

The More fragments bit means that more fragments will follow. The Retry bit marks a retransmission of a frame sent earlier. The Power management bit indicates that the sender is going into power-save mode. The More data bit indicates that the sender has additional frames for the receiver. The Protected Frame bit indicates that the frame body has been encrypted for security. The Order bit tells the receiver that the higher layer expects the sequence of frames to arrive strictly in order.

Data Frame.

The second field of the data frame, the Duration field, tells how long the frame and its acknowledgement will occupy the channel, measured in microseconds. Next comes the addresses. Data frames sent to or from an AP have three addresses, all in standard IEEE 802 format. The first address is the receiver The second address is the transmitter. Remember that the AP is simply a relay point for frames as they travel between a client and another point on the network, perhaps a distant client or a portal to the Internet. The third address gives this distant endpoint.

The Sequence field numbers frames so that duplicates can be detected. The Data field contains the payload, up to 2312 bytes. Last comes the Frame check sequence, which is the same 32-bit CRC

You might also like