Standard LAN Protocols The IEEE 802 Standards The IEEE 802 Standards (also known as ISO 8802) lay down a set of guide lines as to how a range of common networks should work. The IEEE 802.1 Standard describes the architecture, general management, addressing and internetworking of IEEE 802 networks. The IEEE 802.2 Standard describes the interface between the Network Layer and the Data Link Layer. – This standardised interface is called Logical Link Control (LLC) and allows the software from the Network Layer upwards to be ported from one IEEE 802 LAN to another. IEEE 802.2: Logical Link Control Logical Link Control (LLC) is essentially a sub-layer in the Data Link Layer of IEEE 802 networks. – It forms the upper half of the Data Link Layer while Medium Access Control (MAC) forms the bottom half. The Network Layer passes its packets to the Data Link Layer using the LLC access primitives. – The LLC adds its own header containing sequence numbers and piggy-backed acknowledgement numbers. – The resulting structure is then passed to the MAC. IEEE 802.2: Logical Link Control The LLC offers three types of service to the Network Layer: – Unreliable datagram service - this type of connectionless service does not bother with acknowledgements. It is mainly used for sending status information. – Acknowledge datagram service - still connectionless but this time packets are acknowledge and retransmitted if they are corrupted or go missing. – Reliable connection-oriented service - packets are passed up to the Network Layer in the order they were transmitted. Packets are acknowledge and are retransmitted if they are corrupted or go missing. LLC is based on an older protocol called High-level Data Link Control (HDLC) Medium Access Control IEEE 802.3, 802.4 and 802.5 describes the Medium Access Control (MAC) for CSMA/CD Bus, Token Bus and Token Ring LANs respectively. The roles MAC sub-layer are to determine when a frame can be transmitted, transmit the frame and to extract incoming frames from the bit stream (presented to it by the Physical Layer). The MAC sub-layer is particularly important in broadcast networks. This is because the MAC layer deals with the problem of contention (i.e. the situation when two hosts want to transmit at the same time). Multiple Access (MA) To help us understand the sort of problems MAC may have to deal with, imagine a bus topology that uses a single cable to connect multiple hosts. Communication Link If any host is allowed to transmit data over this cable then there is a multiple access (MA) channel between the hosts. Such a network is actually viable. Each host can send a frame at any time and, as long as the network is not being used by another host, the destination host can receive it. Carrier Sense, Multiple Access (CSMA) With just Multiple Access, we can make a cheap and simple Communication Link network. However, if a host transmits a frame while another host is transmitting then both frames will be garbled. This is known as a collision. We can improve the performance of our simple network greatly if we introduce carrier sensing (CS). With carrier sensing, each host listens to the data being transmitted over the cable. – A host will only transmit its own frames when it cannot hear any data being transmitted by other hosts. – When a frame finishes, an interframe gap of about 9.6sec is allowed to pass before another host starts transmitting its frame. Collision Detection (CD) Now and again two hosts will attempt to transmit a frame at exactly the same time. Even carrier sensing will not help in this case because both hosts will already be transmitting before they hear the other host’s data. – This happens more often than you would think. There is a small time lag as data propagates along the cable. This means there is a realistic window of opportunity for both hosts to start transmitting without detecting the other. Both frames will, of course, be garbled. The best thing to do is for both hosts to abandon the transmission of their frames and to try again later. – This is done by getting the hosts to listen to the data on the cable and comparing it to the data they are transmitting. If they are different then a collision must have occurred! Collision Detection (CD) To ensure that the other hosts knows a collision has occurred as soon as possible, the first host to detect a collision will transmit a 48-bit burst of random data called a jam sequence. – This is just to make doubly sure that any hosts currently transmitting know to abandon their transmissions. After a suitable interval (the time it takes for the jam sequence to propagate along the whole network plus the interframe gap) the hosts can attempt to retransmit their frames. – But hang on! If the collision was due to two hosts transmitting at exactly the same time, what is to stop them from transmitting at the same time again and again? Binary Exponential Back-off Algorithm Rather than having two hosts (or occasionally more) attempting to retransmit their frames immediately after the interval, they wait for a random period of time. – It is unlikely that both hosts will wait for exactly the same time period and so a stalemate situation can be avoided. After the first collision, a host will typically wait 0 or 1 time units (usually 1 unit = 51.2sec). If a collision occurs again, it will wait 0,1,2 or 3 time units. – And so on. After n collisions a host will randomly choose to wait between 0 and 2n-1 time units. – After 10 successive collisions, a host will typically give up and report to its user than it cannot transmit the data. IEEE 802.3: CSMA/CD Bus LAN The 802.3 standard describes the operation of the MAC sub-layer in a bus LAN that uses carrier sense, multiple access with collision detection (CSMA/CD). – Beside carrier sensing, collision detection and the binary exponential back-off algorithm, the standard also describes the format of the frames and the type of encoding used for transmitting frames. – The minimum length of frames can be varied from network to network. This is important because, depending on the size of the network, the frames must be of a suitable minimum length. – The standard also makes some suggestions about the type of cabling that should be used for CSMA/CD bus LANs. The CSMA/CD Bus LAN is also called Ethernet. IEEE 802.3: Cable Types There are four types of cable use for CSMA/CD bus LANs. The most common are 10Base2 (a.k.a. thin Ethernet) and 10Base-T (a.k.a. category 5 UTP). (a) 10Base5 (b) 10Base2 (c) 10Base-T SEG. NODES/ NAME CABLE LENGTH SEG. CONNECTORS ADVANTAGES 10Base5 thick coaxial 500m 100 vampire taps Good backbone 10Base2 thin coaxial 200m 30 BNC (T-junc) Cheap 10Base-T twisted pair 100m 1024 telephone like Easy maintenance 10Base-F fibre optic 2000m 1024 expensive Low noise IEEE 802.3: Frame Format Regardless of the type of cable used in the CSMA/CD Bus LAN, the format of the frame generated by the MAC sub-layer is the same. Bytes: 7 1 2 or 6 2 or 6 2 0-1500 0-46 4 Preamble Destination Source Data Data Pad Checksum address address Length SOF Delimiter – Frames are transmitted using Manchester Encoding. – The preamble contains the pattern 10101010… (a square wave) lasting for 5.6sec. When a network card hears that pattern, it gets ready to listen to the address information. – The Start Of Frame (SOF) byte has the pattern 10101011 (continuing the square wave until the last bit). This change indicates that the destination address follows. IEEE 802.3: MAC Addresses Every network card in the world has a unique 46- bit serial number called a MAC address. The IEEE allocates these numbers to network card manufacturers who encode them into the firmware of their cards. – The destination and source address fields of the MAC frame have 48 bits set aside (the standard also allows for 16-bit addresses but these are rarely used). – The most significant bit is set to 0 to indicate an ordinary address and 1 to indicate a group address (this is for multicasting, which means that frames are sent to several hosts). If all 48 bits are set to 1 then frames are broadcast to all the hosts. – If the two most significant bits are both zero then the 46 least significant bits contain the MAC addresses of the source and destination hosts. IEEE 802.3: The Other Frame Fields Bytes: 7 1 2 or 6 2 or 6 2 0-1500 0-46 4 Preamble S Destination Source Data Data Pad Checksum O F address address Length The data length field contains the number of bytes of data (up to a maximum of 1500 bytes). The data field contains the LLC data structure, which in turn contains the Network Layer packet. If the data field is less that an appropriate minimum length (usually 46 bytes but this can be changed if necessary) then the pad field is filled will extra bytes to ensure the frame is long enough. The checksum field (a 32-bit cyclic redundancy code) is tagged onto the end of the frame so that the receiving host can check it for errors. IEEE 802.3: Minimum Frame Length When a host transmits a frame, there is a small chance that a collision will occur. The first host to detect a collision transmits a 48-bit jam sequence. To ensure that any hosts involved with the collision realise that the jam sequence is associate with their frame, they must still be transmitting when the jam sequence arrives. This means that the frame must be of a minimum length. The worse case scenario is if the two hosts are at far ends of the cable. If host A’s frame is just reaching host B when it begins transmitting, host B will detect the collision first and send a jam signal back to host A. IEEE 802.3: Minimum Frame Length The longest time between starting to transmit a frame and receiving the first bit of a jam sequence is twice the propagation delay from one end of the cable to the other. A Packet starts at B A Packet at time tp- B (a) time 0 (b) Collision occurs Jam sequence gets A at time tp B A back to A at 2tp B (c) (d) Jam sequence Jam sequence This means that a frame must have enough bits to last twice the propagation delay. – The 802.3 CSMA/CD Bus LAN transmits data at the standard rate of r = 10Mbps. – The speed of signal propagation is about v = 2108m/s. IEEE 802.3: Minimum Frame Length In order to calculate the minimum frame length, we must first work out the propagation delay from one end of the cable to the other. – Say the cable is d = 400m long. – The propagation delay time tp = dv. In our example tp = 400 (2108) = 2 10-6 or 2sec. – The round-trip propagation delay is, of course, twice this. Thus the round trip delay is 2tp = 4sec. – With a data rate of r = 10Mbps, each bit has duration tb = 1/r = 1 / 10,000,000 = 0.1sec. – The number of bits we can fit into a round-trip propagation delay is 2tp tb = 4 0.1 = 40 bits. – The minimum frame length is thus 40 bits (5 bytes). A margin of error is usually added to this (often to make it a power of 2) so we might use 64 bits (8 bytes). IEEE 802.3: Minimum Frame Length The standard frame length is at least 512 bits (64 bytes) long, which is much longer than our minimum requirement of 64 bits (8 bytes). – We only have to start worrying when the LAN reaches lengths of more than 2.5km. 802.3 CSMA/CD bus LANs longer than 500m are usually composed of multiple segments joined by in- line passive repeaters, which output on one cable the signals received on another cable. – When we work out the minimum frame length for these longer LANs, we also have to take the delays caused by the passive repeaters (about 2.5sec each) into account as well. IEEE 802.3: Non-Deterministic The 802.3 CSMA/CD bus LAN is said to be a non-deterministic network. This means that no host is guaranteed to be able to send its frame within a reasonable time (just a good probability of doing so). – When the network is busy, the number of collisions rises dramatically and it may become very difficult for any hosts to transmit their frames. A real-time computing application (such as an assembly line) will demand that data is transmitted within a specified time period. – Since the 802.3 bus LAN cannot guarantee this, its use for real-time applications may not only be undesirable but potentially dangerous in some situations. 802.4 - Standard for Token Buses The IEEE 802.4 standard describes the operation of token buses. Unlike CSMA/CD, token buses have a guaranteed response time. Designed for use on factory floors, token buses are designed to be robust and reliable. The token bus uses a common media for sending frames (just like that used in CSMA/CD). Tokens Unlike CSMA/CD, each host must have permission before it can send a frame. Permission is given in the form of a token (a special packet that is sent to the host). There is only ever one token on the network, which is passed from host to host. The 802.4 frame The 802.4 frame is slightly different from that used by the 802.3 specification. Even the modulation is different - there are an extra three signals other than those that represent 0, 1 and idle. These signals are used to indicate the start and ends of frames. Frame Fields Preamble lengths are different and there is no data length field. The 802.4 frame includes a frame control field that specifies the type of frame being sent. There are frames for sending data, passing tokens and management frames. The source address, destination address and checksum (CRC) fields are the same as in the 802.3 standard. 802.5 - Standard for Token Rings The IEEE 802.5 standard describes the operation of token rings. Like token buses, these have a guaranteed response time depending on network size. Structure of Token Ring Unlike bus networks and token buses, token rings do not use a single media. Instead, each ring interface (NIU) is connected to the next by a separate link. The links are arranged in a circle. Each ring interface has a 1-bit buffer (which introduces a 1-bit delay). The interface can either store-and-forward the bit or send a different bit. The Token In a token ring, the token is a special bit pattern that circulates around the ring. There can be only one token so only one host can transmit when it has the token. The bits propagate around the ring until a host decides it wants to send and removes the token from the network. – Removing the token is done by inverting just one bit in the token to turn it into a frame header. Sending Data Once a host has the token, it can transmit a frame. In fact it can transmit several frames so long as it can do so within the token-holding time (10msec). The frame propagates around the token ring where it is seen by the destination ring interface, which gives a copy of it to the destination host. The frame propagates around the whole token ring and is removed by the sending host. Acknowledgements Acknowledgements are sent back by modifying bits in the frame status field. If left unmodified, the sender knows that the destination host never received the frame (in which case the sender will retransmit). When the last frame has been sent, the transmitting host reconstructs the token and then the next host can take it. The 802.5 Token/Frame The token is made of 3 fields: SD,AC,ED. The SD field indicates the start of a frame. The ED field indicates the end of a frame. The AC field contains a number of flags. The frame also starts SD,AC, … The 802.5 Frame The frame uses the FC field to distinguish a data frame from other management frames (e.g. for electing a new monitor station if the existing one fails). The destination and source address fields are the same as in 802.3 and 802.4 frames. There is no limit to the amount of data sent as long as it is within the token-holding time. The checksum is a 32-bit CRC. The Frame Status Field The frame status field is used for acknowledgements. There are two flags in this field, called A and C, which are set to A=0 and C=0 when the frame is transmitted. The receiving station can change these bits. When read by the sender, they mean: – A=0, C=0: destination not found – A=1, C=0: frame not acknowledged (=NAK) – A=1, C=1: frame acknowledged (=ACK) The Access Control Field The access control field of the frame contains flags for indicating priorities, differentiating between tokens and data frames, and a monitor bit. P P P T M R R R When T is 1, it indicates that the frame is a token. When it is 0, it is a data frame. The Monitor Bit of the Access Control Field The monitor bit M is used to mark frames as having passed the monitor station. One station on the network is nominated as the monitor when the network is switched on. Any frame passing through the monitor is marked. If a frame passes through the monitor a second time, it is deleted. The Priority Bits The 802.5 standard allows 8 levels of priority (0 being the lowest and 7 being the highest) as indicated in the PPP bits. A host with an equal or higher priority than the token may capture the token. A host may also attempt to reserve a token by setting the RRR bits of a passing frame to its priority. This will then be copied to the new token’s PPP bits. Benefits of Token Rings Unlike CSMA/CD, the efficiency of token rings is actually at its best when the network is being used most heavily. A token ring can be more difficult to maintain and expand than a bus network or a token bus network but it is no less reliable than a token bus and, in heavy usage environment, much better than a bus network. 802.2 - Logical Link Control It is useful to hide the differences between networks by using a common protocol for controlling them. This is what the Logical Link Control does (its like an interface used by hosts for talking to the network regardless of type). The IEEE 802.2 standard describes Logical Link Control for all 802.x networks. Logical Link Control (LLC) Basically, the network layer hands packets to the LLC (upper part of data link layer). The LLC adds some control data to the packet and passes it to the data link layer proper. The data link layer encapsulates the packets inside data frames that are then transmitted on the network. LLC service options The LLC can operate in several different modes: – unreliable datagram service is useful for transmitting video and voice signals. There are no acknowledgements and no sequence numbers. – acknowledged datagram service includes acknowledgements and sequence numbers. – connection-oriented service provides an apparently reliable error-free connection. Some Jargon A Bridge is a connection that links two similar LANs. Packets not meant for the current LAN are passed to the bridge and sent on to the other LAN. A Router connects several similar networks and uses the destination address to decide which network the packet should be sent to. A Gateway connects dissimilar networks and performs protocol conversions on packets. Revisiting the OSI Model The ISO (International Standards Organization) have devised a reference model for computer networks. Such a model is meant to help network designers design networks and protocols. The model is called the OSI (Open Systems Interconnection) reference model. It has 7 layers with distinct functions. The OSI Reference Model Host A Host B Sends data in form of: Application Layer Application Layer APDU Presentation layer Presentation layer PPDU Session Layer Session Layer SPDU Transport Layer Transport Layer TPDU Router Network Layer Network Layer Network Layer Packet Data Link Layer Data Link Layer Data Link Layer Frame Physical Layer Bit We imagine that each layer is the servant of the layer above it. Data and instructions are passed down through the layers until the data is physically transmitted by the physical layer. The data is then passed up through the layers of the destination. Peer-to-peer Communication We imagine that each layer in the transmitting host is talking directly to the equivalent layer (or peer) in the receiving host. It is normal to say things like ‘I was talking to Fred on the phone’. In fact, it was the telephone I was talking to, not Fred! Fred is my peer (another person) but my voice was processed by the telephone and then sent via the telephone network. The Layers The physical layer transmits raw bits over a communication channel. The data link layer uses link flow control and error correction to make the link appear free of errors. The network layer controls the local sub-net and decides on which direction packets should be routed. The Layers The transport layer turns the packet based communication into a stream of data. It deals with assembly of packets and the disassembly of message into packets. It also contains end-to-end flow control. The session layer establishes and maintains a logical connection between sender and receiver. The Layers The presentation layer can perform various functions. Typically it might convert ASCII characters into UNICODE characters. The application layer represents the programs that use network communication such as FTP,TELNET, Web Browsers etc... The TCP/IP Reference Model Not every network is based on the OSI reference model. Many systems are based on the TCP/IP model. Host A Host B Application Layer Application Layer Transport Layer Transport Layer Router Network Layer Network Layer Network Layer Data Link Layer Data Link Layer Data Link Layer Physical Layer TCP stands for Transmission Control Protocol and IP stands for Internet Protocol. How TCP/IP differs from OSI TCP/IP has 5 layers rather than 7 (actually it traditionally has 4 layers, the data link layer and physical layer being combined in the Host-to-network layer). There are no session or presentation layers (their roles being performed by the application layer if necessary). The TCP/IP Layers The TCP/IP layers that exist are essentially the same as those in the OSI reference model. The host-to-network layer is responsible for sending bits across the network and for link error control and link flow control (i.e. data link layer and physical layer combined). The Internet layer switches packets around the network and places packets on (or removes them from) the network using a packet format called IP (Internet Protocol). Finally….The TCP/IP Layers The transport layer accepts data (and instructions) from the application layer and breaks the data up into packets. It also reassembles received packets into data. It is also responsible for end-to-end flow control. The application layer contains all the higher level protocols such as TELNET, FTP, SMTP (email) etc... that are used by applications.
Pages to are hidden for
"Standard LAN Protocols - PowerPoint"Please download to view full document