TA 2 Data Communication & Networking PDF
Document Details
Uploaded by SolicitousOklahomaCity
null
2020
S.D. Banerjee
Tags
Summary
This document is a set of notes on data communication and networking, specifically from the Indian Railway Institute of Signal Engineering & Telecommunication (IRISET). The notes cover various topics such as data representation, network topologies, data transmission, and protocols. These notes provide a fundamental understanding of data communication.
Full Transcript
TA 2 DATA COMMUNICATION & NETWORKING CRC Cyclic Redundancy Check इ रसेट IRISET TA 2 DATA COMMUNICATION & NETWORKING The Material Presented in this IRISET Notes is for guidance only. It does not over rule o...
TA 2 DATA COMMUNICATION & NETWORKING CRC Cyclic Redundancy Check इ रसेट IRISET TA 2 DATA COMMUNICATION & NETWORKING The Material Presented in this IRISET Notes is for guidance only. It does not over rule or alter any of the Provisions contained in Manuals or Railway Board’s directives INDIAN RAILWAY INSTITUTE OF SIGNAL ENGINEERING & TELECOMMUNICATION, SECUNDERABAD - 500017 January 2020 TA 2 DATA COMMUNICATION & NETWORKING INDEX Page S.No. Chapter No. 1. Introduction to Data Communication 1.0 Introduction 1 1.1 Data representation 1.2 Data components 1.3 Fundamental characteristics of data communication 1.4 Data flow 1.5 Data Transmission 1.6 Network 1.7 Categories of networks 1.8 Topology 1.9 Standard organizations 1.10 The OSI model (layered approach to data communications) 2. Data Transmission on Physical media 2.0 Introduction 21 2.1 Data & Signal (Baseband and broadband transmission, transmission impairments, data rates, bandwidth and baud rate) 2.2 Encoding 2.3 Transmission Media Categories 3 Data Transmission on LAN 3.0 Introduction 29 3.1 Data Link control ( Framing, Line Discipline, Flow control, Error detection and correction, Block coding, CRC Checksum, Error control) 3.2 LAN Protocols (Character oriented & Bit oriented protocols) 3.3 Media Access (Mac control, Mac/Ethernet frame, CSMA/CD, CSMA/CA) 3.4 Ethernet (evolution, implementation, electrical specifications, media variants, cables, cross & straight cables) 3.5 PoE (Power over Ethernet) 3.6 Connecting devices ( Hubs, Switches – Manageable, Unmanageable, Layer 2 & 3) 3.5 VLAN (Virtual LAN) – Creation, Trunking. 4 Data Transmission on WAN 4.0 Introduction 51 4.1 TCP/IP Protocol (TCP header & its description) 4.2 UDP Protocol (UDP header & its description) 4.3 IP Communication (IP header & its description, Data transmission on IP) 4.4 IP Address (Different Classes, Subnetting & Supernetting & Special IP addresses) 4.5 IP Routing (Static and Dynamic Routing, Different Routing Protocols) 4.6 WAN devices (Routers & its hardware setup and Gateways) 4.7 MPLS (Multi Protocol Label Switching) 5 Long Distance Data Transmission 5.0 Introduction 79 5.1 Modem (Modem working method) 5.2 Classification modems (based on range, line, operation modes etc.) 5.3 Modem Diagnostics (Local, Remote & Digital loops) 5.4 Digital Subscriber line & XDSL modems (ADSL, HDSL, SDSL & VDSL) 5.4 LAN extender 5.5 Media Converter 6 Wireless LAN 6.0 Introduction 89 6.1 IEEE 802.11 Layered Protocol Architecture (SSID, BSSID) 6.2 Transmission Technology (Microwave, Spread Spectrum, Infrared transmission) 6.3 WLAN Architecture (IBSS, BSS, Extended Service Set) 6.4 WLAN application and Standards 6.5 Wireless LAN security (WEP, WPA,WPA2) 6.6 Securing Access Points APs (Administrator & User prospective) 6.7 Wi-MAX (Worldwide Interoperability for Microwave Access) 7 Internet Protocol version – 6 (IPv6) 7.0 Introduction 98 7.1 IPv6 format 7.2 IPv6 Address Classification 7.3 IPv6 Address types and their formats 7.4 IPv6 Networks 7.5 IPv6 Migration 8 Annexure (Line encoding and block coding, High Level data Link Control 106 (HDLC), Quality of service (QoS), Blue tooth & RoIP, Connectors & Interfaces (RS232, V.35, G.703, USB & HMI Connectors), Precautions of handling adaptors, connectors, chords, plugs 9 Questions Bank 136 10 Abbreviations/Acronyms 142 11 Glossary 147 12 References 150 Prepared by : S.D. Banerjee, INW1 Reviewed by : B. B. K. Murthy, Prof. - Tele Approved by : C. Chandrasekhara Sastry, Sr. Prof. - Tele DTP and Drawings : K. Srinivas, JE (D) Version No. : 1.0 January 2020 No. of Pages : 153 No. of Sheets : 77 © IRISET “This is the intellectual property for exclusive use of Indian Railways. No part of this publication may be stored in a retrieval system, transmitted or reproduced in any way, including but not limited to photo copy, photograph, magnetic, optical or other record without the prior agreement and written permission of IRISET, Secunderabad, India” http://www.iriset.indianrailways.gov.in CHAPTER - 1 INTRODUCTION TO DATA COMMUNICATION 1.0 Introduction: In the simplest form, data communication involves the exchange of data between two devices. Here devices includes computers or the variety of devices used in communication system having a processor and memory of its own viz. switches, routers etc. These devices work with a binary language consisting of zeros and ones. Therefore, a computer generates a stream of zeros and ones and sends it to another computer to which it is connected. The connection can be either a simple wire or it can be through wireless media. For data communications to occur, the communicating devices must be part of communication system made up of a combination of hardware (physical equipment) and software (programs). 1.1 DATA REPRESENTATION: Information or data today comes in different forms such as text, numbers, images, audio and video. a. Text: In data communications, text is represented as a bit pattern, a sequence of bits (0’s or 1’s). Different sets of bit patterns have been designed to represent text symbols. Each set is called a code, and the process of representing symbols is called coding. Earlier we were using ASCII (American Standard Code for Information Interchange) coding system, but today the prevalent coding system is called Unicode, which uses 32 bits to represent a symbol or character used in any language in the world. b. Numbers: Numbers are also represented by bit patterns. However, a code such as ASCII is not used to represent numbers; the number is directly converted to a binary number to simplify mathematical operations. c. Images: Images are also represented by bit patterns. In its simplest form, an image is composed of a matrix of pixels (picture elements), where each pixel is a small dot. The size of the pixel depends on the resolution. For example, an image can be divided into 1000 pixels or 10,000 pixels. In the second case, there is a better representation of the image (better resolution), but more memory is needed to store the image. After an image is divided into pixels, each pixel is assigned a bit pattern. d. Audio: Audio refers to the recording or broadcasting of sound or music. Audio is by nature different from text, number or images. It is continuous, not discrete. e. Video: Video refers to the recording or broadcasting of a picture or movie. Video can either be produced as a continuous entity (e.g. By a TV camera), or it can be a combination of images, each a discrete entity, arranged to convey the idea of motion. 1.2 DATA COMPONENTS: A data communications system has five components (see fig. 1.1) Fig. 1.1 Data communications system IRISET 1 TA2 – Data Communication & Networking Introduction to Data Communication Message: The message is the information (data) to be communicated. Popular forms of information include text, numbers, pictures, audio and video. a. Receiver: The receiver is the device that receives the b. Sender: The sender is a device that sends the data message. It can be computer, workstation, telephone handset, video camera and so on. c. Message: It can be computer, workstation, telephone handset, television and so on. d. Transmission medium: The transmission medium is the physical path by which a message travels from sender to receiver. Some examples of transmission media include twisted-pair wires, coaxial cable, fiber optic cable and radio waves. e. Protocol: A protocol is a set of rules which is used by computers to communicate with each other across a network. A protocol is a convention or standard or software that controls or enables the connection, communication, and data transfer between computing endpoints. The purpose of protocols specifies one or more of the following properties. Detection of the underlying physical connection (wired or wireless), or the existence of the other endpoint or node Handshaking Negotiation of various connection characteristics. How to start and end a message? Procedures on formatting a message. What to do with corrupted or improperly formatted messages (error correction)? How to detect unexpected loss of the connection, and what to do next ? Termination of the session or connection. In data communications, there are widely accepted protocols for sending & receiving data. Both the sender and receiver must use the same protocol when communicating. Protocols can be broadly classified as 1. Proprietary Protocols (works on a specific make or brand or model device) 2. Open Source Protocols (works on any make or brand or model device) 1.3 Fundamental Characteristics of Data Communication: The effectiveness of data communications system depends on four fundamental characteristics: delivery, accuracy, timeliness and jitter. a. Delivery: The system must deliver data to the correct destination. Data must be received by the intended device or user and only by that device or user. b. Accuracy: The system must deliver the data accurately. Data that have been altered in transmission and left uncorrected are unusable. c. Timelines: The system must deliver data in a timely manner. Data delivered late are useless. In the case of video and audio, timely delivery means delivering data as they are produced, without significant delay. This kind of delivery is called real time transmission. d. Jitter: Jitter refers to the variation in the packet arrival time. It is the uneven delay in the delivery of audio or video packets, which results in degradation of the quality. Hence jitter is required to be minimized. IRISET 2 TA2 – Data Communication & Networking Introduction to Data Communication 1.4 Data Flow: Communication between two devices can be simplex, half duplex, or full duplex as shown in figure 1.2. a. Simplex: In simplex mode, the communication is unidirectional, only one of the two devices on a link can transmit; the other can only receive (see figure 1.2a). Fig. 1.2a Simplex mode Keyboards and traditional monitors are examples of simplex devices. The keyboard can only introduce input; the monitor can only accept output. The simplex mode can use the entire capacity of the channel to send data in one direction. b. Half-Duplex: In half duplex mode, each station can both transmit and receive, but not at the same time. When one device is sending, the other can only receive, and vice versa (see fig. 1.2b). In a half duplex transmission, the entire capacity of a channel is taken over by whichever of the two devices is transmitting at a time. Fig. 1.2b Half Duplex mode The half duplex mode is used in cases where there is no need for communication in both directions at the same time; Walkie-talkie is the best example for half duplex systems. The entire capacity of the channel can be utilized for each direction. c. Full-Duplex: In full duplex mode (also called duplex), both stations can transmit and receive simultaneously (see fig. 1.2c). Fig.1.2c Full duplex mode In full duplex mode, signals going in one direction share the capacity of the link with signals going in the other direction. The full duplex mode is used when the communication in both the direction is required all the time. The capacity of the channel however must be divided between the two directions. The best example of full duplex communication is the telephone network. IRISET 3 TA2 – Data Communication & Networking Introduction to Data Communication 1.5 DATA TRANSMISSION The transmission of binary data across a link can be accomplished in either parallel or serial mode as shown in fig. 1.3a. Data Transmission Parallel Serial Synchronous Asynchronous Fig 1.3a Data transmission methods In parallel mode, multiple bits are sent with each clock tick. In serial mode, 1 bit is sent with each clock tick. While there are no sub classes in parallel data, there are two subclasses of Serial transmission: 1. Synchronous. 2. Asynchronous 1.5.1 SERIAL, PARALLEL COMMUNICATION a. Serial Data Communication: The physical connection determines how many bits (1's or 0's) can be transmitted at a single instance of time. If only 1 bit of information can be transmitted over the data transmission medium at a time then it is considered as a Serial Communication. (Refer Fig. 1.3b) 0 1 0 0 1 0 1 0 0 1 0 0 1 0 1 0 Sends Serial Data Transmission Medium Only 1 Wire! Receives Data Serial Data 1 bit at a time 1 bit at a time Byte: 0100 1010 Byte: 0100 1010 Serial Communication Fig.1.3b Serial communication b. Parallel Data Communication: If more than 1 bit of information is transmitted over the data transmission medium at a time then it is considered as Parallel Communication. (Refer Fig. 1.3c) Fig.1.3c Parallel communication IRISET 4 TA2 – Data Communication & Networking Introduction to Data Communication Communications Advantages Disadvantages Parallel Fast Transfer Rates Short distances only Serial Long Distances Slow transfer rates Table 1.1 Comparison of Parallel and Serial Communication The transfer rate comparison is relative to serial versus parallel. Data can be transferred at much faster rates over long distances using serial methods than using parallel data transfer. At shorter distances, typically less than 15 feet, parallel data transfers are used. Serial data communication transfers one bit at a time and does not have the timing problems (race conditions) as that of parallel data communications. 1.5.2 ASYNCHRONOUS / SYNCHRONOUS COMMUNICATION a. Asynchronous Transmission: In asynchronous transmission, we send 1 start bit (0) at the beginning and 1 or more stop bits (1s) at the end of each byte. There may be a gap between each byte. Fig. 1.4a Asynchronous system of sending data Asynchronous systems send data bytes between the sender and receiver by packaging the data in an envelope as shown in Fig.1.4a this envelope helps transport the character across the transmission line that separates the sender and receiver. The transmitter creates the envelope, and the receiver uses the envelope to extract the data. Each character (data byte) the sender transmits is preceded with a start bit, and suffixed with a stop bit. These extra bits serve to synchronize the receiver with the sender. Fig. 1.4b Asynchronous system of sending data This method of transmission is suitable for slow speeds less than about 32000 bits per second. In addition, notice that, the signal that is sent does not contain any information that can be used to validate if it was received without modification. This means that this method does not contain error detection information, and is susceptible to errors. IRISET 5 TA2 – Data Communication & Networking Introduction to Data Communication In addition, for every character that is sent, additional two bits are also sent as shown in fig 1.4b. Consider the sending of a text document which contains 1000 characters. Each character is eight bits, thus the total number of bits sent are 10000 (8 bits per character plus a start and stop bit for each character). These 10000 bits are actually 1250 characters, meaning that an additional 250 equivalent characters are sent due to the start and stop bits. This represents a large overhead in sending data, clearly making this method an inefficient means of sending large amounts of data. b. Synchronous Transmission: In synchronous transmission, we send bits one after another without start or stop bits or gaps. It is the responsibility of the receiver to group the bits. (Refer fig.1.5a). Fig 1.5a Synchronous Transmission In synchronous transmission, greater efficiency is achieved by grouping characters together, and doing away with the start and stop bits for each character. We still envelop the information in a similar way as before, but this time we send more characters between the start and end sequences. In addition, the start and stop bits are replaced with a new format that permits greater flexibility. An extra ending sequence is added to perform error checking. In asynchronous transmission, if there was no data to transmit, nothing was sent. We relied on the start bit to start the CLOCK on receiving device and thus begin the preparation to decode the incoming character. However, in synchronous transmission, because the start bit has been dropped, the receiver must be kept in a state of readiness. This is achieved by sending a special code by the transmitter whenever it has no data to send. In bit orientated protocols, the line idle state is changed to 7E, which synchronizes the receiver to the sender. The start and stop bits are removed, and each character is combined with others into a data packet. User data is prefixed with a header field, and suffixed with a trailer field which includes a checksum value (used by the receiver to check for errors in sending) as shown in Fig. 1.5b. Fig. 1.5b Synchronous serial data IRISET 6 TA2 – Data Communication & Networking Introduction to Data Communication The header field is used to convey address information (sender and receiver), packet type and control data. The data field contains the users’ data (if it can't fit in a single packet, then use multiple packets and number them). Generally, it has a fixed size. The tail field contains checksum information which the receiver uses to check whether the packet was corrupted during transmission. 1.6 NETWORK A network is a set of devices (often referred to as nodes) connected by communication links as shown in fig.1.6. A node can be a computer, printer or other device capable of sending and receiving data generated by other nodes on the network. The main advantage of network is sharing of resources; the resources can be hardware or software Most networks use distributed processing, in which a task is divided among multiple computers. Instead of one single large machine being responsible for all aspects of process, separate computers (usually a personal computer or workstation) handle a subset. Advantage of distributed processing is security, distribution of database, faster problem solving etc. Network criteria: A network must be able to meet a certain criteria. The most important of these are performance, reliability and security. Performance: Performance can be measured in many ways, including transit time and response time. Transit time is the amount of time required for a message to travel from one device to another. Response time is the elapsed time between an inquiry and a response. The performance of a network depends on a number of factors, including the number of users, the type of transmission medium, the capabilities of the connected hardware and the efficiency of the software. A Fig. 1.6 Networks Reliability: In addition to accuracy of delivery, network reliability is measured by the frequency of failure, the time it takes a link to recover from a failure and the network’s robustness in a catastrophe. IRISET 7 TA2 – Data Communication & Networking Introduction to Data Communication Security: Network security issues include protecting data from unauthorized access, protecting data from damage, for development and implementing policies and procedures for recovery from breaches and data losses. 1.7 Categories of Networks Networks come in all shapes and sizes. Network administrators often classify networks according to geographical size. Networks of similar size have many similar characteristics, as you will learn in later chapters. The following are the most common size classifications: Local area networks (LANs) Wide area networks (WANs) Intranets and Internets 1.7.1 Local Area Networks (LANs) A local area network (LAN) is a group of computers and network communication devices interconnected within a geographically limited area, such as a building or a campus. LANs are characterized by the following: They transfer data at high speeds (higher bandwidth). They exist in a limited geographical area. Connectivity and resources, especially the transmission media, usually are managed by the company running the LAN. Fig. 1.7 Local Area Network 1.7.2 Wide Area Networks (WANs) A wide area network (WAN) interconnects LANs. A WAN can be located entirely within a state or a country, or it can be interconnected around the world. WANs are characterized by the following: They exist in an unlimited geographical area. They usually interconnect multiple LANs. They often transfer data at lower speeds (lower bandwidth). IRISET 8 TA2 – Data Communication & Networking Introduction to Data Communication Connectivity and resources, especially the transmission media, usually are managed by a third- party carrier such as a telephone or cable company. Fig. 1.8 Wide Area Network WANs Are Interconnected LANs. The linkup of LAN’s is often shown as cloud and the interconnection often is represented by a line going into a cloud. Refer fig 1.7.3. This is because the company running the network typically has only a general idea of the path that the data will take on its journey to the other LAN segment. All the company knows is that the data enters the cloud on one side and exits the other side. 1.7.3 INTRANETS AND INTERNETS Intranet: Intranet is the system in which multiple PCs are connected to each other. PCs in intranet are not available to the world outside the intranet. Usually each organization has its own Intranet network and members/employees of that organization can access the computers in their intranet. Fig. 1.9 Intranet Each computer in Intranet is also identified by an IP Address which is unique among the computers in that Intranet. IRISET 9 TA2 – Data Communication & Networking Introduction to Data Communication Internet: Internet is a network of networks. It is the worldwide collection of multiple computer networks. Internet is a network of thousand of computer networks. It is capable to transfer information across the geographical boundaries in an electronic format at a very fast speed. It is a huge reservoir of information. It is a facility, which can be used by libraries for navigating through globally distributed and electronically accessible knowledge resource. Internet is accessible to every user all over the world. i n te r n e t Fig. 1.10 Internet Similarities between Internet and Intranet Intranet uses the internet protocols such as TCP/IP and FTP. Intranet sites are accessible via the web browser in a similar way as websites in the internet. However, only members of Intranet network can access intranet hosted sites. In Intranet, own instant messengers can be used as similar to yahoo messenger/gtalk over the internet. Differences between Internet and Intranet Internet is general to PCs all over the world whereas Intranet is specific to few PCs. Internet provides a wider and better access to websites to a large population, whereas Intranet is restricted. Internet is not as safe as Intranet. Intranet can be safely privatized as per the need. Comparison between Internet and Intranet is appended in fig 17.4 and the table no. 1.2 below. Domain Controller/ DNS server Di rect Access Direct Access Client server or Application servers Fig. 1.11 Internet and Intranet IRISET 10 TA2 – Data Communication & Networking Introduction to Data Communication Parameter Internet Intranet Usage Public Private User Types Any user having dial up of Internet Organization employees and Internal access line company departments Usage Access all kind of Information Internal employee communication, telephone directories etc. Security Low security, Configured under 0 High security, Configured under 100 security level in firewall security level in firewall Regulated by Internet Architecture Board (IAB): It is regulated by an organization Oversees the technical and engineering development of the IETF and IRTF. Internet Corporation for Assigned Names and Numbers (ICANN) Coverage Wide Area Within an organization Access Large number of users Limited number of users System Failure Unpredictable System availability is high since system is monitored by authority Table 1.2 Comparisons of Internet and Intranet 1.8 TOPOLOGY The networks in which the terminals are interconnected with each other for inter communication within and outside the network is called as Topology. Basically the Topology is categorized in following four types of designs. (Ref fig no. 1.11 ) 1. Mesh topology 3. Bus Topology. 2. Star Topology 4. Ring Topology T o p olo g y M esh Star Bus Ri n g Fig. 1.12 Categories of topology 1.8.1 Mesh Topology In mesh topology every device has a dedicated point to point connectivity to every other device. Every device must have (n-1) I/O ports. All WAN links use mesh topology. (Ref fig no. 1.13) Fig. 1.13 Mesh topology (for five devices) IRISET 11 TA2 – Data Communication & Networking Introduction to Data Communication Advantages It is robust. Each link can carry its own data load. It has privacy or secrecy. Fault identification is easy Mesh disadvantages are larger number of cables & I/O ports are required for each device. Also the bulk of the wires can be greater than the available space. 1.8.2 Star Topology In star topology each device has a dedicated point to point link only to central controller called as HUB as shown in fig no. 1.14. If one device wants to send data to another device, it sends through the HUB. Generally used in LAN networks Fig. 1.14 Star topology Advantages It is easy to install and reconfigure. Each device needs only one link. Hence it is less expensive. If a link fails, only that link has to be attended. All other links remain active. It is easy to identify fault. It is also robust. 1.8.3 Bus topology A BUS topology is multipoint. One long cable acts as a backbone to link all devices in a network. The advantage is the installation is easy. Generally used in LAN networks. (Ref fig no. 1.15) Fig. 1.15 Bus topology Disadvantages Difficult in fault isolation and reconnection. Difficult to add device to an existing system. A fault or break in bus cable stops all transmission. 1.8.4 Ring Topology In a ring topology, each has a dedicated point to point connection only with two devices on either side of it. A data is passed along the ring in one direction, from device to device until it reaches its destination. Each device in a ring incorporates a repeater. Generally used in LAN networks (Ref fig no. 1.16) IRISET 12 TA2 – Data Communication & Networking Introduction to Data Communication Fig. 1.16 Ring topology Advantages It is easy to install & configure. To add or delete a device requires only changing two connections. The disadvantages are unidirectional traffic and a break in the ring can disable entire network. 1.9 STANDARD ORGANISATIONS Because of the wide number of hardware manufacturers, a standard is essential in order to connect one computer to another computer if a different type. There are recognized and widely accepted standards governing how data is to be transmitted, whether asynchronously, synchronously or parallely. Standards govern the format of the data, and also specify the hardware details like voltages to use, bit durations, speeds etc..The major organizations responsible for standards are ISO (International Organization for Standards): It is a nongovernmental organization based in Geneva. ISO has standards covering a wide range of computer related topics and it maintains standard for quality assurance. The most significant activities are its work on open systems, which defines the protocols that would allow any two computers to communicate independent of their architecture. http://www.iso.org ITUT (International Telecommunication Union): Formerly known as CCITT It is an agency of United Nations, it sets standards for modems (V-Series / Which defines data transmission over phone lines) & switching networks (X-Series / Which defines data transmission over switching digital networks). The ITU co-ordinates international communications and recommend standard interfaces and policies for the interconnection of national networks. http://www.itu.int ANSI (American National Standard Institute): Represents a number of US standards organizations. It is a private agency, it sets up the standards for FDDI (which is one of the LAN interface) & ASCII (which is used by many computers for storing information. http://www.ansi.org IEEE (Institute of Electrical and Electronic Engineers): Largest Professional organization of engineers, developing standards for LAN called as IEEE802 http://www.ieee.org IRISET 13 TA2 – Data Communication & Networking Introduction to Data Communication EIA/TIA (Electronic Industries Association/Telecommunication Industries Association): Defines physical connection interfaces and Electronic signaling specifications for data communications. Their most well known standard is the RS-232(EIA- 232); EIA-449 & EIA-530 defines serial transmission between two digital devices (i.e. computer to modem) http://www.tiaonline.org , http://www.eciaonline.org IEC (International Electro Technical Commission): It is a non-governmental agency devising standards for data processing and safety in office equipments. It has devised a compression standard for images like JPEG. http://www.iec.ch ISOC & IETF (Internet Society & Internet Engineering Task Force): Internet Society concentrates on user issues Including enhancement to the TCP/IP protocol IETF focuses on technical Internet issues (hardware & software) it Developed SNMP(Simple Network Management Protocol) http://www.ietf.org, http://www.isoc.org 1.10 THE OSI MODEL (layered approach to data communications) OSI MODEL - History, Origin, Purpose Established in 1947, the International Standards Organization (ISO) is a multinational body dedicated to worldwide agreement on international standards. An ISO standard that covers all aspects of network communications is the open systems Interconnection model. It was first introduced in the late 1970s. An open system is a set of protocols that allows any two different systems to communicate regardless of their underlying architecture. The purpose of the OSI model is to show how to facilitate communication between different systems without requiring changes to the logic of the underlying hardware and software. The OSI model is not a protocol; it is a model for understanding and designing a network architecture that is flexible, robust and interoperable. The OSI model is a seven-layer framework that allows communication between all types of computer systems. 1.10.1 OSI (Open System Interconnection) MODEL What is the OSI Model? The OSI Model is a way of thinking about how networks 'work'. The OSI Model is a theoretical model--it is not a technology, it is not a protocol, it is not a program or software. The OSI Model sorts out network communication functions into layers The OSI Model does not specify how a layer will work internally--that is a matter left to the programmers. The OSI Model specifies how layers should talk to each other. The OSI Model specifies that any layer's processes should be invisible to the layer above it, and below it. The OSI Model defines how information should be handled when being transported over a network. The OSI Model defines how software should interact with the network. IRISET 14 TA2 – Data Communication & Networking Introduction to Data Communication 1.10.2 Why Should We Learn the OSI model? Learning the OSI Model helps us to understand what functions occur where and when The OSI Model helps us to understand how a Web browser works The OSI Model helps us to understand what Internet Protocol does and how it works The OSI Model helps us to understand why we need ARP The OSI Model helps us to understand what is MAC address Learning the OSI Model makes it easier to learn. Learning the OSI Model makes it easier to perform troubleshooting. Learning the OSI Model makes it easier to troubleshoot any problem, including computer problems. Learning the OSI Model makes it easier to communicate with other technical people and discuss technical issues. 1.10.3 OSI model Fig 1.17 OSI model Network architecture based on OSI model is shown in fig 1.17 (above) & its functional description is given below. The Open Systems Interconnection (OSI) model defines a networking framework to implement protocols in layers, with control passed from one layer to the next. It is primarily used today as a teaching tool. It conceptually divides computer network architecture into 7 layers in a logical progression. The lower layers deal with electrical signals, chunks of binary data, and routing of these data across networks. Higher levels cover network requests and responses, representation of data, and network protocols as seen from a user's point of view. Follow fig 1.18. The OSI model was originally conceived as a standard architecture for building network systems and indeed, many popular network technologies today reflect the layered design of OSI. IRISET 15 TA2 – Data Communication & Networking Introduction to Data Communication Fig.1.18 OSI layers Physical Layer At Layer 1, the Physical layer of the OSI model is responsible for ultimate transmission of digital data bits from the Physical layer of the sending (source) device over network communications media to the Physical layer of the receiving (destination) device. Examples of Layer 1 technologies include Ethernet cables and Token Ring networks. Additionally, hubs and other repeaters are standard network devices that function at the Physical layer, as are cable connectors. Follow fig 1.19. Fig. 1.19 Physical layer At the Physical layer, data are transmitted using the type of signaling supported by the physical medium: electric voltages, radio frequencies, or pulses of infrared or ordinary light. Data Link Layer When obtaining data from the Physical layer, the Data Link layer checks for physical transmission errors and packages bits into data "frames". The Data Link layer also manages physical addressing schemes such as MAC addresses for Ethernet networks, controlling access of any various network devices to the physical medium. Because the Data Link layer is the single most complex layer in the OSI model, it is often divided into two parts, the "Media Access Control" sub layer and the "Logical Link Control" sublayer.Follow fig 1.20. Fig 1.20 Data Link layer IRISET 16 TA2 – Data Communication & Networking Introduction to Data Communication Network Layer The Network layer adds the concept of routing above the Data Link layer. When data arrives at the Network layer, the source and destination addresses contained inside each frame are examined to determine if the data has reached its final destination, Fig 1.21 Network Layer This Layer 3 formats the data into packets delivered up to the Transport layer. Otherwise, the Network layer updates the destination address and pushes the frame back down to the lower layers Follow fig 1.21. To support routing, the Network layer maintains logical addresses such as IP addresses for devices on the network. The Network layer also manages the mapping between these logical addresses and physical addresses. In IP networking, this mapping is accomplished through the Address Resolution Protocol (ARP). Transport Layer The Transport Layer delivers data across network connections. TCP is the most common example of a Transport Layer 4 network protocol. Different transport protocols may support a range of optional capabilities including error recovery, flow control, and support for re- transmission follow Fig 1.22. Fig 1.22 Transport layer IRISET 17 TA2 – Data Communication & Networking Introduction to Data Communication Session Layer The Session Layer manages the sequence and flow of events that initiate and tear down network connections. At Layer 5, it is built to support multiple types of connections that can be created dynamically and run over individual networks. Follow fig 1.23. Fig 1.23 Session Layer Presentation Layer The Presentation layer is the simplest in function of any piece of the OSI model. At Layer 6, it handles syntax processing of message data such as format conversions and encryption / decryption needed to support the Application layer above it.Follow fig 1.24.. Fig 1.24, Presentation Layer Application Layer The Application layer supplies network services to end-user applications. Network services are typically protocols that work with user's data. For example, in a Web browser application, the Application layer protocol HTTP packages the data needed to send and receive Web page content. This Layer 7 provides data to (and obtains data from) the Presentation layer. Follow fig 1.25. Fig 1.25 Application Layer IRISET 18 TA2 – Data Communication & Networking Introduction to Data Communication 1.10.4 An Operational Example of the OSI Model This example assumes that we are on a local area network and that we are using an Ethernet card to communicate with the network. Follow table 1.2 LAYER EXAMPLE FUNCTION/ACTIVITY A Web browser such as Internet Explorer or Netscape provides the means for computer to contact a Web server and download several files that go together to produce a single Web page. We can request a Web page by typing in a Web address or by clicking a link in an open Web page. The Web APPLICATION Web browser is an APPLICATION. The Web browser Browser application gives the means to select a Web server, contact the server and request a Web page. The Web browser handles the process of finding the Web server, requesting the desired file and displaying all the files contained in the Web page. Web browser supports various image file formats, audio files and HTML. The Web browser handles PRESENTATION of the Web page to the user by converting the files stored at the Web server into formats used to display them on computer. Conversion of data from one format to another is the job of the PRESENTATION PRESENTATION layer. A Web browser can convert these file formats into the local formats used on the local computer for displaying images, playing sounds and displaying text; if it cannot, it often can launch an application which does understand the format. Much of the PRESENTATION layer HTTP conversions are handled in the program we are running. SESSION When we request a Web page, the Web browser opens a TCP connection to the Web server. The Web server sends back the Web page and closes the connection. Web browser then opens the Web page. Within the Web page instructions are written in HTML tags which tell the browser where to find additional files to be displayed within the Web page such as style sheets, sound files, images, movies, Flash files and applets. Web browser automatically opens additional TCP connections to the Web server. Each TCP connection is a SESSION. To communicate with a Web server computer must open a TCP connection to the Web server and request a Web page. The TCP connection breaks up the Web page into TRANSPORT TCP manageable chunks, labels them with numbers so they can be reassembled in the correct order and TRANSPORTS the pieces across the correct SESSION. Internet Protocol (IP) is a NETWORK layer protocol that uses unique addresses for the Web server and for computer. IP provides the means for computer to determine whether the Web server is a local computer or a computer located somewhere on the Internet. To reach a Web server on the IP NETWORK Internet, IP protocol also allows computer to figure out how ARP to reach the Internet Web server via default gateway. Computer creates a message addressed to the Web server with computer's return IP address. Computer uses ARP to figure out the physical MAC address of the default gateway and then passes the data to the NETWORK layer. IRISET 19 TA2 – Data Communication & Networking Introduction to Data Communication LLC Once the request from Web browser has been created it is sent to the network card. Once it reaches network card it E must be converted into a message that is sent from DATA LINK T computer to the default gateway which will forward the H MAC message to the Internet. At the DATA LINK layer, the Web E request is inserted inside a network request to the default R N gateway. E T CSMA The physical layer provides the means to transmit the Web PHYSICAL /CD page request to the default gateway. Table 1.2 Operational examples of OSI Layers 1.10.5 SUMMARY OF OSI LAYERS Fig 1.26 Summary of OSI model Video links for understanding of OSI layers https://www.youtube.com/watch?v=vv4y_uOneC0 https://www.youtube.com/watch?v=KUoJKwgnGlQ IRISET 20 TA2 – Data Communication & Networking Data Transmission on Physical Media CHAPTER - 2 DATA TRANSMISSION ON PHYSICAL MEDIA 2.0 INTRODUCTION The following most essential topics covered for “Data Transmission on a Physical media” are Data & Signal, Baseband and Broadband transmission, Impairments, Band width ,Data rate and Baud rate Encoding Transmission Media Categories 2.1 DATA & SIGNAL Data can be analog or digital. Analog data are continuous and take continuous values. Digital data have discrete states and take discrete values. Signals can be analog or digital. Analog signals can have an infinite number of values in a range; digital signals can have only a limited number of values. In data communications, we commonly use periodic analog signals and non-periodic (a periodic) digital signals. Periodic analog signals can be classified as simple or composite. A simple periodic analog signal, a sine wave, cannot be decomposed into simpler signals. A composite Periodic analog signal is composed of multiple sine waves. The bandwidth of a composite signal is the difference between the Highest and the lowest frequencies contained in that signal. A digital signal can have more than two levels, we can send more than 1 bit for each level. Figure 2.1 shows two signals, one with two levels and the other with four. Fig. 2.1(a) & 2.1 (b) Encoded digital signal We send 1 bit per level in figure 2.1(a) and 2 bits per level in figure 2.1 (b). In general, if a signal has L levels, each level needs log2 L bits. E.g. If a digital has eight (8) levels, we need three (3) bits per level Number of bits per level= log2 8 = 3 IRISET 21 TA2 – Data Communication & Networking Data Transmission on Physical Media Digital signal (whether periodic or non-periodic) is a composite analog signal with frequencies between zero and infinity. Digital signal is transmitted either baseband or broadband transmission method. Baseband Transmission: In Baseband, data is sent as digital signals through the media as a single channel that uses the entire bandwidth of the media. The signal is delivered as a pulse of electricity or light depending on the type of cabling being used. Baseband communication is also bi-directional, which means that the same channel can be used to send and receive signals. In Baseband frequency-division multiplexing is not possible. In baseband transmission, the required bandwidth is proportional to the bit rate, if we need to send bits faster, we need more bandwidth. Fig. 2.2 Baseband and Broadband Transmission Broadband Transmission: In Broadband information is sent in the form of an analog signal, which flows as electromagnetic waves or optical waves. Each transmission is assigned to a portion of the bandwidth; hence multiple transmissions are possible at the same time. Broadband communication is unidirectional, so in order to send and receive, two pathways are needed. This can be accomplished either by assigning a frequency for sending and assigning a frequency for receiving along the same cable or by using two cables, one for sending and one for receiving. In broadband frequency-division multiplexing is possible. Difference between Baseband and Broadband is illustrated below in fig 2.3 Fig. 2.3, Difference between Baseband and Broadband Transmission IRISET 22 TA2 – Data Communication & Networking Data Transmission on Physical Media Transmission Impairment Signals travel through transmission media is not perfect. The imperfection causes signal impairment. This means that the signal at the beginning of the medium is not the same as the signal at the end of the medium. What is sent is not what is received. Three causes of impairment are attenuation, distortion, and noise. Ref fig 2.4 Fig. 2.4, Signal impairment. Attenuation: Attenuation means loss of energy. When a simple or composite signal travels through a medium, it loses some of its energy in overcoming the resistance of the medium. To compensate this loss amplifiers are used to amplify the signal. The decibel (dB) measures the relative strengths of two signals or one signal at two different points. The decibel value is negative if a signal is attenuated & positive if a signal is amplified. dB = 10 log 10 P2 / P1 Distortion: Distortion means that the signal changes its form or shape. Distortion can occur in a composite signal made of different frequencies. Each signal component has its own propagation speed; own delay in arriving at the destination causes phase difference at the receiver. Noise: Noise causes signal impairment. Several types of noise, like thermal noise, induces noise, crosstalk noise & impulse noise corrupts the signal Signal-to-Noise Ratio (SNR): It is ratio of what is wanted (Signal) to what is not wanted (noise). A high SNR means the signal is less corrupted by noise; a low SNR means the signal is more corrupted by noise. SNR = average signal power / average noise power Because SNR is the ratio of powers, it is often described in decibel units called SNRdB SNRdB = 10 log 10 SNR Data rate: In data communications it is very important how fast we send data in bits per second (bps) over a channel. This data rate depends on 1. The bandwidth available 2. The level of the signal we use 3. The quality of the channel (the level of the noise) IRISET 23 TA2 – Data Communication & Networking Data Transmission on Physical Media Data rate is calculated, using two methods 1. Nyquist bit rate (noiseless channel) 2. Shannon capacity (noisy channel) Nyquist bit rate (noiseless channel): For a noiseless channel, the nyquist bit rate defines the theoretical maximum bit rate is Bit Rate = 2 x bandwidth x log 2 L ‘bandwidth’ is the bandwidth of the channel ‘L’ is the number of signal levels used to represent data On a given specific bandwidth we can increase the bit rate by increasing the number of signal levels. But practically there is a limit, it will burden the receiver. Hence increasing the levels of a signal may reduce the reliability of the system. Shannon capacity (noisy channel): Practically we cannot have a noiseless channel, hence as per the Shannon capacity the theoretical maximum bit rate of a noisy channel is Bit Rate = bandwidth x log 2 (1 + SNR) ‘bandwidth’ is the bandwidth of the channel ‘SNR’ is the signal-to-noise ratio Whatever may be the no. of signal levels, we cannot achieve a data rate higher than the capacity of the channel and it defines the characteristics of the channel, not the method of transmission. Bandwidth: In networking, we use the term bandwidth in two contexts. The first, bandwidth in hertz, refers to the range of frequencies in a composite signal or the range of frequencies that a channel can pass. The second, bandwidth in bits per second, refers to the speed of bit transmission in a channel or link. An increase in bandwidth in hertz means an increase in bandwidth in bits per second. This relationship depends on whether baseband transmission or broadband (modulation) transmission. Baud Rate: Baud rate refers to the signal (symbol) rate, how many signal changes are transmitted per second. One goal of the data communications is to increase the data rate while decreasing the signal rate. Increasing the data rate increases the speed of transmission; decreasing the signal rate decreases the bandwidth requirement. Bit rate is the number of bits per second. Baud rate is the number of signal elements per second. In the analog transmission of digital data, the baud rate is less than or equal to bit rate. BPS = Baud per second x the number of Bits per Baud The relationship between the data rate (bit rate) and the signal rate (baud rate) is S = N x 1 / r baud IRISET 24 TA2 – Data Communication & Networking Data Transmission on Physical Media Where ‘S’ is the baud rate, ‘N’ is the bit rate and ‘r’ is the ratio of number of data elements carried in one signal element. r = log 2 L, Where ‘L’ is the no. of signal elements. Throughput: It is a measure of how fast we can actually send data through a network; throughput is also measured as bits per second (bps) as that of bandwidth. But both are not same, throughput is always less than the bandwidth. Bandwidth is a potential measurement of a link; the throughput is an actual measurement of a link. 2.2 ENCODING Data (or) Signal encoding can be of four types: DIGITAL-TO-ANALOG CONVERSION ANALOG TO ANALOG CONVERSION ANALOG-TO-DIGITAL CONVERSION DIGITAL-TO-DIGITAL CONVERSION 2.2.1 DIGITAL-TO-ANALOG CONVERSION Digital-to-analog conversion is the process of changing one of the characteristics of an analog signal based on the information in digital data. (Refer Fig. 2.5) Fig. 2.5 Digital-to-Analog conversion There can be different types of DIGITAL TO ANALOG conversion techniques as shown below fig 2.6 Fig. 2.6 Types of Digital-to-Analog conversion techniques This sort of conversion will enable digital data to be carried over a ‘Long Distance Communication Link‘. Example: Modem is one such device that employs this conversion technique to interface a Digital source and an Analog Media. IRISET 25 TA2 – Data Communication & Networking Data Transmission on Physical Media 2.2.2 ANALOG TO ANALOG CONVERSION Analog-to-analog conversion is the representation of analog information by an analog signal. One may ask why we need to modulate an analog signal; it is already analog. Modulation is needed if the medium is band pass in nature or if only a band pass channel is available to us. There can be different types of ANALOG TO ANALOG conversion techniques as shown below fig 2.7 Fig. 2.7 Types of Analog-to-Analog conversion techniques 2.2.3 ANALOG-TO-DIGITAL CONVERSION A Digital signal is superior to an analog signal. The tendency today is to change an analog signal to digital data before transmission. One such technique is Pulse Code Modulation, is shown (Fig. 2.8), schematically, below. Fig. 2.8 Analog to Digital conversion Example: Transmission of Voice, Video, Telemetry 2.2.4 DIGITAL-TO-DIGITAL CONVERSION In this section, we see how we can represent digital data by using digital signals (Fig 2.9) The conversion involves three techniques: line coding, block coding, and scrambling. Line coding is always needed; block coding and scrambling may or may not be needed always. Fig. 2.9 Digital to Digital conversion IRISET 26 TA2 – Data Communication & Networking Data Transmission on Physical Media 2.3 Transmission Media Categories There are 2 basic categories of Transmission Media as shown in fig 2.10 a. Un-Guided Transmission Media b. Guided Transmission Media Fig. 2.10 Transmission Media Categories 2.3.1 Un-guided Transmission Media Wireless communication is the base of un - guided media. It transports electromagnetic waves without using a physical conductor. The wireless media available for transmitting network packets are 3 types a. Radio waves – used for Wireless LANs b. Microwaves – used for terrestrial and satellite communication. c. Infrared waves – used for controlling devices like remote controls. 2.3.2 Guided Transmission Media There 4 basic types of Guided Media: a. Open Wire c. Optical Fiber b. Coaxial Cable d. Twisted Pair Media versus Bandwidth Comparison of usable bandwidth between the different guided transmission media is shown in table 2.1 Cable Type Bandwidth Open Wire 0 - 5 MHz Coaxial Cable 0 - 600 MHz Optical Fiber Cable 0 - 10 GHz Twisted Pair Cable 0 - 100 MHz Table. 2.1 Comparison of bandwidth i. Open wire: This open wire is not used in Data communications. ii. Coaxial Cables: Two types of coaxial cable are used in data communications. Thick net (RG-8 and RG-11 coaxial cable) and Thin net (RG-58 coaxial cable). Thick net is a heavy- gauge coaxial cable that is fairly inflexible and requires special equipment (over and above a simple network card) to connect the computer to the network backbone. These co-axial cables are now not used much. IRISET 27 TA2 – Data Communication & Networking Data Transmission on Physical Media iii. Optical Fiber Cables: Fiber-optic cable is a high-speed alternative to copper wire and is often employed as the backbone of larger corporate networks. However, the drop in the price of fiber-optic cable has started to make it a possibility for other LAN uses. Fiber-optic cable uses glass or plastic filaments to move data and provides greater bandwidth as well as longer cable runs (up to 2 kilometers, depending on the network architecture). iv. Twisted Pair cables: LAN cables are generically called twisted pair cables. There are two (2) types. One is UTP (Unshielded Twisted Pair) and the other is STP (Shielded Twisted Pair). UTP is predominantly used for indoor areas and whereas STP for outdoor & in special areas. These UTP cables are identified with a category rating. UTP comes in two forms SOLID or STRANDED. SOLID refers to the fact that each internal conductor is made up of a single (solid) wire, STRANDED means that each conductor is made up of multiple smaller wires. The only obvious benefit of using stranded cable (which is typically more expensive) is that it has a smaller 'bend- radius' (we can squeeze the cable round tighter corners with lower loss) or where we plug and unplug the cable frequently. All other things being equal the performance of both types of cable is the same. In general solid cable is used for backbone wiring and stranded for PC to wall plug cables. IRISET 28 TA2 – Data Communication & Networking Data Transmission on LAN CHAPTER - 3 DATA TRANSMISSION ON LAN 3.0 INTRODUCTION In this chapter, functions associated with “Data Transmission on LAN “are discussed. And the Following Topics are covered: Data Link Control - Framing ,Line discipline ,Flow Control & Error Control Media Access Control , Ethernet Categories , Ethernet Wiring practices and Power over Ethernet Connecting Devices 3.1 DATA LINK CONTROL 3.1.1 FRAMING The data link layer needs to pack bits into frames, so that each frame is distinguishable from another. A frame in a character-oriented protocol is shown in fig 3.1(a) & a frame in a bit- oriented protocol is shown in fig 3.1(b) Fig. 3.1(a) Character-oriented protocol frame Fig. 3.1(b) Bit-oriented protocol frame The most important function of a data link layer is LINE DISCIPLINE, FLOW CONTROL and ERROR CONTROL 3.1.2 LINE DISCIPLINE Whatever the system, no device in it should be allowed to transmit until the device has the evidence that intended receiver is able to receive and is prepared to accept the transmission. What if the receiving device does not expect a transmission, is busy, or is out of commission? With no way to determine the status of the intended receiver, the transmitting device may waste its time sending data to a non functioning receiver or may interfere with signals already on the link. The line discipline functions of the data link layer oversee the establishment of links and the right of a particular device to transmit at a given time. Line discipline can be done in two ways: enquiry/acknowledgment (ENQ/ACK) and poll/select. The first method is used in peer-to-peer communication; the second method is used in primary- secondary communication. IRISET 29 TA2 – Data Communication & Networking Data Transmission on LAN 3.1.3 FLOW CONTROL The second aspect of data link control, following line discipline, is flow control. In most protocols flow control is a set of procedures that tell the sender how much data it can transmit before it must wait for an acknowledgment from the receiver. Two issues are at stake: The flow of data must not be allowed to overwhelm the receiver. Any receiving device has a limited speed at which it can process incoming data and a limited amount of memory, in which to store incoming data. The receiving device must be able to inform the sending device before those limits are reached and to request that the transmitting device send fewer frames or stop temporarily. Incoming data must be checked and processed before they can be used. The rate of such processing is often slower than the rate of transmission. For this reason, each receiving device has a block of memory, called a buffer, reserved for storing incoming data until they are processed. If the buffer begins to fill up, the receiver must be able to tell the sender to halt transmission until it is once again able to receive. As frames come in, they are acknowledged, either frame by frame or several frames at a time. If a frame arrives damaged, the receiver sends an error message (a NAK frame). Flow control refers to a set of procedures used to restrict the amount of data the sender can send before waiting for acknowledgment. Two methods have been developed to control the flow of data across communications links: Stop-and-Wait and Sliding Window. For efficient data packet transmission, the transmitter must not be forced to stop sending for an unnecessarily long time. This will happen if the receiving computer sends an acknowledgment signal to stop and does not send another signal to begin transmitting when its buffer has available space or is empty. Other considerations for efficient data packet transmission include: Round-trip delay time End-to-end delay Bandwidth delay 3.1.4 ERROR DETECTION & CORRECTION Data can be corrupted during transmission. Some applications require that errors be detected and corrected. Let us first discuss some issues related, directly or indirectly, to error detection and correction. In a single-bit error, only 1 bit in the data unit has changed as shown in fig 3.2 (a) Fig 3.2 (a) Single bit error A burst error as shown in fig 3.2 (b) means that 2 or more bits in the data unit have changed. Fig 3.2 (b) Burst errors IRISET 30 TA2 – Data Communication & Networking Data Transmission on LAN To detect or correct errors, we need to send extra (redundant) bits with data as shown in fig 3.3 below. Fig. 3.3 sending redundant bits with data There are different types of error detection methods / codlings are available. The popular methods are Parity checking, Block coding, CRC and Checksum etc. Block Coding: In block coding, we divide our message into blocks, each of k bits, called data words. We add redundant bits to each block to make the length n = k + r. The resulting n-bit blocks are called code words as shown in fig 3.4 below. Fig 3.4 Block coding (code words) The 4b/5b coding is a good example of block coding. In this coding scheme, k = 4 and n = 5. As we have 2k = 16 data words and 2n = 32 code word. We see that 16 out of 32 codeword are used for message transfer and the rest are either used for other purposes or unused. Table below shows the list of data words and code words. Later, we will see how to derive a codeword from a data word. Assume that k = 2 and n = 3. The sender encodes the data word 01 as 011 and sends it to the receiver. Consider the following cases as shown in Table 3.1. 1. The receiver receives 011. It is a valid codeword. The receiver extracts the data word 01 from it. 2. The codeword is corrupted during transmission, and 111 is received. This is not a valid codeword and is discarded. 3. The codeword is corrupted during transmission, and 000 is received. This is a valid codeword. The receiver correctly extracts the data word 00. Two corrupted bits have made the error undetectable. Table 3.1 Code for error detection IRISET 31 TA2 – Data Communication & Networking Data Transmission on LAN An error-detecting code can detect only the types of errors for which it is designed; other types of errors may remain undetected. A block diagram (fig. 3.5) is shown below. Fig.3.5 Error-detecting coding By adding more redundant bits to above Example, to see if the receiver can correct an error without knowing what was actually sent. We add 3 redundant bits to the 2-bit data word to make 5-bit code words. Table below shows the data words and code words. Assume the data word is 01. The sender creates the codeword 01011. The codeword is corrupted during transmission, and 01001 is received. First, the receiver finds that the received codeword is not in the table. This means an error has occurred. The receiver, assuming that there is only 1 bit corrupted, uses the following strategy to guess the correct data word as shown in Table 3.2 below. 1. Comparing the received codeword with the first codeword in the table (01001 versus 00000), the receiver decides that the first codeword is not the one that was sent because there are two different bits. 2. By the same reasoning, the original codeword cannot be the third or fourth one in the table. 3. The original codeword must be the second one in the table because this is the only one that differs from the received codeword by 1 bit. The receiver replaces 01001 with 01011 and consults the table to find the data word 01. Table 3.2 code for error detection (adding more redundant bits) Cyclic codes are special linear block codes with one extra property. In a cyclic code, if a codeword is cyclically shifted (rotated), the result is another codeword. 3.1.5 CYCLIC REDUNDANCY CHECK (CRC) The divisor in a cyclic code is normally called the generator polynomial or simply the generator as shown in Table 3.3. Table 3.3 Cyclic Redundancy Check (CRC) / Polynomial IRISET 32 TA2 – Data Communication & Networking Data Transmission on LAN The block diagram for encoder & decoder for cyclic redundant bits is shown in fig 3.6 below. Fig. 3.6 Encoder & decoder for cyclic redundant bits. An example for CRC is shown in fig 3.7, let a four bit data be 1001. If the divisor is a 1011 (four bit), then three 0’s are augmented to data word. We get quotient and remainder. Remainder is added to data word to form the code word. This method is more popular. Fig. 3.7 ,Example for Cyclic Redundancy check 3.1.6 CHECKSUM The last error detection method we are going to discuss here is called the checksum as shown in fig 3.8. The checksum is used in the Internet by several protocols although not at the data link layer. However, we briefly discuss it here to complete our discussion on error checking. Suppose our data is a list of five 4-bit numbers that we want to send to a destination. In addition to sending these numbers, we send the sum of the numbers. For example, if the set of numbers is (7, 11, 12, 0, 6), we send (7, 11, 12, 0, 6, 36), where 36 is the sum of the original numbers. The receiver adds the five numbers and compares the result with the sum. If the two are the same, the receiver assumes no error, accepts the five numbers, and discards the sum. Otherwise, there is an error somewhere and the data are not accepted. IRISET 33 TA2 – Data Communication & Networking Data Transmission on LAN We can make the job of the receiver easier if we send the negative (complement) of the sum, called the checksum. In this case, we send (7, 11, 12, 0, 6, −36). The receiver can add all the numbers received (including the checksum). If the result is 0, it assumes no error; otherwise, there is an error. How can we represent the number 21 in one’s complement arithmetic using only four bits? The number 21 in binary is 10101 (it needs five bits). We can wrap the leftmost bit and add it to the four rightmost bits. We have (0101 + 1) = 0110 or 6. How can we represent the number −6 in one’s complement arithmetic using only four bits? In one’s complement arithmetic, the negative or complement of a number is found by inverting all bits. Positive 6 is 0110; negative 6 is 1001. If we consider only unsigned numbers, this is 9. In other words, the complement of 6 is 9. Another way to find the complement of a number in one’s complement arithmetic is to subtract the number from 2n − 1 (16 − 1 in this case). Fig. 3.8 Example for Checksum Sender site: The message is divided into 16-bit words. The value of the checksum word is set to 0. All words including the checksum are added using one’s complement addition. The sum is complemented and becomes the checksum. The checksum is sent with the data. Receiver site: The message (including checksum) is divided into 16-bit words. All words are added using one’s complement addition. The sum is complemented and becomes the new checksum. If the value of checksum is 0, the message is accepted; otherwise, it is rejected. 3.1.7 ERROR CONTROL There are three protocols in this section that use error control. Stop-and-Wait Automatic Repeat Request Go-Back-N Automatic Repeat Request Selective Repeat Automatic Repeat Request IRISET 34 TA2 – Data Communication & Networking Data Transmission on LAN 3.2 LAN PROTOCOLS: For data transmission on LAN, protocols are used to form frames. Basically there two types of protocols are used. They are Character Oriented protocols Bit oriented protocols Character – oriented protocols In character oriented protocols, data to be carried are 8 bit characters from a coding system such as ASCII. The header, which normally carries the source and destination address and other control information and trailer which carries error detection or error correction redundant bits are also multiples of 8 bits. To separate one frame from the next, an 8 bit flag is added at the beginning and end of the frame Character orientated protocols are inefficient. This is because a character is used to convey meaning. As the number of meanings increase, the overhead involved also increases, as a character is used to signal the meaning. Bit - oriented protocols In bit-orientated protocols, each bit has significance. The position and value of each bit in the data stream determines its function. Thus, a single character can hold 256 different meanings in a bit orientated protocol. This reduces the information needed to convey additional information, thus increasing the efficiency of the protocol. Examples of these types of protocols are, X.25 CCITT standard for packet data transmission HDLC high level data link control (adopted by ISO in 1970's) SDLC synchronous data link control (developed by IBM) Links between sender and receiver can be half duplex, full duplex or both. Information can be sent across the network in two different ways, traveling different routes to the receiver (datagram), or traveling the same route (virtual circuit). Information is packaged into an envelope, called a FRAME. Each frame has a similar format header containing routing and control information body containing the actual data to be transmitted to destination and tail containing checksum data Frames are responsible for transporting the data to the next point. Consider data that is to be sent from a source to a destination. This involves several intermediate points (called stations). The data is placed into a frame and sent to the next station, where the frame is checked for validity and if valid, the data extracted. The data is now repackaged into a new frame and sent by that station to the next station, and the process repeats till the data arrives at the destination. When a station transmits a frame, it keeps a copy of the frame contents till the frame is acknowledged as correctly received by the next station. When a station receives a frame, it is temporarily stored in a buffer and checked for errors. If the frame has errors, the station will ask the previous station to resend the frame. Frames that are received without errors are also acknowledged, at which point the sending station can erase its copy of the frame. A receiving station has a limited amount of buffer space to store incoming frames. When it runs out of buffer space, it signals other stations that it cannot receive any more frames. IRISET 35 TA2 – Data Communication & Networking Data Transmission on LAN Data is placed into frames for sending across a transmission link. The frame allows intelligent control of the transmission link, as well as supporting multiple stations, error recovery, intelligent (adaptive) routing and other important functions. For the purposes of sending data on a link, there are two types of stations Primary station (issues commands) Secondary station (responds to commands) Primary Station: The primary station is responsible for controlling the data link, initiating error recovery procedures, and handling the flow of transmitting data to and from the primary. In a conversation, there is one primary and one or more secondary stations involved. Secondary Station: A secondary station responds to requests from a primary station, but may under certain modes of operation, initiate transmission of its own. An example of this is when it runs out of buffer space, at which point it sends RNR (receiver not ready) to the primary station. When the buffer space is cleared, it sends RR (receiver ready) to the primary station, informing the primary that it is now ready to receive frames again. Because frames are numbered, it is possible for a primary station to transmit a number of frames without receiving an acknowledgement for each frame. The secondary can store the incoming frames and reply using a supervisory frame with the sequence number bits in the control field set so as to acknowledge a group of received frames. If the secondary runs out of buffer space to store incoming Information frames, it can transmit a supervisory frame informing primary stations of its status. Primary stations will thus keep their Information frames and wait till the secondary is again able to process Information frames. When a secondary cannot process Information frames, it must still be able to process incoming supervisory and unnumbered frames (because of status requests). At any one time, a number of Information frames can be unacknowledged by a secondary station, and this is called the sliding window value, which defaults to 2, but can be negotiated when a call is first established. 3.3 MEDIA ACCESS Classification of media access / multiple-access protocols is shown in fig 3.9 Fig. 3.9 Classification of multiple-access protocol In random access methods, no station is superior to another station and none is assigned the control over another. No station permits, or does not permit, another station to send. At each instance, a station that has data to send uses a procedure defined by the protocol to make a decision on whether or not to send. IRISET 36 TA2 – Data Communication & Networking Data Transmission on LAN In controlled access, the stations consult one another to find which station has the right to send. A station cannot send unless it has been authorized by other stations. Channelization is a multiple-access method in which the available bandwidth of a link is shared in time, frequency, or through code, between different stations. 3.3.1 MAC - Media Access Control The IEEE 802.3 Media Access Control layer as shown in fig 3.10 is physically located in the firmware (ROM) of the Network Interface Card. It is the link between the Data Link Layer and the Physical Layer of the OSI model and logically resides in the lower portion of the Data Link Layer. There is only 1 MAC layer for all IEEE 802.3 versions: 802.3, 802.3a, 802.3b, 802.3i, etc. OSI Model IEEE DataLink 802.2 LLC Layer 802.3 MAC – CSMA/CD 802.3 802.3a 802.3b 802.3e 802.3i Physical 10Base5 10Base2 10Broad 36 1Base5 10BaseT Layer Thick Coax Thin Coax Braodband StarLAN Twisted Pair Fig. 3.10 IEEE 802.3 MAC layer versions The most popular type of IEEE 802.3 Media Access Control protocol is Ethernet protocol and it uses CSMA/CD (Carrier Sense Multiple Access/Collision Detect) to determine Bus Arbitration. The MAC layer is concerned with the order of the bits and converting the Datagram from the Network Layer into Packets/Frames. Fig 3.11 shows the MAC layer / Ethernet frame format. Preamble SFD DA SA Length IF / FCS DATA Fig 3.11, MAC layer / Ethernet frame format Preamble: The Preamble is used to synchronize the receiving station's clock. It consists of 7 bytes of 10101010. Start Frame Delimiter (SFD): The Start Frame Delimiter indicates the start of the frame. It consists of 1 byte of 10101011. It is an identical bit pattern to the preamble except for the last bit. The Destination Address (DA): Indicates the destination (receiving station) of the frame. It is 6 octets long (48 bits), The DA field as shown in fig 3.13 consists of I/G U/L 46 Address bits Fig 3.12 DA Field I/G: Stands for Individual/Group. It indicates whether the destination is for an individual or for a multicast broadcast. It is one bit long: 0 = Individual 1 = Group IRISET 37 TA2 – Data Communication & Networking Data Transmission on LAN A multicast broadcast can be for everyone or for a group. For a multicast broadcast to all stations, the Destination Address = FFFFFFFFFFFFh (h - hexadecimal notation). To multicast to a specific group, the Network Administrator must assign unique addresses to each station. U/L: Stands for Universal/Local. It allows for unique addresses. It is used to indicate whether a local naming convention is used - administered by the Network Administrator (not recommended - incredible amount of work) or the burnt-in ROM address is used (recommended). 46 Bit Address: 46 bits address indicating the destination NIC cards address burnt into the firmware (ROM) of the card or the unique name assigned to the card during the card's initialization by the Network Administrator. Source Address (SA): The Source Address indicates the source or transmitting station of the frame. It is identical in format to the Destination Address but always has the I/G bit = 0 (Individual/Group Bit = Individual) Length (L): The Length field indicates the Length of the Information Field. It allows for variable length frames. The minimum Information Field size is 46 octets and the maximum size is 1500 octets. When the Information Field size is less than 46 octets, the Pad field is used. Due to the 802.3 MAC Frame having a Length field, there is no End Delimiter in the MAC Frame. The Length of the field is known and the receiving station counts the number of octets. Information Field (Data): The Information Field contains the Data from the next upper layer: Logical Link Control Layer. It is commonly referred to as the LLC Data. The minimum Information Field size is 46 octets and the maximum size is 1500 octets. Pad: The Pad is used to add octets to bring the Information Field up to the minimum size of 46 octets if the Info Field is less than the minimum. Frame Check Sequence (FCS): The Frame Check Sequence is used for error-checking at the bit level. It is based on 32 bit CRC (Cyclic Redundancy Checking) and consists of 4 octets (4 x 8 = 32 bits). The FCS is calculated according to the contents of the DA, SA, L, Data and Pad fields. Total breakup of MAC Frame Length is shown in table 3.4 Min Size Max. Size (octets) (octets) Preamble 7 7 Start Frame Delimiter 1 1 Destination Address 6 6 Source Address 6 6 Length 2 2 Information Field 46 1500 Frame Check Sequence 4 4 TOTAL: 72 1526 Octets Table 3.4 MAC frame Length breakup IRISET 38 TA2 – Data Communication & Networking Data Transmission on LAN MAC / Ethernet Frame structure is shown in fig 3.13 Fig 3.13 MAC / Ethernet frame structure 3.3.2 CSMA/CD (Carrier Sense Multiple Access/ Collision Detect) Bus arbitration is performed on all versions of Ethernet using the CSMA/CD (Carrier Sense Multiple Access/ Collision Detect) protocol. Bus arbitration is another way of saying how to control who is allowed to talk on the (medium) and when. Put simply, it is used to determine whose turn it is to talk. In CSMA/CD, all stations, on the same segment of cable, sense for the carrier signal. If the carrier is sensed, then it is treated that the segment of cable NOT free for communication. In the absence of carrier, it is treated that the segment of cable is free for communication. This principle of working is called the Carrier Sense portion of CSMA/CD. Sender has to keep trying to access the media by way of sensing the presence/absence of carrier. All stations share the same segment of cable and can talk on it similar to a party line. This is the Multiple Access portion of CSMA/CD. If 2 stations attempt to talk at the same time, a collision is detected and both stations back off for a random amount of time and then try again. 3.3.3 CSMA/CA (Carrier Sense Multiple Access/ Collision Avoidance) CSMA/CA stands for: Carrier Sense Multiple Access With Collision Avoidance. As per the CSMA/CA, a station wishing to transmit has to first listen to the channel for a predetermined amount of time so as to check for any activity on the channel. If the channel is sensed "idle" then the station is permitted to transmit. If the channel is sensed as "busy" the station has to defer its transmission. This is the essence of both CSMA/CA and CSMA/CD. In CSMA/CA (Local Talk), once the channel is clear, a station sends a signal telling all other stations not to transmit, and then sends its packet. Collision avoidance is used to improve the performance of CSMA by attempting to be less "greedy" on the channel. If the channel is sensed busy before transmission then the transmission is deferred for a "random" interval. This reduces the probability of collisions on the channel. IRISET 39 TA2 – Data Communication & Networking Data Transmission on LAN CSMA/CA is used where CSMA/CD cannot be implemented due to the nature of the channel. CSMA/CA is used in 802.11 based wireless LANs and it is not possible to listen while sending, therefore collision detection is not possible. 3.4 ETHERNET IEEE 802.3 supports a LAN standard originally developed by Xerox and later extended by a joint venture between Digital Equipment Corporation, Intel Corporation and Xerox. This was called Ethernet. The evolution of Ethernet is in fig 3.14 Fig 3.14 Ethernet evolution IEEE divides the standard Ethernet implementation into four different standards as shown in fig 3.15. 10Base5, 10Base2, 10Base-T and 10Base-F. The first number (10) indicates data rate in MBPS. The last number or letter (5, 2, T and F) indicates maximum cable length or the type of cable. However, the maximum cable length restriction can be changed using networking devices such as repeaters or bridges. Fig 3.15 Implementation of Ethernet The backbone of wired Ethernet is coaxial, UTP, fiber in 10Base5, 10Base-T, 10 Base- F respectively. Electrical Specification for Ethernet: Signaling: The baseband systems use Manchester digital encoding. Data Rate: Ethernet LANs can support data rates between 1 and 100 Mbps. Frame Format: IEEE 802.3 specifies one type of frame as shown in fig 3.13 containing seven fields: preamble, SFD, DA, SA, length/type of PDU, 802.3 frames, and the CRC. IRISET 40 TA2 – Data Communication & Networking Data Transmission on LAN 3.4.1 IEEE 802.3 defines 5 media types of IEEE 802.3 Ethernet variants: IEEE Std Name Cabling Transfer Methodol Distance rate ogy limit IEEE 802.3 10Base Thick 10 Mbps Baseban 500m 5 Coax d IEEE 802.3a 10Base Thin 10 Mbps Baseban 185m 2 Coax d IEEE803b 10Broa Broadb 10 Mbps Broadban 3600m d36 and d IEEE802.3e 1Base5 Star 1 Mbps Baseban 500m LAN d IEEE 802.3i 10Base Cat5 Twisted 10 Mbps Baseban 100m T Pair d IEEE 802.3u 100Bas Cat5 Twisted Baseban 100m eT Pair 1000Mbps Full d Duplex IEEE 802.3z 1Gbase Cat5e Twisted 1 Gbps Full Baseban 100m T Pair Duplex d Table 3.5 Ethernet media variants Baseband - only a single stream of intelligence or data is transmitted. Ex. A television station broadcasts one television channel from its transmitter. Broadband - multiple streams of intelligence or data is transmitted. Ex. A cable company broadcasts many television channels on its cable system. IEEE 802.3 - 10Base5 (Thick Coax or thick net) was the original Ethernet configuration. Hasn't been used since the early 1990s. 10Base5 was replaced by Thin Coax. IEEE 802.3a - 10Base2 (Thin Coax or thin net) was commonly used for new installations in the 1990s and was replaced by 10BaseT in the mid 1990s. IEEE 802.3b - 10Broad36 is rarely used; it combined analog and digital signals together. Broadband means that a mixture of signals can be sent on the same medium. I have never seen or heard of a 10Broad36 installation. IEEE 802.3e - Star LAN was a slow 1 Mbps standard that was used in the 1980s briefly. IEEE 802.3i - 10BaseT (cheaper net) was commonly used to connect workstations to network hubs starting in the mid 1990s until the early 2000s. The network uses Cat5 cabling (Twisted Pair) to connect to other Hubs. IEEE 802.3u - 100BaseT (fast Ethernet) is commonly used to connect workstations to network hubs and became common in the early 2000s. The network uses Cat5 cabling (Twisted Pair) to connect to other Hubs or switches. IEEE 802.3z - 1000BaseT or 1GbaseT (Gigabit Ethernet) is commonly used to connect servers to high speed backbone networks through Cat5e cabling (Twisted Pair). The standard defines auto-negotiation of speed between 10, 100 and 1000 Mbit/s so the speed will fall to the maximum supported by both ends - ensuring inter-working with existing installations. Gigabit Ethernet uses all 4 pairs (8 conductors). The transmission scheme is radically different (PAM-5 amplitude modulation scheme is used ) and each conductor is used for send and receive. IRISET 41 TA2 – Data Communication & Networking Data Transmission on LAN 3.4.2 Cables used for Ethernet and their Wiring Practices: Cables used for Ethernet for Local Area Network (LAN) are generically called twisted pair cables. There are two (2) types. One is UTP (Unshielded Twisted Pair) and the other is STP (Shielded Twisted Pair). UTP is predominantly used for indoor areas and whereas STP for outdoor & in special areas. These UTP cables are identified with a category rating. UTP comes in two forms SOLID or STRANDED. SOLID refers to the fact that each internal conductor is made up of a single (solid) wire, STRANDED means that each conductor is made up of multiple smaller wires. The only obvious benefit of using stranded cable (which is typically more expensive) is that it has a smaller 'bend- radius' (we can squeeze the cable round tighter corners with lower loss) or where we plug and unplug the cable frequently. All other things being equal the performance of both types of cable is the same. In general solid cable is used for backbone wiring and stranded for PC to wall plug cables. Refer fig.3.16 for UTP cables. Technical name-RG-8 Used for 10base t and 100base t networks. They have different categories from 1-6. Total length of the segment is 100 meters. Common implementation in Star Topology. CAT -3 cable has speed of 10 Mbps. CAT -5 cable has speed of 100Mbps and CAT -6 above 100Mbps Fig.3.16 UTP CABLE (4 -pair) Fig. 3.17 Use of crossed and straight cables Note: We show Straight cables as BLUE and Crossed as RED. As shown in fig 3.17. Straight cables are used for interconnecting dissimilar devices and Crossed cables are used between similar devices. IRISET 42 TA2 – Data Communication & Networking Data Transmission on LAN To avoid the need for Crossed cables many vendors provide UPLINK ports on Hubs or Switches - these are specially designed to allow the use of a STRAIGHT cable when connecting back-to-back Hubs or Switches. Category 5(e) (UTP) colour coding table The following Fig. 3.18 (a) , shows the normal color coding for category 5 cables (4 pair) based on the two standards 568A and 568B supported by TIA/EIA. Fig. 3.18 (a) TIA/EIA 568 Standard for straight wiring The following description shows the wiring at both ends (male RJ45 connectors) of the crossed cable. The diagrams Fig. 3.18 (b) below shows crossing of all 4 pairs. Crossing of pairs 4, 5 and 7, 8 is optional. Fig. 3.18 (b) TIA/EIA 568 Standard for crossed wiring. 3.5 PoE (Power over Ethernet): Power over Ethernet is a technology which allows a single cable to provide both data connection and electrical power to the devices as shown in fig 3.19 It is not necessary to use two individual lines for Data & Power supply. One Ethernet line is sufficient. This technology is applicable for wide range of network products such as Access Points, Routers, IP cameras, modems, switches, embedded computers or other network products. IRISET 43 TA2 – Data Communication & Networking Data Transmission on LAN Power over Ethernet is defined by standard IEEE 802.3af / 15.4 W, (at the same time it is defined by new prep