[PDF] Data link Layer:- Framing Types:- To provide service




Loading...







[PDF] The Data Link Layer

1) Character count: • This framing method uses a field in the header to specify the number of characters in the frame

[PDF] 3 The Data link layer

Computer and Data Networks, 3 Date Link Layer Framing – Character count (b) Four examples of byte sequences before and after stuffing

[PDF] Data link Layer:- Framing Types:- To provide service

Computer Communication Networks Lecture No 6 Computer Network Lectures 1- Data link Layer:- For example, if the character count of 5 in the second

[PDF] 80519 Computer Networks Lab - MREC Academics Login

24 jui 2021 · 1 Implementing the data link layer framing methods i Character count 2 Character Stuffing and destuffing 3 Bit Stuffing 

[PDF] unit-iii computer networks: datalink layer - BDU OMS

When the data link layer at the destination sees the character count, it knows how many characters follow and hence where the end of the frame is This 

[PDF] UNIT – III

To provide service to the network layer, the data link layer must use the service example, if the character count of 5 in the second frame of Fig

[PDF] Data Link Layer (Marks 5) Computer Network BSc 6th Semester Sub

The trouble with this algorithm is that the count can be garbled by a transmission error For example, if the character count of 5 in the second frame of fig (b) 

[PDF] CSE 123 Computer Networks

If ETX appears in the data introduce a special character DLE (Data No bit or byte stuffing ? Example: ? Synchronous Optical Network (SONET)

[PDF] Computer Networks - Data Link Layer - Framing and Switching

23 nov 2021 · Include the character count in the header of the frame Example: the byte-oriented Digital Data Communications

[PDF] Chapter 5: Data Link Layer - Bhargavi Goswami

Character count with some other mechanisms 4 Physical Layer Coding Violation A Flag Byte or Byte Stuffing: Examples ® “To stop input please enter X and 

[PDF] Data link Layer:- Framing Types:- To provide service 43798_3Computer_Communication___Networks_6.pdf

Computer Communication Networks

Lecture No. 6

Computer Network Lectures

1- Data link Layer:-

Framing Types:-

To provide service to the network layer, the data link layer must use the service provided to it by the physical layer. What the physical layer does is accept a raw bit stream and attempt to deliver it to the destination. This bit stream is not guaranteed to be error free. The number of bits received may be less than, equal to, or more than the number of bits transmitted, and they may have different values. It is up to the data link layer to detect and, if necessary, correct errors. The usual approach is for the data link layer to break the bit stream up into discrete frames and compute the checksum for each frame. Breaking the bit stream up into frames is more difficult than it at first appears. One way to achieve this framing is to insert time gaps between frames, much like the spaces between words in ordinary text. However, networks rarely make any guarantees about timing, so it is possible these gaps might be squeezed out or other gaps might be inserted during transmission. Since it is too risky to count on timing to mark the start and end of each frame, other methods have been devised. In this section we will look at four methods:

1. Character count.

2. Flag bytes with byte stuffing.

3. Starting and ending flags, with bit stuffing.

4. Physical layer coding violations.

The first framing method uses a field in the header to specify the number of characters in the frame. When the data link layer at the destination sees the character count, it knows how many characters follow and hence where the end of the frame is. This technique is shown in Fig. 3-4(a) for four frames of sizes 5, 5, 8, and 8 characters, respectively. The trouble with this algorithm is that the count can be garbled by a transmission error. For example, if the character count of 5 in the second frame of Fig. 3-4(b) becomes a 7, the destination will get out of synchronization and will be unable to locate the start of the next frame. Even if the checksum is incorrect so the destination knows that the frame is bad, it still has no way of telling where the next frame starts. Sending a frame back to the source asking for a retransmission does not help either, since the destination does not know how many characters to skip over to get to the start of the retransmission. For this reason, the character count method is rarely used anymore. The second framing method gets around the problem of resynchronization after an error by having each frame start and end with special bytes. In the past, the starting and ending bytes were different, but in recent years most protocols have used the same byte, called a flag byte, as both the starting and ending delimiter, as shown in Fig. 3-5(a) as FLAG. In this way, if the receiver ever loses synchronization, it can just search for the flag byte to find the end of the current frame. Two consecutive flag bytes indicate the end of one frame and start of the next one. A serious problem occurs with this method when binary data, such as object programs or floating-point numbers, are being transmitted. It may easily happen that the flag byte's bit pattern occurs in the data. This situation will usually interfere with the framing. One way to solve this problem is to have the sender's data link layer insert a special escape byte (ESC) just before each ''accidental'' flag byte in the data. The data link layer on the receiving end removes the escape byte before the data are given to the network layer. This technique is called byte stuffing or character stuffing. Thus, a framing flag byte can be distinguished from one in the data by the absence or presence of an escape byte before it. Of course, the next question is: What happens if an escape byte occurs in the middle of the data? The answer is that it, too, is stuffed with an escape byte. Thus, any single escape byte is part of an escape sequence, whereas a doubled one indicates that a single escape occurred naturally in the data. Some examples are shown in Fig. 3- 5(b). In all cases, the byte sequence delivered after de-stuffing is exactly the same as the original byte sequence. A major disadvantage of using this framing method is that it is closely tied to the use of 8-bit characters. Not all character codes use 8-bit characters. For example. UNICODE uses 16-bit characters, As networks developed, the disadvantages of embedding the character code length in the framing mechanism became more and more obvious, so a new technique had to be developed to allow arbitrary sized characters. The new technique allows data frames to contain an arbitrary number of bits and allows character codes with an arbitrary number of bits per character. It works like this. Each frame begins and ends with a special bit pattern, 01111110 (in fact, a flag byte). Whenever the sender's data link layer encounters five consecutive 1s in the data, it automatically stuffs a 0 bit into the outgoing bit stream. This bit stuffing is analogous to byte stuffing, in which an escape byte is stuffed into the outgoing character stream before a flag byte in the data. When the receiver sees five consecutive incoming 1 bits, followed by a 0 bit, it automatically de-stuffs (i.e., deletes) the 0 bit. Just as byte stuffing is completely transparent to the network layer in both computers, so is bit stuffing. If the user data contain the flag pattern, 01111110, this flag is transmitted as 011111010 but stored in the receiver's memory as

01111110. Figure 3-6 gives an example of bit stuffing.

if the receiver loses track of where it is, all it has to do is scan the input for flag sequences, since they can only occur at frame boundaries and never within the data. The last method of framing is only applicable to networks in which the encoding on the physical medium contains some redundancy. For example, some LANs encode 1 bit of data by using 2 physical bits. Normally, a 1 bit is a high-low pair and a 0 bit is a low-high pair. The scheme means that every data bit has a transition in the middle, making it easy for the receiver to locate the bit boundaries.

2-Network Layer (L3):

The network layer is concerned with getting packets from the source all the way to the destination. Getting to the destination may require making many hops at intermediate routers along the way. This function clearly contrasts with that of the data link layer, which has the more modest goal of just moving frames from one end of a wire to the other. Thus, the network layer is the lowest layer that deals with end-to-end transmission. The network layer provides services to the transport layer at the network layer/transport layer interface.

2-1 Services classes: Two classes of service the network layer can

provide to its users, it is time to see how this layer works inside. Two different organizations are possible, depending on the type of service offered. If connectionless service is offered, packets are injected into the subnet individually and routed independently of each other. No advance setup is needed. In this context, the packets are frequently called datagrams (in analogy with telegrams) and the subnet is called a datagram subnet. If connection-oriented service is used, a path from the source router to the destination router must be established before any data packets can be sent. This connection is called a VC (virtual circuit), in analogy with the physical circuits set up by the telephone system, and the subnet is called a virtual-circuit subnet. In this section we will examine datagram subnets; in the next one we will examine virtual-circuit subnets. Let us now see how a datagram subnet works. Suppose that the process P1 in Fig. D1 has a long message for P2. It hands the message to the transport layer with instructions to deliver it to process P2 on host H2. The transport layer code runs on H1, typically within the operating system. It prepends a transport header to the front of the message and hands the result to the network layer, probably just another procedure within the operating system. Let us assume that the message is four times longer than the maximum packet size, so the network layer has to break it into four packets, 1, 2, 3, and 4 and sends each of them in turn to router A using some point-to- point protocol (ppp) . At this point the carrier takes over. Every router has an internal table telling it where to send packets for each possible destination.

Fig D1

Each table entry is a pair consisting of a destination and the outgoing line to use for that destination. Only directly-connected lines can be used. For example, in Fig. D1, A has only two outgoing linesto B and Cso every incoming packet must be sent to one of these routers, even if the ultimate destination is some other router. A's initial routing table is shown in the figure under the label ''initially.'' As they arrived at A, packets 1, 2, and 3 were stored briefly (to verify their checksums). Then each was forwarded to C according to A's table. Packet 1 was then forwarded to E and then to F. When it got to F, it was encapsulated in a data link layer frame and sent to H2 over the LAN. Packets 2 and 3 follow the same route. However, something different happened to packet 4. When it got to A it was sent to router B, even though it is also destined for F. For some reason, A decided to send packet 4 via a different route than that of the first three. Perhaps it learned of a traffic jam somewhere along the ACE path and updated its routing table, as shown under the label ''later.'' The algorithm that manages the tables and makes the routing decisions is called the routing algorithm.

2-2 Routing Algorithms:

The routing algorithm is that part of the network layer software responsible for deciding which output line an incoming packet should be transmitted on. If the subnet uses datagrams internally, this decision must be made anew for every arriving data packet since the best route may have changed since last time. If the subnet uses virtual circuits internally, routing decisions are made only when a new virtual circuit is being set up.

2-2-1 Types of routing algorithms

There are three classes of routing algorithms:

Flooding In flooding, every possible path between the source and the destination station are exercised. Each node, upon receiving a packet, forwards copies of it to all its neighboring nodes (except the one from which it received the packet). Flooding is a highly robust technique since it offers the best chance of at least one packet copy reaching the destination. Its major disadvantage, however, is that it quickly congests the network. Static Routing In static routing, a fixed routing directory is used to guide the selection of a route which remains unchanged for the duration of the connection. The directory consists of a table which for each node pair (p,q) in the network suggests a partial path by nominating the first intermediate node, r, along the path. This should be WRU
Politique de confidentialité -Privacy policy